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