|
|
|
@ -20,6 +20,7 @@ import com.hai.config.TuanYouConfig; |
|
|
|
|
import com.hai.entity.*; |
|
|
|
|
import com.hai.enum_type.DiscountUseScope; |
|
|
|
|
import com.hai.enum_type.GasClassGroupTaskStatus; |
|
|
|
|
import com.hai.enum_type.MerAccountMarketingType; |
|
|
|
|
import com.hai.enum_type.OrderChildGoodsTypeEnum; |
|
|
|
|
import com.hai.model.GasPayPriceModel; |
|
|
|
|
import com.hai.model.HighMerchantStoreModel; |
|
|
|
@ -322,7 +323,7 @@ public class HighOrderController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 营销减免的金额
|
|
|
|
|
BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), 1, Integer.valueOf(childOrder.getGasOilNo())); |
|
|
|
|
BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), MerAccountMarketingType.type3.getType(), Integer.valueOf(childOrder.getGasOilNo())); |
|
|
|
|
|
|
|
|
|
// 计算价格
|
|
|
|
|
GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(childOrder.getGoodsPrice(), childOrder.getGoodsId(), childOrder.getGasOilNo(), highOrder.getIsTyAgent()); |
|
|
|
@ -366,11 +367,17 @@ public class HighOrderController { |
|
|
|
|
childOrder.setGoodsImg(store.getStoreLogo()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); |
|
|
|
|
childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN)); |
|
|
|
|
childOrder.setGoodsName(store.getStoreName()); |
|
|
|
|
childOrder.setGoodsSpecName("默认"); |
|
|
|
|
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); |
|
|
|
|
|
|
|
|
|
// 成本价 油站价 减 营销策略价
|
|
|
|
|
childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice)); |
|
|
|
|
if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) { |
|
|
|
|
childOrder.setGasPriceCostTotal(childOrder.getTotalPrice()); |
|
|
|
|
} else { |
|
|
|
|
childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (childOrder.getGoodsType() == 7) { |
|
|
|
|