瀏覽代碼

pref: selectUserList 9

shc 8 月之前
父節點
當前提交
83f72332d9

+ 4 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/SysEnterpriseAreaServiceImpl.java

@@ -90,7 +90,8 @@ public class SysEnterpriseAreaServiceImpl extends ServiceImpl<SysEnterpriseAreaM
      */
      */
     @Override
     @Override
     public List<Long> listEntAreas(Collection<Long> deptId) {
     public List<Long> listEntAreas(Collection<Long> deptId) {
-        return this.list(Wrappers.<SysEnterpriseArea>lambdaQuery().in(SysEnterpriseArea::getEntId, deptId)).stream().map(SysEnterpriseArea::getAreaId).collect(Collectors.toList());
+        List<Long> collect = deptId.stream().sorted().collect(Collectors.toList());
+        return this.list(Wrappers.<SysEnterpriseArea>lambdaQuery().in(SysEnterpriseArea::getEntId, collect)).stream().map(SysEnterpriseArea::getAreaId).collect(Collectors.toList());
     }
     }
 
 
 
 
@@ -102,7 +103,8 @@ public class SysEnterpriseAreaServiceImpl extends ServiceImpl<SysEnterpriseAreaM
      */
      */
     @Override
     @Override
     public Map<Long, List<Long>> listEntAreas1(Collection<Long> deptId) {
     public Map<Long, List<Long>> listEntAreas1(Collection<Long> deptId) {
-        return this.list(Wrappers.<SysEnterpriseArea>lambdaQuery().in(SysEnterpriseArea::getEntId, deptId)).stream().collect(Collectors.groupingBy(SysEnterpriseArea::getEntId, Collectors.mapping(SysEnterpriseArea::getAreaId, Collectors.toList())));
+        List<Long> collect = deptId.stream().sorted().collect(Collectors.toList());
+        return this.list(Wrappers.<SysEnterpriseArea>lambdaQuery().in(SysEnterpriseArea::getEntId, collect)).stream().collect(Collectors.groupingBy(SysEnterpriseArea::getEntId, Collectors.mapping(SysEnterpriseArea::getAreaId, Collectors.toList())));
     }
     }
 
 
     /**
     /**