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
d790d8c2
Commit
d790d8c2
authored
May 19, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-增加币种83
parent
8af45979
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+13
-7
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
d790d8c2
...
...
@@ -434,11 +434,20 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
Collectors
.
reducing
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
))));
// 4.4 反写 expected_fortune
expectedList
.
forEach
(
ef
->
{
for
(
ExpectedFortune
ef
:
expectedList
)
{
BigDecimal
totalPaid
=
paidMap
.
getOrDefault
(
ef
.
getExpectedFortuneBizId
(),
BigDecimal
.
ZERO
);
BigDecimal
totalAmount
=
ef
.
getHkdAmount
();
BigDecimal
unpaid
=
totalAmount
.
subtract
(
totalPaid
);
BigDecimal
paidRatio
=
BigDecimal
.
ZERO
;
if
(
totalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
paidRatio
=
totalPaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
));
}
BigDecimal
unpaidRatio
=
BigDecimal
.
ZERO
;
if
(
totalAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
unpaidRatio
=
unpaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
));
}
String
newStatus
;
if
(
unpaid
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
newStatus
=
FortuneStatusEnum
.
SENT
.
getItemValue
();
// 全部完成
...
...
@@ -451,17 +460,14 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
expectedFortuneService
.
lambdaUpdate
()
.
set
(
ExpectedFortune:
:
getPaidAmount
,
totalPaid
)
.
set
(
ExpectedFortune:
:
getUnpaidAmount
,
unpaid
)
.
set
(
ExpectedFortune:
:
getPaidRatio
,
totalPaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
unpaid
.
divide
(
totalAmount
,
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
.
set
(
ExpectedFortune:
:
getPaidRatio
,
paidRatio
)
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
unpaidRatio
)
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
// .set(ExpectedFortune::getActualPayoutDate, new Date())
.
set
(
ExpectedFortune:
:
getUpdaterId
,
loginUserId
.
toString
())
.
set
(
ExpectedFortune:
:
getUpdateTime
,
LocalDateTime
.
now
())
.
eq
(
ExpectedFortune:
:
getId
,
ef
.
getId
())
.
update
();
}
);
}
return
true
;
}
...
...
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