From 820dde03b508f1ca6436cacf517ff197e1875f4f Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 10 十月 2023 16:05:31 +0800
Subject: [PATCH] 集成系统信息管理-分类授权-重置、展开所有节点多选父节点增删
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
index 4948270..076c48b 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
@@ -95,6 +95,7 @@
// SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
List<CodeAllCode> allCodeDOList = new ArrayList<>();
Map<String/**娴佹按渚濇嵁**/, Map<String/**鐮佹鐨勪富閿�**/,Double/**鏈�澶ф祦姘村彿**/>> maxSerialMap = new HashMap<>();
+ // TODO 澶氱嚎绋嬫祦寮曞彂鐨勯棶棰樺凡淇敼
dataCBOList.parallelStream().forEach(cbo->{
// VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
String code = cbo.getId();
@@ -518,7 +519,7 @@
secValue = classifyFullInfoBO.getCurrentClassifyVO().getId();
} else {
//鎴戜滑闇�瑕佷粠椤跺眰寮�濮嬫壘鍒板綋鍓嶅垎绫讳负姝�
- secValue = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining()) + classifyFullInfoBO.getCurrentClassifyVO().getId();
+ secValue = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining()) + classifyFullInfoBO.getCurrentClassifyVO().getId();
}
} else {
//鎸囧畾灞傦紝鎴戜滑闇�瑕侀�氳繃涓婄骇鐨勬潵鑾峰彇
@@ -527,7 +528,7 @@
secValue = classifyFullInfoBO.getCurrentClassifyVO().getId();
} else {
//杩欎釜鎴戜滑闇�瑕佺湅鐪�,灞傜骇鏄笉鏄ぇ浜庝簡鏈�澶у眰绾х殑鏁�
- List<CodeClassifyVO> parentClassifyVOList = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o1.getDataLevel().compareTo(o2.getDataLevel()))).collect(Collectors.toList());
+ List<CodeClassifyVO> parentClassifyVOList = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).collect(Collectors.toList());
if (secVO.getCodeLevelValue() > (parentClassifyVOList.size() + 1)) {
//鎸囧畾鐨勫眰绾ф瘮褰撳墠鐨勫眰绾ц繕澶т簡锛屾墍浠ュ彧鑳借幏鍙栧綋鍓嶅眰绾т簡
if (CodeGetValueTypeEnum.CURRENT.getValue().equalsIgnoreCase(secVO.getCodeGetValueType())) {
@@ -544,7 +545,7 @@
}
} else {
//灏忎簬绛変簬鐨勫叏閮ㄦ嬁鍑烘潵
- secValue = parentClassifyVOList.stream().filter(s -> s.getDataLevel().intValue() <= secVO.getCodeLevelValue().intValue()).sorted(((o1, o2) -> o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining());
+ secValue = parentClassifyVOList.stream().filter(s -> s.getDataLevel().intValue() <= secVO.getCodeLevelValue().intValue()).sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining());
}
}
}
--
Gitblit v1.9.3