| | |
| | | /** |
| | | * 查询DB中溢出的单位ID |
| | | */ |
| | | public List<Integer> selectDbOverflowDep(UserEntity ue, List<String> entities, String wkt) { |
| | | List<Integer> rs = new ArrayList<>(); |
| | | public List<String> selectDbOverflowDep(UserEntity ue, List<String> entities, String wkt) { |
| | | List<String> rs = new ArrayList<>(); |
| | | for (String enity : entities) { |
| | | try { |
| | | GeomBaseMapper<?> baseMapper = ClassHelper.getGeoBaseMapper(enity); |
| | |
| | | wrapper.apply(String.format("ST_Intersects(ST_PolygonFromText('%s', %d), geom)", wkt, srid)); |
| | | } |
| | | |
| | | List<Integer> ids = baseMapper.selectObjs(wrapper); |
| | | List<String> ids = baseMapper.selectObjs(wrapper); |
| | | |
| | | addDepIds(rs, ids); |
| | | } catch (Exception ex) { |
| | |
| | | /** |
| | | * 添加单位ID |
| | | */ |
| | | private void addDepIds(List<Integer> rs, List<Integer> ids) { |
| | | private void addDepIds(List<String> rs, List<String> ids) { |
| | | if (null == ids || ids.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | for (Integer id : ids) { |
| | | for (String id : ids) { |
| | | if (!rs.contains(id)) { |
| | | rs.add(id); |
| | | } |