订单打印时间
This commit is contained in:
@@ -372,8 +372,22 @@ public abstract class PrinterHandler {
|
||||
log.info("准备开始打印菜品以及结算单");
|
||||
if (data instanceof OrderInfo orderInfo) {
|
||||
List<OrderDetail> orderDetailList = orderDetailService.list(new QueryWrapper().eq(OrderDetail::getOrderId, orderInfo.getId()));
|
||||
onlyFrontDesk(machine, false, orderInfo, orderDetailList);
|
||||
onlyKitchen(machine, orderInfo, orderDetailList);
|
||||
switch (machine.getPrintMethod()) {
|
||||
case "all":
|
||||
onlyFrontDesk(machine, false, orderInfo, orderDetailList);
|
||||
onlyKitchen(machine, orderInfo, orderDetailList);
|
||||
break;
|
||||
case "one":
|
||||
log.info("打印机仅打印one");
|
||||
onlyKitchen(machine, orderInfo, orderDetailList);
|
||||
break;
|
||||
case "normal":
|
||||
log.info("打印机仅打印normal");
|
||||
onlyFrontDesk(machine, false, orderInfo, orderDetailList);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("打印方法有误");
|
||||
}
|
||||
}else {
|
||||
throw new RuntimeException("传递数据类型有误");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user