| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.moral.api.entity.Menu; |
| | | import com.moral.api.entity.MonitorPoint; |
| | | import com.moral.api.entity.Organization; |
| | | import com.moral.api.entity.SysArea; |
| | | import com.moral.api.mapper.MonitorPointMapper; |
| | | import com.moral.api.mapper.SysAreaMapper; |
| | | import com.moral.api.service.OrganizationService; |
| | | import com.moral.api.service.SysAreaService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.constant.Constants; |
| | |
| | | @Autowired |
| | | private MonitorPointMapper monitorPointMapper; |
| | | |
| | | @Autowired |
| | | private OrganizationService organizationService; |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getMapPath(Integer orgId) { |
| | | //获取组织下所有子组织 |
| | | List<Organization> organizations = organizationService.getChildrenOrganizationsById(orgId); |
| | | List<Integer> orgIds = organizations.stream().map(Organization::getId).collect(Collectors.toList()); |
| | | orgIds.add(orgId); |
| | | QueryWrapper<MonitorPoint> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("province_code", "city_code", "area_code") |
| | | .eq("organization_id", orgId) |
| | | .eq("is_delete", Constants.NOT_DELETE); |
| | | .eq("is_delete", Constants.NOT_DELETE) |
| | | .in("organization_id", orgIds); |
| | | |
| | | //根据组织id查询所有站点 |
| | | List<MonitorPoint> monitorPoints = monitorPointMapper.selectList(queryWrapper); |
| | | Set<Integer> cityCodes = new HashSet<>(); |