zxf недель назад: 3
Родитель
Сommit
d6f8c57143

+ 4 - 4
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/SFLogisticsService.java

@@ -368,13 +368,13 @@ public class SFLogisticsService implements LogisticsService {
         Map<String, String> params = new HashMap<String, String>();
         String timeStamp = String.valueOf(System.currentTimeMillis());
         Map<String,Object> orderData= new HashMap<>();
-        orderData.put("templateCode","fm_210_standard_{{clientcode}}");
+        orderData.put("templateCode","fm_76130_standard_RJAHGDYVIJP8");
         orderData.put("version","2.0");
         orderData.put("fileType","pdf");
         orderData.put("sync",true);
         List<Map<String, Object>> documents = new ArrayList<>();
         Map<String, Object> doc = new HashMap<>();
-        doc.put("masterWaybillNo",bizWaybillOrder.getWaybillNo() );
+        doc.put("masterWaybillNo",bizWaybillOrder.getExternalWaybillNo());
         documents.add(doc);
         orderData.put("documents",documents);
         String msgData =tools.packageMsgData(standardService);
@@ -389,7 +389,7 @@ public class SFLogisticsService implements LogisticsService {
             String result = HttpClientUtil.post(sfExpressConfig.getCurrentApiUrl(), params);
             JSONObject jsonObject = JSON.parseObject(result).getJSONObject("apiResultData");
             JSONObject resultInfo = new JSONObject();
-            if (jsonObject != null && jsonObject.containsKey("apiErrorMsg") && StringUtils.isBlank("apiErrorMsg")) {
+            if (jsonObject != null && jsonObject.containsKey("success") && jsonObject.getBooleanValue("success")) {
                 resultInfo.put("success", true);
                 JSONObject obj = jsonObject.getJSONObject("obj");
                 // 4. 取出 files 数组,取第一个
@@ -402,7 +402,7 @@ public class SFLogisticsService implements LogisticsService {
                 return resultInfo;
             } else {
                 resultInfo.put("success", false);
-                resultInfo.put("msg", "获取面单失败!失败原因:"+jsonObject.get("apiErrorMsg"));
+                resultInfo.put("msg", "获取面单失败!");
                 return resultInfo;
             }