|
|
@ -106,16 +106,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
.get(wmsurl + getToken_url) |
|
|
|
.execute(); |
|
|
|
} catch (Exception e) { |
|
|
|
logServer.extLog("获取token", "反馈任务状态获取token失败" + e.getMessage()); |
|
|
|
return null; |
|
|
|
logServer.extLog("获取token", "反馈任务状态获取token失败,原因:" + e.getMessage()); |
|
|
|
return getTokenResult; |
|
|
|
} |
|
|
|
|
|
|
|
String token = getTokenResult.body(); |
|
|
|
logServer.extLog("获取token", "反馈任务状态获取token成功" + token); |
|
|
|
logServer.extLog("获取token", "反馈任务状态获取token成功,token值:" + token); |
|
|
|
|
|
|
|
HttpResponse result = null; |
|
|
|
log.info("feedbackTaskStatusToWms-----请求参数{}", data.toString()); |
|
|
|
|
|
|
|
AddressDto addressDto = addressService.findByCode("feedbackTaskStatusToWms"); |
|
|
|
String methods_url = addressDto.getMethods_url(); |
|
|
|
String url = wmsurl + methods_url; |
|
|
@ -125,20 +123,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
String taskcode = jsonObject.getString("Taskcode"); |
|
|
|
String taskstatus = jsonObject.getString("Taskstatus"); |
|
|
|
JSONObject reqData = new JSONObject(); |
|
|
|
reqData.put("Staus",taskstatus); |
|
|
|
reqData.put("Staus", taskstatus); |
|
|
|
try { |
|
|
|
result = HttpRequest |
|
|
|
.put(url + taskcode + "?token=" + token) |
|
|
|
.header("Content-Type", "application/json") |
|
|
|
.body(String.valueOf(reqData)) |
|
|
|
.execute(); |
|
|
|
// //System.out.println(result2);
|
|
|
|
log.info("反馈WMS任务状态,请求参数:{},响应参数:{}", String.valueOf(reqData), String.valueOf(result)); |
|
|
|
} catch (Exception e) { |
|
|
|
String msg = e.getMessage(); |
|
|
|
//网络不通
|
|
|
|
// //System.out.println(msg);
|
|
|
|
log.info("feedbackTaskStatusToWms-----输出参数{}", msg); |
|
|
|
|
|
|
|
log.error("反馈WMS任务状态,请求参数:{},响应参数:{}", String.valueOf(reqData), e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
String type = ""; |
|
|
@ -558,29 +552,24 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
|
.get(wmsUrl + getToken_url) |
|
|
|
.execute(); |
|
|
|
} catch (Exception e) { |
|
|
|
logServer.extLog("获取token", e.getMessage()); |
|
|
|
logServer.extLog("反馈WMS取放货状态获取token失败", e.getMessage()); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
String token = getTokenResult.body(); |
|
|
|
|
|
|
|
logServer.extLog("反馈WMS取放货状态获取token成功,token值:", token); |
|
|
|
|
|
|
|
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus"); |
|
|
|
String methods_url = addressDto.getMethods_url(); |
|
|
|
String url = wmsUrl + methods_url; |
|
|
|
HttpResponse result = null; |
|
|
|
log.info("feedAgvTaskStatus----请求参数{}", from); |
|
|
|
|
|
|
|
try { |
|
|
|
result = HttpRequest.post(url + "?token=" + token) |
|
|
|
.body(String.valueOf(from)) |
|
|
|
.body(JSON.toJSONString(from)) |
|
|
|
.execute(); |
|
|
|
System.out.println(result); |
|
|
|
log.info("feedAgvTaskStatus----返回参数{}", result); |
|
|
|
log.info("反馈WMS取放货状态,请求参数:{},响应参数:{}", JSON.toJSONString(from), String.valueOf(result)); |
|
|
|
} catch (Exception e) { |
|
|
|
String msg = e.getMessage(); |
|
|
|
//网络不通
|
|
|
|
//System.out.println(msg);
|
|
|
|
log.info("反馈WMS取放货状态,请求参数:{},响应参数:{}", JSON.toJSONString(from), e.getMessage()); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|