Commit ba65d59f by jianan

出账检核-剩余出账比例

parent 041f93d4
......@@ -329,14 +329,16 @@ public class FortuneVO implements Serializable {
}
FortuneVO fortuneVO = new FortuneVO();
BeanUtils.copyProperties(fortune, fortuneVO);
// 计算已出账金额和待出账金额
fortuneVO.setFortunePaidAmount(fortune.getCurrentPaymentHkdAmount());
fortuneVO.setFortuneUnpaidAmount(NumberUtil.sub(fortune.getHkdAmount(), fortune.getCurrentPaymentHkdAmount()));
// 计算待出账比例
BigDecimal currentPaymentRatio = ObjectUtil.defaultIfNull(fortuneVO.getCurrentPaymentRatio(), BigDecimal.ZERO);
BigDecimal currentPaymentRatio = NumberUtil
.div(fortune.getCurrentPaymentHkdAmount(), fortune.getHkdAmount(), 4)
.multiply(BigDecimal.valueOf(100));
fortuneVO.setCurrentPaymentRatio(currentPaymentRatio);
fortuneVO.setFortuneUnpaidRatio(BigDecimal.valueOf(100).subtract(currentPaymentRatio));
fortuneVO.setFortunePaidAmount(fortune.getCurrentPaymentHkdAmount());
fortuneVO.setFortuneUnpaidAmount(NumberUtil.sub(fortune.getHkdAmount(), fortune.getCurrentPaymentHkdAmount()));
fortuneVO.setCurrency(CurrencyEnum.toLabel(fortune.getCurrency()));
fortuneVO.setPolicyCurrency((CurrencyEnum.toLabel(fortune.getPolicyCurrency())));
......
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