rev:修改
This commit is contained in:
@@ -124,6 +124,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
(byte) fhdhigh, (byte) fhdlow
|
||||
};
|
||||
log.info("下发AGV作业指令--{}", str1);
|
||||
log.info("下发AGV作业任务--{}", inst.getInstruction_code()+"-----"+Bytes2HexString(b));
|
||||
OneNDCSocketConnectionAutoRun.write(b);
|
||||
System.out.println("下发agv指令数据:" + Bytes2HexString(b));
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public interface AcsToWmsService {
|
||||
* @param arr
|
||||
* @return
|
||||
*/
|
||||
HttpResponse feedTaskStatus(JSONArray arr);
|
||||
HttpResponse feedTaskStatus(JSONObject arr);
|
||||
|
||||
/**
|
||||
* ACS向WMS反馈任务状态
|
||||
|
||||
@@ -165,20 +165,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse feedTaskStatus(JSONArray data) {
|
||||
public HttpResponse feedTaskStatus(JSONObject data) {
|
||||
//feedTaskStatus
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
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;
|
||||
log.info("feedbackTaskStatusToWms-----请求参数{}", data.toString());
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("remark", remark);
|
||||
jo.put("params", params);
|
||||
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("route_plan_code", route_plan_code);
|
||||
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())) {
|
||||
feed_jo.put("weight", entity.getWeight());
|
||||
}
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
//TODO 有需要根据上位系统反馈的信息再做进一步处理
|
||||
CompletableFuture.runAsync(() -> {
|
||||
acstowmsService.feedTaskStatus(ja);
|
||||
acstowmsService.feedTaskStatus(feed_jo);
|
||||
// 异步更新任务状态
|
||||
try {
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user