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
f99bba4a
Commit
f99bba4a
authored
May 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
693c1d6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalaryServiceImpl.java
+6
-8
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalaryServiceImpl.java
View file @
f99bba4a
...
@@ -350,16 +350,14 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
...
@@ -350,16 +350,14 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
if
(
CollectionUtils
.
isEmpty
(
calculateTotalAmountDTOList
))
{
if
(
CollectionUtils
.
isEmpty
(
calculateTotalAmountDTOList
))
{
throw
new
BusinessException
(
"计算入参的值不能为空"
);
throw
new
BusinessException
(
"计算入参的值不能为空"
);
}
}
BigDecimal
totalAmount
=
BigDecimal
.
ZERO
;
//累加
calculateTotalAmountDTOList
.
forEach
(
dto
->
{
BigDecimal
totalAmount
=
calculateTotalAmountDTOList
.
stream
()
//发放金额
.
map
(
dto
->
{
BigDecimal
amount
=
ObjectUtils
.
defaultIfNull
(
dto
.
getAmount
(),
BigDecimal
.
ZERO
);
BigDecimal
amount
=
ObjectUtils
.
defaultIfNull
(
dto
.
getAmount
(),
BigDecimal
.
ZERO
);
//汇率
BigDecimal
exchangeRate
=
ObjectUtils
.
defaultIfNull
(
dto
.
getExchangeRate
(),
BigDecimal
.
ZERO
);
BigDecimal
exchangeRate
=
ObjectUtils
.
defaultIfNull
(
dto
.
getExchangeRate
(),
BigDecimal
.
ZERO
);
//港币金额 = 发放金额 * 汇率
return
amount
.
multiply
(
exchangeRate
);
BigDecimal
hkdAmount
=
amount
.
multiply
(
exchangeRate
);
})
totalAmount
.
add
(
hkdAmount
);
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
});
return
Result
.
success
(
totalAmount
);
return
Result
.
success
(
totalAmount
);
}
}
...
...
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