|
|
@ -1674,28 +1674,42 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
try { |
|
|
|
try { |
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
SpPrinterConfig sp = new SpPrinterConfig(); |
|
|
|
sp.print(device.getDeviceSn(), |
|
|
|
|
|
|
|
SpPrinterTemplate.oilCashierStubTemp( |
|
|
|
String printStr = SpPrinterTemplate.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"), |
|
|
|
"嗨森逛", |
|
|
|
order.getMemPhone(), |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
"嗨森逛", |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
order.getTotalPrice().toString() |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
), 1); |
|
|
|
order.getTotalPrice().toString() |
|
|
|
sp.print(device.getDeviceSn(), |
|
|
|
) + "<BR><BR><BR><BR><BR>" + |
|
|
|
|
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
|
|
|
|
childOrder.getGoodsName(), |
|
|
|
|
|
|
|
order.getOrderNo(), |
|
|
|
|
|
|
|
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"), |
|
|
|
|
|
|
|
order.getMemPhone(), |
|
|
|
|
|
|
|
"嗨森逛", |
|
|
|
|
|
|
|
childOrder.getGasGunNo(), |
|
|
|
|
|
|
|
childOrder.getGasOilNo(), |
|
|
|
|
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
|
|
|
|
order.getTotalPrice().toString() |
|
|
|
|
|
|
|
) + "<BR>"; |
|
|
|
|
|
|
|
sp.print(device.getDeviceSn(), printStr, 1); |
|
|
|
|
|
|
|
/* sp.print(device.getDeviceSn(), |
|
|
|
SpPrinterTemplate.oilClientStubTemp( |
|
|
|
SpPrinterTemplate.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"), |
|
|
|
|
|
|
|
order.getMemPhone(), |
|
|
|
"嗨森逛", |
|
|
|
"嗨森逛", |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
order.getTotalPrice().toString() |
|
|
|
order.getTotalPrice().toString() |
|
|
|
), 1); |
|
|
|
), 1);*/ |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
@ -1706,28 +1720,17 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
|
try { |
|
|
|
try { |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), |
|
|
|
mqttProviderConfig.publish(2, false, device.getDeviceImei(), |
|
|
|
ZkcPrinterTemplate.oilCashierStubTemp( |
|
|
|
ZkcPrinterTemplate.oilTemp( |
|
|
|
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"), |
|
|
|
|
|
|
|
order.getMemPhone(), |
|
|
|
"嗨森逛", |
|
|
|
"嗨森逛", |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
childOrder.getGasGunNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilNo(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
childOrder.getGasOilLiters().toString(), |
|
|
|
order.getTotalPrice().toString() |
|
|
|
order.getTotalPrice().toString() |
|
|
|
)); |
|
|
|
)); |
|
|
|
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) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.getMessage(); |
|
|
|
e.getMessage(); |
|
|
|
} |
|
|
|
} |
|
|
|