| | |
| | | IGridService gridService = SpringUtils.getBean(IGridService.class); |
| | | IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class); |
| | | String point = "'POINT(" + backblastPubRecord.getLng() + " " + backblastPubRecord.getLat() + ")'"; |
| | | //点坐标解析网格 |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size()>0){ |
| | | GridEntity gridEntity = gridEntityList.get(0); |
| | | backblastPubRecord.setGridCode(gridEntity.getGridCode()); |
| | | if(StringUtils.isBlank(backblastPubRecord.getGridCode())){ |
| | | //点坐标解析网格 |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size()>0){ |
| | | GridEntity gridEntity = gridEntityList.get(0); |
| | | backblastPubRecord.setGridCode(gridEntity.getGridCode()); |
| | | } |
| | | } |
| | | //点坐标解析警格 |
| | | List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point); |
| | |
| | | // 再删除对应的宣传对象信息 |
| | | if (flag){ |
| | | IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class); |
| | | for (Long id : toLongList) { |
| | | // 删除所有 |
| | | QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("backblast_pub_record_id", id); |
| | | wrapper.in("backblast_pub_record_id", toLongList); |
| | | backblastPubPersonService.remove(wrapper); |
| | | } |
| | | // for (Long id : toLongList) { |
| | | // // 删除所有 |
| | | // QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>(); |
| | | // wrapper.eq("backblast_pub_record_id", id); |
| | | // backblastPubPersonService.remove(wrapper); |
| | | // } |
| | | } |
| | | return flag; |
| | | } |