| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.crossCity.dao.LineSiteMapper; |
| | | import com.stylefeng.guns.modular.crossCity.dao.LocationMapper; |
| | | import com.stylefeng.guns.modular.crossCity.dao.SiteMapper; |
| | | import com.stylefeng.guns.modular.crossCity.model.LineSite; |
| | | import com.stylefeng.guns.modular.crossCity.model.Site; |
| | | import com.stylefeng.guns.modular.crossCity.server.ISiteService; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.SiteWarpper; |
| | |
| | | |
| | | @Resource |
| | | private LocationMapper locationMapper; |
| | | |
| | | @Resource |
| | | private LineSiteMapper lineSiteMapper; |
| | | |
| | | @Autowired |
| | | private GDMapElectricFenceUtil gdMapElectricFenceUtil; |
| | |
| | | } |
| | | return false; |
| | | } |
| | | @Override |
| | | public boolean areaMonitoring1(Integer lineId, Integer code, String lonLat) throws Exception { |
| | | List<Integer> lineSites = lineSiteMapper.areaMonitoring1(lineId); |
| | | for (Integer lineSite : lineSites) { |
| | | List<Map<String, Object>> list = this.queryLocation(lineSite); |
| | | String province = code.toString().substring(0, 2) + "0000"; |
| | | String city = code.toString().substring(0, 4) + "00"; |
| | | for (Map<String, Object> map : list) { |
| | | if (Integer.valueOf(map.get("type").toString()) == 1) {//行政区域 |
| | | if (null != map.get("districtCode")) { |
| | | if (code.toString().equals(map.get("districtCode").toString())) { |
| | | return true; |
| | | } |
| | | continue; |
| | | } |
| | | if (null != map.get("cityCode")) { |
| | | if (city.equals(map.get("cityCode").toString())) { |
| | | return true; |
| | | } |
| | | continue; |
| | | } |
| | | if (null != map.get("provinceCode")) { |
| | | if (province.equals(map.get("provinceCode").toString())) { |
| | | return true; |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | if (Integer.valueOf(map.get("type").toString()) == 2) {//电子围栏 |
| | | String coordinate = map.get("coordinate").toString(); |
| | | return ElectricFenceUtil.monitorElectricFenc(coordinate, lonLat); |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 根据站点id获取地点区域 |