| | |
| | | /** |
| | | * 根据角色获取功能集合数据 |
| | | * |
| | | * @param type 1:查社区 2:查房屋和场所(居民角色) |
| | | * @param roleName |
| | | * @param type 1:查社区 2:查房屋和场所(居民角色)--2024/04/10 弃用 |
| | | * @param roleNames --2024/04/10 弃用 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getFuncList(Integer type, String roleName) { |
| | | public Object getFuncList(Integer type, String roleNames) { |
| | | HouseParam houseParam = new HouseParam(); |
| | | String userId = AuthUtil.getUserId().toString(); |
| | | houseParam.setUserId(userId); |
| | | List<String> stringList = new ArrayList<>(); |
| | | List<String> communityList = new ArrayList<>(); |
| | | List<TreeStringNode> list = new ArrayList<>(); |
| | | if (null != type) { |
| | | // 如果是网格管理员,系统管理员,民警 |
| | | if (type == 1) { |
| | | if (null != roleName && !roleName.equals("")) { |
| | | // 获取请求头中的角色别名 |
| | | String roleName = SpringUtils.getRequestParam("roleName"); |
| | | // 如果是网格管理员,系统管理员,民警,无诈场所采集 |
| | | if (roleName.equals("admin") || |
| | | roleName.equals("wzcj") || |
| | | roleName.equals("wgy") || |
| | | roleName.equals("mj")) |
| | | { |
| | | houseParam.setRoleName(roleName); |
| | | if (roleName.equals("网格员") && !userId.equals("1726859808689696770")) { |
| | | if ((roleName.equals("wgy") || roleName.equals("wzcj")) |
| | | && !userId.equals("1726859808689696770")) { |
| | | // 查询对应的网格code |
| | | stringList = gridService.getGridListByUserId(AuthUtil.getUserId()); |
| | | // stringList = gridService.getGridListByUserId(AuthUtil.getUserId()); |
| | | stringList = SysCache.getGridRegionChildCodesByDeptId(AuthUtil.getDeptId(),null,roleName); |
| | | } |
| | | if (roleName.equals("民警")) { |
| | | if (roleName.equals("mj")) { |
| | | // 查询对应的社区编号 |
| | | communityList = SysCache.getPoliceRegionChildCodesByDeptId(AuthUtil.getDeptId(),null); |
| | | } |
| | | } |
| | | // 查询街道 |
| | | List<TreeStringNode> townList = baseMapper.getRegionListByGroupTwon(houseParam, stringList, communityList); |
| | |
| | | return townList; |
| | | } |
| | | // 如果是居民 |
| | | if (type == 2 || type == 3) { |
| | | if (roleName.equals("inhabitant")) { |
| | | return getInhabitantInfo(list); |
| | | } |
| | | } |
| | | return list; |
| | | } |