From 49e1471d4e5b276891db33492a2ff46b9029eb9d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 11 Jul 2022 14:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hai/config/ZkcPrinterTemplate.java | 2 ++ .../service/impl/HighOrderServiceImpl.java | 19 ++++--------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java index abdf415e..2bc51261 100644 --- a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java +++ b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java @@ -279,6 +279,8 @@ public class ZkcPrinterTemplate { stream.write(0x0A); stream.write(0x0A); stream.write(0x0A); + stream.write(0x0A); + stream.write(0x0A); return getPrinterBytes(stream.toByteArray(), 1, "UTF-8"); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 0390f0f9..e024e5e0 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -1685,7 +1685,8 @@ public class HighOrderServiceImpl implements HighOrderService { childOrder.getGasOilNo(), childOrder.getGasOilLiters().toString(), order.getTotalPrice().toString() - ) + "




" + + ) + "
"; + /* + SpPrinterTemplate.oilClientStubTemp( childOrder.getGoodsName(), order.getOrderNo(), @@ -1696,20 +1697,8 @@ public class HighOrderServiceImpl implements HighOrderService { childOrder.getGasOilNo(), childOrder.getGasOilLiters().toString(), order.getTotalPrice().toString() - ) + "
"; + ) + "
";*/ sp.print(device.getDeviceSn(), printStr, 1); - /* sp.print(device.getDeviceSn(), - 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() - ), 1);*/ } catch (Exception e) { e.printStackTrace(); } @@ -1720,7 +1709,7 @@ public class HighOrderServiceImpl implements HighOrderService { new Thread(() -> { try { mqttProviderConfig.publish(2, false, device.getDeviceImei(), - ZkcPrinterTemplate.oilTemp( + ZkcPrinterTemplate.oilCashierStubTemp( childOrder.getGoodsName(), order.getOrderNo(), DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"),