From 6fb38b4d7396296f87011ac717b885bb8d7965b2 Mon Sep 17 00:00:00 2001 From: "lidy@connor.net.cn" Date: Tue, 21 May 2024 17:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6=E5=88=9B=E5=BB=BABUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/chint/plm/createKjBom/KjController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.connor.chint.wuhan/src/com/chint/plm/createKjBom/KjController.java b/com.connor.chint.wuhan/src/com/chint/plm/createKjBom/KjController.java index 4fe0dde..268f3ae 100644 --- a/com.connor.chint.wuhan/src/com/chint/plm/createKjBom/KjController.java +++ b/com.connor.chint.wuhan/src/com/chint/plm/createKjBom/KjController.java @@ -533,12 +533,12 @@ public class KjController { useLines.add(cLine); createId(cLine, bomLineTreeNodeSOA, builder, ccomponentitemtype, findMap, useLines, 0); }else { - TCComponentItem find = ccomponentitemtype.findItems(replaceAll)[0]; - if(find != null) { + TCComponentItem[] finds = ccomponentitemtype.findItems(replaceAll); + if(finds != null && finds.length > 0) { builder.append("当前ID已经存在:").append(replaceAll).append("\n"); - findMap.put(item_id, find); + findMap.put(item_id, finds[0]); useLines.add(cLine); - oldkjIdMap.put(cRev, find); + oldkjIdMap.put(cRev, finds[0]); createId(cLine, bomLineTreeNodeSOA, builder, ccomponentitemtype, findMap, useLines, 0); }else { kjIdMap.put(cRev, replaceAll); -- 2.36.3