提交代码

2.0-dev
胡锐 7 months ago
parent 217e9e25b4
commit 187a277c1a
  1. 5
      hai-service/src/main/java/com/hai/model/GasPayPriceModel.java
  2. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  3. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  4. 2
      hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java

@ -26,6 +26,11 @@ public class GasPayPriceModel {
*/ */
private BigDecimal priceGun; private BigDecimal priceGun;
/**
* 成本价
*/
private BigDecimal priceCost;
/** /**
* 国标价 * 国标价
*/ */

@ -455,8 +455,13 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
gasOrder.setDeductionCouponPrice(new BigDecimal("0")); gasOrder.setDeductionCouponPrice(new BigDecimal("0"));
gasOrder.setDeductionProductPrice(new BigDecimal("0")); gasOrder.setDeductionProductPrice(new BigDecimal("0"));
if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
// 成本价
gasOrder.setGasPriceCost(priceModel.getPriceCost());
} else {
// 成本价 油站价 减 营销策略价 // 成本价 油站价 减 营销策略价
gasOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); gasOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice));
}
if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) { if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) {
gasOrder.setGasPriceCostTotal(gasOrder.getGasRefuelPrice()); gasOrder.setGasPriceCostTotal(gasOrder.getGasRefuelPrice());
} else { } else {

@ -385,8 +385,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), gasOrder, false); highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), gasOrder, false);
} else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type2.getNumber())) { } else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type2.getNumber())) {
// HighGasOilPrice gasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId() , gasOrder.getGasOilNo());
HighGasOilPrice gasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId() , gasOrder.getGasOilNo());
// 推送团油订单 // 推送团油订单
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
@ -394,7 +393,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
paramMap.put("oilNo", gasOrder.getGasOilNo()); paramMap.put("oilNo", gasOrder.getGasOilNo());
paramMap.put("gunNo", gasOrder.getGasGunNo()); paramMap.put("gunNo", gasOrder.getGasGunNo());
paramMap.put("priceGun", gasOrder.getGasPriceGun()); // 枪单价 paramMap.put("priceGun", gasOrder.getGasPriceGun()); // 枪单价
paramMap.put("priceVip", gasOilPrice.getPriceCost()); // 成本价 paramMap.put("priceVip", gasOrder.getGasPriceCost()); // 成本价
paramMap.put("driverPhone", gasOrder.getMemPhone()); paramMap.put("driverPhone", gasOrder.getMemPhone());
paramMap.put("thirdSerialNo", gasOrder.getOrderNo()); paramMap.put("thirdSerialNo", gasOrder.getOrderNo());
paramMap.put("refuelingAmount", gasOrder.getGasRefuelPrice()); paramMap.put("refuelingAmount", gasOrder.getGasRefuelPrice());

@ -225,6 +225,8 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri
priceGun = priceDetail.getBigDecimal("priceGun"); priceGun = priceDetail.getBigDecimal("priceGun");
// 团油优惠价 // 团油优惠价
priceVip = priceDetail.getBigDecimal("priceGun"); priceVip = priceDetail.getBigDecimal("priceGun");
// 团油VIP价 成本价
payPriceModel.setPriceCost(priceDetail.getBigDecimal("priceVip"));
// 嗨森逛平台价 国标价 * 折扣 // 嗨森逛平台价 国标价 * 折扣
BigDecimal pricePlatform = priceGun.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal pricePlatform = priceGun.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP);

Loading…
Cancel
Save