|
|
@ -15,7 +15,6 @@ import java.math.BigDecimal;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
|
|
|
|
* 商户经营区域
|
|
|
|
* 商户经营区域
|
|
|
|
* 版本: V3.5
|
|
|
|
* 版本: V3.5
|
|
|
|
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
|
|
|
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
|
|
@ -33,14 +32,14 @@ public class IStationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stat
|
|
|
|
//获取所有的围栏信息
|
|
|
|
//获取所有的围栏信息
|
|
|
|
QueryWrapper<StationArea> wrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<StationArea> wrapper = new QueryWrapper<>();
|
|
|
|
// wrapper.eq("area_type","1");//1接单 2不接单
|
|
|
|
// wrapper.eq("area_type","1");//1接单 2不接单
|
|
|
|
wrapper.eq("status","1");//0禁用 1启用
|
|
|
|
wrapper.eq("status", "1");//0禁用 1启用
|
|
|
|
List<StationArea> areas = stationAreaMapper.selectList(wrapper);
|
|
|
|
List<StationArea> areas = stationAreaMapper.selectList(wrapper);
|
|
|
|
BigDecimal lat = new BigDecimal(location.getLatitude());//纬度
|
|
|
|
BigDecimal lat = new BigDecimal(location.getLatitude());//纬度
|
|
|
|
BigDecimal lng = new BigDecimal(location.getLongitude());//经度
|
|
|
|
BigDecimal lng = new BigDecimal(location.getLongitude());//经度
|
|
|
|
|
|
|
|
|
|
|
|
for (StationArea area : areas) {
|
|
|
|
for (StationArea area : areas) {
|
|
|
|
String mapInfo = area.getAreaMapInfo();
|
|
|
|
String mapInfo = area.getAreaMapInfo();
|
|
|
|
if(StringUtils.hasText(mapInfo)&& AreaUtil.isInsidePolygon(mapInfo, lng, lat)){
|
|
|
|
if (StringUtils.hasText(mapInfo) && AreaUtil.isInsidePolygon(mapInfo, lat, lng)) {
|
|
|
|
return area;
|
|
|
|
return area;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|