| | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridRangeEntity; |
| | | import org.springblade.modules.grid.service.IGridRangeService; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | | import org.springblade.modules.label.service.ILabelService; |
| | | import org.springblade.modules.label.vo.LabelVO; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 房屋网格处理 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object houseGridHandle() { |
| | | // 查询未处理的数据 |
| | | List<HouseEntity> houseEntityList = baseMapper.getNotBindGridOrJwGridList(1); |
| | | // 遍历 |
| | | for (HouseEntity houseEntity : houseEntityList) { |
| | | String point = "'POINT(" + houseEntity.getLng() + " " + houseEntity.getLat() + ")'"; |
| | | List<GridEntity> gridEntityList = SpringUtils.getBean(IGridService.class).spatialAnalysis(point); |
| | | if (gridEntityList.size()>0){ |
| | | houseEntity.setGridCode(gridEntityList.get(0).getGridCode()); |
| | | houseEntity.setGridId(gridEntityList.get(0).getId()); |
| | | // 更新 |
| | | updateById(houseEntity); |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 房屋警格处理 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object houseJwGridHandle() { |
| | | // 查询未处理的数据 |
| | | List<HouseEntity> houseEntityList = baseMapper.getNotBindGridOrJwGridList(2); |
| | | // 遍历 |
| | | for (HouseEntity houseEntity : houseEntityList) { |
| | | String point = "'POINT(" + houseEntity.getLng() + " " + houseEntity.getLat() + ")'"; |
| | | List<PoliceAffairsGridEntity> policeAffairsGridEntityList = SpringUtils.getBean(IPoliceAffairsGridService.class).spatialAnalysis(point); |
| | | if (policeAffairsGridEntityList.size()>0){ |
| | | houseEntity.setJwGridCode(policeAffairsGridEntityList.get(0).getJwGridCode()); |
| | | // 更新 |
| | | updateById(houseEntity); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |