From 051bed63734f0423213336cb255b825fe40bedfd Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 10 Oct 2023 13:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8D=E7=A7=B0=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProOrderServiceImpl.java | 8 ++++---- .../impl/ProOrderWorkorderServiceImpl.java | 19 ++++++++++++------- .../impl/ProWhiteOrderServiceImpl.java | 7 +++---- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index b507da8a..c0b52c9b 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -366,11 +366,11 @@ public class ProOrderServiceImpl implements IProOrderService { } Map equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 - Set keys = equipMap.keySet(); - for (String key : keys) { - prodLineName.append(equipMap.get(key).getLabel()); - prodLineName.append(","); + for (int c = 0; c < codeArray.size(); c++) { + String equipCode = codeArray.getJSONArray(c).getString(1); + prodLineName.append(equipMap.get(equipCode).getLabel() + ","); } + proOrderWorkorder.setProdLineCode(prodLineName.toString()); // 通过工单id查询批次号 diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index 78b9c450..df172021 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -94,10 +94,15 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { } Map equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 - Set keys = equipMap.keySet(); - for (String key : keys) { - prodLineName += equipMap.get(key).getLabel() + ","; + for (int c = 0; c < codeArray.size(); c++) { + String equipCode = codeArray.getJSONArray(c).getString(1); + prodLineName += equipMap.get(equipCode).getLabel() + ","; } +// Set keys = equipMap.keySet(); +// for (String key : keys) { +// prodLineName += equipMap.get(key).getLabel() + ","; +// } + workorder.setProdLineName(prodLineName); // // 通过设备code查询出机型名称 // workorder.setProdLineCode(proOrderMapper.selectProdLineName(workorder.getProdLineCode())); @@ -946,11 +951,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { } Map equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 - Set keys = equipMap.keySet(); - for (String key : keys) { - prodLineName.append(equipMap.get(key).getLabel()); - prodLineName.append(","); + for (int c = 0; c < codeArray.size(); c++) { + String equipCode = codeArray.getJSONArray(c).getString(1); + prodLineName.append(equipMap.get(equipCode).getLabel() + ","); } + proOrderWorkorder.setProdLineCode(prodLineName.toString()); // 通过工单id查询批次号 diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java index 276bb86a..2da0476b 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java @@ -317,10 +317,9 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { } Map equipMap = proOrderMapper.getEquipInfoByCodes(equipCods.substring(1));//设备字典 - Set keys = equipMap.keySet(); - for (String key : keys) { - prodLineName.append(equipMap.get(key).getLabel()); - prodLineName.append(","); + for (int c = 0; c < codeArray.size(); c++) { + String equipCode = codeArray.getJSONArray(c).getString(1); + prodLineName.append(equipMap.get(equipCode).getLabel() + ","); } proOrderWorkorder.setProdLineCode(prodLineName.toString());