|
|
|
@ -339,6 +339,44 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (highChildOrder.getGoodsType() == 3) { |
|
|
|
|
highChildOrder.setChildOrdeStatus(3); |
|
|
|
|
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId()); |
|
|
|
|
// 推送团油订单
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(); |
|
|
|
|
paramMap.put("gasId", store.getStoreKey()); |
|
|
|
|
paramMap.put("oilNo", highChildOrder.getGasOilNo()); |
|
|
|
|
paramMap.put("gunNo", highChildOrder.getGasGunNo()); |
|
|
|
|
BigDecimal priceGun = highChildOrder.getGasPriceGun(); |
|
|
|
|
BigDecimal priceVip = highChildOrder.getGasPriceVip(); |
|
|
|
|
paramMap.put("priceGun", priceGun); // 枪单价
|
|
|
|
|
paramMap.put("priceVip", priceVip); // 优惠价
|
|
|
|
|
paramMap.put("driverPhone", highOrder.getMemPhone()); |
|
|
|
|
paramMap.put("thirdSerialNo", highOrder.getOrderNo()); |
|
|
|
|
paramMap.put("refuelingAmount", highChildOrder.getTotalPrice()); |
|
|
|
|
|
|
|
|
|
// 油品类型 1:汽油:2:柴油;3:天然气
|
|
|
|
|
if (highChildOrder.getGasOilType() == 1) { |
|
|
|
|
paramMap.put("accountNo", CommonSysConst.getSysConfig().getTuanYouGasolineAccount()); |
|
|
|
|
} else if (highChildOrder.getGasOilType() == 2) { |
|
|
|
|
paramMap.put("accountNo", CommonSysConst.getSysConfig().getTuanYouDieselAccount()); |
|
|
|
|
} |
|
|
|
|
JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(paramMap); |
|
|
|
|
// 推送团油订单记录
|
|
|
|
|
HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); |
|
|
|
|
highGasOrderPush.setType(OrderPushType.type1.getType()); |
|
|
|
|
highGasOrderPush.setOrderNo(highOrder.getOrderNo()); |
|
|
|
|
highGasOrderPush.setCreateTime(new Date()); |
|
|
|
|
highGasOrderPush.setCode(orderPushObject.getString("code")); |
|
|
|
|
highGasOrderPush.setRequestContent(JSONObject.toJSONString(paramMap)); |
|
|
|
|
highGasOrderPush.setReturnContent(orderPushObject.toJSONString()); |
|
|
|
|
highGasOrderPushMapper.insert(highGasOrderPush); |
|
|
|
|
|
|
|
|
|
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { |
|
|
|
|
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (highChildOrder.getGoodsType() == 7) { |
|
|
|
|
HighDiscountPackageActual actual = discountPackageActualService.getDetailByChildOrderId(highChildOrder.getId()); |
|
|
|
|
if (actual != null) { |
|
|
|
|