退款单 不播报

This commit is contained in:
2026-04-21 10:31:57 +08:00
parent 5cd729f4f7
commit 2410e965de
3 changed files with 8 additions and 5 deletions

View File

@@ -213,7 +213,7 @@ public class FeiPrinter extends PrinterHandler implements PrinterImpl {
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}"; String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
if (1 == machine.getVolumeSwitch()) { if (1 == machine.getVolumeSwitch()) {
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}"; voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
if ("退菜单".equals(bizType) || "退款单".equals(bizType)) { if ("退菜单".equals(bizType)) {
voiceJson = "{\"bizType\":\"2\",\"content\":\"有客人退菜了,请注意查看\"}"; voiceJson = "{\"bizType\":\"2\",\"content\":\"有客人退菜了,请注意查看\"}";
} }
} }

View File

@@ -274,8 +274,11 @@ public class PrintConfig implements ApplicationRunner {
getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.RETURN_ORDER).forEach(machine -> getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.RETURN_ORDER).forEach(machine ->
getPrinter(machine.getBrand()).returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList)); getPrinter(machine.getBrand()).returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList));
} else if ("退款单".equals(printTitle)) { } else if ("退款单".equals(printTitle)) {
getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.REFUND_ORDER).forEach(machine -> getPrintMachine(orderInfo.getShopId(), PrinterHandler.PrintTypeEnum.REFUND_ORDER).forEach(machine -> {
getPrinter(machine.getBrand()).returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList)); PrinterHandler printer = getPrinter(machine.getBrand());
machine.setVolumeSwitch(0);
printer.returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList);
});
} else { } else {
log.error("未知的前台退款打印类型: {}", printTitle); log.error("未知的前台退款打印类型: {}", printTitle);
} }

View File

@@ -96,7 +96,7 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
OrderInfo orderInfo, PrintMachine machine, List<OrderDetail> detailList) { OrderInfo orderInfo, PrintMachine machine, List<OrderDetail> detailList) {
OrderPrintDTO orderPrintDTO = super.returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList); OrderPrintDTO orderPrintDTO = super.returnOrderPrint(printTitle, operator, refundAmount, refundReason, refundType, orderInfo, machine, detailList);
String data = buildRefundOrderPrintData(orderPrintDTO, detailList); String data = buildRefundOrderPrintData(orderPrintDTO, detailList);
sendOrderPrint(data, orderInfo.getId(), machine, "退款单"); sendOrderPrint(data, orderInfo.getId(), machine, printTitle);
return null; return null;
} }
@@ -208,7 +208,7 @@ public class YxyPrinter extends PrinterHandler implements PrinterImpl {
String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}"; String voiceJson = "{\"bizType\":\"2\",\"content\":\"\"}";
if (1 == machine.getVolumeSwitch()) { if (1 == machine.getVolumeSwitch()) {
voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}"; voiceJson = "{\"bizType\":\"2\",\"content\":\"您有一笔新的订单,请及时处理\"}";
if ("退菜单".equals(bizType) || "退款单".equals(bizType)) { if ("退菜单".equals(bizType)) {
voiceJson = "{\"bizType\":\"2\",\"content\":\"有客人退菜了,请注意查看\"}"; voiceJson = "{\"bizType\":\"2\",\"content\":\"有客人退菜了,请注意查看\"}";
} }
} }