From 5b0e2c1d552737686e343602f33bb9489d9324f0 Mon Sep 17 00:00:00 2001 From: psh Date: Mon, 8 Jan 2024 13:57:56 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=810x05=E5=86=8D=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AE=8C=E6=88=90=202=E3=80=81=E7=A9=BA?= =?UTF-8?q?=E6=9E=B6=E6=BB=A1=E4=BA=86=E4=B8=8D=E6=8A=A5=E9=94=99=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E4=B8=8D=E9=87=8D=E5=A4=8D=E5=8F=91=E9=80=81=203?= =?UTF-8?q?=E3=80=81=E6=BB=A1=E6=9E=B6=E4=B8=8B=E6=96=99=E4=BA=8C=E6=AC=A1?= =?UTF-8?q?=E5=88=86=E9=85=8D=E5=86=8D=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java | 10 +++++++++- .../nl/wms/ext/service/impl/AcsToWmsServiceImpl.java | 4 +--- .../nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java | 4 ++-- .../nl/wms/sch/task_manage/task/tasks/MJXLTask.java | 7 +++++-- 4 files changed, 17 insertions(+), 8 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 ec688f6..408a4af 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 @@ -178,7 +178,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if(device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); if(standardInspectSiteDeviceDriver.getAction()==1){ - standardInspectSiteDeviceDriver.writing(2); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); }else{ log.info("当前涂板线未允许取货"); @@ -227,6 +226,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); return; } + + StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; + if(device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){ + standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); + if(standardInspectSiteDeviceDriver.getAction()==1){ + standardInspectSiteDeviceDriver.writing(2); + } + } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达放货等待点 //(需要WCS反馈) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java index 8e4d53e..93a1057 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java @@ -100,9 +100,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { // 执行创建任务 task.apply(param); } catch (Exception e) { - String message = ObjectUtil.isEmpty(e.getMessage()) - ? ((InvocationTargetException) e).getTargetException().getMessage() - : e.getMessage(); + String message = e.getMessage(); log.error("ACS请求LMS出现错误: {}", message); result.setCode(HttpStatus.HTTP_BAD_REQUEST); result.setMessage(message); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java index 3d7932b..750aa3e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KGHJRKTask.java @@ -128,7 +128,7 @@ public class KGHJRKTask extends AbstractTask { if (schBasePoint != null) { log.info("空固化架放货找到当前点位有货:{},取上一个空位:{}", temp.getPoint_code(), schBasePoint.getPoint_code()); } else { - throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); + log.info("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); } break; } @@ -143,7 +143,7 @@ public class KGHJRKTask extends AbstractTask { } } if (schBasePoint==null){ - throw new BadRequestException("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); + log.info("当前区域:"+regionCode+"所有点位均已放满,暂时跳过"); } } return schBasePoint; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java index 82970e6..7885a13 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java @@ -98,7 +98,7 @@ public class MJXLTask extends AbstractTask { taskService.update(task); //发起任务时先把点位占用,防止发起重复任务 - point.setIng_task_code(task.getTask_code()); +// point.setIng_task_code(task.getTask_code()); point.setVehicle_type(materialType); pointService.update(point); @@ -288,8 +288,11 @@ public class MJXLTask extends AbstractTask { .eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); SchBasePoint point = findNextPoint(startPoint, extGroupData); schBaseTask.setPoint_code2(point.getPoint_code()+"0"+(point.getVehicle_qty()+1)); - if(point.getIng_task_code()!=null){ + if(ObjectUtil.isNotEmpty(point.getIng_task_code())&&!schBaseTask.getTask_code().equals(point.getIng_task_code())){ throw new BadRequestException("当前固化室点位有任务,暂不反馈!"); } + //重算点位时把点位占用 + point.setIng_task_code(schBaseTask.getTask_code()); + pointService.update(point); } }