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
Hide 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 {
...
@@ -135,7 +135,7 @@ public class SalaryAccountUtil implements Serializable {
// 连接查询的数据集合
// 连接查询的数据集合
List
<
TSalaryEmployee
>
updateEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
updateEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
checkBankInfoEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
checkBankInfoEmpList
=
new
ArrayList
<>();
Map
<
Integer
,
TSalaryEmployee
>
newEmpMap
=
new
HashMap
<>();
List
<
TSalaryEmployee
>
newEmpList
=
new
ArrayList
<>();
Map
<
String
,
TSalaryAccountVo
>
entityMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryAccountVo
>
entityMap
=
new
HashMap
<>();
List
<
String
>
otherIdCard
=
new
ArrayList
<>();
List
<
String
>
otherIdCard
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
rows
;
i
++)
{
for
(
int
i
=
0
;
i
<
rows
;
i
++)
{
...
@@ -396,7 +396,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -396,7 +396,7 @@ public class SalaryAccountUtil implements Serializable {
emp
.
setLineNums
(
i
);
emp
.
setLineNums
(
i
);
}
}
}
else
if
(
emp
==
null
)
{
}
else
if
(
emp
==
null
)
{
newEmp
Map
.
put
((
i
+
2
),
newEmp
);
newEmp
List
.
add
(
newEmp
);
entityMap
.
put
(
newEmp
.
getEmpIdcard
(),
entity
);
entityMap
.
put
(
newEmp
.
getEmpIdcard
(),
entity
);
otherIdCard
.
add
(
newEmp
.
getEmpIdcard
());
otherIdCard
.
add
(
newEmp
.
getEmpIdcard
());
}
}
...
@@ -461,51 +461,60 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -461,51 +461,60 @@ public class SalaryAccountUtil implements Serializable {
TSalaryEmployee
otherEmp
;
TSalaryEmployee
otherEmp
;
List
<
TSalaryEmployee
>
saveNewEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
saveNewEmpList
=
new
ArrayList
<>();
List
<
String
>
checkTaxMonthList
=
new
ArrayList
<>();
List
<
String
>
checkTaxMonthList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Integer
,
TSalaryEmployee
>
newEmps
:
newEmpMap
.
entrySet
())
{
if
(!
newEmpList
.
isEmpty
())
{
TSalaryEmployee
newEmps
;
entity
=
entityMap
.
get
(
newEmps
.
getValue
().
getEmpIdcard
());
for
(
int
i
=
0
;
i
<
newEmpList
.
size
();
i
++)
{
// 先按照身份证查询
newEmps
=
newEmpList
.
get
(
i
);
otherEmp
=
otherEmpMap
.
get
(
newEmps
.
getValue
().
getEmpIdcard
());
entity
=
entityMap
.
get
(
newEmps
.
getEmpIdcard
());
if
(
otherEmp
==
null
)
{
// 先按照身份证查询
if
(
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
()))
{
otherEmp
=
otherEmpMap
.
get
(
newEmps
.
getEmpIdcard
());
this
.
setNewEmpBase
(
newEmps
.
getValue
(),
newEmps
.
getKey
()
-
2
,
errorList
,
notLabour
if
(
otherEmp
==
null
)
{
,
entity
,
salaryType
,
dept
,
user
,
entity
.
getSalaryStyle
()
if
(
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
()))
{
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
()),
invoiceTitle
);
if
(!
this
.
setNewEmpBase
(
newEmps
,
newEmps
.
getLineNums
(),
errorList
,
notLabour
saveNewEmpList
.
add
(
newEmps
.
getValue
());
,
entity
,
salaryType
,
dept
,
user
,
entity
.
getSalaryStyle
()
checkTaxMonthList
.
add
(
newEmps
.
getValue
().
getEmpIdcard
());
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
()),
invoiceTitle
))
{
}
else
{
continue
;
if
(
"4"
.
equals
(
salaryType
))
{
}
error
=
"第"
+
newEmps
.
getKey
()
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
saveNewEmpList
.
add
(
newEmps
);
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getKey
(),
error
));
checkTaxMonthList
.
add
(
newEmps
.
getEmpIdcard
());
}
else
if
(
notLabour
)
{
}
else
{
error
=
"第"
+
newEmps
.
getKey
()
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
if
(
"4"
.
equals
(
salaryType
))
{
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getKey
(),
error
));
error
=
"第"
+
(
newEmps
.
getLineNums
()
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getLineNums
()
+
2
,
error
));
}
else
if
(
notLabour
)
{
error
=
"第"
+
(
newEmps
.
getLineNums
()
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
errorList
.
add
(
new
ErrorMessage
(
newEmps
.
getLineNums
()
+
2
,
error
));
}
}
}
}
else
{
// 使用emp信息
if
(
setEntityByEmpInfo
(
dept
,
ownEmployeeMap
,
ownDeptMap
,
salaryType
,
isIssue
,
errorList
,
entity
,
otherEmp
,
entity
.
getSaiList
()
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
())
,
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
())
,
otherEmp
.
getEmpName
(),
entity
.
getSalaryStyle
()
,
nowMonth
,
updateEmpList
,
checkBankInfoEmpList
,
newEmps
.
getLineNums
()))
return
;
}
}
}
else
{
// 使用emp信息
if
(
setEntityByEmpInfo
(
dept
,
ownEmployeeMap
,
ownDeptMap
,
salaryType
,
isIssue
,
errorList
,
entity
,
otherEmp
,
entity
.
getSaiList
()
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
())
,
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
())
,
otherEmp
.
getEmpName
(),
entity
.
getSalaryStyle
()
,
nowMonth
,
updateEmpList
,
checkBankInfoEmpList
,
newEmps
.
getKey
()
-
2
))
return
;
}
}
}
}
int
nowYear
=
Integer
.
parseInt
(
nowMonth
.
substring
(
0
,
4
));
int
nowYear
=
Integer
.
parseInt
(
nowMonth
.
substring
(
0
,
4
));
Map
<
String
,
String
>
minTaxMonthMap
=
tSalaryAccountService
.
getMinTaxMonthByNowYearAndList
(
checkTaxMonthList
,
nowYear
);
Map
<
String
,
String
>
minTaxMonthMap
=
tSalaryAccountService
.
getMinTaxMonthByNowYearAndList
(
checkTaxMonthList
,
nowYear
);
String
minTaxMonth
;
String
minTaxMonth
;
boolean
canSave
=
true
;
boolean
canSave
=
true
;
for
(
TSalaryEmployee
saveNewEmp
:
saveNewEmpList
)
{
if
(!
saveNewEmpList
.
isEmpty
())
{
// 新员工校验计税月
TSalaryEmployee
saveNewEmp
;
if
(!
"3"
.
equals
(
salaryType
)
&&
!
"4"
.
equals
(
salaryType
))
{
for
(
int
i
=
0
;
i
<
saveNewEmpList
.
size
();
i
++)
{
entity
=
entityMap
.
get
(
saveNewEmp
.
getEmpIdcard
());
saveNewEmp
=
saveNewEmpList
.
get
(
i
);
minTaxMonth
=
minTaxMonthMap
.
get
(
saveNewEmp
.
getEmpIdcard
());
// 新员工校验计税月
if
(
Common
.
isNotNull
(
minTaxMonth
)
if
(!
"3"
.
equals
(
salaryType
)
&&
!
"4"
.
equals
(
salaryType
))
{
&&
!
minTaxMonth
.
equals
(
entity
.
getTaxMonth
()))
{
entity
=
entityMap
.
get
(
saveNewEmp
.
getEmpIdcard
());
error
=
"第"
+
(
saveNewEmp
.
getLineNums
()
+
2
)
+
"行:该员工已有发薪记录,计税月份请填写:【"
+
minTaxMonth
+
"】"
+
",你填写了计税月:【"
+
entity
.
getTaxMonth
()
+
"】"
;
minTaxMonth
=
minTaxMonthMap
.
get
(
saveNewEmp
.
getEmpIdcard
());
errorList
.
add
(
new
ErrorMessage
((
saveNewEmp
.
getLineNums
()
+
2
),
error
));
if
(
Common
.
isNotNull
(
minTaxMonth
)
canSave
=
false
;
&&
!
minTaxMonth
.
equals
(
entity
.
getTaxMonth
()))
{
error
=
"第"
+
(
saveNewEmp
.
getLineNums
()
+
2
)
+
"行:该员工已有发薪记录,计税月份请填写:【"
+
minTaxMonth
+
"】"
+
",你填写了计税月:【"
+
entity
.
getTaxMonth
()
+
"】"
;
errorList
.
add
(
new
ErrorMessage
((
saveNewEmp
.
getLineNums
()
+
2
),
error
));
canSave
=
false
;
}
}
}
}
}
}
}
...
...
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