| | |
| | | } |
| | | } else { |
| | | // 一对一,暂时不处理,后续考虑需加绑定关系表 |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | if (null != addressEntity) { |
| | | placeVO = new PlaceVO(); |
| | | placeVO.setDoorplateAddressEntity(addressEntity); |
| | | placeVO.setHouseCode(addressEntity.getAddressCode()); |
| | | placeVO.setLng(addressEntity.getX()); |
| | | placeVO.setLat(addressEntity.getY()); |
| | | placeVO.setLocation(addressEntity.getAddressName()); |
| | |
| | | } |
| | | 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; |
| | | } |
| | | } |