提交代码

dev-discount
胡锐 2 years ago
parent d0d22b69ee
commit 2d860adac4
  1. 6
      hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java

@ -198,11 +198,11 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri
// 优惠价格 油站VIP价 * 系统折扣 // 优惠价格 油站VIP价 * 系统折扣
payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP)); payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP));
// 每升优惠 国标价 - 优惠价格 // 每升优惠 油站价 - 优惠价格
payPriceModel.setLitersPreferences(payPriceModel.getPriceOfficial().subtract(payPriceModel.getPricePreferences())); payPriceModel.setLitersPreferences(payPriceModel.getPriceGun().subtract(payPriceModel.getPricePreferences()));
// 本次优惠 加油升数 * 每升优惠 // 本次优惠 加油升数 * 每升优惠
payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_DOWN)); payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_HALF_UP));
// 支付价格 加油金额 - 本次优惠 // 支付价格 加油金额 - 本次优惠
payPriceModel.setPayPrice(oilingPrice.subtract(payPriceModel.getTotalPreferences())); payPriceModel.setPayPrice(oilingPrice.subtract(payPriceModel.getTotalPreferences()));

Loading…
Cancel
Save