| | |
| | | import org.springblade.modules.place.service.IPlaceExtService; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.place.vo.PlaceVO; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private ICommunityService communityService; |
| | | |
| | | @Autowired |
| | | private IPoliceAffairsGridService policeAffairsGridService; |
| | | |
| | | |
| | | @Override |
| | | public IPage<DoorplateAddressVO> selectDoorplateAddressPage(IPage<DoorplateAddressVO> page, DoorplateAddressVO doorplateAddress) { |
| | |
| | | houseParam.setUserId(userId); |
| | | List<String> stringList = new ArrayList<>(); |
| | | List<String> communityList = new ArrayList<>(); |
| | | if (null != roleName && !roleName.equals("")) { |
| | | houseParam.setRoleName(roleName); |
| | | if (roleName.equals("网格员") && !userId.equals("1726859808689696770")) { |
| | | // 查询对应的房屋地址code |
| | | stringList = gridService.getAddressCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | if (roleName.equals("民警")) { |
| | | // 查询对应的社区编号 |
| | | communityList = communityService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | List<TreeStringNode> list = new ArrayList<>(); |
| | | if (null != type) { |
| | | // 如果是网格管理员,系统管理员,民警 |
| | | if (type == 1) { |
| | | if (null != roleName && !roleName.equals("")) { |
| | | houseParam.setRoleName(roleName); |
| | | if (roleName.equals("网格员") && !userId.equals("1726859808689696770")) { |
| | | // 查询对应的网格code |
| | | stringList = gridService.getGridListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | if (roleName.equals("民警")) { |
| | | // 查询对应的社区编号 |
| | | communityList = policeAffairsGridService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | // 查询街道 |
| | | List<TreeStringNode> townList = baseMapper.getRegionListByGroupTwon(houseParam, stringList, communityList); |
| | | // 查询社区 |
| | |
| | | /** |
| | | * 查询社区信息 |
| | | * |
| | | * @param name |
| | | * @param doorplateAddressEntity |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DoorplateAddressEntity> getAllDoorplateAddress(String name) { |
| | | return baseMapper.getAllDoorplateAddress(name); |
| | | public List<DoorplateAddressEntity> getAllDoorplateAddress(DoorplateAddressEntity doorplateAddressEntity) { |
| | | return baseMapper.getAllDoorplateAddress(doorplateAddressEntity); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (null != houseParam.getRoleName() && !houseParam.getRoleName().equals("")) { |
| | | if (houseParam.getRoleName().equals("民警") && !userId.equals("1726859808689696770")) { |
| | | // 查询对应的房屋地址code |
| | | stringList = communityService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | stringList = policeAffairsGridService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | return stringList; |
| | |
| | | // 无权限 |
| | | one.setIsJur(2); |
| | | // 查询对应的社区code |
| | | list = communityService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | list = policeAffairsGridService.getCommunityCodeListByUserId(AuthUtil.getUserId()); |
| | | if (null!=list && list.size()>0){ |
| | | boolean contains = list.contains(one.getNeiCode()); |
| | | if (contains) { |