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
d6f1a4b8
Commit
d6f1a4b8
authored
Nov 07, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20221107 针对批增的:“购买周期”是用生效日期同原保单截止日期进行计算得出,然后去计算预估保费
parent
8a2d11ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+15
-3
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
d6f1a4b8
...
@@ -782,6 +782,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -782,6 +782,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//购买周期
//购买周期
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if
(
CommonConstants
.
THREE_INT
==
insuranceDetailVO
.
getBuyType
()){
if
(
Objects
.
isNull
(
insuranceDetailVO
.
getPolicyEffect
())){
insuranceDetailVO
.
setBuyCycle
(
null
);
}
else
{
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
}
}
//派单类型
//派单类型
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
//派单状态
//派单状态
...
@@ -1309,12 +1320,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1309,12 +1320,13 @@ 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) * 天数
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
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyEffect
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
}
}
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
//记录状态均置为「已投保」
//记录状态均置为「已投保」
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setSignFlag
(
CommonConstants
.
ONE_INT
);
detail
.
setSignFlag
(
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