rev:修改
This commit is contained in:
@@ -124,6 +124,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
(byte) fhdhigh, (byte) fhdlow
|
(byte) fhdhigh, (byte) fhdlow
|
||||||
};
|
};
|
||||||
log.info("下发AGV作业指令--{}", str1);
|
log.info("下发AGV作业指令--{}", str1);
|
||||||
|
log.info("下发AGV作业任务--{}", inst.getInstruction_code()+"-----"+Bytes2HexString(b));
|
||||||
OneNDCSocketConnectionAutoRun.write(b);
|
OneNDCSocketConnectionAutoRun.write(b);
|
||||||
System.out.println("下发agv指令数据:" + Bytes2HexString(b));
|
System.out.println("下发agv指令数据:" + Bytes2HexString(b));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public interface AcsToWmsService {
|
|||||||
* @param arr
|
* @param arr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
HttpResponse feedTaskStatus(JSONArray arr);
|
HttpResponse feedTaskStatus(JSONObject arr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ACS向WMS反馈任务状态
|
* ACS向WMS反馈任务状态
|
||||||
|
|||||||
@@ -165,20 +165,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResponse feedTaskStatus(JSONArray data) {
|
public HttpResponse feedTaskStatus(JSONObject data) {
|
||||||
//feedTaskStatus
|
//feedTaskStatus
|
||||||
try {
|
try {
|
||||||
MDC.put(log_file_type, log_type);
|
MDC.put(log_file_type, log_type);
|
||||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||||
|
|
||||||
String task_code = "";
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
|
||||||
JSONObject json = (JSONObject) data.get(i);
|
|
||||||
task_code = json.getString("task_code");
|
|
||||||
}
|
|
||||||
TaskDto taskDto = taskService.findByCode(task_code);
|
|
||||||
String vehicle_code = taskDto.getVehicle_code();
|
|
||||||
|
|
||||||
HttpResponse result2 = null;
|
HttpResponse result2 = null;
|
||||||
log.info("feedbackTaskStatusToWms-----请求参数{}", data.toString());
|
log.info("feedbackTaskStatusToWms-----请求参数{}", data.toString());
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("remark", remark);
|
jo.put("remark", remark);
|
||||||
jo.put("params", params);
|
jo.put("params", params);
|
||||||
jo.put("params2", params2);
|
jo.put("params2", params2);
|
||||||
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
jo.put("task_type", task_type);
|
||||||
jo.put("class_type", class_type);
|
jo.put("class_type", class_type);
|
||||||
jo.put("route_plan_code", route_plan_code);
|
jo.put("route_plan_code", route_plan_code);
|
||||||
jo.put("paper_array", JSONUtil.toJsonStr(paper_array));
|
jo.put("paper_array", JSONUtil.toJsonStr(paper_array));
|
||||||
|
|||||||
@@ -1467,11 +1467,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
|||||||
if (ObjectUtil.isNotEmpty(entity.getWeight())) {
|
if (ObjectUtil.isNotEmpty(entity.getWeight())) {
|
||||||
feed_jo.put("weight", entity.getWeight());
|
feed_jo.put("weight", entity.getWeight());
|
||||||
}
|
}
|
||||||
JSONArray ja = new JSONArray();
|
|
||||||
ja.add(feed_jo);
|
|
||||||
//TODO 有需要根据上位系统反馈的信息再做进一步处理
|
//TODO 有需要根据上位系统反馈的信息再做进一步处理
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
acstowmsService.feedTaskStatus(ja);
|
acstowmsService.feedTaskStatus(feed_jo);
|
||||||
// 异步更新任务状态
|
// 异步更新任务状态
|
||||||
try {
|
try {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user