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
9b54f8b0
Commit
9b54f8b0
authored
Jan 27, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
见费出单逻辑-fxj
parent
a57601a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+30
-29
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 @
9b54f8b0
...
...
@@ -522,36 +522,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LocalDate
buyStartDate
;
//计算预计办理日期:若派单当日为工作日3点20之前,则预计办理日期为派单日期,若为3点20之后或派单日为非工作日,则预计办理日期为派单日后最近的一个工作日
detail
.
setPreHandleTime
(
LocalDateUtil
.
parseLocalDate
(
DateUtil
.
formatDate
(
preDispatchDate
)));
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
detail
.
getIsJfcd
())){
//计算参保开始日期:新增\批增\替换的参保开始日期=MAX("保单开始时间"、"预计办理日期+1日");
if
(
detail
.
getPolicyStart
().
isAfter
(
detail
.
getPreHandleTime
().
plusDays
(
1
))){
buyStartDate
=
detail
.
getPolicyStart
();
}
else
{
buyStartDate
=
detail
.
getPreHandleTime
().
plusDays
(
1
);
}
if
(
null
!=
detail
.
getPolicyEnd
()
&&
null
!=
buyStartDate
){
purchaseCycle
=
LocalDateUtil
.
betweenMonth
(
buyStartDate
.
toString
(),
detail
.
getPolicyEnd
().
toString
());
}
//计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数;
//计算参保开始日期:新增\批增\替换的参保开始日期=MAX("保单开始时间"、"预计办理日期+1日");
if
(
detail
.
getPolicyStart
().
isAfter
(
detail
.
getPreHandleTime
().
plusDays
(
1
))){
buyStartDate
=
detail
.
getPolicyStart
();
}
else
{
buyStartDate
=
detail
.
getPreHandleTime
().
plusDays
(
1
);
}
if
(
null
!=
detail
.
getPolicyEnd
()
&&
null
!=
buyStartDate
){
purchaseCycle
=
LocalDateUtil
.
betweenMonth
(
buyStartDate
.
toString
(),
detail
.
getPolicyEnd
().
toString
());
}
//计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数;
//按天计费方式
if
(
null
!=
detail
.
getBillingType
()
&&
CommonConstants
.
ZERO_INT
==
detail
.
getBillingType
().
intValue
()){
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式
if
(
null
!=
detail
.
getBillingType
()
&&
CommonConstants
.
ZERO_INT
==
detail
.
getBillingType
().
intValue
()){
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式
detail
.
setEstimatePremium
(
new
BigDecimal
(
detail
.
getBuyStandard
())
.
multiply
(
new
BigDecimal
(
purchaseCycle
))
.
divide
(
new
BigDecimal
(
"365"
),
2
,
RoundingMode
.
HALF_UP
)
.
add
(
new
BigDecimal
(
"5.00"
)));
//按月计费方式
}
else
if
(
null
!=
detail
.
getBillingType
()
&&
CommonConstants
.
ONE_INT
==
detail
.
getBillingType
().
intValue
()){
detail
.
setEstimatePremium
(
new
BigDecimal
(
detail
.
getBuyStandard
())
.
multiply
(
null
==
detail
.
getRate
()?
BigDecimal
.
ZERO
:
detail
.
getRate
())
.
add
(
new
BigDecimal
(
"5.00"
)));
}
long
day
=
LocalDateUtil
.
betweenDay
(
buyStartDate
.
toString
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
//购买周期
detail
.
setPurchaseCycle
(
purchaseCycle
+
"个月/"
+
day
+
"天"
);
detail
.
setEstimatePremium
(
new
BigDecimal
(
detail
.
getBuyStandard
())
.
multiply
(
new
BigDecimal
(
purchaseCycle
))
.
divide
(
new
BigDecimal
(
"365"
),
2
,
RoundingMode
.
HALF_UP
)
.
add
(
new
BigDecimal
(
"5.00"
)));
//按月计费方式
}
else
if
(
null
!=
detail
.
getBillingType
()
&&
CommonConstants
.
ONE_INT
==
detail
.
getBillingType
().
intValue
()){
detail
.
setEstimatePremium
(
new
BigDecimal
(
detail
.
getBuyStandard
())
.
multiply
(
null
==
detail
.
getRate
()?
BigDecimal
.
ZERO
:
detail
.
getRate
())
.
add
(
new
BigDecimal
(
"5.00"
)));
}
long
day
=
LocalDateUtil
.
betweenDay
(
buyStartDate
.
toString
(),
detail
.
getPolicyEnd
().
toString
());
//购买周期
detail
.
setPurchaseCycle
(
purchaseCycle
+
"个月/"
+
day
+
"天"
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
detail
.
getIsJfcd
())){
//预估缴费状态 0待缴费、1已缴费
detail
.
setPaymentStatus
(
CommonConstants
.
ZERO_STRING
);
detail
.
setBuyHandleStatus
(
CommonConstants
.
SIX_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