From 36ad0e2b9f12b33c0495acc701cbbfd1def36edc Mon Sep 17 00:00:00 2001 From: zhangzq Date: Tue, 24 Feb 2026 10:48:57 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9Akit=E5=A5=97=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardOrdinarySiteDeviceDriver.java | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java index db2de50..f36c578 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java @@ -170,15 +170,15 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple device = deviceAppService.findDeviceByCode(this.devicecode); TaskService taskService = SpringContextHolder.getBean("taskServiceImpl"); TaskDto task = taskService.findByCode(instruction.getTask_code()); - + StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code()); + if (dto == null) { + log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); + return; + } + instruction.setOffSet(dto.getAddress()); + instruction.setOffSetName(instruction.getStart_point_code()); if ((StrUtil.startWith(task.getTask_code(), "-"))) { log.info("定点任务下发agv允许取货信号"); - StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code()); - if (dto == null) { - log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); - return; - } instruction.setOffSet(dto.getAddress()); - instruction.setOffSetName(instruction.getNext_point_code()); HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10); if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) { return; @@ -218,6 +218,13 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple //放货申请 else if (ObjectUtil.isNotEmpty(instruction) && StrUtil.equals(instruction.getNext_point_code(), this.devicecode)) { if (agvphase == 3) { + StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code()); + if (dto == null) { + log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); + return; + } + instruction.setOffSet(dto.getAddress()); + instruction.setOffSetName(instruction.getNext_point_code()); device = deviceAppService.findDeviceByCode(this.devicecode); HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10); if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) { @@ -232,6 +239,13 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple device = deviceAppService.findDeviceByCode(this.devicecode); TaskService taskService = SpringContextHolder.getBean("taskServiceImpl"); TaskDto task = taskService.findByCode(instruction.getTask_code()); + StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getNext_point_code()); + if (dto == null) { + log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); + return; + } + instruction.setOffSet(dto.getAddress()); + instruction.setOffSetName(instruction.getNext_point_code()); if ((StrUtil.startWith(task.getTask_code(), "-"))) { log.info("定点任务下发agv允许取货信号"); HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10);