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
d063e368
Commit
d063e368
authored
Nov 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20221108 登记保单保费逻辑优化
parent
e1313ee0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
21 deletions
+15
-21
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+0
-4
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+15
-17
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
d063e368
...
@@ -277,10 +277,6 @@ public class InsurancesConstants {
...
@@ -277,10 +277,6 @@ public class InsurancesConstants {
* 购买标准不存在
* 购买标准不存在
*/
*/
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
/**
* 购买标准格式错误
*/
public
static
final
String
BUY_STANDARD_PARSE_ERROR
=
"购买标准格式错误"
;
/**
/**
* 商险购买地省名称不能为空
* 商险购买地省名称不能为空
*/
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
d063e368
...
@@ -611,6 +611,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -611,6 +611,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//冗余保险公司计费方式
//冗余保险公司计费方式
byId
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
byId
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
//冗余办理地省、市
param
.
setInsuranceHandleProvince
(
insuranceCompany
.
getInsuranceHandleProvince
());
param
.
setInsuranceHandleProvinceName
(
insuranceCompany
.
getInsuranceHandleProvinceName
());
param
.
setInsuranceHandleCity
(
insuranceCompany
.
getInsuranceHandleCity
());
param
.
setInsuranceHandleCityName
(
insuranceCompany
.
getInsuranceHandleCityName
());
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
...
@@ -657,7 +662,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -657,7 +662,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
+ 购买标准
是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -669,6 +674,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -669,6 +674,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
//有效
...
@@ -1461,7 +1467,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1461,7 +1467,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
...
@@ -1469,6 +1475,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1469,6 +1475,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
@@ -1924,6 +1931,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1924,6 +1931,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -2093,7 +2101,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2093,7 +2101,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
+ 购买标准
是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -2105,6 +2113,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2105,6 +2113,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
//有效
//有效
.
and
(
.
and
(
...
@@ -2234,7 +2243,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2234,7 +2243,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种
、购买标准
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
...
@@ -2450,7 +2459,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2450,7 +2459,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//记录查重校验:姓名 + 身份证号 + 保
险公司 + 险种
//记录查重校验:姓名 + 身份证号 + 保
单号 + 保险公司 + 险种 + 购买标准
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -2863,20 +2872,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2863,20 +2872,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_E
XIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_E
MPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
if
(!
ValidityUtil
.
validateMoney
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validateMoneyMax
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_STANDARD_MAX_ERROR
);
listResult
.
add
(
param
);
continue
;
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
...
...
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