Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
95a34de3
Commit
95a34de3
authored
Feb 13, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.5-薪资导入优化
parent
b42cb475
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
39 deletions
+48
-39
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+48
-39
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
95a34de3
...
...
@@ -135,7 +135,7 @@ public class SalaryAccountUtil implements Serializable {
// 连接查询的数据集合
List
<
TSalaryEmployee
>
updateEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
checkBankInfoEmpList
=
new
ArrayList
<>();
Map
<
Integer
,
TSalaryEmployee
>
newEmpMap
=
new
HashMap
<>();
List
<
TSalaryEmployee
>
newEmpList
=
new
ArrayList
<>();
Map
<
String
,
TSalaryAccountVo
>
entityMap
=
new
HashMap
<>();
List
<
String
>
otherIdCard
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
rows
;
i
++)
{
...
...
@@ -396,7 +396,7 @@ public class SalaryAccountUtil implements Serializable {
emp
.
setLineNums
(
i
);
}
}
else
if
(
emp
==
null
)
{
newEmp
Map
.
put
((
i
+
2
),
newEmp
);
newEmp
List
.
add
(
newEmp
);
entityMap
.
put
(
newEmp
.
getEmpIdcard
(),
entity
);
otherIdCard
.
add
(
newEmp
.
getEmpIdcard
());
}
...
...
@@ -461,25 +461,29 @@ public class SalaryAccountUtil implements Serializable {
TSalaryEmployee
otherEmp
;
List
<
TSalaryEmployee
>
saveNewEmpList
=
new
ArrayList
<>();
List
<
String
>
checkTaxMonthList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Integer
,
TSalaryEmployee
>
newEmps
:
newEmpMap
.
entrySet
())
{
entity
=
entityMap
.
get
(
newEmps
.
getValue
().
getEmpIdcard
());
if
(!
newEmpList
.
isEmpty
())
{
TSalaryEmployee
newEmps
;
for
(
int
i
=
0
;
i
<
newEmpList
.
size
();
i
++)
{
newEmps
=
newEmpList
.
get
(
i
);
entity
=
entityMap
.
get
(
newEmps
.
getEmpIdcard
());
// 先按照身份证查询
otherEmp
=
otherEmpMap
.
get
(
newEmps
.
getValue
()
.
getEmpIdcard
());
otherEmp
=
otherEmpMap
.
get
(
newEmps
.
getEmpIdcard
());
if
(
otherEmp
==
null
)
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
()))
{
this
.
setNewEmpBase
(
newEmps
.
getValue
(),
newEmps
.
getKey
()
-
2
,
errorList
,
notLabour
if
(!
this
.
setNewEmpBase
(
newEmps
,
newEmps
.
getLineNums
()
,
errorList
,
notLabour
,
entity
,
salaryType
,
dept
,
user
,
entity
.
getSalaryStyle
()
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
()),
invoiceTitle
);
saveNewEmpList
.
add
(
newEmps
.
getValue
());
checkTaxMonthList
.
add
(
newEmps
.
getValue
().
getEmpIdcard
());
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
()),
invoiceTitle
))
{
continue
;
}
saveNewEmpList
.
add
(
newEmps
);
checkTaxMonthList
.
add
(
newEmps
.
getEmpIdcard
());
}
else
{
if
(
"4"
.
equals
(
salaryType
))
{
error
=
"第"
+
newEmps
.
getKey
(
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getKey
()
,
error
));
error
=
"第"
+
(
newEmps
.
getLineNums
()
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getLineNums
()
+
2
,
error
));
}
else
if
(
notLabour
)
{
error
=
"第"
+
newEmps
.
getKey
(
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getKey
()
,
error
));
error
=
"第"
+
(
newEmps
.
getLineNums
()
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getLineNums
()
+
2
,
error
));
}
}
}
else
{
...
...
@@ -489,14 +493,18 @@ public class SalaryAccountUtil implements Serializable {
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
())
,
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
())
,
otherEmp
.
getEmpName
(),
entity
.
getSalaryStyle
()
,
nowMonth
,
updateEmpList
,
checkBankInfoEmpList
,
newEmps
.
getKey
()
-
2
))
return
;
,
nowMonth
,
updateEmpList
,
checkBankInfoEmpList
,
newEmps
.
getLineNums
()))
return
;
}
}
}
int
nowYear
=
Integer
.
parseInt
(
nowMonth
.
substring
(
0
,
4
));
Map
<
String
,
String
>
minTaxMonthMap
=
tSalaryAccountService
.
getMinTaxMonthByNowYearAndList
(
checkTaxMonthList
,
nowYear
);
String
minTaxMonth
;
boolean
canSave
=
true
;
for
(
TSalaryEmployee
saveNewEmp
:
saveNewEmpList
)
{
if
(!
saveNewEmpList
.
isEmpty
())
{
TSalaryEmployee
saveNewEmp
;
for
(
int
i
=
0
;
i
<
saveNewEmpList
.
size
();
i
++)
{
saveNewEmp
=
saveNewEmpList
.
get
(
i
);
// 新员工校验计税月
if
(!
"3"
.
equals
(
salaryType
)
&&
!
"4"
.
equals
(
salaryType
))
{
entity
=
entityMap
.
get
(
saveNewEmp
.
getEmpIdcard
());
...
...
@@ -509,6 +517,7 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
}
if
(
canSave
)
{
// 新增
tSalaryEmployeeService
.
saveNewEmployeeList
(
saveNewEmpList
,
errorList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment