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
189dd12b
Commit
189dd12b
authored
Mar 13, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.2' into MVP1.5.2
parents
1820bb04
a1619e69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+6
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+29
-2
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
189dd12b
...
...
@@ -337,13 +337,17 @@ public class InsurancesConstants {
*/
public
static
final
String
BUY_STANDARD_NOT_EMPTY
=
"购买标准不能为空"
;
/**
* 变更后保单开始时间、变更后保单结束时间、变更后投保类型
三
个字段至少填写一个
* 变更后保单开始时间、变更后保单结束时间、变更后投保类型
、变更后购买标准四
个字段至少填写一个
*/
public
static
final
String
CHOOSE_ONE_OF_THREE
=
"变更后保单开始时间、变更后保单结束时间、变更后投保类型
三
个字段至少填写一个"
;
public
static
final
String
CHOOSE_ONE_OF_THREE
=
"变更后保单开始时间、变更后保单结束时间、变更后投保类型
、变更后购买标准四
个字段至少填写一个"
;
/**
* 购买标准不存在
*/
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
/**
* 变更后的购买标准不存在
*/
public
static
final
String
CHANGE_BUY_STANDARD_NOT_EXIST
=
"变更后的购买标准不存在"
;
/**
* 商险购买地省名称不能为空
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
189dd12b
...
...
@@ -2285,7 +2285,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isBlank
(
param
.
getId
())){
return
R
.
failed
(
InsurancesConstants
.
ID_IS_EMPTY
);
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())
&&
Objects
.
isNull
(
param
.
getBuyType
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())
&&
Objects
.
isNull
(
param
.
getBuyType
())
&&
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
return
R
.
failed
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())){
...
...
@@ -2331,6 +2332,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setBuyType
(
param
.
getBuyType
());
}
if
(
Objects
.
nonNull
(
param
.
getBuyStandard
())){
//判断变更后购买标准是否存在
//购买标准
TInsuranceTypeStandard
typeStandard
=
tInsuranceTypeStandardService
.
getOne
(
Wrappers
.<
TInsuranceTypeStandard
>
query
().
lambda
()
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
byId
.
getInsuranceTypeId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
())
{
return
R
.
failed
(
InsurancesConstants
.
CHANGE_BUY_STANDARD_NOT_EXIST
);
}
byId
.
setBuyStandard
(
param
.
getBuyStandard
());
}
//变更记录
...
...
@@ -3808,6 +3820,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
List
<
InsuranceInsuredParam
>
updateInsuranceInsuredCheck
(
List
<
InsuranceInsuredParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
List
<
InsuranceInsuredParam
>
collect
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
TInsuranceDetail
detail
;
TInsuranceTypeStandard
typeStandard
;
for
(
InsuranceInsuredParam
param
:
collect
)
{
param
.
setFlag
(
CommonConstants
.
ONE_STRING
);
// 必填校验
...
...
@@ -3847,7 +3860,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStartNew
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEndNew
())
&&
StringUtils
.
isBlank
(
param
.
getBuyTypeStr
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStartNew
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEndNew
())
&&
StringUtils
.
isBlank
(
param
.
getBuyTypeStr
())
&&
StringUtils
.
isBlank
(
param
.
getBuyStandardNew
())){
param
.
setErrorMessage
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
continue
;
}
...
...
@@ -3929,6 +3943,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
continue
;
}
//判断变更后购买标准是否存在
if
(
Common
.
isNotNull
(
param
.
getBuyStandardNew
()))
{
//购买标准
typeStandard
=
tInsuranceTypeStandardService
.
getOne
(
Wrappers
.<
TInsuranceTypeStandard
>
query
().
lambda
()
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandardNew
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
detail
.
getInsuranceTypeId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
CHANGE_BUY_STANDARD_NOT_EXIST
);
}
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
param
.
setFlag
(
CommonConstants
.
ZERO_STRING
);
...
...
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