|  |  | 
 |  |  | import com.moral.api.entity.MonitorPoint; | 
 |  |  | import com.moral.api.entity.Organization; | 
 |  |  | import com.moral.api.entity.SysArea; | 
 |  |  | import com.moral.api.mapper.DeviceMapper; | 
 |  |  | import com.moral.api.mapper.MonitorPointMapper; | 
 |  |  | import com.moral.api.mapper.SysAreaMapper; | 
 |  |  | import com.moral.api.service.OrganizationService; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private OrganizationService organizationService; | 
 |  |  |     @Autowired | 
 |  |  |     private DeviceMapper deviceMapper; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<Map<String, Object>> getMapPath(Integer orgId) { | 
 |  |  |         //获取组织下所有子组织 | 
 |  |  |         List<Organization> organizations = organizationService.getChildrenOrganizationsById(orgId); | 
 |  |  |         /*List<Organization> organizations = organizationService.getChildrenOrganizationsById(orgId); | 
 |  |  |         List<Integer> orgIds = organizations.stream().map(Organization::getId).collect(Collectors.toList()); | 
 |  |  |         orgIds.add(orgId); | 
 |  |  |         orgIds.add(orgId);*/ | 
 |  |  |         List<Integer> orgIds = deviceMapper.deviceOrgIdList(orgId); | 
 |  |  |         QueryWrapper<MonitorPoint> queryWrapper = new QueryWrapper<>(); | 
 |  |  |         queryWrapper.select("province_code", "city_code", "area_code") | 
 |  |  |                 .eq("is_delete", Constants.NOT_DELETE) | 
 |  |  | 
 |  |  |         return newList; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<SysArea> getChildren(Integer regionCode) { | 
 |  |  |         QueryWrapper<SysArea> wrapper = new QueryWrapper<>(); | 
 |  |  |         wrapper.eq("parent_code",regionCode); | 
 |  |  |         return sysAreaMapper.selectList(wrapper); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public SysArea getAreaByCode(Integer regionCode) { | 
 |  |  |         QueryWrapper<SysArea> wrapper = new QueryWrapper<>(); | 
 |  |  |         wrapper.eq("area_code",regionCode); | 
 |  |  |         return sysAreaMapper.selectOne(wrapper); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     //获取层级城市列表 | 
 |  |  |     private List<Map<String, Object>> getAreasByRecursion(SysArea sysArea, List<SysArea> sysAreas) { | 
 |  |  |         SysArea newSysArea = new SysArea(); |