排队叫号打印
This commit is contained in:
@@ -232,6 +232,15 @@ public abstract class PrinterHandler {
|
||||
printMethod = "all";
|
||||
break;
|
||||
|
||||
case PrintTypeEnum.CALL:
|
||||
CallQueue queue = callQueueService.getById(data);
|
||||
if (queue == null) {
|
||||
throw new RuntimeException("叫号信息不存在: " + data);
|
||||
}
|
||||
shopId = queue.getShopId();
|
||||
obj = queue;
|
||||
printType = "queue";
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("未知打印类型");
|
||||
|
||||
@@ -346,8 +355,8 @@ public abstract class PrinterHandler {
|
||||
break;
|
||||
case PrintTypeEnum.CALL:
|
||||
log.info("准备开始打印叫号单");
|
||||
if (data instanceof Long id) {
|
||||
onlyCallNumPrint(machine, id);
|
||||
if (data instanceof CallQueue queue) {
|
||||
onlyCallNumPrint(machine, queue);
|
||||
}else {
|
||||
throw new RuntimeException("传递数据类型有误");
|
||||
}
|
||||
@@ -506,12 +515,7 @@ public abstract class PrinterHandler {
|
||||
/**
|
||||
* 打印排队小票
|
||||
*/
|
||||
private void onlyCallNumPrint(PrintMachine machine, Long callQueueId) {
|
||||
if (callQueueId == null) {
|
||||
log.warn("打印叫号小票失败,id为空");
|
||||
}
|
||||
|
||||
CallQueue queue = callQueueService.getById(callQueueId);
|
||||
private void onlyCallNumPrint(PrintMachine machine, CallQueue queue) {
|
||||
if (queue == null) {
|
||||
log.warn("叫号记录不存在");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user