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
52144992
Commit
52144992
authored
Jul 29, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
投保成功 按天计算保留两位小数 See merge request fangxinjiang/yifu!71
parents
02da7e15
573bd694
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+1
-1
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
52144992
...
@@ -741,7 +741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -741,7 +741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//计算起止时间的天数
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
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
);
detail
.
setEstimatePremium
(
estimatePremium
);
detail
.
setEstimatePremium
(
estimatePremium
);
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_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