fix(print): 启用资源相关的打印机配置逻辑
- 恢复根据 operationOutDTO 的 resrce 字段设置 printDevice 的条件判断 - 注释掉硬编码的默认打印机名称"分切项目组150" - 确保不同资源使用对应的打印机配置(SJ001-SJ004 映射到 TPU001-TPU004)
This commit is contained in:
parent
bda9636e93
commit
0197287920
@ -2693,17 +2693,17 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
|
||||
// ===== 1. 组装要传给打印服务的 JSON =====
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
// 打印机名称(替换成实际打印机名)
|
||||
// if (Objects.equals(operationOutDTO.getResrce(), "SJ001")) {
|
||||
// jsonObject.put("printDevice", "TPU001");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ002")) {
|
||||
// jsonObject.put("printDevice", "TPU002");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ003")) {
|
||||
// jsonObject.put("printDevice", "TPU003");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ004")) {
|
||||
// jsonObject.put("printDevice", "TPU004");
|
||||
// }
|
||||
if (Objects.equals(operationOutDTO.getResrce(), "SJ001")) {
|
||||
jsonObject.put("printDevice", "TPU001");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ002")) {
|
||||
jsonObject.put("printDevice", "TPU002");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ003")) {
|
||||
jsonObject.put("printDevice", "TPU003");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ004")) {
|
||||
jsonObject.put("printDevice", "TPU004");
|
||||
}
|
||||
|
||||
jsonObject.put("printDevice", "分切项目组150");
|
||||
// jsonObject.put("printDevice", "分切项目组150");
|
||||
// 打印模板名称(替换成实际模板名)
|
||||
jsonObject.put("configTemplateName", "JM-内部标签");
|
||||
JSONObject dataJson = new JSONObject();
|
||||
@ -2752,16 +2752,16 @@ public class OperationOutServiceImpl extends ServiceImpl<OperationOutMapper, Ope
|
||||
// ===== 1. 组装要传给打印服务的 JSON =====
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
// // 打印机名称(替换成实际打印机名)
|
||||
// if (Objects.equals(operationOutDTO.getResrce(), "SJ001")) {
|
||||
// jsonObject.put("printDevice", "TPU001");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ002")) {
|
||||
// jsonObject.put("printDevice", "TPU002");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ003")) {
|
||||
// jsonObject.put("printDevice", "TPU003");
|
||||
// } else if (Objects.equals(operationOutDTO.getResrce(), "SJ004")) {
|
||||
// jsonObject.put("printDevice", "TPU004");
|
||||
// }
|
||||
jsonObject.put("printDevice", "分切项目组150");
|
||||
if (Objects.equals(operationOutDTO.getResrce(), "SJ001")) {
|
||||
jsonObject.put("printDevice", "TPU001");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ002")) {
|
||||
jsonObject.put("printDevice", "TPU002");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ003")) {
|
||||
jsonObject.put("printDevice", "TPU003");
|
||||
} else if (Objects.equals(operationOutDTO.getResrce(), "SJ004")) {
|
||||
jsonObject.put("printDevice", "TPU004");
|
||||
}
|
||||
// jsonObject.put("printDevice", "分切项目组150");
|
||||
// 打印模板名称(替换成实际模板名)
|
||||
jsonObject.put("configTemplateName", operationOutDTO.getPrintTemplate());
|
||||
JSONObject dataJson = new JSONObject();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user