From b267ac7499877043675bbd25d1478b1731c12ec9 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 24 十一月 2023 15:14:03 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 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 f8d4959..c168c16 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
@@ -885,7 +885,7 @@
 			String idFieldName = attrVOS.stream().filter(s -> VciQueryWrapperForDO.ID_FIELD.equalsIgnoreCase(s.getId())).findFirst().orElseGet(() -> new CodeClassifyTemplateAttrVO()).getName();
 			getFieldIndexMap(titleRowData, attrNameIdMap, fieldIndexMap);
 			//鍏堜笉鐢ㄧ灞炴�ф槸鍚﹂兘瀛樺湪锛屽厛杞崲涓�涓嬫暟鎹�
-			List<ClientBusinessObject> cboList = new CopyOnWriteArrayList<>();
+			List<ClientBusinessObject> cboList = new ArrayList<>();
 			String fullPath = getFullPath(classifyFullInfo);
 			//鎴戜滑闇�瑕佽幏鍙栧埌鎵�鏈夌殑涓嬬骇鍒嗙被鐨刼id鐨勮矾寰勶紝鍥犱负鍚庨潰闇�瑕�
 			Map<String/**涓婚敭**/, String/**璺緞**/> childOidPathMap = getChildClassifyPathMap(classifyFullInfo, fullPath);
@@ -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 ";
@@ -3775,7 +3780,7 @@
 			if(!CollectionUtils.isEmpty(nullRowIndex)){
 				String checkAttr = requiredAttrMap.values().stream().map(CodeClassifyTemplateAttrVO::getName).collect(Collectors.joining(","));
 				nullRowIndex.stream().forEach(rowIndex->{
-					errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";鏍¢獙瑙勫垯涓嶉�氳繃锛屾湁鏍¢獙鐨勫睘鎬т负" + checkAttr);
+					errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";鏍¢獙瑙勫垯蹇呭~椤逛笉閫氳繃锛屽鏋滄湁蹇呭~灞炴�т负绌猴紝鍒欏~銆�/銆戜唬鏇�,鏈夋牎楠岀殑灞炴�т负" + checkAttr);
 				});
 			}
 		}
@@ -4019,6 +4024,9 @@
 				childOidPathMap.put(childPath.getOid(),thisClassifyPath);
 			});
 		}
+		String path=classifyFullInfo.getCurrentClassifyVO().getId();
+		//鏍规嵁瀹㈡埛閫夋嫨鐨勫垎绫昏矾寰勬湭id锛岃繕鏄痭ame纭畾璺緞鎷兼帴
+		childOidPathMap.put(classifyFullInfo.getCurrentClassifyVO().getOid(),fullPath);
 		return childOidPathMap;
 	}
 

--
Gitblit v1.9.3