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
5818609b
Commit
5818609b
authored
Apr 03, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
5916f848
2d35cbaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+12
-14
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
5818609b
...
@@ -651,13 +651,17 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -651,13 +651,17 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
errorMsg
);
throw
new
BusinessException
(
ResultCode
.
FAIL
.
getCode
(),
errorMsg
);
}
}
List
<
ApiExpectedSpeciesListResponse
>
matchedList
=
matchResult
.
getMatchedList
();
// 计算佣金总期数 list 中 endPeriod最大值
// 计算佣金总期数 list 中 endPeriod最大值
Integer
maxEndPeriod
=
match
Result
.
getMatchedList
()
.
stream
()
Integer
maxEndPeriod
=
match
edList
.
stream
()
.
map
(
item
->
Convert
.
toInt
(
item
.
getEndPeriod
()))
.
map
(
item
->
Convert
.
toInt
(
item
.
getEndPeriod
()))
.
max
(
Integer:
:
compareTo
)
.
max
(
Integer:
:
compareTo
)
.
orElse
(
0
);
.
orElse
(
0
);
for
(
ApiExpectedSpeciesListResponse
item
:
matchResult
.
getMatchedList
())
{
int
size
=
matchedList
.
size
();
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
ApiExpectedSpeciesListResponse
item
=
matchedList
.
get
(
i
);
CommissionExpected
commissionExpected
=
new
CommissionExpected
();
CommissionExpected
commissionExpected
=
new
CommissionExpected
();
commissionExpected
.
setCommissionExpectedBizId
(
RandomStringGenerator
.
generateBizId16
(
"commission_expected"
));
commissionExpected
.
setCommissionExpectedBizId
(
RandomStringGenerator
.
generateBizId16
(
"commission_expected"
));
commissionExpected
.
setReceivableNo
(
receivableService
.
generateReceivableNo
(
"R"
,
reconciliationCompanyCode
,
reconciliationCompany
));
commissionExpected
.
setReceivableNo
(
receivableService
.
generateReceivableNo
(
"R"
,
reconciliationCompanyCode
,
reconciliationCompany
));
...
@@ -678,7 +682,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -678,7 +682,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
commissionExpected
.
setCommissionRatio
(
item
.
getCommissionRate
());
commissionExpected
.
setCommissionRatio
(
item
.
getCommissionRate
());
commissionExpected
.
setAmount
(
null
);
commissionExpected
.
setAmount
(
null
);
commissionExpected
.
setCurrency
(
item
.
getCurrency
());
commissionExpected
.
setCurrency
(
item
.
getCurrency
());
commissionExpected
.
setCommissionDate
(
calculateCommissionDate
(
i
tem
.
getEndPeriod
()
,
coolingOffEndDate
));
commissionExpected
.
setCommissionDate
(
calculateCommissionDate
(
i
,
coolingOffEndDate
));
commissionExpected
.
setStatus
(
CommissionExpectedStatusEnum
.
PENDING
.
getItemValue
());
commissionExpected
.
setStatus
(
CommissionExpectedStatusEnum
.
PENDING
.
getItemValue
());
commissionExpected
.
setStatusDesc
(
null
);
commissionExpected
.
setStatusDesc
(
null
);
commissionExpected
.
setDefaultExchangeRate
(
queryExchangeRateByFeign
(
policy
.
getCurrency
(),
item
.
getCurrency
()));
commissionExpected
.
setDefaultExchangeRate
(
queryExchangeRateByFeign
(
policy
.
getCurrency
(),
item
.
getCurrency
()));
...
@@ -973,12 +977,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -973,12 +977,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
/**
/**
* 根据保单生效日和佣金期数计算预计来佣日期,首期为生效日的1个月,后续期数为首期的次年
* 根据保单生效日和佣金期数计算预计来佣日期,首期为生效日的1个月,后续期数为首期的次年
*
*
* @param
endPeriod
佣金期数
* @param
currentPeriod
佣金期数
* @param effectiveDate 保单生效日
* @param effectiveDate 保单生效日
* @return 预计来佣日期
* @return 预计来佣日期
*/
*/
private
Date
calculateCommissionDate
(
String
end
Period
,
Date
effectiveDate
)
{
private
Date
calculateCommissionDate
(
Integer
current
Period
,
Date
effectiveDate
)
{
if
(
effectiveDate
==
null
||
StringUtils
.
isBlank
(
endPeriod
)
)
{
if
(
effectiveDate
==
null
||
currentPeriod
==
null
||
currentPeriod
<=
0
)
{
return
null
;
return
null
;
}
}
...
@@ -987,14 +991,8 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -987,14 +991,8 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
// 首期:保单生效日的1个月
// 首期:保单生效日的1个月
cal
.
add
(
Calendar
.
MONTH
,
1
);
cal
.
add
(
Calendar
.
MONTH
,
1
);
Integer
period
=
Convert
.
toInt
(
endPeriod
);
// 后续期数
if
(
period
==
null
||
period
<=
0
)
{
cal
.
add
(
Calendar
.
YEAR
,
currentPeriod
);
return
cal
.
getTime
();
}
// 后续期数:在首期基础上增加 (period - 1) 年
// 例如:第2期为首期次年,第3期为首期+2年
cal
.
add
(
Calendar
.
YEAR
,
period
-
1
);
return
cal
.
getTime
();
return
cal
.
getTime
();
}
}
...
...
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