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
75dc8216
Commit
75dc8216
authored
Feb 04, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EKP1.7.8-薪酬人员更新、导入、批量更新,加银行卡校验
parent
8eb9739e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
3 deletions
+99
-3
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+99
-3
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
75dc8216
...
@@ -614,6 +614,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -614,6 +614,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if
(
Common
.
isNotNull
(
excel
.
getEmpName
()))
{
if
(
Common
.
isNotNull
(
excel
.
getEmpName
()))
{
emp
.
setEmpName
(
excel
.
getEmpName
());
emp
.
setEmpName
(
excel
.
getEmpName
());
}
}
// 2024-2-4 16:05:56 hgw 银行卡需要校验
String
pre
=
getCheckBankNo
(
emp
,
old
);
if
(
pre
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
pre
));
continue
;
}
// 变更日志 fxj 2023-10-24
// 变更日志 fxj 2023-10-24
logService
.
initModLog
(
old
,
emp
,
CommonConstants
.
ONE_STRING
,
user
.
getNickname
(),
util
);
logService
.
initModLog
(
old
,
emp
,
CommonConstants
.
ONE_STRING
,
user
.
getNickname
(),
util
);
baseMapper
.
updateById
(
emp
);
baseMapper
.
updateById
(
emp
);
...
@@ -749,6 +755,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -749,6 +755,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List
<
TSalaryEmployee
>
updateList
=
new
ArrayList
<>();
List
<
TSalaryEmployee
>
updateList
=
new
ArrayList
<>();
TSettleDomain
dept
=
vo
.
getDept
();
TSettleDomain
dept
=
vo
.
getDept
();
Map
<
String
,
String
>
bankMap
=
tBankSetService
.
getBankMap
(
null
);
Map
<
String
,
String
>
bankMap
=
tBankSetService
.
getBankMap
(
null
);
// 校验卡号所用的
Map
<
String
,
Boolean
>
bankCheckMap
=
new
HashMap
<>();
List
<
TCheckBankNo
>
bankList
=
new
ArrayList
<>();
TCheckBankNo
checkBankNo
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
if
(
excel
!=
null
)
{
if
(
excel
!=
null
)
{
...
@@ -818,6 +830,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -818,6 +830,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
emp
.
setDeptName
(
dept
.
getDepartName
());
emp
.
setDeptName
(
dept
.
getDepartName
());
emp
.
setDeptNo
(
dept
.
getDepartNo
());
emp
.
setDeptNo
(
dept
.
getDepartNo
());
emp
.
setInvoiceTitle
(
dept
.
getInvoiceTitleSalary
());
emp
.
setInvoiceTitle
(
dept
.
getInvoiceTitleSalary
());
if
(
Common
.
isNotNull
(
excel
.
getBankNo
()))
{
checkBankNo
=
new
TCheckBankNo
();
emp
.
setLineNums
((
i
+
2
));
checkBankNo
.
setName
(
excel
.
getEmpName
());
checkBankNo
.
setBankNo
(
excel
.
getBankNo
());
bankList
.
add
(
checkBankNo
);
}
updateList
.
add
(
emp
);
updateList
.
add
(
emp
);
if
(
curTaxMonth
)
{
if
(
curTaxMonth
)
{
errorMessageList
.
add
(
new
ErrorMessage
((
i
+
2
),
SalaryConstants
.
CUR_TAX_INFO
));
errorMessageList
.
add
(
new
ErrorMessage
((
i
+
2
),
SalaryConstants
.
CUR_TAX_INFO
));
...
@@ -878,6 +899,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -878,6 +899,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
excel
.
setDeptName
(
dept
.
getDepartName
());
excel
.
setDeptName
(
dept
.
getDepartName
());
excel
.
setDeptNo
(
dept
.
getDepartNo
());
excel
.
setDeptNo
(
dept
.
getDepartNo
());
excel
.
setInvoiceTitle
(
dept
.
getInvoiceTitleSalary
());
excel
.
setInvoiceTitle
(
dept
.
getInvoiceTitleSalary
());
if
(
Common
.
isNotNull
(
excel
.
getBankNo
()))
{
checkBankNo
=
new
TCheckBankNo
();
excel
.
setLineNums
((
i
+
2
));
checkBankNo
.
setName
(
excel
.
getEmpName
());
checkBankNo
.
setBankNo
(
excel
.
getBankNo
());
bankList
.
add
(
checkBankNo
);
}
saveList
.
add
(
excel
);
saveList
.
add
(
excel
);
errorMessageList
.
add
(
new
ErrorMessage
((
i
+
2
),
CommonConstants
.
SAVE_SUCCESS
));
errorMessageList
.
add
(
new
ErrorMessage
((
i
+
2
),
CommonConstants
.
SAVE_SUCCESS
));
}
}
...
@@ -890,11 +918,42 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -890,11 +918,42 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZERO_INT
,
SalaryConstants
.
DATA_MUST
));
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZERO_INT
,
SalaryConstants
.
DATA_MUST
));
}
}
}
}
if
(
bankList
!=
null
&&
!
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
)
{
bankCheckMap
=
checkListR
.
getData
().
getCheckMap
();
}
}
if
(!
updateList
.
isEmpty
())
{
if
(!
updateList
.
isEmpty
())
{
this
.
updateBatchById
(
updateList
);
List
<
TSalaryEmployee
>
newUpdateList
=
new
ArrayList
<>();
for
(
TSalaryEmployee
employee
:
updateList
)
{
if
(
bankCheckMap
.
get
(
employee
.
getBankNo
())
!=
null
&&
Boolean
.
FALSE
.
equals
(
bankCheckMap
.
get
(
employee
.
getBankNo
())))
{
errorMessageList
.
add
(
new
ErrorMessage
(
employee
.
getLineNums
(),
"第"
+
employee
.
getLineNums
()
+
"行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"
));
}
else
{
employee
.
setIssueStatus
(
CommonConstants
.
ZERO_INT
);
employee
.
setLineNums
(
null
);
newUpdateList
.
add
(
employee
);
}
}
this
.
updateBatchById
(
newUpdateList
);
}
}
if
(!
saveList
.
isEmpty
())
{
if
(!
saveList
.
isEmpty
())
{
this
.
saveBatch
(
saveList
);
List
<
TSalaryEmployee
>
newSaveList
=
new
ArrayList
<>();
for
(
TSalaryEmployee
employee
:
saveList
)
{
if
(
bankCheckMap
.
get
(
employee
.
getBankNo
())
!=
null
&&
Boolean
.
FALSE
.
equals
(
bankCheckMap
.
get
(
employee
.
getBankNo
())))
{
errorMessageList
.
add
(
new
ErrorMessage
(
employee
.
getLineNums
(),
"第"
+
employee
.
getLineNums
()
+
"行:-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!"
));
}
else
{
employee
.
setIssueStatus
(
CommonConstants
.
ZERO_INT
);
employee
.
setLineNums
(
null
);
newSaveList
.
add
(
employee
);
}
}
this
.
saveBatch
(
newSaveList
);
}
}
boolean
isTrue
=
true
;
boolean
isTrue
=
true
;
for
(
ErrorMessage
message
:
errorMessageList
)
{
for
(
ErrorMessage
message
:
errorMessageList
)
{
...
@@ -958,8 +1017,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -958,8 +1017,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if
(
Common
.
isEmpty
(
user
)){
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
}
// 变更日志 fxj 2023-10-24
TSalaryEmployee
old
=
baseMapper
.
selectById
(
tSalaryEmployee
.
getId
());
TSalaryEmployee
old
=
baseMapper
.
selectById
(
tSalaryEmployee
.
getId
());
// 2024-2-4 16:05:56 hgw 银行卡需要校验
String
pre
=
getCheckBankNo
(
tSalaryEmployee
,
old
);
if
(
pre
!=
null
)
return
R
.
failed
(
pre
);
// 变更日志 fxj 2023-10-24
logService
.
initModLog
(
old
,
tSalaryEmployee
,
CommonConstants
.
ZERO_STRING
,
user
.
getNickname
(),
null
);
logService
.
initModLog
(
old
,
tSalaryEmployee
,
CommonConstants
.
ZERO_STRING
,
user
.
getNickname
(),
null
);
int
res
=
baseMapper
.
updateById
(
tSalaryEmployee
);
int
res
=
baseMapper
.
updateById
(
tSalaryEmployee
);
if
(
res
>=
CommonConstants
.
ZERO_INT
){
if
(
res
>=
CommonConstants
.
ZERO_INT
){
...
@@ -968,4 +1032,36 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
...
@@ -968,4 +1032,36 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return
R
.
failed
(
CommonConstants
.
UPDATE_DATA_FAIL
);
return
R
.
failed
(
CommonConstants
.
UPDATE_DATA_FAIL
);
}
}
}
}
/**
* @Description: 单个校验通用方法
* @Author: hgw
* @Date: 2024/2/4 17:15
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
private
String
getCheckBankNo
(
TSalaryEmployee
tSalaryEmployee
,
TSalaryEmployee
old
)
{
if
(
old
!=
null
&&
Common
.
isNotNull
(
tSalaryEmployee
.
getBankNo
())
&&
!
tSalaryEmployee
.
getBankNo
().
equals
(
old
.
getBankNo
()))
{
// 调用校验服务
TCheckBankNo
checkBankNo
=
new
TCheckBankNo
();
checkBankNo
.
setName
(
tSalaryEmployee
.
getEmpName
());
checkBankNo
.
setBankNo
(
tSalaryEmployee
.
getBankNo
());
R
<
CheckBankNoVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
checkProperties
.
getAppUrl
(),
checkProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
checkBankNo
,
CheckBankNoVo
.
class
,
SecurityConstants
.
FROM_IN
);
String
pre
=
"姓名与卡号验证:"
;
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
CheckBankNoVo
vo
=
checkListR
.
getData
();
TCheckBankNo
check
=
(
null
==
vo
.
getRes
())
?
null
:
vo
.
getRes
().
getData
();
if
(
Common
.
isEmpty
(
vo
))
{
return
pre
+
SalaryConstants
.
CHECK_NO_RESPONSE
;
}
else
if
(!
CommonConstants
.
SUCCESS
.
equals
(
vo
.
getRes
().
getCode
()))
{
return
pre
+
vo
.
getRes
().
getMsg
();
}
else
if
(
check
!=
null
&&
!
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_ONE
))
{
return
pre
+
check
.
getRemark
();
}
}
else
{
return
pre
+
SalaryConstants
.
CHECK_NO_RESPONSE
;
}
}
return
null
;
}
}
}
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