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
06695c85
Commit
06695c85
authored
Nov 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20221108 新增、批增、替换添加购买标准判重
parent
d063e368
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+12
-3
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
06695c85
...
...
@@ -64,6 +64,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 替换员工姓名
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
06695c85
...
...
@@ -424,7 +424,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
//替换
TInsuranceDetail
newDetail
=
new
TInsuranceDetail
();
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
...
...
@@ -433,6 +433,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2552,6 +2553,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getReplaceEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -2628,6 +2634,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& 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
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -2694,7 +2701,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//原数据查重校验:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//原数据查重校验:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
...
...
@@ -2703,6 +2710,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2778,7 +2786,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
//替换者数据查重校验:替换姓名 + 替换身份证号 + 替换项目编码? + 保险公司 + 险种名称
//替换者数据查重校验:替换姓名 + 替换身份证号 + 替换项目编码? + 保险公司 + 险种名称
+ 购买标准
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
...
@@ -2790,6 +2798,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_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