liyg 2 years ago
parent
commit
c511f895fe

+ 2 - 2
src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java

@@ -273,7 +273,7 @@ public class OffSiteTransportationController extends BaseRESTfulController {
     }
 
     @PostMapping(value = "/addTmstruckReceiptResult" )
-    public synchronized RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value, String orderNumber, String resultArrivalAddress) throws Exception {
+    public RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value, String orderNumber, String resultArrivalAddress) throws Exception {
         Map<String,Object> map = new HashMap<String,Object>();
         map.put("orderNumber",orderNumber);
         map.put("resultArrivalAddress",resultArrivalAddress);
@@ -364,7 +364,7 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         //入网验证
         String netValidationResult = zhongJiaoXingLu.netValidation(capacityNumber);
         Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
-        if (Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
+        if (netValidationMap!=null && 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=  JSON.parseObject(searchPointJson, SearchPoint2.class);
             String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address="+URLEncoder.encode("四川省达州钢铁集团有限责任公司","utf-8")+"&key="+gaodeTonken);

+ 2 - 2
src/main/java/com/steerinfo/route/threeRequest/ZhongJiaoXingLu.java

@@ -227,7 +227,7 @@ public class ZhongJiaoXingLu {
                 map.put("vclN", vclN+"_3");
             }
             String url = "https://openapi.sinoiov.cn/save/apis/checkTruckExistV2";
-            DataExchangeService des = new DataExchangeService(5000, 8000);
+            DataExchangeService des = new DataExchangeService(500, 500);
 
             // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
             String res = des.postHttps(url, map);
@@ -239,7 +239,7 @@ public class ZhongJiaoXingLu {
             }
             return res;
         } catch (Exception e) {
-            System.out.println("e:" + e.getMessage());
+            System.out.println("中交兴路入网验证异常:" + e.getMessage());
         }
         return null;
     }