Commit 3cffef0e by zhangxingmin

push

parent 6a24545e
......@@ -18,12 +18,12 @@ public class ExchangeUtils {
if (fromAmount == null || percent == null) {
throw new IllegalArgumentException("fromAmount and percent must not be null");
}
BigDecimal rate = percent.divide(ONE_HUNDRED, DIVISION_SCALE, RoundingMode.HALF_UP);
BigDecimal target = fromAmount.multiply(rate);
// BigDecimal rate = percent.divide(ONE_HUNDRED, DIVISION_SCALE, RoundingMode.HALF_UP);
BigDecimal target = fromAmount.multiply(percent);
return target.setScale(SCALE, RoundingMode.HALF_UP);
}
public static void main(String[] args) {
System.out.println(calculateTargetAmount(new BigDecimal(20102.8921), new BigDecimal(20.18)));
System.out.println(calculateTargetAmount(new BigDecimal(20102.8921), new BigDecimal(0.12800000)));
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ public class ApiSalarySplitSummaryPageDto {
/**
* 即时汇率(原币种->目标币种)(查询原出账币种兑目标币种汇率,可修改)字符串 例:100%
*/
private String exchangeRate;
private BigDecimal exchangeRate;
/**
* 目标金额
......
......@@ -21,7 +21,7 @@
fa.team,
ss.from_amount,
ss.to_currency,
concat(ss.exchange_rate, '%') as exchangeRate,
ss.exchange_rate,
ss.to_amount,
fa.fortune_account_date,
ss.bill_org,
......
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