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
3f15142c
Commit
3f15142c
authored
Feb 10, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.5-薪资导入优化
parent
a18f1a57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
12 deletions
+44
-12
TSalaryEmployeeService.java
...d/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
+2
-0
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+33
-0
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+9
-12
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryEmployeeService.java
View file @
3f15142c
...
@@ -110,4 +110,6 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
...
@@ -110,4 +110,6 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/
**/
boolean
checkBankInfo
(
TSalaryEmployee
employee
);
boolean
checkBankInfo
(
TSalaryEmployee
employee
);
boolean
checkBankInfoList
(
List
<
TSalaryEmployee
>
empList
,
List
<
ErrorMessage
>
errorList
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
3f15142c
...
@@ -635,6 +635,39 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -635,6 +635,39 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
}
}
@Override
public
boolean
checkBankInfoList
(
List
<
TSalaryEmployee
>
empList
,
List
<
ErrorMessage
>
errorList
)
{
// 批量校验 卡号与手机号
Map
<
String
,
Boolean
>
bankMap
=
new
HashMap
<>();
List
<
TCheckBankNo
>
bankList
=
new
ArrayList
<>();
TCheckBankNo
checkBankNo
;
for
(
TSalaryEmployee
employee
:
empList
)
{
if
(
Common
.
isNotNull
(
employee
.
getBankNo
()))
{
checkBankNo
=
new
TCheckBankNo
();
checkBankNo
.
setName
(
employee
.
getEmpName
());
checkBankNo
.
setBankNo
(
employee
.
getBankNo
());
bankList
.
add
(
checkBankNo
);
}
}
if
(!
bankList
.
isEmpty
())
{
R
<
CheckBatchVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
checkProperties
.
getAppUrl
(),
checkProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNoBatch"
,
bankList
,
CheckBatchVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
bankMap
=
checkListR
.
getData
().
getCheckMap
();
}
for
(
TSalaryEmployee
employee
:
empList
)
{
employee
.
setIssueStatus
(
CommonConstants
.
ZERO_INT
);
if
(
bankMap
.
get
(
employee
.
getBankNo
())
!=
null
&&
Boolean
.
FALSE
.
equals
(
bankMap
.
get
(
employee
.
getBankNo
())))
{
errorList
.
add
(
new
ErrorMessage
((
employee
.
getLineNums
()
+
2
),
"第"
+
(
employee
.
getLineNums
()
+
2
)
+
"行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"
));
return
false
;
}
}
this
.
saveBatch
(
empList
);
}
return
true
;
}
/**
/**
* @param vo
* @param vo
* @Description: 批量更新-薪资人员信息
* @Description: 批量更新-薪资人员信息
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
3f15142c
...
@@ -134,7 +134,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -134,7 +134,7 @@ public class SalaryAccountUtil implements Serializable {
boolean
notLabour
=
!
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
);
boolean
notLabour
=
!
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
);
// 连接查询的数据集合
// 连接查询的数据集合
List
<
TSalaryEmployee
>
updateEmpList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
updateEmpList
=
new
ArrayList
<>();
Map
<
Integer
,
TSalaryEmployee
>
checkBankInfoEmpMap
=
new
HashMap
<>();
List
<
TSalaryEmployee
>
checkBankInfoEmpList
=
new
ArrayList
<>();
Map
<
Integer
,
TSalaryEmployee
>
newEmpMap
=
new
HashMap
<>();
Map
<
Integer
,
TSalaryEmployee
>
newEmpMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryAccountVo
>
entityMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryAccountVo
>
entityMap
=
new
HashMap
<>();
List
<
String
>
otherIdCard
=
new
ArrayList
<>();
List
<
String
>
otherIdCard
=
new
ArrayList
<>();
...
@@ -145,6 +145,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -145,6 +145,7 @@ public class SalaryAccountUtil implements Serializable {
entity
=
new
TSalaryAccountVo
();
entity
=
new
TSalaryAccountVo
();
emp
=
null
;
emp
=
null
;
newEmp
=
new
TSalaryEmployee
();
newEmp
=
new
TSalaryEmployee
();
newEmp
.
setLineNums
(
i
);
salaryGiveTimeFlag
=
true
;
salaryGiveTimeFlag
=
true
;
entity
.
setSalaryGiveTime
(
CommonConstants
.
ZERO_STRING
);
entity
.
setSalaryGiveTime
(
CommonConstants
.
ZERO_STRING
);
empName
=
null
;
empName
=
null
;
...
@@ -392,6 +393,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -392,6 +393,7 @@ public class SalaryAccountUtil implements Serializable {
continue
;
continue
;
}
else
{
}
else
{
emp
=
eR
.
getData
();
emp
=
eR
.
getData
();
emp
.
setLineNums
(
i
);
}
}
}
else
if
(
emp
==
null
)
{
}
else
if
(
emp
==
null
)
{
newEmpMap
.
put
((
i
+
2
),
newEmp
);
newEmpMap
.
put
((
i
+
2
),
newEmp
);
...
@@ -401,7 +403,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -401,7 +403,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
emp
!=
null
)
{
if
(
emp
!=
null
)
{
if
(
setEntityByEmpInfo
(
dept
,
ownEmployeeMap
,
ownDeptMap
,
salaryType
,
isIssue
,
errorList
if
(
setEntityByEmpInfo
(
dept
,
ownEmployeeMap
,
ownDeptMap
,
salaryType
,
isIssue
,
errorList
,
entity
,
emp
,
saiList
,
salaryGiveTimeFlag
,
isNewEmployee
,
empName
,
salaryStyle
,
entity
,
emp
,
saiList
,
salaryGiveTimeFlag
,
isNewEmployee
,
empName
,
salaryStyle
,
nowMonth
,
updateEmpList
,
checkBankInfoEmp
Map
,
i
))
,
nowMonth
,
updateEmpList
,
checkBankInfoEmp
List
,
i
))
continue
;
continue
;
}
else
if
(
"3"
.
equals
(
salaryType
)
||
"4"
.
equals
(
salaryType
))
{
}
else
if
(
"3"
.
equals
(
salaryType
)
||
"4"
.
equals
(
salaryType
))
{
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
...
@@ -448,14 +450,9 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -448,14 +450,9 @@ public class SalaryAccountUtil implements Serializable {
// 统一处理连接查询
// 统一处理连接查询
tSalaryEmployeeService
.
updateBatchById
(
updateEmpList
);
tSalaryEmployeeService
.
updateBatchById
(
updateEmpList
);
for
(
Map
.
Entry
<
Integer
,
TSalaryEmployee
>
checkBank
:
checkBankInfoEmpMap
.
entrySet
())
{
if
(!
checkBankInfoEmpList
.
isEmpty
())
{
// 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡
// 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡
boolean
bankNoIsTrue
=
tSalaryEmployeeService
.
checkBankInfo
(
checkBank
.
getValue
());
tSalaryEmployeeService
.
checkBankInfoList
(
checkBankInfoEmpList
,
errorList
);
if
(!
bankNoIsTrue
)
{
error
=
"第"
+
checkBank
.
getKey
()
+
SalaryConstants
.
LINE_EMP
+
checkBank
.
getValue
().
getEmpIdcard
()
+
"-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"
;
errorList
.
add
(
new
ErrorMessage
(
checkBank
.
getKey
(),
error
));
}
}
}
Map
<
String
,
TSalaryEmployee
>
otherEmpMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryEmployee
>
otherEmpMap
=
new
HashMap
<>();
if
(!
otherIdCard
.
isEmpty
())
{
if
(!
otherIdCard
.
isEmpty
())
{
...
@@ -492,7 +489,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -492,7 +489,7 @@ public class SalaryAccountUtil implements Serializable {
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
())
,
CommonConstants
.
ZERO_STRING
.
equals
(
entity
.
getSalaryGiveTime
())
,
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
())
,
CommonConstants
.
ONE_STRING
.
equals
(
entity
.
getIsNewEmployee
())
,
otherEmp
.
getEmpName
(),
entity
.
getSalaryStyle
()
,
otherEmp
.
getEmpName
(),
entity
.
getSalaryStyle
()
,
nowMonth
,
updateEmpList
,
checkBankInfoEmp
Map
,
newEmps
.
getKey
()
-
2
))
return
;
,
nowMonth
,
updateEmpList
,
checkBankInfoEmp
List
,
newEmps
.
getKey
()
-
2
))
return
;
}
}
}
}
int
nowYear
=
Integer
.
parseInt
(
nowMonth
.
substring
(
0
,
4
));
int
nowYear
=
Integer
.
parseInt
(
nowMonth
.
substring
(
0
,
4
));
...
@@ -530,7 +527,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -530,7 +527,7 @@ public class SalaryAccountUtil implements Serializable {
,
Map
<
String
,
Integer
>
ownDeptMap
,
String
salaryType
,
Integer
isIssue
,
List
<
ErrorMessage
>
errorList
,
Map
<
String
,
Integer
>
ownDeptMap
,
String
salaryType
,
Integer
isIssue
,
List
<
ErrorMessage
>
errorList
,
TSalaryAccountVo
entity
,
TSalaryEmployee
emp
,
List
<
TSalaryAccountItemVo
>
saiList
,
TSalaryAccountVo
entity
,
TSalaryEmployee
emp
,
List
<
TSalaryAccountItemVo
>
saiList
,
boolean
salaryGiveTimeFlag
,
boolean
isNewEmployee
,
String
empName
,
String
salaryStyle
,
String
nowMonth
,
boolean
salaryGiveTimeFlag
,
boolean
isNewEmployee
,
String
empName
,
String
salaryStyle
,
String
nowMonth
,
List
<
TSalaryEmployee
>
updateEmpList
,
Map
<
Integer
,
TSalaryEmployee
>
checkBankInfoEmpMap
,
int
i
)
{
,
List
<
TSalaryEmployee
>
updateEmpList
,
List
<
TSalaryEmployee
>
checkBankInfoEmpList
,
int
i
)
{
TSalaryAccountItemVo
sai
;
TSalaryAccountItemVo
sai
;
String
error
;
String
error
;
if
(
Common
.
isEmpty
(
emp
.
getEmpName
()))
{
if
(
Common
.
isEmpty
(
emp
.
getEmpName
()))
{
...
@@ -593,7 +590,7 @@ public class SalaryAccountUtil implements Serializable {
...
@@ -593,7 +590,7 @@ public class SalaryAccountUtil implements Serializable {
if
(
isIssue
==
0
&&
Common
.
isNotNull
(
emp
.
getBankNo
())
if
(
isIssue
==
0
&&
Common
.
isNotNull
(
emp
.
getBankNo
())
&&
Common
.
isNotNull
(
emp
.
getIssueStatus
())
&&
Common
.
isNotNull
(
emp
.
getIssueStatus
())
&&
CommonConstants
.
ONE_INT
==
emp
.
getIssueStatus
())
{
&&
CommonConstants
.
ONE_INT
==
emp
.
getIssueStatus
())
{
checkBankInfoEmp
Map
.
put
((
i
+
2
),
emp
);
checkBankInfoEmp
List
.
add
(
emp
);
}
}
entity
.
setEmpId
(
emp
.
getId
());
entity
.
setEmpId
(
emp
.
getId
());
...
...
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