From fa8a4dcad4de381be7384f61e0e579657e530615 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Fri, 9 Dec 2022 18:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hd/logPath_IS_UNDEFINED/2022-12-09.0.log | 0 .../ACS请求ERP/2022-12-09.0.log | 0 .../ACS请求WMS/2022-12-09.0.log | 0 .../AGV请求离开/2022-12-09.0.log | 0 hd/logPath_IS_UNDEFINED/NDC/2022-12-09.0.log | 0 .../WMS下发ACS/2022-12-09.0.log | 0 .../反馈AGV请求/2022-12-09.0.log | 1 + .../扫码记录/2022-12-09.0.log | 0 .../查询AGV指令状态/2022-12-09.0.log | 0 .../2022-12-09.0.log | 0 .../自动创建指令/2022-12-09.0.log | 0 .../nl/acs/ext/wms/service/AgvWaitUtil.java | 8 +++---- .../service/impl/AcsToWmsZDServiceImpl.java | 8 ++++--- .../wms/service/impl/AgvToAcsServiceImpl.java | 4 ++-- .../task/service/impl/TaskServiceImpl.java | 23 +++++++++++++++---- .../resources/config/application-prod.yml | 2 +- 16 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 hd/logPath_IS_UNDEFINED/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/AGV请求离开/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/NDC/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/扫码记录/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/查询仙知AGV指令状态/2022-12-09.0.log create mode 100644 hd/logPath_IS_UNDEFINED/自动创建指令/2022-12-09.0.log diff --git a/hd/logPath_IS_UNDEFINED/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/AGV请求离开/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/AGV请求离开/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/NDC/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/NDC/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-09.0.log new file mode 100644 index 0000000..bc2b168 --- /dev/null +++ b/hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-09.0.log @@ -0,0 +1 @@ +2022-12-09 15:50:14.334 [http-nio-8010-exec-1] INFO org.nl.acs.agv.server.impl.AgvServiceImpl - 任务号:10820,指令号00080,下发agv订单序列参数:{"id":"00080","complete":true,"blocks":[{"blockId":"d606f3dd0910426e9cabc33091846b68","location":"4204IN","operation":"script","id":"4204IN","script_name":"userpy/interact.py","script_args":{"addr":"http://127.0.0.1:8010","data":{"reach":{"task_code":"00080","address":"4204IN"}},"protocol":"HTTP"}},{"blockId":"7978bd275c024c038243f3864d9ed153","location":"4204","operation":"JackLoad"},{"blockId":"88413812f550427bac6abc68e0b1da8b","location":"4204OUT","operation":"script","id":"4204OUT","script_name":"userpy/interact.py","script_args":{"addr":"http://127.0.0.1:8010","data":{"reach":{"task_code":"00080","address":"4204OUT"}},"protocol":"HTTP"}},{"blockId":"1776881cf7144fc0b8e4bb35849d2c85","location":"1019IN","operation":"script","id":"1019IN","script_name":"userpy/interact.py","script_args":{"addr":"http://127.0.0.1:8010","data":{"reach":{"task_code":"00080","address":"1019IN"}},"protocol":"HTTP"}},{"blockId":"fe0f7bf9f6bb4ff3b2eb6cc3fe30170d","location":"1019","operation":"JackUnload"},{"blockId":"9c6f68517762442e84d833c28eeb0681","location":"1019OUT","operation":"script","id":"1019OUT","script_name":"userpy/interact.py","script_args":{"addr":"http://127.0.0.1:8010","data":{"reach":{"task_code":"00080","address":"1019OUT"}},"protocol":"HTTP"}}]} diff --git a/hd/logPath_IS_UNDEFINED/扫码记录/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/扫码记录/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/查询仙知AGV指令状态/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/查询仙知AGV指令状态/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/logPath_IS_UNDEFINED/自动创建指令/2022-12-09.0.log b/hd/logPath_IS_UNDEFINED/自动创建指令/2022-12-09.0.log new file mode 100644 index 0000000..e69de29 diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java index ed75f6b..5d89182 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java @@ -35,7 +35,7 @@ public class AgvWaitUtil { //取货前等待 public Map waitInGet(String device_code, Map feedMap, JSONObject param) { String inst_code = param.getString("task_code"); - Instruction instructionDto = instructionService.findByCode(inst_code); + Instruction instructionDto = instructionService.findByCodeFromCache(inst_code); String task_code = String.valueOf(feedMap.get("taskCode")); StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver; @@ -110,7 +110,7 @@ public class AgvWaitUtil { //取货完成等待 public Map waitOutGet(String device_code, Map feedMap, JSONObject param) { String inst_code = param.getString("task_code"); - Instruction instructionDto = instructionService.findByCode(inst_code); + Instruction instructionDto = instructionService.findByCodeFromCache(inst_code); String task_code = String.valueOf(feedMap.get("taskCode")); StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver; @@ -179,7 +179,7 @@ public class AgvWaitUtil { //放货前等待 public Map waitInPut(String device_code, Map feedMap, JSONObject param) { String inst_code = param.getString("task_code"); - Instruction instructionDto = instructionService.findByCode(inst_code); + Instruction instructionDto = instructionService.findByCodeFromCache(inst_code); String task_code = String.valueOf(feedMap.get("taskCode")); StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver; @@ -255,7 +255,7 @@ public class AgvWaitUtil { //放货完成等待 public Map waitOutPut(String device_code, Map feedMap, JSONObject param) { String inst_code = param.getString("task_code"); - Instruction instructionDto = instructionService.findByCode(inst_code); + Instruction instructionDto = instructionService.findByCodeFromCache(inst_code); String task_code = String.valueOf(feedMap.get("taskCode")); StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver; diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java index 9b3c64b..c9814eb 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; +import com.alibaba.fastjson.JSON; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import net.sf.json.JSONObject; @@ -182,7 +183,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { String url = wcsurl + methods_url; try { result = HttpRequest.post(url) - .header("Authorization", token).body(String.valueOf(whereJson)) + .header("Authorization", token).body(JSON.toJSONString(whereJson)) .execute(); logServer.log(taskCode, "taskFeedback", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, carId); JSONObject jo = JSONObject.fromObject(result.body()); @@ -212,7 +213,8 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { String url = wcsurl + methods_url; try { result = HttpRequest.post(url) - .header("Authorization", token).body(String.valueOf(whereJson)) + .header("Authorization", token) + .body(JSON.toJSONString(whereJson)) .execute(); logServer.log(taskCode, "taskDeprecate", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, ""); JSONObject jo = JSONObject.fromObject(result.body()); @@ -247,7 +249,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { } try { result = HttpRequest.post(url) - .header("Authorization", token).body(String.valueOf(whereJson)) + .header("Authorization", token).body(JSON.toJSONString(whereJson)) .execute(); JSONObject jo = JSONObject.fromObject(result.body()); log.info("checkDeviceStatus-----输出参数{}", jo.toString()); diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java index 7343b99..0cfa815 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java @@ -31,7 +31,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { public Map waitpointRequest(JSONObject param) { String inst_code = param.getString("task_code"); String address = param.getString("address"); - Instruction instructionDto = instructionService.findByCode(inst_code); + Instruction instructionDto = instructionService.findByCodeFromCache(inst_code); Map map = new HashMap<>(); if (ObjectUtil.isEmpty(instructionDto)) { map.put("status", 400); @@ -43,7 +43,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { Map feedMap = new HashMap(); feedMap.put("taskCode", task_code); feedMap.put("taskType", instructionDto.getInstruction_type()); - feedMap.put("carId", instructionDto.getAgv_jobno()); + feedMap.put("carId", instructionDto.getCarno()); String start_device_code = instructionDto.getStart_device_code(); String next_device_code = instructionDto.getNext_device_code(); if (address.contains("IN")) { diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index fa7fd34..9f0fcc4 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -638,7 +638,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { Map feedMap = new HashMap(); feedMap.put("taskCode", entity.getTask_code()); feedMap.put("taskType", entity.getTask_type()); - feedMap.put("carId", instruction.getAgv_jobno()); + String carno = instruction.getCarno(); + if (StrUtil.isEmpty(carno)){ + carno = "null"; + } feedMap.put("feedbackStatus", "errorFinish"); Map map = acsToWmsZDService.taskFeedback(feedMap); removeByCodeFromCache(entity.getTask_code()); @@ -665,7 +668,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { Map feedMap = new HashMap(); feedMap.put("taskCode", entity.getTask_code()); feedMap.put("taskType", entity.getTask_type()); - feedMap.put("carId", instruction.getAgv_jobno()); + String carno = instruction.getCarno(); + if (StrUtil.isEmpty(carno)){ + carno = "null"; + } + feedMap.put("carId", carno); feedMap.put("feedbackStatus", "exception"); acsToWmsZDService.taskFeedback(feedMap); removeByCodeFromCache(entity.getTask_code()); @@ -692,7 +699,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { Map feedMap = new HashMap(); feedMap.put("taskCode", entity.getTask_code()); feedMap.put("taskType", entity.getTask_type()); - feedMap.put("carId", instruction.getAgv_jobno()); + String carno = instruction.getCarno(); + if (StrUtil.isEmpty(carno)){ + carno = "null"; + } + feedMap.put("carId", carno); feedMap.put("feedbackStatus", "deprecate"); acsToWmsZDService.taskFeedback(feedMap); removeByCodeFromCache(entity.getTask_code()); @@ -719,7 +730,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { Map feedMap = new HashMap(); feedMap.put("taskCode", entity.getTask_code()); feedMap.put("taskType", entity.getTask_type()); - feedMap.put("carId", instruction.getAgv_jobno()); + String carno = instruction.getCarno(); + if (StrUtil.isEmpty(carno)){ + carno = "null"; + } + feedMap.put("carId", carno); feedMap.put("feedbackStatus", "NoTargetPutFinish"); acsToWmsZDService.taskFeedback(feedMap); removeByCodeFromCache(entity.getTask_code()); diff --git a/hd/nladmin-system/src/main/resources/config/application-prod.yml b/hd/nladmin-system/src/main/resources/config/application-prod.yml index f1be2ba..c11a58f 100644 --- a/hd/nladmin-system/src/main/resources/config/application-prod.yml +++ b/hd/nladmin-system/src/main/resources/config/application-prod.yml @@ -135,4 +135,4 @@ file: avatarMaxSize: 5 agvToAcs: - addr: http://172.22.50.184:8010 + addr: http://172.22.50.188:8010