|
|
@ -385,9 +385,6 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
// 扣预存款
|
|
|
|
// 扣预存款
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
} |
|
|
|
} |
|
|
|
new Thread(() -> { |
|
|
|
|
|
|
|
printGasOrder(store.getId(), highOrder.getOrderNo()); |
|
|
|
|
|
|
|
}).start(); |
|
|
|
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
// 推送团油订单
|
|
|
|
// 推送团油订单
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
@ -456,6 +453,8 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
if (highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
if (highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
|
|
|
|
printGasOrder(highOrder.getHighChildOrderList().get(0).getGoodsId(), highOrder); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
pushMsg.put("userId", highOrder.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
pushMsg.put("userId", highOrder.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
|
|
|
|
|
|
|
@ -653,9 +652,6 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
// 扣预存款
|
|
|
|
// 扣预存款
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
} |
|
|
|
} |
|
|
|
new Thread(() -> { |
|
|
|
|
|
|
|
printGasOrder(store.getId(), order.getOrderNo()); |
|
|
|
|
|
|
|
}).start(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
// 推送团油订单
|
|
|
|
// 推送团油订单
|
|
|
@ -700,6 +696,9 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), order); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
|
|
|
|
|
|
|
@ -959,11 +958,6 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
// 扣预存款
|
|
|
|
// 扣预存款
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
|
|
|
|
printGasOrder(store.getId(), order.getOrderNo()); |
|
|
|
|
|
|
|
}).start(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
// 推送团油订单
|
|
|
|
// 推送团油订单
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
@ -1032,6 +1026,8 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { |
|
|
|
|
|
|
|
printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), order); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
Map<String, Object> pushMsg = new HashMap<>(); |
|
|
|
pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); |
|
|
|
|
|
|
|
|
|
|
@ -1662,9 +1658,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void printGasOrder(Long gasId, String orderNo) { |
|
|
|
public void printGasOrder(Long gasId, HighOrder order) { |
|
|
|
// 查询订单
|
|
|
|
|
|
|
|
HighOrder order = getOrderByOrderNo(orderNo); |
|
|
|
|
|
|
|
if (order == null) { |
|
|
|
if (order == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -1714,7 +1708,8 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
if (device.getType().equals(DeviceTypeEnum.type2.getType())) { |
|
|
|
if (device.getType().equals(DeviceTypeEnum.type2.getType())) { |
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
try { |
|
|
|
try { |
|
|
|
String oilCashierStubTempText = ZkcPrinterTemplate.oilCashierStubTemp( |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), |
|
|
|
|
|
|
|
ZkcPrinterTemplate.oilCashierStubTemp( |
|
|
|
childOrder.getGoodsName(), |
|
|
|
childOrder.getGoodsName(), |
|
|
|
order.getOrderNo(), |
|
|
|
order.getOrderNo(), |
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
@ -1723,11 +1718,12 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
order.getTotalPrice().toString() |
|
|
|
order.getTotalPrice().toString() |
|
|
|
); |
|
|
|
)); |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), ZkcPrinterTemplate.hexStringToString(oilCashierStubTempText)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thread.sleep(6000); |
|
|
|
|
|
|
|
|
|
|
|
String oilClientStubTempText = ZkcPrinterTemplate.oilClientStubTemp( |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), |
|
|
|
|
|
|
|
ZkcPrinterTemplate.oilClientStubTemp( |
|
|
|
childOrder.getGoodsName(), |
|
|
|
childOrder.getGoodsName(), |
|
|
|
order.getOrderNo(), |
|
|
|
order.getOrderNo(), |
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
@ -1736,8 +1732,7 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
order.getTotalPrice().toString() |
|
|
|
order.getTotalPrice().toString() |
|
|
|
); |
|
|
|
)); |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), ZkcPrinterTemplate.hexStringToString(oilClientStubTempText)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.getMessage(); |
|
|
|
e.getMessage(); |
|
|
@ -1747,7 +1742,6 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String priceName(Integer num) { |
|
|
|
public String priceName(Integer num) { |
|
|
|