liyg 2 éve
szülő
commit
3b8455d599

+ 3 - 5
src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java

@@ -835,8 +835,6 @@ public class RouteServiceImpl implements RouteService {
         } else {
             searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode("四川省达川区", "utf-8") + "&key=" + gaodeTonken);
         }
-//        SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
-//        SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
         SearchPoint2 searchPoint = JSON.parseObject(searchPointJson,SearchPoint2.class);
         SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2,SearchPoint2.class);
         //运单生成之后保存
@@ -849,9 +847,9 @@ public class RouteServiceImpl implements RouteService {
         String startLat = Lat.length() > 9 ? Lat.substring(0, 8) : Lat;
         redisMap.put("startLonlat", startLon + "," + startLat);
         String location2 = searchPoint2.getGeocodes().get(0).getLocation();
-        String[] split2 = StringUtils.split(location, ",");
-        String Lng2 = split[0];
-        String Lat2 = split[1];
+        String[] split2 = StringUtils.split(location2, ",");
+        String Lng2 = split2[0];
+        String Lat2 = split2[1];
 
         String endLon = Lng2.length() > 9 ? Lng2.substring(0, 9) : Lng2;
         String endLat = Lat2.length() > 9 ? Lat2.substring(0, 8) : Lat2;