mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-25 21:45:08 +08:00
update
This commit is contained in:
@@ -756,11 +756,14 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
// 订单折扣金额
|
||||
BigDecimal discountAmount = discountServiceAmount.add(discountElectricityAmount);
|
||||
orderBasicInfo.setDiscountAmount(discountAmount);
|
||||
// 更新退款金额 = 退款金额 - 折扣金额
|
||||
// BigDecimal refundAmount = orderBasicInfo.getRefundAmount().subtract(discountAmount);
|
||||
|
||||
// 更新结算金额 结算金额 = 消费金额 - 虚拟金额 - 优惠金额
|
||||
BigDecimal newSettleAmount = orderBasicInfo.getSettleAmount().subtract(discountAmount);
|
||||
orderBasicInfo.setSettleAmount(newSettleAmount);
|
||||
|
||||
// 总消费金额 = 折扣后电费 + 折扣后服务费
|
||||
BigDecimal totalConsumeAmount = afterServiceAmountDiscount.add(afterElectricityAmountDiscount);
|
||||
|
||||
// 更新退款金额
|
||||
BigDecimal refundAmount = orderBasicInfo.getPayAmount().subtract(totalConsumeAmount).setScale(2, RoundingMode.DOWN);
|
||||
orderBasicInfo.setRefundAmount(refundAmount);
|
||||
|
||||
Reference in New Issue
Block a user