Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
13dbdee7
Commit
13dbdee7
authored
Mar 04, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进同步预约信息17-预计来佣比例根据保单生效日期筛选
parent
72c73c8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+17
-2
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
13dbdee7
...
@@ -47,6 +47,8 @@ import java.io.IOException;
...
@@ -47,6 +47,8 @@ import java.io.IOException;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -514,7 +516,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -514,7 +516,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
// 匹配规格并获取不匹配的条件
// 匹配规格并获取不匹配的条件
MatchResult
matchResult
=
matchExpectedSpecies
(
MatchResult
matchResult
=
matchExpectedSpecies
(
expectedSpeciesList
,
paymentTerm
,
reconciliationCompanyBizId
,
expectedSpeciesList
,
paymentTerm
,
reconciliationCompanyBizId
,
policyHolderAge
,
paymentPremium
);
policyHolderAge
,
paymentPremium
,
effectiveDate
);
if
(
matchResult
.
getMatchedList
().
isEmpty
())
{
if
(
matchResult
.
getMatchedList
().
isEmpty
())
{
String
errorMsg
=
matchResult
.
getUnmatchedConditions
().
isEmpty
()
String
errorMsg
=
matchResult
.
getUnmatchedConditions
().
isEmpty
()
...
@@ -611,7 +613,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -611,7 +613,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
*/
*/
private
MatchResult
matchExpectedSpecies
(
List
<
ApiExpectedSpeciesListResponse
>
expectedSpeciesList
,
private
MatchResult
matchExpectedSpecies
(
List
<
ApiExpectedSpeciesListResponse
>
expectedSpeciesList
,
String
paymentTerm
,
String
reconciliationCompanyId
,
String
paymentTerm
,
String
reconciliationCompanyId
,
Integer
policyHolderAge
,
BigDecimal
paymentPremium
)
{
Integer
policyHolderAge
,
BigDecimal
paymentPremium
,
Date
effectiveDate
)
{
List
<
String
>
unmatchedConditions
=
new
ArrayList
<>();
List
<
String
>
unmatchedConditions
=
new
ArrayList
<>();
List
<
ApiExpectedSpeciesListResponse
>
currentList
=
expectedSpeciesList
;
List
<
ApiExpectedSpeciesListResponse
>
currentList
=
expectedSpeciesList
;
...
@@ -644,9 +646,22 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -644,9 +646,22 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
i
->
containsValue
(
i
.
getSpeciesJson
(),
"PREMIUM"
,
Convert
.
toStr
(
paymentPremium
)),
i
->
containsValue
(
i
.
getSpeciesJson
(),
"PREMIUM"
,
Convert
.
toStr
(
paymentPremium
)),
unmatchedConditions
,
"保费["
+
paymentPremium
+
"]"
);
unmatchedConditions
,
"保费["
+
paymentPremium
+
"]"
);
// 检查生效日期
currentList
=
filterAndCheck
(
currentList
,
i
->
isEffective
(
i
.
getEffectiveStart
(),
i
.
getEffectiveEnd
(),
effectiveDate
),
unmatchedConditions
,
"生效日期["
+
effectiveDate
+
"]"
);
if
(
unmatchedConditions
.
size
()
>
0
)
{
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
}
return
new
MatchResult
(
currentList
,
unmatchedConditions
);
return
new
MatchResult
(
currentList
,
unmatchedConditions
);
}
}
private
boolean
isEffective
(
LocalDateTime
effectiveStart
,
LocalDateTime
effectiveEnd
,
Date
effectiveDate
)
{
LocalDateTime
effectiveDateLocal
=
effectiveDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
();
return
effectiveDateLocal
.
isAfter
(
effectiveStart
)
&&
effectiveDateLocal
.
isBefore
(
effectiveEnd
);
}
/**
/**
* 过滤列表并检查是否为空
* 过滤列表并检查是否为空
*
*
...
...
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