更新
This commit is contained in:
@@ -14,58 +14,58 @@ public class CreateTaskRequest extends BaseRequest {
|
|||||||
/**
|
/**
|
||||||
* 任务编号
|
* 任务编号
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Taskcode")
|
@JsonProperty("task_code")
|
||||||
private String Taskcode;
|
private String Taskcode;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取货点1
|
* 取货点1
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Startdevicecode")
|
@JsonProperty("start_device_code")
|
||||||
String Startdevicecode;
|
String Startdevicecode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放货点1
|
* 放货点1
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Nextdevicecode")
|
@JsonProperty("next_device_code")
|
||||||
String Nextdevicecode;
|
String Nextdevicecode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 优先级
|
* 优先级
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Priority")
|
@JsonProperty("priority")
|
||||||
String Priority = "1";
|
String Priority = "1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 载具号
|
* 载具号
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Vehiclecode")
|
@JsonProperty("vehicle_code")
|
||||||
String Vehiclecode;
|
String Vehiclecode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 载具类型
|
* 载具类型
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Vehicletype")
|
@JsonProperty("vehicle_type")
|
||||||
String Vehicletype;
|
String Vehicletype;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务类型
|
* 任务类型
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Tasktype")
|
@JsonProperty("task_type")
|
||||||
String Tasktype;
|
String Tasktype;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Remark")
|
@JsonProperty("remark")
|
||||||
String Remark;
|
String Remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扩展属性
|
* 扩展属性
|
||||||
*/
|
*/
|
||||||
@JsonProperty("Params")
|
@JsonProperty("params")
|
||||||
Map<String,String> Params = new HashMap<>();
|
Map<String,String> Params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,16 +106,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
.get(wmsurl + getToken_url)
|
.get(wmsurl + getToken_url)
|
||||||
.execute();
|
.execute();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.extLog("获取token", "反馈任务状态获取token失败" + e.getMessage());
|
logServer.extLog("获取token", "反馈任务状态获取token失败,原因:" + e.getMessage());
|
||||||
return null;
|
return getTokenResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
String token = getTokenResult.body();
|
String token = getTokenResult.body();
|
||||||
logServer.extLog("获取token", "反馈任务状态获取token成功" + token);
|
logServer.extLog("获取token", "反馈任务状态获取token成功,token值:" + token);
|
||||||
|
|
||||||
HttpResponse result = null;
|
HttpResponse result = null;
|
||||||
log.info("feedbackTaskStatusToWms-----请求参数{}", data.toString());
|
|
||||||
|
|
||||||
AddressDto addressDto = addressService.findByCode("feedbackTaskStatusToWms");
|
AddressDto addressDto = addressService.findByCode("feedbackTaskStatusToWms");
|
||||||
String methods_url = addressDto.getMethods_url();
|
String methods_url = addressDto.getMethods_url();
|
||||||
String url = wmsurl + methods_url;
|
String url = wmsurl + methods_url;
|
||||||
@@ -125,20 +123,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String taskcode = jsonObject.getString("Taskcode");
|
String taskcode = jsonObject.getString("Taskcode");
|
||||||
String taskstatus = jsonObject.getString("Taskstatus");
|
String taskstatus = jsonObject.getString("Taskstatus");
|
||||||
JSONObject reqData = new JSONObject();
|
JSONObject reqData = new JSONObject();
|
||||||
reqData.put("Staus",taskstatus);
|
reqData.put("Staus", taskstatus);
|
||||||
try {
|
try {
|
||||||
result = HttpRequest
|
result = HttpRequest
|
||||||
.put(url + taskcode + "?token=" + token)
|
.put(url + taskcode + "?token=" + token)
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.body(String.valueOf(reqData))
|
.body(String.valueOf(reqData))
|
||||||
.execute();
|
.execute();
|
||||||
// //System.out.println(result2);
|
log.info("反馈WMS任务状态,请求参数:{},响应参数:{}", String.valueOf(reqData), String.valueOf(result));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = e.getMessage();
|
log.error("反馈WMS任务状态,请求参数:{},响应参数:{}", String.valueOf(reqData), e.getMessage());
|
||||||
//网络不通
|
|
||||||
// //System.out.println(msg);
|
|
||||||
log.info("feedbackTaskStatusToWms-----输出参数{}", msg);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String type = "";
|
String type = "";
|
||||||
@@ -558,29 +552,24 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
.get(wmsUrl + getToken_url)
|
.get(wmsUrl + getToken_url)
|
||||||
.execute();
|
.execute();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logServer.extLog("获取token", e.getMessage());
|
logServer.extLog("反馈WMS取放货状态获取token失败", e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String token = getTokenResult.body();
|
String token = getTokenResult.body();
|
||||||
|
logServer.extLog("反馈WMS取放货状态获取token成功,token值:", token);
|
||||||
|
|
||||||
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus");
|
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus");
|
||||||
String methods_url = addressDto.getMethods_url();
|
String methods_url = addressDto.getMethods_url();
|
||||||
String url = wmsUrl + methods_url;
|
String url = wmsUrl + methods_url;
|
||||||
HttpResponse result = null;
|
HttpResponse result = null;
|
||||||
log.info("feedAgvTaskStatus----请求参数{}", from);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = HttpRequest.post(url + "?token=" + token)
|
result = HttpRequest.post(url + "?token=" + token)
|
||||||
.body(String.valueOf(from))
|
.body(JSON.toJSONString(from))
|
||||||
.execute();
|
.execute();
|
||||||
System.out.println(result);
|
log.info("反馈WMS取放货状态,请求参数:{},响应参数:{}", JSON.toJSONString(from), String.valueOf(result));
|
||||||
log.info("feedAgvTaskStatus----返回参数{}", result);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = e.getMessage();
|
log.info("反馈WMS取放货状态,请求参数:{},响应参数:{}", JSON.toJSONString(from), e.getMessage());
|
||||||
//网络不通
|
|
||||||
//System.out.println(msg);
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("agv_system_type", "1");
|
jo.put("agv_system_type", "1");
|
||||||
jo.put("remark", remark);
|
jo.put("remark", remark);
|
||||||
jo.put("params", params);
|
jo.put("params", params);
|
||||||
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
jo.put("task_type", task_type);
|
||||||
|
|
||||||
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user