From 187a277c1a7228b656214fe854ab81e0479bee05 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Sun, 28 Apr 2024 11:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hai/model/GasPayPriceModel.java | 5 +++++ .../order/service/impl/OrderCreateHandleServiceImpl.java | 9 +++++++-- .../order/service/impl/OrderPaySuccessServiceImpl.java | 5 ++--- .../service/impl/HighGasDiscountOilPriceServiceImpl.java | 2 ++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hai-service/src/main/java/com/hai/model/GasPayPriceModel.java b/hai-service/src/main/java/com/hai/model/GasPayPriceModel.java index ba326f38..c60dd774 100644 --- a/hai-service/src/main/java/com/hai/model/GasPayPriceModel.java +++ b/hai-service/src/main/java/com/hai/model/GasPayPriceModel.java @@ -26,6 +26,11 @@ public class GasPayPriceModel { */ private BigDecimal priceGun; + /** + * 成本价 + */ + private BigDecimal priceCost; + /** * 国标价 */ diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index 8a07dce5..7e9cff9c 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -455,8 +455,13 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { gasOrder.setDeductionCouponPrice(new BigDecimal("0")); gasOrder.setDeductionProductPrice(new BigDecimal("0")); - // 成本价 油站价 减 营销策略价 - gasOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); + if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) { + // 成本价 + gasOrder.setGasPriceCost(priceModel.getPriceCost()); + } else { + // 成本价 油站价 减 营销策略价 + gasOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); + } if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) { gasOrder.setGasPriceCostTotal(gasOrder.getGasRefuelPrice()); } else { diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index 9a94110d..46933b70 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -385,8 +385,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), gasOrder, false); } 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 paramMap = new HashMap<>(); @@ -394,7 +393,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { paramMap.put("oilNo", gasOrder.getGasOilNo()); paramMap.put("gunNo", gasOrder.getGasGunNo()); paramMap.put("priceGun", gasOrder.getGasPriceGun()); // 枪单价 - paramMap.put("priceVip", gasOilPrice.getPriceCost()); // 成本价 + paramMap.put("priceVip", gasOrder.getGasPriceCost()); // 成本价 paramMap.put("driverPhone", gasOrder.getMemPhone()); paramMap.put("thirdSerialNo", gasOrder.getOrderNo()); paramMap.put("refuelingAmount", gasOrder.getGasRefuelPrice()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java index c9fef0bb..ac2a505a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java @@ -225,6 +225,8 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri priceGun = priceDetail.getBigDecimal("priceGun"); // 团油优惠价 priceVip = priceDetail.getBigDecimal("priceGun"); + // 团油VIP价 成本价 + payPriceModel.setPriceCost(priceDetail.getBigDecimal("priceVip")); // 嗨森逛平台价 国标价 * 折扣 BigDecimal pricePlatform = priceGun.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP);