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
41d0a989
Commit
41d0a989
authored
Mar 11, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应付款管理-已出账比例和待出账比例不对
parent
d00b320f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyBroker.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+8
-3
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyBroker.java
View file @
41d0a989
...
@@ -37,7 +37,7 @@ public class PolicyBroker implements Serializable {
...
@@ -37,7 +37,7 @@ public class PolicyBroker implements Serializable {
private
String
brokerName
;
private
String
brokerName
;
/**
/**
* 转介人业务ID
(客户端用户表唯一业务ID)
* 转介人业务ID
*/
*/
private
String
brokerBizId
;
private
String
brokerBizId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
41d0a989
...
@@ -285,6 +285,10 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
...
@@ -285,6 +285,10 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
.
list
();
.
list
();
if
(
CollectionUtils
.
isNotEmpty
(
fortunes
))
{
if
(
CollectionUtils
.
isNotEmpty
(
fortunes
))
{
fortunes
.
forEach
(
f
->
{
fortunes
.
forEach
(
f
->
{
if
(
f
.
getCurrentPaymentHkdAmount
()
==
null
)
{
f
.
setCurrentPaymentHkdAmount
(
f
.
getHkdAmount
());
f
.
setCurrentPaymentRatio
(
BigDecimal
.
valueOf
(
100
));
}
f
.
setStatus
(
FortuneStatusEnum
.
SENT
.
getItemValue
());
f
.
setStatus
(
FortuneStatusEnum
.
SENT
.
getItemValue
());
f
.
setActualPayoutDate
(
new
Date
());
f
.
setActualPayoutDate
(
new
Date
());
f
.
setUpdaterId
(
loginUserId
.
toString
());
f
.
setUpdaterId
(
loginUserId
.
toString
());
...
@@ -308,20 +312,20 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
...
@@ -308,20 +312,20 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
.
last
(
"FOR UPDATE"
)
.
last
(
"FOR UPDATE"
)
.
list
();
.
list
();
// 4.3 全量汇总:把同一 expected_fortune 下所有 fortune 的 current_payment_amount 求和
// 4.3 全量汇总:把同一 expected_fortune 下所有 fortune 的 current_payment_
hkd_
amount 求和
Map
<
String
,
BigDecimal
>
paidMap
=
fortuneService
.
lambdaQuery
()
Map
<
String
,
BigDecimal
>
paidMap
=
fortuneService
.
lambdaQuery
()
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
expectedIds
)
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
expectedIds
)
.
eq
(
Fortune:
:
getStatus
,
FortuneStatusEnum
.
SENT
.
getItemValue
())
.
eq
(
Fortune:
:
getStatus
,
FortuneStatusEnum
.
SENT
.
getItemValue
())
.
list
()
.
list
()
.
stream
()
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
Fortune:
:
getExpectedFortuneBizId
,
.
collect
(
Collectors
.
groupingBy
(
Fortune:
:
getExpectedFortuneBizId
,
Collectors
.
mapping
(
Fortune:
:
getCurrentPaymentAmount
,
Collectors
.
mapping
(
Fortune:
:
getCurrentPayment
Hkd
Amount
,
Collectors
.
reducing
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
))));
Collectors
.
reducing
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
))));
// 4.4 反写 expected_fortune
// 4.4 反写 expected_fortune
expectedList
.
forEach
(
ef
->
{
expectedList
.
forEach
(
ef
->
{
BigDecimal
totalPaid
=
paidMap
.
getOrDefault
(
ef
.
getExpectedFortuneBizId
(),
BigDecimal
.
ZERO
);
BigDecimal
totalPaid
=
paidMap
.
getOrDefault
(
ef
.
getExpectedFortuneBizId
(),
BigDecimal
.
ZERO
);
BigDecimal
totalAmount
=
ef
.
getAmount
();
BigDecimal
totalAmount
=
ef
.
get
Hkd
Amount
();
BigDecimal
unpaid
=
totalAmount
.
subtract
(
totalPaid
);
BigDecimal
unpaid
=
totalAmount
.
subtract
(
totalPaid
);
String
newStatus
;
String
newStatus
;
...
@@ -341,6 +345,7 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
...
@@ -341,6 +345,7 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
unpaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
unpaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
.
set
(
ExpectedFortune:
:
getActualPayoutDate
,
new
Date
())
.
set
(
ExpectedFortune:
:
getUpdaterId
,
loginUserId
.
toString
())
.
set
(
ExpectedFortune:
:
getUpdaterId
,
loginUserId
.
toString
())
.
set
(
ExpectedFortune:
:
getUpdateTime
,
LocalDateTime
.
now
())
.
set
(
ExpectedFortune:
:
getUpdateTime
,
LocalDateTime
.
now
())
.
eq
(
ExpectedFortune:
:
getId
,
ef
.
getId
())
.
eq
(
ExpectedFortune:
:
getId
,
ef
.
getId
())
...
...
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