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
fbb2630d
Commit
fbb2630d
authored
Nov 24, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-离职待办-派单暂存
parent
ccb11151
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
3 deletions
+57
-3
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+57
-3
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 @
fbb2630d
...
...
@@ -375,6 +375,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保存到数据库中的结果
List
<
InsuranceAddParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
boolean
isAuto
=
false
;
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
for
(
InsuranceAddParam
success
:
listSuccess
)
{
...
...
@@ -401,6 +403,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
detail
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
detail
,
CommonConstants
.
THREE_STRING
);
if
(
isAuto
||
Common
.
isNotNull
(
success
.
getCustomerUserName
()))
{
isAuto
=
true
;
operateList
.
add
(
addOperateNewUserName
(
detail
.
getId
(),
"自动化派单-"
+
success
.
getCustomerUserName
()
,
InsurancesConstants
.
ADD
,
null
,
CommonConstants
.
ONE_INT
));
}
}
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
d
:
detailList
)
{
...
...
@@ -410,7 +418,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ADD
,
null
,
CommonConstants
.
ONE_INT
);
if
(!
isAuto
)
{
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ADD
,
null
,
CommonConstants
.
ONE_INT
);
}
else
{
if
(
operateList
!=
null
&&
!
operateList
.
isEmpty
())
{
tInsuranceOperateService
.
saveBatch
(
operateList
);
}
}
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
InsuranceAddParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
...
...
@@ -463,6 +477,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保存到数据库中的结果
List
<
InsuranceBatchParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
boolean
isAuto
=
false
;
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
TInsuranceDetail
detail
;
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
...
...
@@ -490,12 +506,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
detail
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
detail
,
CommonConstants
.
THREE_STRING
);
if
(
isAuto
||
Common
.
isNotNull
(
success
.
getCustomerUserName
()))
{
isAuto
=
true
;
operateList
.
add
(
addOperateNewUserName
(
detail
.
getId
(),
"自动化派单-"
+
success
.
getCustomerUserName
()
,
InsurancesConstants
.
BATCH
,
null
,
CommonConstants
.
ONE_INT
));
}
}
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
BATCH
,
null
,
CommonConstants
.
ONE_INT
);
if
(!
isAuto
)
{
addOperate
(
detailList
,
user
,
InsurancesConstants
.
BATCH
,
null
,
CommonConstants
.
ONE_INT
);
}
else
{
if
(
operateList
!=
null
&&
!
operateList
.
isEmpty
())
{
tInsuranceOperateService
.
saveBatch
(
operateList
);
}
}
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
InsuranceBatchParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
...
...
@@ -550,6 +578,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
TInsuranceType
insuranceType
;
TInsuranceCompany
insuranceCompany
;
boolean
isAuto
=
false
;
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
//替换
...
...
@@ -644,10 +674,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
newDetail
,
CommonConstants
.
THREE_STRING
);
}
detailList
.
add
(
newDetail
);
if
(
isAuto
||
Common
.
isNotNull
(
success
.
getCustomerUserName
()))
{
isAuto
=
true
;
operateList
.
add
(
addOperateNewUserName
(
detail
.
getId
(),
"自动化派单-"
+
success
.
getCustomerUserName
()
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
));
}
}
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
if
(!
isAuto
)
{
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
}
else
{
if
(
operateList
!=
null
&&
!
operateList
.
isEmpty
())
{
tInsuranceOperateService
.
saveBatch
(
operateList
);
}
}
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
InsuranceReplaceParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
...
...
@@ -4633,6 +4675,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE
+
areaString
));
}
private
TInsuranceOperate
addOperateNewUserName
(
String
detailId
,
String
userName
,
String
operateDesc
,
String
remark
,
Integer
displayFlag
){
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detailId
);
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
CommonConstants
.
ONE_STRING
);
operate
.
setCreateName
(
userName
);
operate
.
setCreateTime
(
LocalDateTime
.
now
());
return
operate
;
}
/**
* 操作记录(无审批remark)
*
...
...
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