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