排队取号小票未打印BUG修复
This commit is contained in:
@@ -41,22 +41,24 @@ public abstract class PrinterHandler {
|
||||
|
||||
protected void print(TbPrintMachine machine, boolean isReturn, TbOrderInfo orderInfo, List<TbOrderDetail> tbOrderDetailList, CallNumPrintDTO printDTO) {
|
||||
String printMethod = machine.getPrintMethod();
|
||||
if (StrUtil.isBlank(printMethod)) {
|
||||
if (StrUtil.isBlank(printMethod) && StrUtil.isBlank(machine.getPrintType())) {
|
||||
throw new MsgException("打印机配置为空");
|
||||
}
|
||||
List<CategoryInfo> categoryInfos = JSONUtil.parseJSONStr2TList(StrUtil.emptyToDefault(machine.getCategoryList(), "[]"), CategoryInfo.class);
|
||||
//仅打印后厨-一菜一品
|
||||
if ("one".equals(printMethod)) {
|
||||
onlyKitchen(machine, orderInfo, tbOrderDetailList, categoryInfos, isReturn);
|
||||
} else if ("normal".equals(printMethod)) {
|
||||
//仅打印前台
|
||||
onlyFrontDesk(machine, orderInfo, tbOrderDetailList, isReturn);
|
||||
} else if ("all".equals(printMethod)) {
|
||||
//全部打印 前台+后厨
|
||||
onlyFrontDesk(machine, orderInfo, tbOrderDetailList, isReturn);
|
||||
onlyKitchen(machine, orderInfo, tbOrderDetailList, categoryInfos, isReturn);
|
||||
} else {
|
||||
log.warn("未知打印类型: {}", printMethod);
|
||||
if(StrUtil.isNotBlank(printMethod)){
|
||||
List<CategoryInfo> categoryInfos = JSONUtil.parseJSONStr2TList(StrUtil.emptyToDefault(machine.getCategoryList(), "[]"), CategoryInfo.class);
|
||||
//仅打印后厨-一菜一品
|
||||
if ("one".equals(printMethod)) {
|
||||
onlyKitchen(machine, orderInfo, tbOrderDetailList, categoryInfos, isReturn);
|
||||
} else if ("normal".equals(printMethod)) {
|
||||
//仅打印前台
|
||||
onlyFrontDesk(machine, orderInfo, tbOrderDetailList, isReturn);
|
||||
} else if ("all".equals(printMethod)) {
|
||||
//全部打印 前台+后厨
|
||||
onlyFrontDesk(machine, orderInfo, tbOrderDetailList, isReturn);
|
||||
onlyKitchen(machine, orderInfo, tbOrderDetailList, categoryInfos, isReturn);
|
||||
} else {
|
||||
log.warn("未知打印类型: {}", printMethod);
|
||||
}
|
||||
}
|
||||
if (StrUtil.isBlank(machine.getPrintType())) {
|
||||
return;
|
||||
@@ -71,9 +73,6 @@ public abstract class PrinterHandler {
|
||||
return;
|
||||
}
|
||||
callNumPrint(machine, printDTO);
|
||||
if (StrUtil.isBlank(printMethod)) {
|
||||
throw new MsgException("打印机配置为空");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user