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
d9a351e8
Commit
d9a351e8
authored
Nov 30, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
薪资审核优化
parent
d263a2e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
19 deletions
+42
-19
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+42
-19
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
d9a351e8
...
...
@@ -134,13 +134,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 过期同步档案逻辑:
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
changeList
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
e
->
{
if
(!
LocalDateUtil
.
isOverdueDate
(
e
.
getPolicyEnd
().
toString
())){
e
.
setIsOverdue
(
CommonConstants
.
ONE_INT
);
e
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
Common
.
isEmpty
(
e
.
getBuyHandleStatus
())
||
e
.
getBuyHandleStatus
()
!=
CommonConstants
.
FOUR_INT
)
{
changeList
.
add
(
e
);
sourceIdCardList
.
add
(
e
.
getEmpIdcardNo
());
replaceIdList
.
add
(
e
.
getId
());
}
}
});
List
<
TInsuranceDetail
>
collect
=
list
.
stream
().
filter
(
e
->
e
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
).
collect
(
Collectors
.
toList
());
...
...
@@ -148,7 +152,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
log
.
info
(
"定时任务扫描到的已过期数据是:{}条"
,
collect
.
size
());
this
.
updateBatchById
(
collect
);
}
this
.
doFailInfo
(
c
ollec
t
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
this
.
doFailInfo
(
c
hangeLis
t
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
}
}
...
...
@@ -1660,15 +1664,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// (0无2正常3失效4处理中)
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
)
{
return
CommonConstants
.
ZERO_INT
;
}
else
if
(
detail
.
getIsEffect
()
==
CommonConstants
.
ZERO_INT
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ZERO_INT
&&
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
}
else
if
(
(
Common
.
isEmpty
(
detail
.
getIsEffect
())
||
detail
.
getIsEffect
()
==
CommonConstants
.
ZERO_INT
)
&&
(
Common
.
isEmpty
(
detail
.
getIsOverdue
())
||
detail
.
getIsOverdue
()
==
CommonConstants
.
ZERO_INT
)
&&
(
(
Common
.
isEmpty
(
detail
.
getBuyHandleStatus
())
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
THREE_INT
)
&&
(
Common
.
isEmpty
(
detail
.
getReduceHandleStatus
())
||
detail
.
getReduceHandleStatus
()
!=
CommonConstants
.
FOUR_INT
)))
{
return
CommonConstants
.
TWO_INT
;
}
else
if
(
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
||
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
||
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
FOUR_INT
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
)
{
}
else
if
(
(
Common
.
isNotNull
(
detail
.
getIsOverdue
())
&&
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
)
||
(
Common
.
isNotNull
(
detail
.
getIsEffect
())
&&
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
)
||
(
Common
.
isNotNull
(
detail
.
getReduceHandleStatus
())
&&
detail
.
getReduceHandleStatus
()
==
CommonConstants
.
FOUR_INT
)
||
(
Common
.
isNotNull
(
detail
.
getBuyHandleStatus
())
&&
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
)
)
{
return
CommonConstants
.
THREE_INT
;
}
else
{
return
CommonConstants
.
FOUR_INT
;
...
...
@@ -3912,6 +3916,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
//被替换人的档案要处理状态
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
// 被替换的id
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
RefundErrorVo
refundErrorVo
=
new
RefundErrorVo
();
...
...
@@ -3938,6 +3946,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail
.
setUpdateBy
(
user
.
getId
());
tInsuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
successList
.
add
(
tInsuranceDetail
);
sourceIdCardList
.
add
(
tInsuranceDetail
.
getEmpIdcardNo
());
replaceIdList
.
add
(
tInsuranceDetail
.
getId
());
//更新减员记录
refund
.
setId
(
tInsuranceDetail
.
getRefundId
());
refund
.
setUpdateBy
(
user
.
getId
());
...
...
@@ -3954,6 +3964,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceRefundService
.
updateByInsDetailId
(
refund
);
}
updateBatchById
(
successList
);
// 减员失效
this
.
doFailInfo
(
successList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
//操作记录
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
addOperate
(
successList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND_SUCCESS
,
remark
,
CommonConstants
.
ONE_INT
);
...
...
@@ -3985,27 +3997,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceHandleImportParam
>
errorList
=
map
.
get
(
InsurancesConstants
.
ERROR_LIST
);
//减员退回
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
//被替换人的档案要处理状态
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
// 被替换的id
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
TInsuranceOperate
operate
;
TInsuranceDetail
detail
;
for
(
InsuranceHandleImportParam
param
:
successList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
=
new
TInsuranceOperate
();
LambdaUpdateWrapper
<
TInsuranceRefund
>
refund
=
new
LambdaUpdateWrapper
<>();
refund
.
eq
(
TInsuranceRefund
::
getInsDetailId
,
param
.
getId
())
//.set(TInsuranceRefund :: getRemark,param.getRemark())
.
set
(
TInsuranceRefund
::
getUpdateTime
,
LocalDateTime
.
now
())
.
set
(
TInsuranceRefund
::
getUpdateBy
,
user
.
getId
());
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail:
:
getId
,
param
.
getId
())
.
set
(
TInsuranceDetail:
:
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail:
:
getUpdateTime
,
LocalDateTime
.
now
());
detail
=
this
.
getById
(
param
.
getId
());
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
InsurancesConstants
.
SUCCESS
.
equals
(
param
.
getHandType
())){
updateWrapper
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
FOUR_INT
);
updateWrapper
.
set
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
detail
.
setReduceHandleStatus
(
CommonConstants
.
FOUR_INT
);
detail
.
setBuyHandleStatus
(
CommonConstants
.
FIVE_INT
);
refund
.
set
(
TInsuranceRefund
::
getReduceHandleStatus
,
CommonConstants
.
FOUR_INT
);
}
else
{
updateWrapper
.
set
(
TInsuranceDetail:
:
getReduceHandleStatus
,
CommonConstants
.
THREE_INT
);
detail
.
setReduceHandleStatus
(
CommonConstants
.
THREE_INT
);
refund
.
set
(
TInsuranceRefund
::
getReduceHandleStatus
,
CommonConstants
.
THREE_INT
);
}
update
(
updateWrapper
);
this
.
updateById
(
detail
);
sourceList
.
add
(
detail
);
tInsuranceRefundService
.
update
(
refund
);
operate
.
setInsuranceDetailId
(
param
.
getId
());
operate
.
setRemark
(
param
.
getRemark
());
...
...
@@ -4019,9 +4038,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate
.
setOperateDesc
(
InsurancesConstants
.
INSURANCE_REFUND_FAILED
);
}
operateList
.
add
(
operate
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
replaceIdList
.
add
(
detail
.
getId
());
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
// 减员失效
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
...
...
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