Commit b5768c79 authored by zhengyi's avatar zhengyi

保价费bug修复,还原到上个版本业务

parent 6a28c7c6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment