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
d0523a47
Commit
d0523a47
authored
May 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
74424736
421940dc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
10 deletions
+21
-10
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+7
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+3
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+5
-5
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+3
-3
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
d0523a47
...
...
@@ -1433,8 +1433,10 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if
(!
CollectionUtils
.
isEmpty
(
fortuneList
))
{
// 计算已出账金额
for
(
Fortune
fortune
:
fortuneList
)
{
if
(
FortuneStatusEnum
.
SENT
.
getItemValue
().
equals
(
fortune
.
getStatus
()))
{
paidAmount
=
paidAmount
.
add
(
fortune
.
getCurrentPaymentHkdAmount
());
}
}
// 计算待出账金额
unpaidAmount
=
request
.
getHkdAmount
().
subtract
(
paidAmount
);
// 计算已出账比例(已出账金额/预计发佣金额)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
d0523a47
...
...
@@ -751,6 +751,10 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
(
oldValue
,
newValue
)
->
newValue
// 遇到重复时使用新值
));
// 当前登录用户
AuthUserDto
currentLoginUser
=
SecurityUtil
.
getCurrentLoginUser
();
String
loginUserId
=
currentLoginUser
.
getId
().
toString
();
Date
now
=
new
Date
();
// 创建新的发佣记录
...
...
@@ -815,6 +819,9 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
fortune
.
setCreateTime
(
now
);
fortune
.
setUpdateTime
(
now
);
fortune
.
setReconciliationOperator
(
"系统生成"
);
fortune
.
setCreatorId
(
loginUserId
);
fortune
.
setUpdaterId
(
loginUserId
);
newFortuneList
.
add
(
fortune
);
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
d0523a47
...
...
@@ -147,6 +147,7 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
// 3. 将 actualList 转换为 Map
Map
<
String
,
List
<
ApiExpectedFortunePageResponse
>>
actualMap
=
actualList
.
stream
()
.
filter
(
item
->
"R"
.
equals
(
item
.
getFortuneBizType
()))
.
collect
(
Collectors
.
groupingBy
(
ApiExpectedFortunePageResponse:
:
getExpectedFortuneBizId
));
// 4. 调整数据顺序
...
...
@@ -158,11 +159,12 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
// 查找对应的实际发佣
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getExpectedFortuneBizId
());
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
// 设置实际出账记录的字段:待出账金额(估)、已出账比例、未出账比例
// 设置实际出账记录的字段:待出账金额(估)、已出账比例、未出账比例
、已出账金额
matchedList
.
forEach
(
actual
->
{
actual
.
setUnpaidAmount
(
expected
.
getHkdAmount
());
actual
.
setPaidRatio
(
expected
.
getPaidRatio
());
actual
.
setUnpaidRatio
(
expected
.
getUnpaidRatio
());
actual
.
setPaidAmount
(
expected
.
getPaidAmount
());
});
sortedList
.
addAll
(
matchedList
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
d0523a47
...
...
@@ -189,7 +189,7 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
updateFortune
.
setCurrentPaymentRatio
(
item
.
getCurrentPaymentHkdAmount
()
.
divide
(
item
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)));
}
updateFortune
.
setReconciliationOperator
(
currentLoginUser
.
get
Usern
ame
());
updateFortune
.
setReconciliationOperator
(
currentLoginUser
.
get
RealN
ame
());
updateFortuneList
.
add
(
updateFortune
);
// 处理关联预计发佣记录
expectedFortuneBizIdList
.
add
(
item
.
getExpectedFortuneBizId
());
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
d0523a47
...
...
@@ -233,7 +233,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
String
loginUserId
=
currentLoginUser
.
getId
().
toString
();
// 检核人
fortune
.
setReconciliationOperator
(
currentLoginUser
.
get
Usern
ame
());
fortune
.
setReconciliationOperator
(
currentLoginUser
.
get
RealN
ame
());
// 如果传入了金额
if
(
currentPaymentHkdAmount
!=
null
&&
currentPaymentHkdAmount
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
...
...
@@ -260,7 +260,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
fortune
.
setCurrentPaymentHkdAmount
(
fortune
.
getHkdAmount
());
fortune
.
setCurrentPaymentRatio
(
BigDecimal
.
valueOf
(
100
));
fortune
.
setStatus
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
fortune
.
setReconciliationOperator
(
currentLoginUser
.
get
Usern
ame
());
fortune
.
setReconciliationOperator
(
currentLoginUser
.
get
RealN
ame
());
fortune
.
setUpdaterId
(
loginUserId
);
fortune
.
setUpdateTime
(
new
Date
());
...
...
@@ -308,7 +308,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
main
.
setCurrentPaymentRatio
(
currentPaymentHkdAmount
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)));
main
.
setStatus
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
main
.
setReconciliationOperator
(
currentLoginUser
.
get
Usern
ame
());
main
.
setReconciliationOperator
(
currentLoginUser
.
get
RealN
ame
());
main
.
setUpdaterId
(
loginUserId
);
main
.
setUpdateTime
(
new
Date
());
...
...
@@ -327,7 +327,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
part
.
setStatus
(
FortuneStatusEnum
.
RESERVED
.
getItemValue
());
part
.
setIsPart
(
1
);
part
.
setPayoutDate
(
LocalDate
.
now
().
plusMonths
(
1
));
// 次月
part
.
setReconciliationOperator
(
currentLoginUser
.
get
Usern
ame
());
part
.
setReconciliationOperator
(
currentLoginUser
.
get
RealN
ame
());
part
.
setCreatorId
(
loginUserId
);
part
.
setCreateTime
(
new
Date
());
this
.
save
(
part
);
...
...
@@ -1017,7 +1017,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
newExpectedFortune
.
setPaidRatio
(
BigDecimal
.
ZERO
);
newExpectedFortune
.
setUnpaidRatio
(
BigDecimal
.
valueOf
(
100
));
newExpectedFortune
.
setStatus
(
"0"
);
newExpectedFortune
.
setStatus
(
FortuneStatusEnum
.
CAN_SEND
.
getItemValue
()
);
newExpectedFortune
.
setPayoutDate
(
LocalDate
.
parse
(
splitDto
.
getPayoutYearMonth
()
+
"-01"
));
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
d0523a47
...
...
@@ -239,10 +239,10 @@
f.payout_amount,
f.hkd_to_payout_rate,
f.hkd_amount,
f.
current_payment_hkd_amount,
NULL as
current_payment_hkd_amount,
f.exchange_rate,
IF(f.status = 2, f.hkd_amount, 0)
as paid_amount,
IF(f.status != 2 and f.status != 5, f.hkd_amount, 0)
as unpaid_amount,
NULL
as paid_amount,
NULL
as unpaid_amount,
NULL as paid_ratio,
NULL as unpaid_ratio,
f.is_tax,
...
...
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