| | |
| | | */ |
| | | @Override |
| | | public ResultUtil judgingTheCity(String startLonLat, String endAddress) throws Exception { |
| | | Map<String, String> sgeocode = gdMapGeocodingUtil.geocode(startLonLat.split(",")[0], startLonLat.split(",")[1]); |
| | | String scityCode = sgeocode.get("cityCode"); |
| | | Map<String, Object> geocoding = gdMapGeocodingUtil.geocoding(endAddress); |
| | | if(Integer.valueOf(geocoding.get("status").toString()) != 0){ |
| | | return ResultUtil.error("收货地址有误,无法查询具体地址信息"); |
| | | } |
| | | List<String> list = (List<String>)geocoding.get("data"); |
| | | Map<String, String> egeocode = gdMapGeocodingUtil.geocode(list.get(0).split(",")[1], list.get(0).split(",")[0]); |
| | | String ecityCode = egeocode.get("cityCode"); |
| | | if(!scityCode.equals(ecityCode)){ |
| | | return ResultUtil.error("已超出服务范围,请重新选择跨城小件物流"); |
| | | } |
| | | // Map<String, String> sgeocode = gdMapGeocodingUtil.geocode(startLonLat.split(",")[0], startLonLat.split(",")[1]); |
| | | // String scityCode = sgeocode.get("cityCode"); |
| | | // Map<String, Object> geocoding = gdMapGeocodingUtil.geocoding(endAddress); |
| | | // if(Integer.valueOf(geocoding.get("status").toString()) != 0){ |
| | | // return ResultUtil.error("收货地址有误,无法查询具体地址信息"); |
| | | // } |
| | | // List<String> list = (List<String>)geocoding.get("data"); |
| | | // Map<String, String> egeocode = gdMapGeocodingUtil.geocode(list.get(0).split(",")[1], list.get(0).split(",")[0]); |
| | | // String ecityCode = egeocode.get("cityCode"); |
| | | // if(!scityCode.equals(ecityCode)){ |
| | | //// return ResultUtil.error("已超出服务范围,请重新选择跨城小件物流"); |
| | | // } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | price2 = jsonObject.getDouble("num19"); |
| | | } |
| | | |
| | | if(dist.compareTo(jsonObject.getDouble("num9")) >= 0 && dist.compareTo(jsonObject.getDouble("num10")) < 0){ |
| | | if(dist.compareTo(jsonObject.getDouble("num9")) >= 0){ |
| | | price1 = jsonObject.getDouble("num11"); |
| | | } |
| | | // if(dist.compareTo(jsonObject.getDouble("num9")) >= 0 && dist.compareTo(jsonObject.getDouble("num10")) < 0){ |
| | | // price1 = jsonObject.getDouble("num11"); |
| | | // } |
| | | if(dist.compareTo(jsonObject.getDouble("num20")) >= 0 && dist.compareTo(jsonObject.getDouble("num21")) < 0){ |
| | | price2 = jsonObject.getDouble("num22"); |
| | | } |