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
4e66091d
Commit
4e66091d
authored
Aug 03, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化查询唯一性的条件"
parent
8c108f67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+23
-20
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
4e66091d
...
...
@@ -2767,9 +2767,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleCancelService
.
save
(
cancel
);
//推送EKP // TODO: 2022/8/2
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
insuranceDetailId
);
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//如果已经推送过实际保费,则先作废,再推送新的预估保费和实际保费
if
(
byId
.
getIsActualPush
()
==
1
){
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
){
}
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
){
}
//新增新的结算数据
...
...
@@ -3196,11 +3200,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
//排除投保退回的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FOUR_INT
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3458,10 +3458,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getDeptNo
,
deptNo
).
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
)
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FOUR_INT
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3678,11 +3675,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
).
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
//排除投保退回的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FOUR_INT
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3837,17 +3830,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isBlank
(
empIdcardNo
)){
return
R
.
failed
(
"身份证号为空"
);
}
//
员工身份 //
身份证号位数校验(18 位合法)
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
empIdcardNo
)){
return
R
.
failed
(
"身份证格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
//查询所有在保,未出险,未过期,未失效,未减员的保单信息
queryWrapper
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdcardNo
).
eq
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
eq
(
TInsuranceDetail
::
getIsEffect
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getIsUse
,
CommonConstants
.
ZERO_INT
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdcardNo
)
.
eq
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
eq
(
TInsuranceDetail
::
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getIsUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
TWO_INT
);
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
TWO_INT
)
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
FOUR_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
R
.
failed
(
"无可出险的保单"
);
...
...
@@ -3865,6 +3861,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
/**
* 根据身份证查询商险列表
*
* @author huyc
* @param
* @return {@link R}
*/
@Override
public
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
)
{
IPage
<
InsuranceListByIdCardVo
>
insuranceListByIdCard
=
baseMapper
.
getInsuranceListByIdCard
(
page
,
idCard
);
...
...
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