|
|
@ -357,6 +357,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
|
|
|
|
|
|
|
if (highChildOrder.getGoodsType() == 3) { |
|
|
|
if (highChildOrder.getGoodsType() == 3) { |
|
|
|
highChildOrder.setChildOrdeStatus(3); |
|
|
|
highChildOrder.setChildOrdeStatus(3); |
|
|
|
|
|
|
|
highOrder.setOrderStatus(3); |
|
|
|
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId()); |
|
|
|
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId()); |
|
|
|
|
|
|
|
|
|
|
|
// 来源类型 1:平台自建 2:团油
|
|
|
|
// 来源类型 1:平台自建 2:团油
|
|
|
@ -439,43 +440,6 @@ 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) { |
|
|
|
if (highChildOrder.getGoodsType() == 7) { |
|
|
|
HighDiscountPackageActual actual = discountPackageActualService.getDetailByChildOrderId(highChildOrder.getId()); |
|
|
|
HighDiscountPackageActual actual = discountPackageActualService.getDetailByChildOrderId(highChildOrder.getId()); |
|
|
@ -506,13 +470,16 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
|
|
|
|
|
|
|
updateOrder(highOrder); |
|
|
|
updateOrder(highOrder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
if (highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
if (highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
Map<String, Object> message = new HashMap<>(); |
|
|
|
Map<String, Object> message = new HashMap<>(); |
|
|
|
message.put("order", highOrderService.getOrderByOrderNo(highOrder.getOrderNo())); |
|
|
|
message.put("order", highOrderService.getGasOrderDetail(highOrder.getOrderNo())); |
|
|
|
message.put("voice", baiduVoiceService.text2audio(highOrder.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + highOrder.getTotalPrice())); |
|
|
|
message.put("voice", baiduVoiceService.text2audio(highOrder.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + highOrder.getTotalPrice())); |
|
|
|
webSocket.SenderMessage(highOrder.getHighChildOrderList().get(0).getGoodsId().toString() |
|
|
|
webSocket.SenderMessage(highOrder.getHighChildOrderList().get(0).getGoodsId().toString() |
|
|
|
, JSONObject.toJSONString(message)); |
|
|
|
, JSONObject.toJSONString(message)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|