|
|
|
@ -378,36 +378,40 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
// 扣预存款
|
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
|
} |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
highOrder.getOrderNo(), |
|
|
|
|
DateUtil.date2String(highOrder.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
highOrder.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
Thread.sleep(3000); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
highOrder.getOrderNo(), |
|
|
|
|
DateUtil.date2String(highOrder.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
highOrder.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
if (StringUtils.isNotBlank(store.getDeviceSn())) { |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
highOrder.getOrderNo(), |
|
|
|
|
DateUtil.date2String(highOrder.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
highOrder.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
|
|
|
|
|
Thread.sleep(6000); |
|
|
|
|
|
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
highOrder.getOrderNo(), |
|
|
|
|
DateUtil.date2String(highOrder.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
highOrder.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
} |
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
|
// 推送团油订单
|
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
@ -673,36 +677,39 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
// 扣预存款
|
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
|
} |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
Thread.sleep(3000); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
if (StringUtils.isNotBlank(store.getDeviceSn())) { |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
Thread.sleep(6000); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
|
// 推送团油订单
|
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
@ -1005,36 +1012,39 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
// 扣预存款
|
|
|
|
|
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); |
|
|
|
|
} |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
Thread.sleep(3000); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
if (StringUtils.isNotBlank(store.getDeviceSn())) { |
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
Thread.sleep(6000); |
|
|
|
|
sp.print(store.getDeviceSn(), |
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
highChildOrder.getGoodsName(), |
|
|
|
|
order.getOrderNo(), |
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
"嗨森逛", |
|
|
|
|
highChildOrder.getGasGunNo(), |
|
|
|
|
highChildOrder.getGasOilNo(), |
|
|
|
|
highChildOrder.getGasOilLiters().toString(), |
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
), 1); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
}).start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (store.getSourceType().equals(2)) { |
|
|
|
|
// 推送团油订单
|
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
|