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
363afc19
Commit
363afc19
authored
Aug 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询一条时按创建时间倒序
parent
29668d7c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+38
-0
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
363afc19
...
@@ -391,6 +391,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -391,6 +391,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
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:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
BeanCopyUtils
.
copyProperties
(
detail
,
newDetail
);
BeanCopyUtils
.
copyProperties
(
detail
,
newDetail
);
...
@@ -429,6 +430,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -429,6 +430,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setToInsuranceDetailId
(
newDetail
.
getId
());
replace
.
setToInsuranceDetailId
(
newDetail
.
getId
());
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
...
@@ -540,6 +542,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -540,6 +542,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
@@ -551,6 +555,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -551,6 +555,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
@@ -560,6 +566,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -560,6 +566,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
return
R
.
failed
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
@@ -579,6 +587,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -579,6 +587,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
@@ -614,6 +623,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -614,6 +623,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()
&&
!
insuranceDetail
.
getId
().
equals
(
param
.
getId
())){
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()
&&
!
insuranceDetail
.
getId
().
equals
(
param
.
getId
())){
...
@@ -645,6 +655,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -645,6 +655,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
...
@@ -684,6 +695,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -684,6 +695,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
byId
.
getId
())
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
byId
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
insuranceDetail
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
TInsuranceDetail
insuranceDetail
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
...
@@ -810,6 +822,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -810,6 +822,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listVO
.
setRemark
(
InsurancesConstants
.
ADD
);
listVO
.
setRemark
(
InsurancesConstants
.
ADD
);
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
listVO
.
getId
())
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
listVO
.
getId
())
.
orderByDesc
(
TInsuranceReplace:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
...
@@ -1134,6 +1147,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1134,6 +1147,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
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:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
...
@@ -1428,6 +1442,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1428,6 +1442,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
@@ -1441,6 +1457,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1441,6 +1457,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
@@ -1452,6 +1470,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1452,6 +1470,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
@@ -1473,6 +1493,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1473,6 +1493,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
@@ -1522,6 +1543,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1522,6 +1543,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
@@ -1556,6 +1578,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1556,6 +1578,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
...
@@ -1789,6 +1812,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1789,6 +1812,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
()){
...
@@ -1804,6 +1828,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1804,6 +1828,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
...
@@ -1817,6 +1843,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1817,6 +1843,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceCompany
.
getId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
...
@@ -1828,6 +1856,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1828,6 +1856,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeStandard:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
...
@@ -1849,6 +1879,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1849,6 +1879,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
insuranceType
.
getId
())
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getMonth
,
month
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceTypeRate:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
...
@@ -1909,6 +1940,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1909,6 +1940,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
@@ -2116,6 +2148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2116,6 +2148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
...
@@ -2201,6 +2234,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2201,6 +2234,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
replace
).
isPresent
()){
if
(
Optional
.
ofNullable
(
replace
).
isPresent
()){
...
@@ -2234,6 +2268,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2234,6 +2268,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
...
@@ -2334,6 +2369,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2334,6 +2369,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
...
@@ -2361,6 +2397,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2361,6 +2397,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
batchPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
batchPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
...
@@ -2384,6 +2421,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2384,6 +2421,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
addPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
addPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
...
...
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