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
fff55881
Commit
fff55881
authored
Jun 19, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动化办理调整 2024-04-17
parent
41896d80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
TAutoPaymentDetailServiceImpl.java
...fu/social/service/impl/TAutoPaymentDetailServiceImpl.java
+31
-11
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAutoPaymentDetailServiceImpl.java
View file @
fff55881
...
...
@@ -264,13 +264,26 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
}
return
judgeAllMessage
(
errorMessageList
);
}
/**
* @Author fxj
* @Description 判断所有返回数据,是否全部为正确的
* @Date 18:01 2023/10/18
* @Param
* @return
**/
private
R
<
List
<
ErrorMessage
>>
judgeAllMessage
(
List
<
ErrorMessage
>
errorMessageList
)
{
if
(!
errorMessageList
.
isEmpty
()
&&
errorMessageList
.
stream
().
noneMatch
(
e
->
e
.
getColor
().
equals
(
CommonConstants
.
RED
)))
{
return
R
.
ok
();
}
return
R
.
ok
(
errorMessageList
);
}
private
void
importTAutoPaymentDetail
(
List
<
TAutoPaymentDetailVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
String
parentId
)
{
// 执行数据插入操作 组装
TAutoPaymentDetailVo
excel
;
TAutoPaymentDetail
detail
;
List
<
TAutoPaymentDetail
>
details
;
List
<
TAutoPaymentDetail
>
updateList
;
TAutoPaymentInfo
paymentInfo
=
paymentInfoMapper
.
selectById
(
parentId
);
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
...
...
@@ -283,24 +296,31 @@ public class TAutoPaymentDetailServiceImpl extends ServiceImpl<TAutoPaymentDetai
continue
;
}
// 数据合法情况
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getRepeatHandleFlag
())){
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getRepeatHandleFlag
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getRepeatHandleFlag
())
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"'是否重新办理'填写不正确!"
,
excel
));
continue
;
}
detail
=
baseMapper
.
selectOne
(
Wrappers
.<
TAutoPaymentDetail
>
query
().
lambda
()
detail
s
=
baseMapper
.
selectList
(
Wrappers
.<
TAutoPaymentDetail
>
query
().
lambda
()
.
eq
(
TAutoPaymentDetail:
:
getParentId
,
parentId
)
.
eq
(
TAutoPaymentDetail:
:
getEmpName
,
excel
.
getEmpName
())
.
eq
(
TAutoPaymentDetail:
:
getCertNum
,
excel
.
getCertNum
())
.
eq
(
TAutoPaymentDetail:
:
getSocialSecurityAccount
,
excel
.
getSocialSecurityAccount
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
detail
)){
.
eq
(
TAutoPaymentDetail:
:
getSocialSecurityAccount
,
excel
.
getSocialSecurityAccount
()));
if
(
Common
.
isEmpty
(
details
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"对应姓名+证件号码+社保户的数据不存在!"
,
excel
));
continue
;
}
detail
.
setRepeatHandleFlag
(
"0"
);
// 插入
baseMapper
.
updateById
(
detail
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
excel
));
if
(
Common
.
isNotNull
(
details
)){
updateList
=
new
ArrayList
<>();
for
(
TAutoPaymentDetail
detail:
details
){
detail
.
setRepeatHandleFlag
(
"0"
);
updateList
.
add
(
detail
);
}
if
(
Common
.
isNotNull
(
updateList
)){
// 插入
this
.
updateBatchById
(
updateList
);
}
}
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
));
}
}
...
...
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