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
9b58c4ca
Commit
9b58c4ca
authored
Feb 20, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险优化修改
parent
099726a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
21 deletions
+36
-21
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+1
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+19
-5
DoJointInsuranceTask.java
...ud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
+16
-16
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
9b58c4ca
...
...
@@ -17,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
9b58c4ca
...
...
@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.annotation.Lazy
;
...
...
@@ -1217,6 +1218,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
TInsuranceSettle
settle
;
SettleVo
settleVo
;
for
(
TInsuranceDetail
detail
:
successList
)
{
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
...
...
@@ -1237,7 +1239,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
}
tInsuranceSettleService
.
save
(
burden
);
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)
){
//预估推送标识
Integer
isEstimatePush
=
settle
.
getIsEstimatePush
();
...
...
@@ -1393,6 +1395,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
String
>
sourceIdCardList
=
new
ArrayList
<>();
// 被替换的id
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
List
<
TInsuranceSettle
>
settleList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
TInsuranceReplace
one
;
//项目信息
...
...
@@ -1468,11 +1471,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setSettleType
(
detail
.
getSettleType
());
settle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
settle
.
setCreateTime
(
LocalDateTime
.
now
());
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
settle
.
setEstimatePremium
(
estimatePremium
);
//调完ekp接口才会是1
settle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
String
settleId
=
RandomStringUtils
.
randomNumeric
(
19
);
settle
.
setId
(
settleId
);
settleList
.
add
(
settle
);
detail
.
setDefaultSettleId
(
settleId
);
successTwo
.
add
(
detail
);
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
...
...
@@ -1506,8 +1512,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
settle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
String
settleId
=
RandomStringUtils
.
randomNumeric
(
19
);
settle
.
setId
(
settleId
);
settleList
.
add
(
settle
);
detail
.
setDefaultSettleId
(
settleId
);
successTwo
.
add
(
detail
);
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
...
...
@@ -1540,6 +1548,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
successList
.
addAll
(
successTwo
);
successOne
.
clear
();
successTwo
.
clear
();
//插入结算数据
if
(!
settleList
.
isEmpty
())
{
tInsuranceSettleService
.
saveBatch
(
settleList
);
settleList
.
clear
();
}
// 被替换的老商险,要处理档案状态
if
(
CollectionUtils
.
isNotEmpty
(
sourceIdCardList
))
{
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
...
...
@@ -1804,6 +1817,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
policy
.
setPolicyEnd
(
detail
.
getPolicyEnd
());
policy
.
setInsuranceCompanyName
(
detail
.
getInsuranceCompanyName
());
policy
.
setInsuranceTypeName
(
detail
.
getInsuranceTypeName
());
policy
.
setId
(
RandomStringUtils
.
randomNumeric
(
19
));
policyList
.
add
(
policy
);
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
View file @
9b58c4ca
...
...
@@ -105,6 +105,22 @@ public class DoJointInsuranceTask {
log
.
info
(
"推送商险明细到EKP结束"
);
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private
void
saveInsuranceEkp
(
EkpInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
}
/**
* 推送EKP
*
...
...
@@ -197,22 +213,6 @@ public class DoJointInsuranceTask {
}
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private
void
saveInsuranceEkp
(
EkpInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
}
@Async
public
void
updateInsuranceSettleStatus
(
EkpStatusParamVo
vo
)
{
try
{
...
...
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