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