소스 검색

BUG修复

wangliang 3 년 전
부모
커밋
7c7765ca56
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

+ 6 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

@@ -604,9 +604,12 @@ public class SysController {
                                     newSysOrgList.addAll(sysOrgService.findByConnectByParentId(s.getId(), true, false));
                                 }
                             }
-                            newSysOrgList = newSysOrgList.stream().filter(s -> s.getType() == OrgTypeEnum.COLLEGE).collect(Collectors.toList());
-                            Map<Long, SysOrg> sysOrgMap = newSysOrgList.stream().collect(Collectors.toMap(SysOrg::getId, Function.identity(), (dto1, dto2) -> dto1));
-
+                            Map<Long, SysOrg> sysOrgMap = new LinkedHashMap<>();
+                            for (SysOrg s : newSysOrgList) {
+                                if (s.getType() == OrgTypeEnum.COLLEGE) {
+                                    sysOrgMap.put(s.getId(), s);
+                                }
+                            }
                             List<DictionaryResult> finalDictionaryResultList = dictionaryResultList;
                             sysOrgMap.forEach((k, v) -> {
                                 DictionaryResult dictionaryResult = new DictionaryResult();