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
2f3b5db7
Commit
2f3b5db7
authored
Apr 29, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
9d7dbf3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalarySplitServiceImpl.java
+15
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+7
-1
yd-csf-service/src/main/java/com/yd/csf/service/vo/CommissionExpectedNewVO.java
+16
-5
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalarySplitServiceImpl.java
View file @
2f3b5db7
...
@@ -133,6 +133,21 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
...
@@ -133,6 +133,21 @@ public class ApiSalarySplitServiceImpl implements ApiSalarySplitService {
if
(
fortuneAccount
==
null
)
{
if
(
fortuneAccount
==
null
)
{
throw
new
BusinessException
(
"出账记录不存在"
);
throw
new
BusinessException
(
"出账记录不存在"
);
}
}
//统计保存入参的薪资拆分应发记录原币种金额金额之和
if
(
CollectionUtils
.
isNotEmpty
(
request
.
getApiSalarySplitBatchSaveDtoList
()))
{
//入参的薪资拆分应发记录原币种金额金额之和
BigDecimal
total
=
request
.
getApiSalarySplitBatchSaveDtoList
().
stream
()
.
map
(
ApiSalarySplitBatchSaveDto:
:
getFromAmount
)
.
filter
(
Objects:
:
nonNull
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
//原币种总金额
BigDecimal
fortuneAmount
=
fortuneAccount
.
getHkdAmount
()
!=
null
?
fortuneAccount
.
getHkdAmount
()
:
BigDecimal
.
ZERO
;
//入参的薪资拆分应发记录原币种金额金额之和不能大于原币种总金额
if
(
fortuneAmount
.
compareTo
(
total
)
<
0
)
{
throw
new
BusinessException
(
"拆分的原币种金额之和不能大于原币种总金额"
);
}
}
//薪资拆分应发记录-先删除后新增
//薪资拆分应发记录-先删除后新增
iSalarySplitService
.
deleteByFortuneAccountBizId
(
request
.
getFortuneAccountBizId
());
iSalarySplitService
.
deleteByFortuneAccountBizId
(
request
.
getFortuneAccountBizId
());
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
2f3b5db7
...
@@ -265,10 +265,11 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -265,10 +265,11 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
// 累积数据
// 累积数据
BigDecimal
paidAmount
=
ObjectUtils
.
defaultIfNull
(
expected
.
getPaidAmount
(),
BigDecimal
.
ZERO
);
BigDecimal
paidAmount
=
ObjectUtils
.
defaultIfNull
(
expected
.
getPaidAmount
(),
BigDecimal
.
ZERO
);
BigDecimal
paidRatio
=
ObjectUtils
.
defaultIfNull
(
expected
.
getPaidRatio
(),
BigDecimal
.
ZERO
);
BigDecimal
paidRatio
=
ObjectUtils
.
defaultIfNull
(
expected
.
getPaidRatio
(),
BigDecimal
.
ZERO
);
vo
.
setPaidRatio
(
paidRatio
);
//
vo.setPaidRatio(paidRatio);
// vo.setPaidAmount(paidAmount);
// vo.setPaidAmount(paidAmount);
vo
.
setRealAmount
(
paidAmount
);
// 实收金额(累积)
vo
.
setRealAmount
(
paidAmount
);
// 实收金额(累积)
vo
.
setExpectedAmount
(
expected
.
getExpectedAmount
());
vo
.
setExpectedAmount
(
expected
.
getExpectedAmount
());
vo
.
setIssueNumber
(
policyFollow
.
getIssueNumber
()
!=
null
?
Integer
.
parseInt
(
policyFollow
.
getIssueNumber
().
toString
())
:
null
);
// 产品来佣率
// 产品来佣率
BigDecimal
commissionRatio
=
expected
.
getCommissionRatio
();
BigDecimal
commissionRatio
=
expected
.
getCommissionRatio
();
...
@@ -287,6 +288,10 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -287,6 +288,10 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
vo
.
setGapRate
(
BigDecimal
.
ZERO
);
vo
.
setGapRate
(
BigDecimal
.
ZERO
);
}
}
//计算累积已入账比例 = 总实佣率/产品对应来佣率
BigDecimal
totalRevenueRatio
=
paidRatio
.
divide
(
commissionRatio
,
4
,
RoundingMode
.
HALF_UP
);
vo
.
setTotalRevenueRatio
(
totalRevenueRatio
);
// 待入账金额(已实现归零逻辑)
// 待入账金额(已实现归零逻辑)
if
(
commissionRatio
!=
null
&&
paidRatio
.
compareTo
(
commissionRatio
)
>=
0
)
{
if
(
commissionRatio
!=
null
&&
paidRatio
.
compareTo
(
commissionRatio
)
>=
0
)
{
vo
.
setPendingAmount
(
BigDecimal
.
ZERO
);
vo
.
setPendingAmount
(
BigDecimal
.
ZERO
);
...
@@ -335,6 +340,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -335,6 +340,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
vo
.
setRealUpdateTime
(
commission
.
getUpdateTime
());
vo
.
setRealUpdateTime
(
commission
.
getUpdateTime
());
vo
.
setRealUpdaterName
(
commission
.
getUpdaterId
());
vo
.
setRealUpdaterName
(
commission
.
getUpdaterId
());
vo
.
setRealRemark
(
commission
.
getRemark
());
vo
.
setRealRemark
(
commission
.
getRemark
());
vo
.
setCommissionDate
(
commission
.
getCommissionDate
());
// 覆盖公共业务字段
// 覆盖公共业务字段
// vo.setAmount(commission.getAmount());
// vo.setAmount(commission.getAmount());
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/CommissionExpectedNewVO.java
View file @
2f3b5db7
...
@@ -85,16 +85,16 @@ public class CommissionExpectedNewVO implements Serializable {
...
@@ -85,16 +85,16 @@ public class CommissionExpectedNewVO implements Serializable {
private
Date
commissionDateMonth
;
private
Date
commissionDateMonth
;
/**
/**
* 入账检核记录-入账
检核年月 yyyyMM(入账年月(实)
)
* 入账检核记录-入账
年月实(来佣日期 yyyyMM
)
*/
*/
// @Schema(description = "入账检核年月 yyyyMM
")
@JsonFormat
(
pattern
=
"yyyyMM"
,
timezone
=
"GMT+8
"
)
private
String
realReconciliationYearMonth
;
private
Date
commissionDate
;
/**
/**
* 预计来佣-已入账来佣比例 (%) ( 累积已入账比例)
* 预计来佣-已入账来佣比例 (%) ( 累积已入账比例
= 预计来佣实佣率realRate/产品对应来佣率
)
*/
*/
// @Schema(description = "已入账来佣比例 (%)")
// @Schema(description = "已入账来佣比例 (%)")
private
BigDecimal
paid
Ratio
;
private
BigDecimal
totalRevenue
Ratio
;
/**
/**
* 预计来佣-预计入账比例 (%)(产品对应来佣率)
* 预计来佣-预计入账比例 (%)(产品对应来佣率)
...
@@ -128,6 +128,12 @@ public class CommissionExpectedNewVO implements Serializable {
...
@@ -128,6 +128,12 @@ public class CommissionExpectedNewVO implements Serializable {
private
BigDecimal
realAmount
;
private
BigDecimal
realAmount
;
/**
/**
* 入账检核记录-入账检核年月 yyyyMM(检核年月)
*/
// @Schema(description = "入账检核年月 yyyyMM")
private
String
realReconciliationYearMonth
;
/**
* 入账检核记录-本次入账比例(实佣率/产品对应来佣率)
* 入账检核记录-本次入账比例(实佣率/产品对应来佣率)
*/
*/
private
BigDecimal
revenueRatio
;
private
BigDecimal
revenueRatio
;
...
@@ -163,6 +169,11 @@ public class CommissionExpectedNewVO implements Serializable {
...
@@ -163,6 +169,11 @@ public class CommissionExpectedNewVO implements Serializable {
private
String
productName
;
private
String
productName
;
/**
/**
* 年期(供款年期)
*/
private
Integer
issueNumber
;
/**
* 预计来佣-保单币种
* 预计来佣-保单币种
*/
*/
// @Schema(description = "保单币种")
// @Schema(description = "保单币种")
...
...
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