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
42cb5a1d
Commit
42cb5a1d
authored
Aug 10, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
Feature zhaji See merge request fangxinjiang/yifu!160
parents
b3db1736
80c2e03d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
21 deletions
+29
-21
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+29
-21
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
42cb5a1d
...
...
@@ -1142,28 +1142,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
threadPool
.
execute
(()
->
{
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
Integer
settleType
=
tInsuranceDetail
.
getSettleType
();
//如果是合并计算则推送至EKP
if
(
CommonConstants
.
ZERO_INT
==
settleType
){
//存储成功后发送给EKP
threadPool
.
execute
(()
->
{
String
s
=
pushEstimate
(
tInsuranceDetail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
LambdaUpdateWrapper
<
TInsuranceSettle
>
settleWrapper
=
new
LambdaUpdateWrapper
<>();
settleWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceDetail
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
//更新保单信息表
updateById
(
tInsuranceDetail
);
}
});
String
s
=
pushEstimate
(
tInsuranceDetail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
LambdaUpdateWrapper
<
TInsuranceSettle
>
settleWrapper
=
new
LambdaUpdateWrapper
<>();
settleWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceDetail
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle
::
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
//更新保单信息表
updateById
(
tInsuranceDetail
);
}
}
else
{
updateById
(
tInsuranceDetail
);
}
}
});
//todo 根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
//结算状态是待结算,结算中、已结算是ekp反馈的,如果结算失败,反馈到我们这边的状态是待结算
}
...
...
@@ -1228,14 +1228,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//更新实际保费
//
调EKP
更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
}
else
{
...
...
@@ -3154,8 +3158,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
threadPool
.
execute
(()
->
{
for
(
DeptChangeCheckParam
success
:
successList
)
{
threadPool
.
execute
(()
->
{
EKPInteractiveParam
interactiveParam
=
new
EKPInteractiveParam
();
TInsuranceDetail
one
=
getOne
(
lambdaQuery
().
getWrapper
().
eq
(
TInsuranceDetail:
:
getId
,
success
.
getId
()));
BeanCopyUtils
.
copyProperties
(
one
,
interactiveParam
);
...
...
@@ -3527,7 +3531,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
});
//新增操作信息
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
...
...
@@ -3537,6 +3540,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
DEPT_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
});
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
DeptChangeCheckParam
>
errorList
=
stringListMap
.
get
(
"errorList"
);
...
...
@@ -4662,8 +4666,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
defaultSettleId
=
tInsuranceDetail
.
getDefaultSettleId
();
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//冲正取负数
param
.
setEstimatePremium
(
byId
.
getEstimatePremium
().
negate
());
param
.
setActualPremium
(
byId
.
getActualPremium
().
negate
());
if
(
null
!=
byId
.
getEstimatePremium
()){
param
.
setEstimatePremium
(
byId
.
getEstimatePremium
().
negate
());
}
if
(
null
!=
byId
.
getActualPremium
()){
param
.
setActualPremium
(
byId
.
getActualPremium
().
negate
());
}
param
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
param
.
setSettleType
(
CommonConstants
.
ONE_INT
);
}
...
...
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