打印完善

This commit is contained in:
张松
2025-02-26 14:11:34 +08:00
parent 6488a55355
commit a204ed597b
5 changed files with 70 additions and 67 deletions

View File

@@ -46,14 +46,14 @@ public class PrintMqListener {
log.info("接收到订单打印消息:{}", orderId);
MqLog mqLog = new MqLog().setQueue(RabbitConstants.Queue.ORDER_PRINT_QUEUE).setMsg(orderId).setType("orderPrint").setPlat("java.account").setCreateTime(DateUtil.date().toLocalDateTime());
try {
// OrderInfo orderInfo = orderInfoService.getById(orderId);
// if (orderInfo == null) {
// log.error("订单信息不存在, {}", orderId);
// throw new RuntimeException("订单信息不存在");
// }
OrderInfo orderInfo = orderInfoService.getById(orderId);
if (orderInfo == null) {
log.error("订单信息不存在, {}", orderId);
throw new RuntimeException("订单信息不存在");
}
getPrintMachine(1L, "cash", "queue", "queue").forEach(machine -> {
printerHandler.handleRequest(machine, null, 1L);
getPrintMachine(1L, "cash", "one", "one").forEach(machine -> {
printerHandler.handleRequest(machine, orderInfo, null);
// printPlaceTicket(isReturn, machine, orderInfo, shopInfo);
});