| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 场所综治网格处理 |
| | | */ |
| | | @Override |
| | | public Object placeGridCodeHandle() { |
| | | // 查询 综治网格为空的数据 |
| | | List<PlaceEntity> list = baseMapper.getPlaceNotGridCode(); |
| | | // 遍历 |
| | | for (PlaceEntity placeEntity : list) { |
| | | if (!Strings.isBlank(placeEntity.getLng())) { |
| | | // 空间分析 |
| | | //点坐标解析 |
| | | String point = "'POINT(" + placeEntity.getLng() + " " + placeEntity.getLat() + ")'"; |
| | | //String point = "'POINT(" + villageInfoExcel.getLatitude() + " " + villageInfoExcel.getLongitude() +")'"; |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size() > 0) { |
| | | GridEntity gridEntity = gridEntityList.get(0); |
| | | placeEntity.setGridCode(gridEntity.getGridCode()); |
| | | // 更新 |
| | | updateById(placeEntity); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |