From befe4f1bdcda10d7ca67d067d7dfd95365b56cd0 Mon Sep 17 00:00:00 2001 From: psh Date: Fri, 29 Dec 2023 15:51:18 +0800 Subject: [PATCH] fix --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 6 ++--- .../resources/log/AgvNdcOneDeviceDriver.xml | 2 +- .../src/main/resources/log/AutoCreateInst.xml | 2 +- .../resources/log/LnshRGVDeviceDriver.xml | 2 +- .../src/main/resources/log/Lucene.xml | 2 +- .../main/resources/log/NDCAgvServiceImpl.xml | 2 +- .../log/OneNDCSocketConnectionAutoRun.xml | 2 +- .../src/main/resources/log/WmsToAcs.xml | 2 +- .../main/resources/log/XgAgvDeviceDriver.xml | 2 +- .../src/main/resources/logback-spring.xml | 2 +- .../task_manage/task/tasks/ghs/GHSQHTask.java | 24 ++++++++++++------- .../main/resources/log/XgAgvDeviceDriver.xml | 2 +- .../src/main/resources/logback-spring.xml | 2 +- 13 files changed, 30 insertions(+), 22 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 4e50a6f..a3dca4b 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -174,7 +174,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } - data = getData(data, index, inst, task); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达取货等待点 //(需要WCS反馈) } else if (phase == 0x04) { @@ -215,7 +215,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); return; } - data = getData(data, index, inst, task); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达放货等待点 //(需要WCS反馈) } else if (phase == 0x06) { @@ -253,7 +253,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic log.info("未找到关联编号{}对应的指令", ikey); return; } - data = getData(data, index, inst, task); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //放货完毕 //(需要WCS反馈) diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml index f4629cd..ec8c7bf 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/AgvNdcOneDeviceDriver.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml index 1ac8de4..c3bbeed 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/AutoCreateInst.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml index 6920f4f..4436995 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/LnshRGVDeviceDriver.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml index f00bdbd..857dfa3 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/Lucene.xml @@ -11,7 +11,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml index a10d776..4d994b7 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/NDCAgvServiceImpl.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml index 0ee581e..6c2075c 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml index e5d9847..9ea3c61 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/WmsToAcs.xml @@ -10,7 +10,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml b/acs/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml index c805802..3420c4e 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml @@ -11,7 +11,7 @@ 15 - 200MB + 50MB 2GB diff --git a/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index d5826a1..4f110ea 100644 --- a/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -45,7 +45,7 @@ https://juejin.cn/post/6844903775631572999 15 - 200MB + 50MB 20GB diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java index cf257fd..2de8c86 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSQHTask.java @@ -117,6 +117,13 @@ public class GHSQHTask extends AbstractTask { // 申请任务 SchBaseTask task = new SchBaseTask(); // 任务实体 String apply_point_code = schBasePoint.getPoint_code(); // 请求点 + // 获取对接位点位对象 + SchBasePoint pointObj = pointService.getOne(new LambdaQueryWrapper() + .eq(SchBasePoint::getPoint_code, apply_point_code)); + //首位01或06生成任务需要补01,例如GHS0101下发需要改成GHS010101 + if(apply_point_code.endsWith("01")||apply_point_code.endsWith("06")) { + apply_point_code+="01"; + } String config_code = "GHSQHTask"; // 1、校验数据 SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper() @@ -130,9 +137,6 @@ public class GHSQHTask extends AbstractTask { Assert.isFalse(unFinishTasksByTaskConfig.size() >= tcmn, "该点位申请的任务未完成数已超过上限,无法申请任务"); - // 获取对接位点位对象 - SchBasePoint pointObj = pointService.getOne(new LambdaQueryWrapper() - .eq(SchBasePoint::getPoint_code, apply_point_code)); // 校验是否需要自动agv if (!pointObj.getIs_auto()) { // 如果不需要自动,则不创建任务 @@ -146,14 +150,12 @@ public class GHSQHTask extends AbstractTask { task.setTask_status(TaskStatus.APPLY.getCode()); task.setWorkshop_code(taskConfig.getWorkshop_code()); // 车间编码 //首位01或06生成任务需要补01,例如GHS0101下发需要改成GHS010101 - if(schBasePoint.getPoint_code().endsWith("01")||schBasePoint.getPoint_code().endsWith("06")) { - task.setPoint_code1(task.getPoint_code1()+"01"); - } + task.setPoint_code1(apply_point_code); task.setPoint_code2(endPoint); task.setTask_status(TaskStatus.CREATED.getCode()); task.setRemark(""); // 设置起/终点 - this.setTaskPoint(taskConfig, task, apply_point_code); +// this.setTaskPoint(taskConfig, task, apply_point_code); taskService.create(task); //下发 @@ -319,13 +321,19 @@ public class GHSQHTask extends AbstractTask { @Override protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { //todo 重算最优点 + String schBasePoint=schBaseTask.getPoint_code1(); + if(schBasePoint.endsWith("0101")||schBasePoint.endsWith("0601")){ + schBasePoint=schBasePoint.substring(0,schBasePoint.length()-2); + } SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper() - .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); + .eq(SchBasePoint::getPoint_code, schBasePoint)); SchBasePoint nextPoint = this.findNextPoint(startPoint); if (ObjectUtil.isEmpty(nextPoint)) { throw new Exception("当前起点" + schBaseTask.getPoint_code1() + "未找到合适的放货点位"); } //上位记的是整一个缓存区三个点 schBaseTask.setPoint_code2(nextPoint.getPoint_code()); + nextPoint.setIng_task_code(schBaseTask.getTask_code()); + pointService.update(nextPoint); } } diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml b/lms/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml index c805802..3420c4e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml @@ -11,7 +11,7 @@ 15 - 200MB + 50MB 2GB diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml index 64c4ce4..be73e83 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml @@ -37,7 +37,7 @@ https://juejin.cn/post/6844903775631572999 15 - 20MB + 50MB 20GB