Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
b5768c79
Commit
b5768c79
authored
Jul 12, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保价费bug修复,还原到上个版本业务
parent
6a28c7c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
26 deletions
+5
-26
ProdCostCalculation.java
...r/yudao/module/product/component/ProdCostCalculation.java
+5
-26
No files found.
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/component/ProdCostCalculation.java
View file @
b5768c79
...
...
@@ -430,37 +430,16 @@ public class ProdCostCalculation {
currencyApi
.
getCurrencyRate
(
rmbCurrency
.
longValue
(),
insuranceCurrencyId
);
FeeDto
feeDto
=
new
FeeDto
();
if
(
costDto
.
getTotalWorth
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
insuranceCurrencyId
==
Long
.
parseLong
(
usdCurrency
.
toString
()))
{
//美元币种
//因为货值为RMB计算,保价费应换算为目标货币(默认为美元)
BigDecimal
insuranceFee
=
costDto
.
getTotalWorth
().
multiply
(
new
BigDecimal
(
"1.1"
)).
multiply
(
new
BigDecimal
(
"0.002"
)).
multiply
(
exchangeRateRespDTO
.
getCurrencyRate
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
//insuranceFee 修改报价费币种BUG
costDto
.
setInsuranceFee
(
insuranceFee
);
feeDto
.
setAmount
(
insuranceFee
);
}
if
(
insuranceCurrencyId
==
Long
.
parseLong
(
rmbCurrency
.
toString
()))
{
//保费是人民币,不用成汇率
BigDecimal
insuranceFee
=
costDto
.
getTotalWorth
().
multiply
(
new
BigDecimal
(
"1.1"
)).
multiply
(
new
BigDecimal
(
"0.002"
)).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
//insuranceFee 修改报价费币种BUG
costDto
.
setInsuranceFee
(
insuranceFee
);
feeDto
.
setAmount
(
insuranceFee
);
}
// 因为货值为RMB计算,保价费应换算为目标货币(默认为美元)
BigDecimal
insuranceFee
=
costDto
.
getTotalWorth
().
multiply
(
new
BigDecimal
(
"1.1"
))
.
multiply
(
new
BigDecimal
(
"0.002"
)).
multiply
(
exchangeRateRespDTO
.
getCurrencyRate
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
costDto
.
setInsuranceFee
(
insuranceFee
);
feeDto
.
setAmount
(
insuranceFee
);
}
else
{
costDto
.
setInsuranceFee
(
minInsuranceFee
);
feeDto
.
setAmount
(
minInsuranceFee
);
}
if
(
costDto
.
getInsuranceFee
().
compareTo
(
minInsuranceFee
)
<
0
)
{
costDto
.
setInsuranceFee
(
minInsuranceFee
);
// 保价费最低值
feeDto
.
setAmount
(
minInsuranceFee
);
...
...
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