|
@@ -86,7 +86,7 @@ public class RouteServiceImpl implements RouteService {
|
|
|
|
|
|
|
|
|
String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("shipperName") == null ? "安钢集团信阳钢铁有限责任公司" : mapValue.get("shipperName").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
|
|
|
String location = searchPoint.getGeocodes().get(0).getLocation();
|
|
|
String[] split = StringUtils.split(location, ",");
|
|
|
String Lng = split[0];
|
|
@@ -103,7 +103,7 @@ public class RouteServiceImpl implements RouteService {
|
|
|
|
|
|
|
|
|
String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("receiveAddress").toString() == null ? "长沙市" : mapValue.get("receiveAddress").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint2 = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
|
|
|
if (searchPoint2.getStatus() == "0") {
|
|
|
|
|
|
if (searchPoint2.getGeocodes() != null) {
|
|
@@ -281,11 +281,11 @@ public class RouteServiceImpl implements RouteService {
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date gateTime = dateFormat.parse(mapValue.get("resultOutGateTime").toString());
|
|
|
String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("shipperName").toString() == null ? "四川省达州钢铁集团有限责任公司" : mapValue.get("shipperName").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
|
|
|
|
|
|
|
|
|
String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("receiveAddress").toString() == null ? "长沙市" : mapValue.get("receiveAddress").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint2 = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
|
|
|
|
|
|
|
|
|
String netValidationResult = zhongJiaoXingLu.netValidation(mapValue.get("capacityNumber").toString());
|
|
@@ -374,11 +374,11 @@ public class RouteServiceImpl implements RouteService {
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date gateTime = dateFormat.parse(mapValue.get("resultOutGateTime").toString());
|
|
|
String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("shipperName").toString() == null ? "四川省达州钢铁集团有限责任公司" : mapValue.get("shipperName").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
|
|
|
|
|
|
|
|
|
String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(mapValue.get("receiveAddress").toString() == null ? "长沙市" : mapValue.get("receiveAddress").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint2 = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
|
|
|
|
|
|
|
|
|
String netValidationResult = zhongJiaoXingLu.netValidation(mapValue.get("capacityNumber").toString());
|
|
@@ -483,10 +483,10 @@ public class RouteServiceImpl implements RouteService {
|
|
|
Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
|
|
|
if (Integer.parseInt(netValidationMap.get("status").toString()) == 1001 && netValidationMap.get("result").toString().equals("yes")) {
|
|
|
String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode("四川省达州钢铁集团有限责任公司", "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
|
|
|
|
|
|
String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(resultMap.get("receiveAddress") == null || "".equals(String.valueOf(resultMap.get("receiveAddress"))) ? "长沙市" : resultMap.get("receiveAddress").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint2 = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
|
|
|
|
|
|
HashMap<String, String> redisMap = new HashMap<>();
|
|
|
|
|
@@ -677,9 +677,9 @@ public class RouteServiceImpl implements RouteService {
|
|
|
Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
|
|
|
if (Integer.parseInt(netValidationMap.get("status").toString()) == 1001 && netValidationMap.get("result").toString().equals("yes")) {
|
|
|
String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(resultMap.get("shipperName").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson, SearchPoint2.class);
|
|
|
+ SearchPoint2 searchPoint = JSON.parseObject(searchPointJson, SearchPoint2.class);
|
|
|
String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address=" + URLEncoder.encode(resultMap.get("addressDeliveryAddress").toString(), "utf-8") + "&key=" + gaodeTonken);
|
|
|
- SearchPoint2 searchPoint2 = (SearchPoint2) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint.class);
|
|
|
+ SearchPoint2 searchPoint2 = JSON.parseObject(searchPointJson2, SearchPoint2.class);
|
|
|
|
|
|
HashMap<String, String> redisMap = new HashMap<>();
|
|
|
|
|
@@ -835,8 +835,8 @@ 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);
|
|
|
|