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
24ce791c
Commit
24ce791c
authored
Feb 20, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.1' into MVP1.5.1
parents
41230b92
b4d490da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
46 deletions
+52
-46
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+52
-46
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 @
24ce791c
...
@@ -1148,6 +1148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1148,6 +1148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//操作日志对象
//操作日志对象
List
<
InsuranceHandleParam
>
operateList
=
new
ArrayList
<>();
List
<
InsuranceHandleParam
>
operateList
=
new
ArrayList
<>();
//根据id获取所有的商险明细
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
//返回给前端的数据
//返回给前端的数据
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
...
@@ -1160,6 +1161,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1160,6 +1161,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
TInsuranceReplace
one
;
TInsuranceReplace
one
;
TInsuranceDetail
byId
;
TInsuranceDetail
byId
;
List
<
TInsuranceDetail
>
updList
=
new
ArrayList
<>();
List
<
TInsuranceReplace
>
replaceList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
for
(
TInsuranceDetail
detail
:
detailList
)
{
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
||
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
...
@@ -1187,13 +1190,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1187,13 +1190,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
//替换记录变为失败
//替换记录变为失败
one
.
setReplaceStatus
(
CommonConstants
.
ZERO_INT
);
one
.
setReplaceStatus
(
CommonConstants
.
ZERO_INT
);
tInsuranceReplaceService
.
updateByI
d
(
one
);
replaceList
.
ad
d
(
one
);
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
//被替换者激活
//被替换者激活
byId
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
byId
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
byId
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
byId
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
this
.
updateByI
d
(
byId
);
updList
.
ad
d
(
byId
);
}
}
}
}
}
}
...
@@ -1215,10 +1218,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1215,10 +1218,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replaceIdList
.
add
(
detail
.
getId
());
replaceIdList
.
add
(
detail
.
getId
());
}
}
}
}
//批量更新商险和替换表
if
(!
updList
.
isEmpty
())
{
this
.
updateBatchById
(
updList
);
updList
.
clear
();
}
if
(!
replaceList
.
isEmpty
())
{
tInsuranceReplaceService
.
updateBatchById
(
replaceList
);
replaceList
.
clear
();
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
TInsuranceSettle
settle
;
TInsuranceSettle
settle
;
SettleVo
settleVo
;
SettleVo
settleVo
;
R
<
TIncomeDetailReturnVo
>
incomeDetailList
;
for
(
TInsuranceDetail
detail
:
successList
)
{
for
(
TInsuranceDetail
detail
:
successList
)
{
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
...
@@ -1286,7 +1299,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1286,7 +1299,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//已投保退回,收入数据同步处理
//已投保退回,收入数据同步处理
try
{
try
{
updateInsuranceInfo
(
detail
);
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
detail
.
getId
());
incomeDetailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
incomeDetailList
)
&&
incomeDetailList
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
for
(
TIncomeDetail
detailIncome
:
incomeDetailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detailIncome
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
error
(
"收入数据同步处理失败:"
+
e
);
log
.
error
(
"收入数据同步处理失败:"
+
e
);
}
}
...
@@ -1333,7 +1358,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1333,7 +1358,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceHandleImportParam
>
collectSuccess
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
SUCCESS
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
List
<
InsuranceHandleImportParam
>
collectSuccess
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
SUCCESS
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
//投保退回的数据
//投保退回的数据
List
<
InsuranceHandleImportParam
>
collectRollBack
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
FAILED
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
List
<
InsuranceHandleImportParam
>
collectRollBack
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
FAILED
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
successList
.
clear
();
//投保成功
//投保成功
if
(
CollectionUtils
.
isNotEmpty
(
collectSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
collectSuccess
)){
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
...
@@ -1343,6 +1368,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1343,6 +1368,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
handleParam
.
setRemark
(
e
.
getRemark
());
handleParam
.
setRemark
(
e
.
getRemark
());
list
.
add
(
handleParam
);
list
.
add
(
handleParam
);
});
});
collectSuccess
.
clear
();
// 关联档案1
// 关联档案1
this
.
successfulInsurance
(
user
,
list
);
this
.
successfulInsurance
(
user
,
list
);
}
}
...
@@ -1356,6 +1382,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1356,6 +1382,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
handleParam
.
setRemark
(
e
.
getRemark
());
handleParam
.
setRemark
(
e
.
getRemark
());
list
.
add
(
handleParam
);
list
.
add
(
handleParam
);
});
});
collectRollBack
.
clear
();
// 关联档案2
// 关联档案2
this
.
rollBackInsurance
(
user
,
list
);
this
.
rollBackInsurance
(
user
,
list
);
}
}
...
@@ -1475,10 +1502,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1475,10 +1502,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setEstimatePremium
(
estimatePremium
);
settle
.
setEstimatePremium
(
estimatePremium
);
//调完ekp接口才会是1
//调完ekp接口才会是1
settle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
settle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
String
settleId
=
RandomStringUtils
.
randomNumeric
(
19
);
settle
.
setId
(
RandomStringUtils
.
randomNumeric
(
19
));
settle
.
setId
(
settleId
);
settleList
.
add
(
settle
);
settleList
.
add
(
settle
);
detail
.
setDefaultSettleId
(
settle
Id
);
detail
.
setDefaultSettleId
(
settle
.
getId
()
);
successTwo
.
add
(
detail
);
successTwo
.
add
(
detail
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
createInsuranceInfo
(
detail
,
settleDomain
);
...
@@ -1512,10 +1538,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1512,10 +1538,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
settle
.
setCreateTime
(
LocalDateTime
.
now
());
settle
.
setCreateTime
(
LocalDateTime
.
now
());
String
settleId
=
RandomStringUtils
.
randomNumeric
(
19
);
settle
.
setId
(
RandomStringUtils
.
randomNumeric
(
19
));
settle
.
setId
(
settleId
);
settleList
.
add
(
settle
);
settleList
.
add
(
settle
);
detail
.
setDefaultSettleId
(
settle
Id
);
detail
.
setDefaultSettleId
(
settle
.
getId
()
);
successTwo
.
add
(
detail
);
successTwo
.
add
(
detail
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
createInsuranceInfo
(
detail
,
settleDomain
);
...
@@ -4805,26 +4830,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4805,26 +4830,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
update
(
updateWrapper
);
update
(
updateWrapper
);
//更换项目更新收入
//更换项目更新收入
TInsuranceDetail
income
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
TInsuranceDetail
income
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
if
(
Common
.
isNotNull
(
income
))
{
if
(
Common
.
isNotNull
(
income
)
&&
income
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
if
(
income
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//判断是否存在当月的商险收入数据
//判断是否存在当月的商险收入数据
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
income
.
getId
());
incomeDetail
.
setSourceId
(
income
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
detailList
.
getData
().
getDetailList
().
size
()
>
0
)
{
&&
!
detailList
.
getData
().
getDetailList
().
isEmpty
()
)
{
//原项目生成红冲数据
//原项目生成红冲数据
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail
.
getMoney
().
negate
());
detail1
.
setMoney
(
detail
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
//新项目下生成收入数据
//新项目下生成收入数据
createInsuranceInfo
(
income
,
null
);
createInsuranceInfo
(
income
,
null
);
}
}
}
}
}
//商险id
//商险id
...
@@ -7257,23 +7280,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -7257,23 +7280,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
socialDaprUtils
.
createTIncomeDetail
(
detail
);
socialDaprUtils
.
createTIncomeDetail
(
detail
);
}
}
//更新收入信息
public
void
updateInsuranceInfo
(
TInsuranceDetail
insuranceDetail
)
{
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setSourceId
(
insuranceDetail
.
getId
());
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
}
@Override
@Override
public
void
ekpUpdateInsuranceDept
(
ChangeDeptVo
changeDeptVo
)
{
public
void
ekpUpdateInsuranceDept
(
ChangeDeptVo
changeDeptVo
)
{
Set
<
String
>
detailIdSet
=
new
HashSet
<>();
Set
<
String
>
detailIdSet
=
new
HashSet
<>();
...
...
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