zhongrj
2024-04-12 47712cc6cd4d52fcd1dde44e2a400ccbb9c6ae7a
src/main/java/org/springblade/common/cache/SysCache.java
@@ -378,7 +378,7 @@
   /**
    * 查询综治网格相关的网格,社区编号集合
    * 查询综治网格/公安相关的网格,社区编号集合
    * @param deptId
    * @param communityCode
    * @param roleName
@@ -399,10 +399,14 @@
            List<String> list = new ArrayList<>();
            // 查询对应的区域编号code
            Dept dept = deptService.getById(id);
            // 只取综治的
            if (dept.getDeptNature() == 2) {
               if (null != dept && !Strings.isBlank(dept.getRegionCode()) && !AuthUtil.isAdministrator()) {
//                  list = getGridRegionChildCodes(dept.getRegionCode(),communityCode,roleName);
            if (null != dept) {
               if (
                  (roleName.equals("mj") && dept.getDeptNature()==1) ||
                  (
                     (roleName.equals("wgy") || roleName.equals("wzcj")) && dept.getDeptNature()==2
                  )
               ){
                  if (!AuthUtil.isAdministrator()) {
                  if (dept.getRegionCode() == null) {
                     return;
                  }
@@ -414,15 +418,14 @@
                        List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList());
                        list.addAll(collect);
                     }
//                     finalRegionCodeList.add(dept.getRegionCode());
                  }
                  //行政区划不为空添加进集合
                  if (list.size() > 0) {
                     finalRegionCodeList.addAll(list);
                  }
               }
            }
            }
         });
         // 去重
         regionCodeList = finalRegionCodeList.stream().distinct().collect(Collectors.toList());