店铺管理-店铺配置:打印机设置相关接口

This commit is contained in:
谭凯凯 2024-10-18 13:45:29 +08:00 committed by Tankaikai
parent 82aba51c36
commit 44c4da7ca4
1 changed files with 5 additions and 1 deletions

View File

@ -116,7 +116,11 @@ public class YxyPrinter extends PrinterHandler {
String data = PrinterUtils.getCashPrintData(detailPO, printType, orderInfo.getOrderType());
// String voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
String resp = PrinterUtils.printTickets(voiceJson, 3, 1, machine.getAddress(), data);
String printerNum = "1";
if (StrUtil.isNotBlank(machine.getPrintQty())) {
printerNum = machine.getPrintQty().split("\\^")[1];
}
String resp = PrinterUtils.printTickets(voiceJson, 3, Integer.valueOf(printerNum), machine.getAddress(), data);
shopPrintLogService.save(machine, printType, data, resp);
}