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
700047ec
Commit
700047ec
authored
Mar 03, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险购买标准修改
parent
9991dbb0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
InsuranceInsuredDetailParam.java
...us/v1/yifu/insurances/vo/InsuranceInsuredDetailParam.java
+6
-0
InsuranceInsuredParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceInsuredParam.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+19
-5
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceInsuredDetailParam.java
View file @
700047ec
...
@@ -37,6 +37,12 @@ public class InsuranceInsuredDetailParam implements Serializable {
...
@@ -37,6 +37,12 @@ public class InsuranceInsuredDetailParam implements Serializable {
@Schema
(
description
=
"变更后投保类型 1新增 3批增"
)
@Schema
(
description
=
"变更后投保类型 1新增 3批增"
)
private
Integer
buyType
;
private
Integer
buyType
;
/**
* 变更后的购买标准
*/
@Schema
(
description
=
"变更后的购买标准"
)
private
String
buyStandard
;
/**
/**
* 变更原因
* 变更原因
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceInsuredParam.java
View file @
700047ec
...
@@ -57,6 +57,12 @@ public class InsuranceInsuredParam implements Serializable {
...
@@ -57,6 +57,12 @@ public class InsuranceInsuredParam implements Serializable {
@Schema
(
description
=
"购买标准"
)
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
private
String
buyStandard
;
/**
* 变更后的购买标准
*/
@Schema
(
description
=
"变更后的购买标准"
)
private
String
buyStandardNew
;
/**
/**
* 变更后保单开始时间
* 变更后保单开始时间
*/
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
700047ec
...
@@ -2198,8 +2198,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2198,8 +2198,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceInsuredParam
>
listSuccess
=
operateList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
List
<
InsuranceInsuredParam
>
listSuccess
=
operateList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
TInsuranceDetail
detail
;
for
(
InsuranceInsuredParam
success
:
listSuccess
)
{
for
(
InsuranceInsuredParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
success
.
getDetail
();
detail
=
success
.
getDetail
();
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
...
@@ -2212,6 +2213,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2212,6 +2213,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Objects
.
nonNull
(
success
.
getBuyType
())){
if
(
Objects
.
nonNull
(
success
.
getBuyType
())){
detail
.
setBuyType
(
success
.
getBuyType
());
detail
.
setBuyType
(
success
.
getBuyType
());
}
}
if
(
Common
.
isNotNull
(
success
.
getBuyStandardNew
()))
{
detail
.
setBuyStandard
(
success
.
getBuyStandardNew
());
}
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
//变更记录
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
...
@@ -2233,6 +2237,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2233,6 +2237,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(!
oldDetail
.
getBuyType
().
equals
(
detail
.
getBuyType
()))
{
if
(!
oldDetail
.
getBuyType
().
equals
(
detail
.
getBuyType
()))
{
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
oldDetail
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
detail
.
getBuyType
()));
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
oldDetail
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
detail
.
getBuyType
()));
}
}
if
(!
oldDetail
.
getBuyStandard
().
equals
(
detail
.
getBuyStandard
()))
{
sb
.
append
(
";变更前购买标准:"
+
oldDetail
.
getBuyStandard
()
+
";变更后购买标准:"
+
detail
.
getBuyStandard
());
}
if
(
StringUtils
.
isNotBlank
(
success
.
getReason
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getReason
())){
sb
.
append
(
";变更原因:"
+
success
.
getReason
());
sb
.
append
(
";变更原因:"
+
success
.
getReason
());
}
}
...
@@ -2258,7 +2265,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2258,7 +2265,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//操作记录
//操作记录
//addOperate(detailList,user,InsurancesConstants.UPDATE_INSURED,null,CommonConstants.ONE_INT);
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operateList
=
null
;
operateList
=
null
;
}
}
...
@@ -2326,6 +2332,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2326,6 +2332,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Objects
.
nonNull
(
param
.
getBuyType
())){
if
(
Objects
.
nonNull
(
param
.
getBuyType
())){
byId
.
setBuyType
(
param
.
getBuyType
());
byId
.
setBuyType
(
param
.
getBuyType
());
}
}
if
(
Objects
.
nonNull
(
param
.
getBuyStandard
())){
byId
.
setBuyStandard
(
param
.
getBuyStandard
());
}
//变更记录
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
byId
.
getId
(),
old
,
byId
,
param
.
getReason
());
tBusinessOperateService
.
saveModificationRecord
(
byId
.
getId
(),
old
,
byId
,
param
.
getReason
());
...
@@ -2346,6 +2355,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2346,6 +2355,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(!
old
.
getBuyType
().
equals
(
param
.
getBuyType
()))
{
if
(!
old
.
getBuyType
().
equals
(
param
.
getBuyType
()))
{
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
old
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
param
.
getBuyType
()));
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
old
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
param
.
getBuyType
()));
}
}
if
(!
old
.
getBuyStandard
().
equals
(
param
.
getBuyStandard
()))
{
sb
.
append
(
";变更前购买标准:"
+
old
.
getBuyStandard
()
+
";变更后购买标准:"
+
param
.
getBuyStandard
());
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())){
sb
.
append
(
";变更原因:"
+
param
.
getReason
());
sb
.
append
(
";变更原因:"
+
param
.
getReason
());
}
}
...
@@ -3793,6 +3805,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3793,6 +3805,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
*/
private
List
<
InsuranceInsuredParam
>
updateInsuranceInsuredCheck
(
List
<
InsuranceInsuredParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
private
List
<
InsuranceInsuredParam
>
updateInsuranceInsuredCheck
(
List
<
InsuranceInsuredParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
List
<
InsuranceInsuredParam
>
collect
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
InsuranceInsuredParam
>
collect
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
TInsuranceDetail
detail
;
for
(
InsuranceInsuredParam
param
:
collect
)
{
for
(
InsuranceInsuredParam
param
:
collect
)
{
param
.
setFlag
(
CommonConstants
.
ONE_STRING
);
param
.
setFlag
(
CommonConstants
.
ONE_STRING
);
// 必填校验
// 必填校验
...
@@ -3876,7 +3889,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3876,7 +3889,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
...
@@ -3899,8 +3912,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3899,8 +3912,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//商险办理地权限校验
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
detail
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
detail
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
String
insuranceHandleCity
=
detail
.
getInsuranceHandleCity
().
toString
();
if
(!
b
){
String
insuranceHandleProvince
=
detail
.
getInsuranceHandleProvince
().
toString
();
if
(
insuranceAreaResList
.
stream
().
noneMatch
(
s
->
insuranceHandleCity
.
equals
(
s
.
getCity
())
&&
insuranceHandleProvince
.
equals
(
s
.
getProvince
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
continue
;
continue
;
}
}
...
...
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