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
051a980d
Commit
051a980d
authored
Aug 02, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10572、10563 bug 修复
parent
b314fcc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+23
-15
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
051a980d
...
...
@@ -516,9 +516,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
...
...
@@ -534,7 +537,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()
&&
!
insuranceDetailBetween
.
getId
().
equals
(
param
.
getId
())){
return
R
.
failed
(
"当前员工在["
+
param
.
getPolicyStart
()+
"-"
+
param
.
getPolicyEnd
()+
"]期间内有投保记录"
);
return
R
.
failed
(
"当前员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
}
BeanCopyUtils
.
copyProperties
(
param
,
byId
);
//投保状态:待投保
...
...
@@ -787,7 +790,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
...
...
@@ -1276,9 +1279,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
...
...
@@ -1294,7 +1300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()){
param
.
setErrorMessage
(
"当前员工在["
+
param
.
getPolicyStart
()+
"-"
+
param
.
getPolicyEnd
()+
"]期间内有投保记录"
);
param
.
setErrorMessage
(
"当前员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
listResult
.
add
(
param
);
continue
;
}
...
...
@@ -1922,9 +1928,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
and
(
wrapper
->
wrapper
.
between
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
or
()
.
between
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()),
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
wrapper
->
wrapper
.
and
(
s
->
s
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
)
.
or
(
e
->
e
.
le
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
ge
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
())))
)
//有效
.
and
(
...
...
@@ -1940,7 +1949,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
if
(
Optional
.
ofNullable
(
insuranceDetailBetween
).
isPresent
()){
param
.
setErrorMessage
(
"替换员工在["
+
param
.
getPolicyStart
()+
"-"
+
param
.
getPolicyEnd
()+
"]期间内有投保记录"
);
param
.
setErrorMessage
(
"替换员工在["
+
insuranceDetailBetween
.
getPolicyStart
()+
"-"
+
insuranceDetailBetween
.
getPolicyEnd
()+
"]期间内有投保记录"
);
listResult
.
add
(
param
);
continue
;
}
...
...
@@ -3453,7 +3462,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
...
...
@@ -3514,7 +3523,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* EKP紧急出险
*
* @author zhaji
* @param userName
* @param empIdcardNo
* @return {@link R}
*/
...
...
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