From 875779f6e1ef1416cf5d62134489d546ab59de2a Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期五, 24 十一月 2023 13:43:02 +0800 Subject: [PATCH] 集成校验关键属性重复,并记录编号关键属性 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java index 1667402..52470cd 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java @@ -2020,9 +2020,10 @@ //鏈�鍚庡紕缁勫悎瑙勫垯 batchSwitchComponentAttrOnOrder(attrVOS,cboList); //3.鍒ゆ柇鍏抽敭灞炴�� - CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList,errorMap); + CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList,errorKeyMap); Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList(); Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList(); + Map<String,List<String>>keyAttrOkOidTORepeatOidMap= keyResultVO.getKeyAttrOkOidTORepeatOidMap(); if(!CollectionUtils.isEmpty(selfRepeatRowIndexList)){ selfRepeatRowIndexList.stream().forEach(rowIndex->{ @@ -2052,7 +2053,11 @@ resultDataObjectDetailDO.setMsg(errorMap.getOrDefault(rowIndex,"") + ";鍏抽敭灞炴�т笌绯荤粺涓殑閲嶅" ); resultDataObjectDetailDOs.add(resultDataObjectDetailDO); */ - errorKeyMap.put(rowIndex, "鍏抽敭灞炴�т笌绯荤粺涓殑閲嶅;" + errorMap.getOrDefault(rowIndex,"")); + Map<String, List<BaseModel>> indexTODataMap=keyResultVO.getIndexTODataMap(); + if(indexTODataMap.containsKey(rowIndex)){ + List<BaseModel> baseModelList= indexTODataMap.get(rowIndex); + } + errorKeyMap.put(rowIndex, "鍏抽敭灞炴�т笌绯荤粺涓殑閲嶅;" + errorKeyMap.getOrDefault(rowIndex,"")); }); } //鏍¢獙灞炴�ф槸鍚︽纭敊璇俊鎭� @@ -2688,7 +2693,7 @@ return; } //final String[] sql = {"select count(*) from " + tableName + " t where 1 = 1 "}; - final String[] sql = {"select id from " + tableName + " t where 1 = 1 "}; + final String[] sql = {"select t.id from " + tableName + " t where 1 = 1 "}; conditionMap.forEach((key, value) -> { if(StringUtils.isBlank(value)||value.equals(QueryOptionConstant.ISNULL)){ sql[0] += " and " + key + " is null "; -- Gitblit v1.9.3