| | |
| | | public IsInOperationAreaVo isInOperationArea(LonLatCityCodeDto dto) { |
| | | |
| | | IsInOperationAreaVo vo = new IsInOperationAreaVo(); |
| | | // Map<String, String> geocode = gdMapGeocodingUtil.geocode(dto.getLongitude().toString(), dto.getLatitude().toString()); |
| | | // if(null == geocode){ |
| | | // throw new RuntimeException("经纬度转换城市code失败"); |
| | | // } |
| | | String cityCode = dto.getCityCode(); |
| | | List<XpGeoFencingPolygon> xpGeoFencingPolygons = mongoTemplate.find(new Query(Criteria.where("cityCode").is(cityCode)), XpGeoFencingPolygon.class); |
| | | for (XpGeoFencingPolygon polygon : xpGeoFencingPolygons) { |
| | |
| | | if(electronicFence.getFailureType() == 2){ |
| | | inOperationTime = isInOperationTime(operationStrategy); |
| | | } |
| | | if(inOperationTime){ |
| | | XpElectronicFenceArea electronicFenceArea = this.getById(Long.valueOf(polygon.getAreaId())); |
| | | if(inOperationTime && null != electronicFenceArea && !electronicFenceArea.getDeleted()){ |
| | | vo.setStatus("inside"); |
| | | vo.setElectronicAreaId(Long.valueOf(polygon.getAreaId())); |
| | | return vo; |