From 6732cd7a4e0fd7ea083d4ae11254bde35adb1ee4 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期五, 17 十一月 2023 01:39:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 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 57d9c79..0f6dfd2 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
@@ -856,7 +856,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 ArrayList<>();
+			List<ClientBusinessObject> cboList = new CopyOnWriteArrayList<>();
 			String fullPath = getFullPath(classifyFullInfo);
 			//鎴戜滑闇�瑕佽幏鍙栧埌鎵�鏈夌殑涓嬬骇鍒嗙被鐨刼id鐨勮矾寰勶紝鍥犱负鍚庨潰闇�瑕�
 			Map<String/**涓婚敭**/, String/**璺緞**/> childOidPathMap = getChildClassifyPathMap(classifyFullInfo, fullPath);
@@ -942,7 +942,7 @@
 			if (CollectionUtils.isEmpty(ruleOidMap.values())) {
 				throw new VciBaseException("瀵煎叆鐨勬暟鎹墍閫夋嫨鐨勫垎绫婚兘娌℃湁璁剧疆缂栫爜瑙勫垯");
 			}
-			// TODO: 鏀圭敤oid鏌ヨ瑙勫垯鐨勶紝鍒敤id
+			// TODO: 璇ョ敤oid鏌ヨ瑙勫垯鐨勶紝鍒敤id
 			Map<String, CodeRuleVO> ruleVOMap = ruleService.listCodeRuleByOids(ruleOidMap.values()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
 			//鏍¢獙缂栫爜瑙勫垯鍜岀爜娈垫槸鍚︽纭�
 			Map<String, List<String>> ruleRowIndexMap = new ConcurrentHashMap<>();
@@ -1538,7 +1538,6 @@
 				total += commonsMapper.queryCountBySql(countSql);
 			}
 		}else{
-
 			total = commonsMapper.queryCountBySql(countSql);
 		}
 		List<String> selectFieldList = new ArrayList<>();
@@ -1966,7 +1965,6 @@
 
 		//閮借浆鎹㈠畬浜嗐�傞渶瑕佹壒閲忔鏌�
 		//濡傛灉鍑洪敊浜嗭紝鎴戜滑渚濈劧鎵ц鏈夋晥鐨勬暟鎹紝鏃犳晥鐨勬暟鎹啓鍥炲埌excel涓�
-
 
 		Map<String,String> errorKeyMap=new HashMap<>();
 		//1.鍒嗙被娉ㄥ叆
@@ -3149,6 +3147,7 @@
 		});
 
 	}
+
 	/**
 	 * excel杞崲涓篶bo鐨勫璞�
 	 * @param classifyFullInfo 鍒嗙被鐨勫叏閮ㄤ俊鎭�
@@ -3166,7 +3165,7 @@
 			ClientBusinessObject cbo=new ClientBusinessObject();
 			DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmTypeId());
 			rowData.getData().forEach((index,value)->{
-				String field = fieldIndexMap.get(index);
+					String field = fieldIndexMap.get(index);
 				if (StringUtils.isBlank(field)) {
 					throw new VciBaseException("绗�" + (index + 1) + "鍒楃殑鏍囬鍦ㄧ郴缁熶腑涓嶅瓨鍦�");
 				}
@@ -3523,6 +3522,7 @@
 			});
 		}
 	}
+
 	/***
 	 * 鏍¢獙鍒嗙被瀵瑰簲鐨勬ā鏉夸俊鎭�
 	 * @param titleRowData
@@ -3606,6 +3606,7 @@
 		}
 		return codeClassifyTemplateVOList ;
 	}
+
 	/**
 	 * 浠庡睘鎬т笂鑾峰彇鍙傜収鐨勫唴瀹�
 	 * @param attrVO 灞炴�х殑淇℃伅
@@ -3728,6 +3729,7 @@
 			}
 		}
 	}
+
 	/**
 	 * 澶勭悊鍒嗙被娉ㄥ叆
 	 * @param attrVOS 妯℃澘灞炴��
@@ -3818,6 +3820,8 @@
 		//鍥犱负鏁版嵁閲忓緢澶э紝鎵�浠ュ緱鎯冲姙娉曞苟琛�
 		//SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
 		Map<String,List<BaseModel>> indexTODataMap=new ConcurrentHashMap<>();
+		// 鏌ヨ涓嶉渶瑕佸弬涓庡叧閿睘鎬ф牎楠岀殑闄よ嚜宸变互澶栫殑鎵�鏈夊垎绫籵id
+		String isParticipateCheckOids = classifyService.selectLeafByParentClassifyOid(classifyFullInfo.getTopClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO().getOid());
 		List<ClientBusinessObject> repeatDataMap = cboList.parallelStream().filter(cbo -> {
 			//姣忚閮藉緱鏌ヨ.濡傛灉鍏朵腑鍑虹幇浜嗛敊璇紝鎴戜滑灏辩洿鎺ユ姏鍑哄紓甯革紝鍏朵綑鐨勬樉绀�
 			//VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
@@ -3831,6 +3835,10 @@
 				engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
 			});
 			if (!CollectionUtils.isEmpty(ketAttrMap)) {
+				// 娣诲姞涓嶅弬涓庡叧閿睘鎬ф牎楠岀殑鍒嗙被oid鍒ゆ柇
+				if(Func.isNotBlank(isParticipateCheckOids)){
+					conditionMap.put("t.codeclsfid",QueryOptionConstant.NOTIN+isParticipateCheckOids);
+				}
 				CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmTypeId(), templateVO, conditionMap, null);
 				boolean isKeyCheck= commonsMapper.queryCountBySql(sqlBO.getSqlCount()) > 0;
 				if(isKeyCheck){
@@ -3874,7 +3882,7 @@
 			if(StringUtils.isBlank(classifyPath)){
 				classifyPath = "#current#";
 			}
-			if ( !pathMap.containsKey(classifyPath)) {
+			if (!pathMap.containsKey(classifyPath)) {
 				String row_index = cbo.getAttributeValue(IMPORT_ROW_INDEX);
 				errorMap.put(row_index,errorMap.getOrDefault(row_index,"") + ";鍒嗙被璺緞涓嶅瓨鍦�");
 			} else {
@@ -4014,7 +4022,7 @@
 					List<String>newOidList=new ArrayList<>();
 					newOidList.add(oid);
 					if(keyAttrOkOidTORepeatOidMap.containsKey(okOid)){
-						List<String> oldOidList=	keyAttrOkOidTORepeatOidMap.get(okOid);
+						List<String> oldOidList = keyAttrOkOidTORepeatOidMap.get(okOid);
 						newOidList.addAll(oldOidList);
 
 					}

--
Gitblit v1.9.3