|
|
|
@ -125,7 +125,7 @@ public class BsGasServiceImpl implements BsGasService { |
|
|
|
|
payPriceModel.setPricePlatform(pricePlatform); |
|
|
|
|
|
|
|
|
|
// 加油升数,计算方式:加油金额 / 国标价
|
|
|
|
|
payPriceModel.setOilLiters(refuelPrice.divide(priceOfficial, 2, BigDecimal.ROUND_HALF_DOWN)); |
|
|
|
|
payPriceModel.setOilLiters(refuelPrice.divide(priceGun, 2, BigDecimal.ROUND_HALF_DOWN)); |
|
|
|
|
|
|
|
|
|
// 平台折扣,我们平台或者代理商设置的折扣
|
|
|
|
|
payPriceModel.setDiscount(discount.compareTo(new BigDecimal("1.00")) == 0 ? new BigDecimal("1.00") : discount); |
|
|
|
@ -134,7 +134,7 @@ public class BsGasServiceImpl implements BsGasService { |
|
|
|
|
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_HALF_UP)); |
|
|
|
|