From e7138118908312e4e914100f802c8426d99c898d Mon Sep 17 00:00:00 2001 From: liuxy Date: Fri, 11 Nov 2022 11:12:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/ext/mes/service/impl/MesToLmsServiceImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java index 6c7d6050f..44570a226 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java @@ -258,15 +258,22 @@ public class MesToLmsServiceImpl implements MesToLmsService { if (ObjectUtil.isEmpty(bakingTemperature)) throw new BadRequestException("温度不能为空"); if (ObjectUtil.isEmpty(bakingTimer)) throw new BadRequestException("烘烤时间不能为空"); + String point_code = ""; JSONObject jsonCoolIvt = coolIvtTab.query("container_name = '" + containerName + "' and full_point_status = '02' and cool_ivt_status <> '03'").uniqueResult(0); - if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("母卷不存在或已烘烤完成"); + if (ObjectUtil.isEmpty(jsonCoolIvt)) { + JSONObject jsonPoint = pointTab.query("material_code ='" + containerName + "'").uniqueResult(0); + if (ObjectUtil.isNotEmpty(jsonPoint)) point_code = jsonPoint.getString("point_code"); + } else { + point_code = jsonCoolIvt.getString("full_point_code"); + } + if (ObjectUtil.isEmpty(point_code)) throw new BadRequestException("母卷不存在或已烘烤完成"); // 调用接口输入参数 jsonParam.put("option", "1"); jsonParam.put("container_name", containerName); jsonParam.put("temperature", bakingTemperature); jsonParam.put("hours", bakingTimer); - jsonParam.put("point_code", jsonCoolIvt.getString("full_point_code")); + jsonParam.put("point_code", point_code); // 调用手持接口 BakingServiceImpl bakingService = new BakingServiceImpl();