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);