From 5317f5ef24316b742b1dec3458e3455678ae50c9 Mon Sep 17 00:00:00 2001 From: LISHUAI <1793460677@qq.com> Date: Wed, 4 Sep 2024 16:04:40 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acs2/nladmin-system/nlsso-server/pom.xml | 3 + .../run/TwoNDCSocketConnectionAutoRun.java | 101 ++-- .../service/impl/DeviceServiceImpl.java | 2 +- .../agv/ndctwo/AgvNdcTwoDeviceDriver.java | 407 +++++++++---- .../AirShowerDoorDefination.java} | 16 +- .../AirShowerDoorDeviceDriver.java} | 6 +- .../ItemProtocol.java | 22 +- .../lift_door/LiftDoorDeviceDriver.java | 1 + .../ToDoorCommandControl.java | 6 +- .../manipulator_agv_station/ItemProtocol.java | 7 + .../ManipulatorAgvStationDeviceDriver.java | 6 + .../OvenGantryManipulatorDeviceDriver.java | 29 +- .../PipeCoreRackStationDefination.java | 2 +- .../ItemProtocol.java | 32 +- .../PipeCoreRackManipulatorDefination.java | 1 + .../PipeCoreRackManipulatorDeviceDriver.java | 191 ++++-- .../ItemProtocol.java | 24 +- .../RollUpRollerManipulatorDeviceDriver.java | 168 ++++-- .../org/nl/acs/enums/PointErrorTypeEnum.java | 28 + .../acs/ext/wms/service/AcsToWmsService.java | 2 + .../wms/service/impl/AcsToWmsServiceImpl.java | 33 ++ .../wms/service/impl/WmsToAcsServiceImpl.java | 130 ++--- .../service/impl/InstructionServiceImpl.java | 36 +- .../org/nl/acs/opc/DeviceExecuteAutoRun.java | 1 + .../src/api/acs/angle/acsPointAngle.js | 1 + .../src/views/acs/device/config.vue | 2 + .../device/driver/manipulator_agv_station.vue | 31 +- .../device/driver/pipe_core_rack_cachebit.vue | 544 ++++++++++++++++++ .../driver/roll_up_roller_manipulator.vue | 4 +- .../device/driver/standard_ordinary_site.vue | 5 +- .../acs/device/driver/standard_storage.vue | 63 +- 31 files changed, 1459 insertions(+), 445 deletions(-) rename acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/{standard_autodoor/StandardAutodoorDefination.java => air_shower_door/AirShowerDoorDefination.java} (73%) rename acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/{standard_autodoor/StandardAutodoorDeviceDriver.java => air_shower_door/AirShowerDoorDeviceDriver.java} (94%) rename acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/{standard_autodoor => air_shower_door}/ItemProtocol.java (77%) create mode 100644 acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/PointErrorTypeEnum.java create mode 100644 acs2/nladmin-ui/src/views/acs/device/driver/pipe_core_rack_cachebit.vue diff --git a/acs2/nladmin-system/nlsso-server/pom.xml b/acs2/nladmin-system/nlsso-server/pom.xml index d351f489a..af0a822bf 100644 --- a/acs2/nladmin-system/nlsso-server/pom.xml +++ b/acs2/nladmin-system/nlsso-server/pom.xml @@ -105,6 +105,9 @@ 5.0.1 + + + com.internetitem diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index 8efc33f99..e4d4273a6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -1,6 +1,5 @@ package org.nl.acs.auto.run; -import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; @@ -10,9 +9,10 @@ import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.agv.ndcone.AgvNdcOneDeviceDriver; import org.nl.acs.device_driver.agv.ndctwo.AgvNdcTwoDeviceDriver; -import org.nl.acs.device_driver.autodoor.standard_autodoor.StandardAutodoorDeviceDriver; +import org.nl.acs.device_driver.autodoor.lift_door.LiftDoorDeviceDriver; +import org.nl.acs.device_driver.autodoor.air_shower_door.AirShowerDoorDeviceDriver; import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver; -import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver; +import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.instruction.domain.Instruction; @@ -31,13 +31,9 @@ import org.springframework.stereotype.Component; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import java.lang.reflect.Field; import java.net.InetSocketAddress; import java.net.Socket; import java.util.Date; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; import static org.nl.acs.agv.server.impl.NDCAgvServiceImpl.Bytes2HexString; @@ -167,7 +163,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { String old_device_code = null; String emptyNum = null; //自动门 - StandardAutodoorDeviceDriver standardAutodoorDeviceDriver; + AirShowerDoorDeviceDriver standardAutodoorDeviceDriver; + LiftDoorDeviceDriver liftDoorDeviceDriver; if (agvaddr != 0) { old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); if (StrUtil.contains(old_device_code, "-")) { @@ -204,18 +201,41 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } else { String agvcar = inst.getCarno(); Device agvDevice = deviceAppService.findDeviceByCode(agvcar); - agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) agvDevice.getDeviceDriver(); - agvNdcTwoDeviceDriver.setInstruction(null); - //标准-光电检测 - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); - try { - standardInspectSiteDeviceDriver.writing(1); - } catch (Exception e) { - e.printStackTrace(); + if (agvDevice != null) { + if (agvDevice.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) { + agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) agvDevice.getDeviceDriver(); + agvNdcTwoDeviceDriver.setInstruction(null); + } else if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { + agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); + agvNdcOneDeviceDriver.setInstruction(null); } - if ((standardInspectSiteDeviceDriver.getOption() == 3 )) { + } + //普通站点 + StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + //废泊处理的时候要判断是否允许任务完成 + if (ObjectUtil.isNotEmpty(device.getExtraValue().get("finish_task")) + && StrUtil.equals("true", device.getExtraValue().get("finish_task").toString())) { + if (standardOrdinarySiteDeviceDriver.getOption() == 3) { + inst.setInstruction_status("2"); + try { + instructionService.finish(inst); + } catch (Exception e) { + e.printStackTrace(); + } + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + } else { + log.info("等待LMS系统进行确认允许任务完成信号,设备号{},option值{}", standardOrdinarySiteDeviceDriver.getDevice_code(), standardOrdinarySiteDeviceDriver.getOption()); + logServer.deviceExecuteLog(device.getDevice_code(), "", "", "等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) + .content("等待LMS系统进行确认允许任务完成信号,设备号" + standardOrdinarySiteDeviceDriver.getDevice_code() + ",option当前值" + standardOrdinarySiteDeviceDriver.getOption()) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } + } else { inst.setInstruction_status("2"); try { instructionService.finish(inst); @@ -223,23 +243,9 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { e.printStackTrace(); } data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(agvDevice.getDevice_code()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - } else { - agvNdcTwoDeviceDriver.setMessage("设备号:" + device_code + "option"+ standardInspectSiteDeviceDriver.getOption()+ "不满足完成任务条件"); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(agvDevice.getDevice_code()) - .content(agvNdcTwoDeviceDriver.getMessage()) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + } } - } } //请求删除任务 @@ -263,8 +269,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { return; } if (ObjectUtil.isNotEmpty(device)) { - if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { - standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); + if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) { + standardAutodoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver(); try { standardAutodoorDeviceDriver.writing("to_open", "1"); standardAutodoorDeviceDriver.writing("to_close", "0"); @@ -279,6 +285,25 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose()); } } + if (device.getDeviceDriver() instanceof LiftDoorDeviceDriver) { + liftDoorDeviceDriver = (LiftDoorDeviceDriver) device.getDeviceDriver(); + try { + liftDoorDeviceDriver.writing("to_open1", "1"); + liftDoorDeviceDriver.writing("to_open2", "1"); + liftDoorDeviceDriver.writing("to_close1", "0"); + liftDoorDeviceDriver.writing("to_close2", "0"); + } catch (Exception e) { + log.info("下发电梯门电气信号失败:" + e.getMessage()); + e.printStackTrace(); + } + if (liftDoorDeviceDriver.getOpen1() == 1 && liftDoorDeviceDriver.getToOpen1() == 1 && liftDoorDeviceDriver.getOpen2() == 1 && liftDoorDeviceDriver.getToOpen2() == 1) { + log.info("下发电梯门开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1(), liftDoorDeviceDriver.getToOpen2(), liftDoorDeviceDriver.getOpen2()); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } else { + log.info("未下发NDC信号原因: 下发开门信号值为:{},读取开门信号值为:{}", liftDoorDeviceDriver.getToOpen1(), liftDoorDeviceDriver.getOpen1(), liftDoorDeviceDriver.getToOpen2(), liftDoorDeviceDriver.getOpen2()); + } + } + } else { log.info(agvaddr + "对应设备号为空!"); } @@ -289,8 +314,8 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { return; } if (ObjectUtil.isNotEmpty(device)) { - if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { - standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); + if (device.getDeviceDriver() instanceof AirShowerDoorDeviceDriver) { + standardAutodoorDeviceDriver = (AirShowerDoorDeviceDriver) device.getDeviceDriver(); try { standardAutodoorDeviceDriver.writing("to_close", "1"); standardAutodoorDeviceDriver.writing("to_open", "0"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java index 8966cb1e9..b3789d5e5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java @@ -1578,7 +1578,7 @@ public class DeviceServiceImpl extends CommonServiceImpl i Iterator iterator = storageCells.iterator(); while (iterator.hasNext()) { StorageCellDto storageCellDto = (StorageCellDto) iterator.next(); - if (storageCellDto.getAddress() == code) { + if (storageCellDto.getAddress() != null && storageCellDto.getAddress() == code) { return storageCellDto.getStorage_code(); } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java index f7c30b7a5..59f411ce0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/agv/ndctwo/AgvNdcTwoDeviceDriver.java @@ -522,26 +522,26 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get("wait")) - && StrUtil.equals("true", this.device.getExtraValue().get("wait").toString()) + if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) + && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString()) && StrUtil.equals(task.getTask_type(), "1")) { - standardOrdinarySiteDeviceDriver.setOption(0); - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + // + if (standardOrdinarySiteDeviceDriver.getOption() == 2) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setOption(0); + } else { + log.info("等待LMS系统进行确认离开,设备号{},指令号:{}", device_code, ikey); + message = "等待LMS系统进行确认离开,设备号:" + device_code + ",指令号:" + ikey; + } } else { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); } + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); String task_code = inst.getTask_code(); if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { @@ -790,7 +790,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + //收卷辊忽略取货校验 + if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check")) + && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check").toString())) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -799,13 +801,23 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDevice_code()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDevice_code()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } } else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); @@ -984,32 +996,52 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic String next_device_code = inst.getNext_device_code(); String start_device_code2 = inst.getStart_device_code2(); String next_device_code2 = inst.getNext_device_code2(); - + //取空锟或去烘箱放货的时候需要请求进入 if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, start_device_code)) { if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); - try { - manipulatorAgvStationDeviceDriver.writing(2); + manipulatorAgvStationDeviceDriver.writing(6); } catch (Exception e) { e.printStackTrace(); } - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check")) + && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_release_check").toString())) { + if (manipulatorAgvStationDeviceDriver.getAction() == 1 && manipulatorAgvStationDeviceDriver.getMode() == 2 && manipulatorAgvStationDeviceDriver.getMove() == 0) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "mode信号:" + manipulatorAgvStationDeviceDriver.getMode() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } } } else if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, next_device_code)) { @@ -1104,6 +1136,79 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic // luceneExecuteLogService.deviceExecuteLog(logDto); // } } + //请求离开 + else if (phase == 0x4E) { + if (agvaddr == 0) { + agvaddr = agvaddr_copy; + } + if (agvaddr < 1) { + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("agv地址参数有误,phase:" + phase) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + return; + } + if (agvaddr != 0) { + CommonFinalParam commonFinalParam = new CommonFinalParam(); + old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr); + if (StrUtil.contains(old_device_code, commonFinalParam.getBARRE())) { + String[] point = old_device_code.split(commonFinalParam.getBARRE()); + device_code = point[0]; + } else if (StrUtil.contains(old_device_code, commonFinalParam.getPOINT())) { + String[] point = old_device_code.split("\\."); + device_code = point[0]; + emptyNum = point[1]; + } else { + device_code = old_device_code; + } + } + + device = deviceAppService.findDeviceByCode(device_code); + if (ObjectUtil.isEmpty(device_code)) { + log.info(agvaddr + "对应设备号为空!"); + return; + } + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到指令号{}对应的指令", ikey); + return; + } + + String start_device_code = inst.getStart_device_code(); + String next_device_code = inst.getNext_device_code(); + String start_device_code2 = inst.getStart_device_code2(); + String next_device_code2 = inst.getNext_device_code2(); + //AGV取完收卷辊请求离开 + if (ObjectUtil.isNotEmpty(start_device_code) && StrUtil.equals(device_code, start_device_code)) { + if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); + try { + manipulatorAgvStationDeviceDriver.writing(7); + } catch (Exception e) { + e.printStackTrace(); + } + if (manipulatorAgvStationDeviceDriver.getAction() == 1) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "mode信号:" + manipulatorAgvStationDeviceDriver.getMode() + "光电信号:" + manipulatorAgvStationDeviceDriver.getMove() + ",指令号:" + ikey + "不满足取货条件"; + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } + + } + } + } // 取货完毕 //(Itype=1、3,需要WCS反馈) @@ -1418,23 +1523,52 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + //申请烘箱行架任务 + if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task")) + && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) { + if (manipulatorAgvStationDeviceDriver.getTo_command() != 4) { + String task_code = inst.getTask_code(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("task_code", task_code); + acsToWmsService.applyOvenGantryTask(jsonObject); + } + //行架取货完成后反馈ndc + if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", manipulatorAgvStationDeviceDriver.getDeviceCode(), manipulatorAgvStationDeviceDriver.getAction(), ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); @@ -1814,29 +1948,49 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } String agv_inst_type = inst.getAgv_inst_type(); if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { -// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); -// if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) -// && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString()) -// && StrUtil.equals(task.getTask_type(), "1")) { -// // -// if (standardOrdinarySiteDeviceDriver.getOption() == 2) { -// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); -// standardOrdinarySiteDeviceDriver.setOption(0); -// } else { -// log.info("等待LMS系统进行确认离开,设备号{},指令号:{}", device_code, ikey); -// message = "等待LMS系统进行确认离开,设备号:" + device_code + ",指令号:" + ikey; -// } -// } else { -// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); -// } - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(this.getDeviceCode()) - .content("agvphase:" + phase + "反馈:" + data) - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); - this.setPhase(phase); + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) + && StrUtil.equals("true", device.getExtraValue().get("wait").toString()) + && StrUtil.equals(task.getTask_type(), "1")) { + if (standardOrdinarySiteDeviceDriver.getOption() == 1) { + String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); + log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); + if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("任务号为空") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } + } else { + log.info("等待LMS系统进行确认允许取货,设备号{},option值{}", standardOrdinarySiteDeviceDriver.getDevice_code(), standardOrdinarySiteDeviceDriver.getOption()); + logServer.deviceExecuteLog(this.device_code, "", "", "等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) + .content("等待LMS系统进行确认允许取货,设备号" + standardOrdinarySiteDeviceDriver.getDevice_code() + ",option当前值" + standardOrdinarySiteDeviceDriver.getOption()) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } + } else { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + this.setPhase(phase); + } } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); @@ -1846,7 +2000,37 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } catch (Exception e) { e.printStackTrace(); } - if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + //申请烘箱行架任务 + if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task")) + && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("request_robot_task").toString())) { + if (manipulatorAgvStationDeviceDriver.getTo_command() != 4) { + String task_code = inst.getTask_code(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("task_code", task_code); + acsToWmsService.applyOvenGantryTask(jsonObject); + } + //行架取货完成后反馈ndc + if ((manipulatorAgvStationDeviceDriver.getAction() == 2)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", manipulatorAgvStationDeviceDriver.getDeviceCode(), manipulatorAgvStationDeviceDriver.getAction(), ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } + } + //收卷辊放货忽略取货校验 + if (ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check")) + && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("ignore_pickup_check").toString())) { data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) @@ -1855,14 +2039,24 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); } else { - message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; - log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); - LuceneLogDto logDto = LuceneLogDto.builder() - .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) - .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") - .build(); - logDto.setLog_level(4); - luceneExecuteLogService.deviceExecuteLog(logDto); + if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(this.getDeviceCode()) + .content("agvphase:" + phase + "反馈:" + data) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } else { + message = "设备号:" + device_code + ",动作信号:" + manipulatorAgvStationDeviceDriver.getAction() + "报警信号:" + ",指令号:" + ikey + "不满足取货条件"; + log.info("设备{},动作信号{} ,不满足取货条件,指令号{}", device_code, manipulatorAgvStationDeviceDriver.getAction(), ikey); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(manipulatorAgvStationDeviceDriver.getDeviceCode()) + .content(manipulatorAgvStationDeviceDriver.getDevice_code() + "动作信号不为1") + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + } } } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); @@ -2025,22 +2219,21 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic } String agv_inst_type = inst.getAgv_inst_type(); if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { -// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); -// if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) -// && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString()) -// && StrUtil.equals(task.getTask_type(), "1")) { -// // -// if (standardOrdinarySiteDeviceDriver.getOption() == 2) { -// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); -// standardOrdinarySiteDeviceDriver.setOption(0); -// } else { -// log.info("等待LMS系统进行确认离开,设备号{},指令号:{}", device_code, ikey); -// message = "等待LMS系统进行确认离开,设备号:" + device_code + ",指令号:" + ikey; -// } -// } else { -// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); -// } - data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait")) + && StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString()) + && StrUtil.equals(task.getTask_type(), "1")) { + // + if (standardOrdinarySiteDeviceDriver.getOption() == 2) { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setOption(0); + } else { + log.info("等待LMS系统进行确认离开,设备号{},指令号:{}", device_code, ikey); + message = "等待LMS系统进行确认离开,设备号:" + device_code + ",指令号:" + ikey; + } + } else { + data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); + } LuceneLogDto logDto = LuceneLogDto.builder() .device_code(this.getDeviceCode()) .content("agvphase:" + phase + "反馈:" + data) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDefination.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDefination.java similarity index 73% rename from acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDefination.java rename to acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDefination.java index 77ae81092..7601d92f9 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDefination.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDefination.java @@ -1,4 +1,4 @@ -package org.nl.acs.device_driver.autodoor.standard_autodoor; +package org.nl.acs.device_driver.autodoor.air_shower_door; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; import org.nl.acs.device.domain.Device; @@ -11,35 +11,35 @@ import java.util.LinkedList; import java.util.List; /** - * 自动门驱动定义 + * 风淋室门 */ @Service -public class StandardAutodoorDefination implements OpcDeviceDriverDefination { +public class AirShowerDoorDefination implements OpcDeviceDriverDefination { @Override public String getDriverCode() { - return "standard_autodoor"; + return "air_shower_door"; } @Override public String getDriverName() { - return "标准版-自动门"; + return "风淋室门"; } @Override public String getDriverDescription() { - return "标准版-自动门"; + return "风淋室门"; } @Override public DeviceDriver getDriverInstance(Device device) { - return (new StandardAutodoorDeviceDriver()).setDevice(device).setDriverDefination(this); + return (new AirShowerDoorDeviceDriver()).setDevice(device).setDriverDefination(this); } @Override public Class getDeviceDriverType() { - return StandardAutodoorDeviceDriver.class; + return AirShowerDoorDeviceDriver.class; } @Override diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDeviceDriver.java similarity index 94% rename from acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDeviceDriver.java rename to acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDeviceDriver.java index a8d84782f..70e3e070e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/StandardAutodoorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/AirShowerDoorDeviceDriver.java @@ -1,12 +1,12 @@ -package org.nl.acs.device_driver.autodoor.standard_autodoor; +package org.nl.acs.device_driver.autodoor.air_shower_door; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.domain.Device; import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.autodoor.standard_autodoor.ToDoorCommandControl; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; import org.nl.acs.log.service.DeviceExecuteLogService; @@ -28,7 +28,7 @@ import java.util.Map; @Slf4j @Data @RequiredArgsConstructor -public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, DeviceStageMonitor { +public class AirShowerDoorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, DeviceStageMonitor { protected ItemProtocol itemProtocol = new ItemProtocol(this); protected ToDoorCommandControl toDoorCommandControl = new ToDoorCommandControl(this); DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/ItemProtocol.java similarity index 77% rename from acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ItemProtocol.java rename to acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/ItemProtocol.java index ba8e72069..437d83dbe 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/air_shower_door/ItemProtocol.java @@ -1,4 +1,4 @@ -package org.nl.acs.device_driver.autodoor.standard_autodoor; +package org.nl.acs.device_driver.autodoor.air_shower_door; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; @@ -15,9 +15,13 @@ public class ItemProtocol { public static String item_to_close = "to_close"; - private StandardAutodoorDeviceDriver driver; + public static String item_status = "status"; - public ItemProtocol(StandardAutodoorDeviceDriver driver) { + public static String item_error = "error"; + + private AirShowerDoorDeviceDriver driver; + + public ItemProtocol(AirShowerDoorDeviceDriver driver) { this.driver = driver; } @@ -38,6 +42,16 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_close); } + + public int getStatus() { + return this.getOpcIntegerValue(item_status); + } + + + public int getError() { + return this.getOpcIntegerValue(item_error); + } + public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); if (value == null) { @@ -63,6 +77,8 @@ public class ItemProtocol { ArrayList list = new ArrayList(); list.add(new ItemDto(item_open, "开到位", "10001")); list.add(new ItemDto(item_close, "关到位", "10002")); + list.add(new ItemDto(item_status, "状态", "10002")); + list.add(new ItemDto(item_error, "异常", "10002")); return list; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/lift_door/LiftDoorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/lift_door/LiftDoorDeviceDriver.java index 6ee4ea8d4..6870c5956 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/lift_door/LiftDoorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/lift_door/LiftDoorDeviceDriver.java @@ -44,6 +44,7 @@ public class LiftDoorDeviceDriver extends AbstractOpcDeviceDriver implements Dev int last_close2 = 0; int toOpen1 = 0; int last_toOpen1 = 0; + int toOpen2 = 0; int toClose = 0; int last_toClose = 0; String device_code = null; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ToDoorCommandControl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ToDoorCommandControl.java index 48839fca8..8825c961e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ToDoorCommandControl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/autodoor/standard_autodoor/ToDoorCommandControl.java @@ -1,14 +1,16 @@ package org.nl.acs.device_driver.autodoor.standard_autodoor; +import org.nl.acs.device_driver.autodoor.air_shower_door.AirShowerDoorDeviceDriver; + import java.util.HashMap; import java.util.Map; public class ToDoorCommandControl { - private StandardAutodoorDeviceDriver driver; + private AirShowerDoorDeviceDriver driver; - public ToDoorCommandControl(StandardAutodoorDeviceDriver driver){ + public ToDoorCommandControl(AirShowerDoorDeviceDriver driver){ this.driver = driver; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java index e92e52b6b..8ccad5e1e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java @@ -17,6 +17,8 @@ public class ItemProtocol { public static String item_to_command = "to_command"; + public static String item_move = "move"; + private ManipulatorAgvStationDeviceDriver driver; public ItemProtocol(ManipulatorAgvStationDeviceDriver driver){ @@ -33,6 +35,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_action); } + public int getMove() { + return this.getOpcIntegerValue(item_move); + } + Boolean isonline; Boolean isError; @@ -58,6 +64,7 @@ public class ItemProtocol { list.add(new ItemDto(item_heartbeat, "心跳", "DB19.B0")); list.add(new ItemDto(item_mode, "工作模式", "DB19.B1")); list.add(new ItemDto(item_action, "取放信号", "DB19.B3")); + list.add(new ItemDto(item_move, "光电信号", "DB1.B2")); return list; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java index 43c20aee4..9fade47c3 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java @@ -90,6 +90,10 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i Boolean iserror = false; + //光电信号 + int move = 0; + int last_move = 0; + /** * 1-执行任务;2-取货完成;3-放货完成; */ @@ -119,6 +123,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i heartbeat = this.itemProtocol.getItem_heartbeat(); action = this.itemProtocol.getItem_action(); iserror = this.itemProtocol.isError; + move = this.itemProtocol.getMove(); if (mode != last_mode) { @@ -269,6 +274,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); + jo.put("move", move); jo.put("action", action); jo.put("isOnline", true); jo.put("isError", this.getIserror()); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java index a3df9f8ac..78eec18e6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/OvenGantryManipulatorDeviceDriver.java @@ -350,27 +350,24 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver(); if (hongXiangConveyorDeviceDriver.getMode() == 0 || hongXiangConveyorDeviceDriver.getMove() == 0) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code() + "未联机或无货,无法下发指令!指令号:" + instruction.getInstruction_code(); + notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code() + "未联机或无货,无法或者为开门下发指令!指令号:" + instruction.getInstruction_code(); return false; } } + + + + if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver(); - if (hongXiangConveyorDeviceDriver.getMode() == 0 || hongXiangConveyorDeviceDriver.getMove() == 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code() + "未联机或者有货,无法下发指令!指令号:" + instruction.getInstruction_code(); + if (hongXiangConveyorDeviceDriver.getMode() == 0 || hongXiangConveyorDeviceDriver.getMove() == 1 ) { + notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code() + "未联机或者有货或者未开门,无法下发指令!指令号:" + instruction.getInstruction_code(); return false; } } - //判断关联的同一列烘箱设备是否都关门 都关门返回false,有一个不关门就返回true - boolean isCloseDoor = this.judgeCloseDoor(start_device_code, next_device_code); - //未关门结束 - if (isCloseDoor) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code(); - return false; - } - /*instruction.setInstruction_status("1"); - instruction.setUpdate_time(DateUtil.now()); - instructionService.update(instruction);*/ + + + Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { @@ -483,12 +480,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); - //判断关联的同一列烘箱设备是否都关门 都关门返回false,有一个不关门就返回true - boolean isCloseDoor = this.judgeCloseDoor(instdto.getStart_device_code(), instdto.getNext_device_code()); - //如果未关门结束 - if (isCloseDoor) { - return false; - } try { instructionService.create(instdto); } catch (Exception e) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_conveyor/PipeCoreRackStationDefination.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_conveyor/PipeCoreRackStationDefination.java index 07d4aa580..ae96e7737 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_conveyor/PipeCoreRackStationDefination.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_conveyor/PipeCoreRackStationDefination.java @@ -14,7 +14,7 @@ import java.util.List; public class PipeCoreRackStationDefination implements OpcDeviceDriverDefination { @Override public String getDriverCode() { - return "pipe_core_rack_manipulator"; + return "pipe_core_rack_station"; } @Override diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java index 4eeaccf78..27dce7a7e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/ItemProtocol.java @@ -39,10 +39,18 @@ public class ItemProtocol { public static String item_walk_y = "walk_y"; /** - * 横坐标 + * 管芯规格 */ public static String item_barcode = "barcode"; + /** + * 库位 + */ + public static String item_target = "target"; + + //任务号 + public static String item_task = "task"; + /** * 下发命令 @@ -68,6 +76,9 @@ public class ItemProtocol { */ public static String item_to_new_onset = "to_new_onset"; + //下发任务号 + public static String item_to_task = "to_task"; + @@ -84,6 +95,10 @@ public class ItemProtocol { this.driver=driver; } + + public String getTarget() { + return this.getOpcStringValue(item_target); + } public int getTo_onset() { return this.getOpcIntegerValue(item_to_onset); } @@ -103,6 +118,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_heartbeat); } + + public int getTask() { + return this.getOpcIntegerValue(item_task); + } public int getMode() { return this.getOpcIntegerValue(item_mode); } @@ -134,6 +153,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_command); } + public int getTo_task() { + return this.getOpcIntegerValue(item_to_task); + } + @@ -182,7 +205,10 @@ public class ItemProtocol { list.add(new ItemDto(item_action, "动作信号", "DB1.B3")); list.add(new ItemDto(item_error, "报警信号", "DB1.B5")); list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4")); - list.add(new ItemDto(item_barcode, "管芯条码", "DB1.B7")); + list.add(new ItemDto(item_barcode, "管芯规格", "DB1.B7")); + list.add(new ItemDto(item_target, "库位", "DB1.B7")); + list.add(new ItemDto(item_task, "任务号", "DB9.D10")); + return list; } @@ -192,7 +218,7 @@ public class ItemProtocol { list.add(new ItemDto(item_to_command, "下发命令", "DB2.W0")); list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4")); list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2")); - + list.add(new ItemDto(item_to_task, "下发任务号", "DB12.D6")); return list; } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDefination.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDefination.java index 308995e11..0eaab71a3 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDefination.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDefination.java @@ -32,6 +32,7 @@ public class PipeCoreRackManipulatorDefination implements OpcDeviceDriverDefinat return (new PipeCoreRackManipulatorDeviceDriver()).setDevice(device).setDriverDefination(this); } + @Override public Class getDeviceDriverType() { return PipeCoreRackManipulatorDeviceDriver.class; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java index e7b77e834..7a8d00be2 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pipe_core_rack_manipulator/PipeCoreRackManipulatorDeviceDriver.java @@ -6,7 +6,6 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -18,10 +17,11 @@ import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.FeedLmsRealFailed; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver; +import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; -import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver; -import org.nl.acs.device_driver.two_conveyor.pipe_core_rack_conveyor.PipeCoreRackStationDeviceDriver; +import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDriver; +import org.nl.acs.enums.PointErrorTypeEnum; import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.history.ErrorUtil; @@ -35,7 +35,6 @@ import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppServiceImpl; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.route.service.impl.RouteLineServiceImpl; -import org.nl.acs.storage_cell.domain.StorageCell; import org.nl.acs.storage_cell.service.mapper.StorageCellMapper; import org.nl.acs.task.enums.ActionTypeEnum; import org.nl.acs.task.enums.TaskStatusEnum; @@ -62,7 +61,8 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver protected ItemProtocol itemProtocol = new ItemProtocol(this); - AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);; + AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); + ; DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); @@ -122,6 +122,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver int to_layer = 0; String barcode = null; + String target = null; Boolean isonline = true; int hasGoods = 0; @@ -143,7 +144,6 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver int branchProtocol = 0; - String device_code; //当前指令 @@ -176,6 +176,9 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver error = this.itemProtocol.getError(); heartbeat = this.itemProtocol.getHeartbeat(); barcode = this.itemProtocol.getBarcode(); + target = this.itemProtocol.getTarget(); + task = this.itemProtocol.getTask(); + to_task = this.itemProtocol.getTo_task(); to_command = this.itemProtocol.getTo_command(); to_target = this.itemProtocol.getTo_target(); to_new_target = this.itemProtocol.getTo_new_target(); @@ -191,7 +194,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver } // 更新指令状态 if (mode == 3 && task > 0) { - if (null!=inst) { + if (null != inst) { inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code(); } updateInstructionStatus(); @@ -205,6 +208,21 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver } else if (error != 0) { this.setIserror(true); message = "universal_message3"; + //满入空出分配新点位 + if (error == 2 || error == 3) { + if (barcode == null || target == null) { + notCreateInstMessage = "管芯规格或库位为空"; + } else { + if (error == 2) { + errorDispose(PointErrorTypeEnum.IN.getCode()); + } else { + errorDispose(PointErrorTypeEnum.OUT.getCode()); + + } + } + } + + //无报警 } else { this.setIsonline(true); @@ -225,19 +243,19 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver String remark = ""; ; if (mode != 2) { - remark = "universal_remark2"; + remark = "工作模式(mode)不是待机状态"; } if (move != 0) { - remark = "universal_remark3"; + remark = "无货"; } if (task != 0) { - remark = "universal_remark4"; + remark = "当前上报任务号(task)应该为0"; if (ObjectUtil.isNotEmpty(this.inst)) { this.inst = null; } } if (requireSucess) { - remark = "universal_remark5"; + remark = "右击该图标,将请求任务复位标记(requireSucess)改为否。"; } this.setNotCreateInstMessage(remark); //} @@ -274,14 +292,78 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver last_to_type = to_type; } + private void errorDispose(Integer code) { + Instruction instruction = checkInst(); + JSONObject param = new JSONObject(); + param.put("barcode", barcode); + param.put("target", target); + param.put("type", code); + param.put("task_code", instruction.getTask_code()); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,参数:" + param) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + String response = acsToWmsService.secondaryAllocationPoint(param); + JSONObject jo = JSON.parseObject(response); + if (jo.getInteger("status") == 200) { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,参数,接口返回:" + jo) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + List list = new ArrayList(); + if (error == 2) { + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 7); + list.add(map1); + Map map2 = new HashMap<>(); + map2.put("code", "to_new_target"); + map2.put("value", jo.getInteger("target")); + list.add(map1); + this.writing(list); + } + if (error == 3) { + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 8); + list.add(map1); + Map map2 = new HashMap<>(); + map2.put("code", "to_new_target"); + map2.put("value", jo.getInteger("target")); + list.add(map1); + this.writing(list); + } + this.actionRequireSucess = true; + } else { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,返回参数:" + jo) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + List list = new ArrayList(); + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 99); + list.add(map1); + this.writing(list); + throw new BadRequestException("管芯库满入或空出请求lms返回失败"); + } + + } + private void creatAGV(Integer actionType, int toCommand) { Instruction instruction = checkInst(); JSONObject param = new JSONObject(); param.put("taskCode", instruction.getTask_code()); - param.put("actionType",actionType ); + param.put("actionType", actionType); LuceneLogDto logDto = LuceneLogDto.builder() .device_code(device_code) - .content("行架取放货完成请求lms,参数:" + task + "--" +ActionTypeEnum.getStatus(actionType)) + .content("行架取放货完成请求lms,参数:" + task + "--" + ActionTypeEnum.getStatus(actionType)) .build(); logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); @@ -398,25 +480,12 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver String next_device_code = taskDtoIns.getNext_device_code(); Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); + String start_point_code = taskDtoIns.getStart_point_code(); + String next_point_code = taskDtoIns.getNext_point_code(); String next_addr = nextDevice.getExtraValue().get("address").toString(); String start_addr = startDevice.getExtraValue().get("address").toString(); - // 起点不是行架对接位就是货位 - PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - if (startDevice.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { - if (ObjectUtil.isEmpty(start_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); - } - pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) startDevice.getDeviceDriver(); - if (pipeCoreRackStationDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-管芯库行架对接位:" + pipeCoreRackStationDeviceDriver.getDevice_code() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code(); - return false; - } - }else { - start_addr = getStorageCell(start_device_code); - } + StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) { @@ -425,11 +494,23 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver } standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver(); if (standardInspectSiteDeviceDriver.getMove() != 0) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code(); + notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-管芯放货对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code(); return false; } - }else { - next_addr = getStorageCell(start_device_code); + } + if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); + } + } + + + if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(next_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); + } } Map map1 = new HashMap<>(); Map map2 = new HashMap<>(); @@ -458,22 +539,8 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); - PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - // 起点不是行架对接位就是货位 - if (startDevice.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { - if (ObjectUtil.isEmpty(start_addr)) { - notCreateInstMessage = "未设置电气调度号!"; - throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); - } - pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) startDevice.getDeviceDriver(); - if (pipeCoreRackStationDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-管芯库行架对接位:" + pipeCoreRackStationDeviceDriver.getDevice_code() + "无货,无法下发指令!指令号:" + taskDto.getTask_code(); - return false; - } - }else { - start_addr = getStorageCell(start_device_code); - } + if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) { @@ -482,11 +549,22 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver } standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver(); if (standardInspectSiteDeviceDriver.getMove() != 0) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); + notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-管芯放货对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); return false; } - }else { - next_addr = getStorageCell(start_device_code); + } + if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); + } + } + + if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(next_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); + } } String taskid = taskDto.getTask_id(); @@ -536,17 +614,6 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver } - private String getStorageCell(String start_device_code) { - StorageCell storageCell = new LambdaQueryChainWrapper<>(storageCellMapper) - .eq(StorageCell::getStorage_code, start_device_code) - .one(); - - if (ObjectUtil.isEmpty(storageCell)) { - notCreateInstMessage = "货位信息为空!"; - throw new BadRequestException("设备:" + start_device_code + "货位信息为空!"); - } - return storageCell.getX() + storageCell.getY() + storageCell.getZ(); - } private void packageData(Instruction instdto, String route_plan_code, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String start_device_code2, String next_device_code2) { instdto.setInstruction_id(IdUtil.simpleUUID()); @@ -689,7 +756,7 @@ public class PipeCoreRackManipulatorDeviceDriver extends AbstractOpcDeviceDriver jo.put("isError", this.getIserror()); jo.put("message", LangProcess.msg(message)); jo.put("notCreateTaskMessage", notCreateTaskMessage); - jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage)); + jo.put("notCreateInstMessage", notCreateInstMessage); jo.put("feedMessage", LangProcess.msg(feedMessage)); jo.put("driver_type", "siemens_conveyor"); jo.put("is_click", true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/ItemProtocol.java index 8ec4bcee8..d7963372f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.roll_up_roller_manipulator; +import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -51,7 +52,10 @@ public class ItemProtocol { */ public static String item_y = "y"; - + /** + * 目标站 + */ + public static String item_target = "target"; /** * 下发命令 @@ -94,8 +98,12 @@ public class ItemProtocol { public int getTo_onset() { return this.getOpcIntegerValue(item_to_onset); } - public int getTo_target() { - return this.getOpcIntegerValue(item_to_target); + public String getTo_target() { + return this.getOpcStringValue(item_to_target); + } + + public String getTarget() { + return this.getOpcStringValue(item_target); } public int getHeartbeat() { @@ -180,6 +188,15 @@ public class ItemProtocol { } + public String getOpcStringValue(String protocol) { + String value = this.driver.getStringValue(protocol); + if (StrUtil.isBlank(value)) { + } else { + return value; + } + return "0"; + } + public static List getReadableItemDtos() { ArrayList list = new ArrayList<>(); list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); @@ -200,7 +217,6 @@ public class ItemProtocol { list.add(new ItemDto(item_to_target, "下发目标站1", "DB2.W4")); list.add(new ItemDto(item_to_onset, "下发起始站1", "DB2.W2")); list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6")); - list.add(new ItemDto(item_to_type, "木箱长度", "DB601.W10")); return list; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java index 905ebca70..1da2810eb 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/roll_up_roller_manipulator/RollUpRollerManipulatorDeviceDriver.java @@ -18,10 +18,13 @@ import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.FeedLmsRealFailed; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver; +import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; import org.nl.acs.device_driver.one_conveyor.manipulator_cache.ManipulatorCacheDeviceDriver; +import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDriver; import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver; +import org.nl.acs.enums.PointErrorTypeEnum; import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.history.ErrorUtil; @@ -100,8 +103,8 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver int to_command = 0; int last_to_command = 0; - int to_target = 0; - int last_to_target = 0; + String to_target = null; + String target = null; int to_onset = 0; int last_to_onset = 0; @@ -181,6 +184,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver y = this.itemProtocol.getY(); to_command = this.itemProtocol.getTo_command(); to_target = this.itemProtocol.getTo_target(); + target = this.itemProtocol.getTarget(); to_onset = this.itemProtocol.getTo_onset(); to_task = this.itemProtocol.getTo_task(); to_type = this.itemProtocol.getTo_type(); @@ -208,6 +212,19 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver } else if (error != 0) { this.setIserror(true); message = "universal_message3"; + //满入空出分配新点位 + if (error == 2 || error == 3) { + if (task == 0 || target == null) { + notCreateInstMessage = "管芯规格或库位为空"; + } else { + if (error == 2) { + errorDispose(PointErrorTypeEnum.IN.getCode()); + } else { + errorDispose(PointErrorTypeEnum.OUT.getCode()); + + } + } + } //无报警 } else { this.setIsonline(true); @@ -273,7 +290,6 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver last_y = y; last_to_task = to_task; last_to_command = to_command; - last_to_target = to_target; last_to_onset = to_onset; last_to_type = to_type; } @@ -317,6 +333,69 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver } + private void errorDispose(Integer code) { + Instruction instruction = checkInst(); + JSONObject param = new JSONObject(); + param.put("target", target); + param.put("type", code); + param.put("task_code", instruction.getTask_code()); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,参数:" + param) + .build(); + logDto.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto); + String response = acsToWmsService.secondaryAllocationPoint(param); + JSONObject jo = JSON.parseObject(response); + if (jo.getInteger("status") == 200) { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,参数,接口返回:" + jo) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + List list = new ArrayList(); + if (error == 2) { + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 7); + list.add(map1); + Map map2 = new HashMap<>(); + map2.put("code", "to_new_target"); + map2.put("value", jo.getInteger("target")); + list.add(map1); + this.writing(list); + } + if (error == 3) { + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 8); + list.add(map1); + Map map2 = new HashMap<>(); + map2.put("code", "to_new_target"); + map2.put("value", jo.getInteger("target")); + list.add(map1); + this.writing(list); + } + this.actionRequireSucess = true; + } else { + LuceneLogDto logDto2 = LuceneLogDto.builder() + .device_code(device_code) + .content("管芯库满入或空出请求lms,返回参数:" + jo) + .build(); + logDto2.setLog_level(4); + luceneExecuteLogService.deviceExecuteLog(logDto2); + List list = new ArrayList(); + Map map1 = new HashMap<>(); + map1.put("code", "to_command"); + map1.put("value", 99); + list.add(map1); + this.writing(list); + throw new BadRequestException("管芯库满入或空出请求lms返回失败"); + } + + } + private void updateInstructionStatus() { Date date = new Date(); if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) { @@ -393,45 +472,53 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver String startDeviceCode = getDeviceCodeList.get(i); //先查指令 List taskDtoInstruction = taskserver.queryTaskByDeviceCodeAndStatus2(startDeviceCode); - List taskDtoStream = taskDtoInstruction.stream().sorted(Comparator.comparing(TaskDto::getCreate_time)).collect(Collectors.toList()); - if (CollUtil.isNotEmpty(taskDtoStream)) { + if (CollUtil.isNotEmpty(taskDtoInstruction)) { + List taskDtoStream = taskDtoInstruction.stream().sorted(Comparator.comparing(TaskDto::getCreate_time)).collect(Collectors.toList()); TaskDto taskDtoIns = taskDtoStream.get(0); if (TaskTypeEnum.Truss_Task.getIndex().equals(taskDtoIns.getTask_type())) { Instruction instruction = instructionService.findByTaskcodeAndStatus(taskDtoIns.getTask_code()); - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; + ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver; String start_device_code = taskDtoIns.getStart_device_code(); + String start_point_code = taskDtoIns.getStart_point_code(); + String next_point_code = taskDtoIns.getNext_point_code(); String next_device_code = taskDtoIns.getNext_device_code(); Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); String next_addr = nextDevice.getExtraValue().get("address").toString(); String start_addr = startDevice.getExtraValue().get("address").toString(); // 起点不是行架对接位就是货位 - if (startDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startDevice.getDeviceDriver(); + if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver(); if (ObjectUtil.isEmpty(start_addr)) { notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if (standardInspectSiteDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code(); + if (manipulatorAgvStationDeviceDriver.getMove() != 1) { + notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code(); return false; } - }else { - start_addr = getStorageCell(start_device_code); + } + if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); + } } - if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + + + if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) { notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver(); - if (standardInspectSiteDeviceDriver.getMove() != 0) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!指令号:" + instruction.getInstruction_code(); + } + if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver(); + if ( manipulatorAgvStationDeviceDriver.getMove() != 0) { + notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code(); return false; } - }else { - next_addr = getStorageCell(start_device_code); } Map map1 = new HashMap<>(); Map map2 = new HashMap<>(); @@ -456,44 +543,49 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver String next_device_code = taskDto.getNext_device_code(); String start_device_code2 = taskDto.getStart_device_code2(); String next_device_code2 = taskDto.getNext_device_code2(); + String start_point_code = taskDto.getStart_point_code(); + String next_point_code = taskDto.getNext_point_code(); Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); - StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; + ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver; // 起点不是行架对接位就是货位 - if (startDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startDevice.getDeviceDriver(); + if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver(); if (ObjectUtil.isEmpty(start_addr)) { notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } - if (standardInspectSiteDeviceDriver.getMove() != 1) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "无货,无法下发指令!任务号:" + taskDto.getTask_code(); + if ( manipulatorAgvStationDeviceDriver.getMove() != 1) { + notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "无货,无法下发指令!任务号:" + taskDto.getTask_code(); return false; } - }else { - start_addr = getStorageCell(start_device_code); + } + if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + if (ObjectUtil.isEmpty(start_addr)) { + notCreateInstMessage = "未设置电气调度号!"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); + } } - if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { + if (nextDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { if (ObjectUtil.isEmpty(next_addr)) { notCreateInstMessage = "未设置电气调度号!"; throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } - standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver(); - if (standardInspectSiteDeviceDriver.getMove() != 0) { - notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); + } + + if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { + manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver(); + if ( manipulatorAgvStationDeviceDriver.getMove() != 0) { + notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + taskDto.getTask_code(); return false; } - }else { - next_addr = getStorageCell(start_device_code); } String taskid = taskDto.getTask_id(); String taskcode = taskDto.getTask_code(); - String start_point_code = taskDto.getStart_point_code(); - String next_point_code = taskDto.getNext_point_code(); String route_plan_code = taskDto.getRoute_plan_code(); Instruction instdto = new Instruction(); packageData(instdto, route_plan_code, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, start_device_code2, next_device_code2); @@ -537,17 +629,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver } - private String getStorageCell(String start_device_code) { - StorageCell storageCell = new LambdaQueryChainWrapper<>(storageCellMapper) - .eq(StorageCell::getStorage_code, start_device_code) - .one(); - if (ObjectUtil.isEmpty(storageCell)) { - notCreateInstMessage = "货位信息为空!"; - throw new BadRequestException("设备:" + start_device_code + "货位信息为空!"); - } - return storageCell.getX() + storageCell.getY() + storageCell.getZ(); - } private void packageData(Instruction instdto, String route_plan_code, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String start_device_code2, String next_device_code2) { instdto.setInstruction_id(IdUtil.simpleUUID()); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/PointErrorTypeEnum.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/PointErrorTypeEnum.java new file mode 100644 index 000000000..11a8342f2 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/enums/PointErrorTypeEnum.java @@ -0,0 +1,28 @@ +package org.nl.acs.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.nl.common.enums.CodeBiEnum; + +@Getter +@AllArgsConstructor +public enum PointErrorTypeEnum { + + /* 旧邮箱修改邮箱 */ + IN(1, "满入"), + + /* 通过邮箱修改密码 */ + OUT(2, "空出"); + + private final Integer code; + private final String description; + + public static CodeBiEnum find(Integer code) { + for (CodeBiEnum value : CodeBiEnum.values()) { + if (code.equals(value.getCode())) { + return value; + } + } + return null; + } +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java index e4bf88b7f..4dcc3cc67 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java @@ -216,4 +216,6 @@ public interface AcsToWmsService { void actionFinishRequest2(JSONObject jsonObject); String outHotTaskApply(JSONObject apply); + + void applyOvenGantryTask(JSONObject jsonObject); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index b79379797..349a84892 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -788,6 +788,39 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { } } + @Override + public void applyOvenGantryTask(JSONObject jsonObject) { + HttpResponse execute = null; + try { + String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue(); + AddressDto addressDto = addressService.findByCode("applyOvenGantryTask"); + String url = wmsurl + addressDto.getMethods_url(); + try { + execute = HttpRequest.post(url) + .body(String.valueOf(jsonObject)) + .execute(); + } catch (Exception e) { + String msg = e.getMessage(); + log.info("applyOvenGantryTask-----输出参数{}", msg); + //网络不通 + LuceneLogDto luceneLogDto1 = new LuceneLogDto(4,"applyOvenGantryTask", String.valueOf(execute.getStatus()), + String.valueOf(jsonObject), + String.valueOf(execute.body()), jsonObject.getString("task_code") + "申请烘箱行架任务反馈失败"); + luceneLogService.interfaceExecuteLog(luceneLogDto1); + } + log.info("applyOvenGantryTask - 申请烘箱行架任务完成反馈{}", jsonObject); + LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyOvenGantryTask", "", + String.valueOf(jsonObject), + "", jsonObject.getString("task_code") + "申请烘箱行架任务完成反馈"); + luceneLogService.interfaceExecuteLog(luceneLogDto); + } catch (Exception e) { + LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyOvenGantryTask", String.valueOf(execute.getStatus()), + JSON.toJSONString(execute.body()), + String.valueOf(execute.body()), jsonObject.getString("task_code") + "申请烘箱行架任务反馈失败"); + luceneLogService.interfaceExecuteLog(luceneLogDto); + } + } + @Override public HttpResponse callShaftFromCache(JSONObject param) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 399d56446..962fefd37 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -455,7 +455,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) { agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver(); int phase = agvNdcTwoDeviceDriver.getPhase(); - if (phase == 0x03 || phase == 0x05 || phase == 0x08 ) { + if (phase == 0x03 || phase == 0x05 || phase == 0x08) { StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; Device devicePointDriver = deviceAppService.findDeviceByCode(device_code); if (devicePointDriver.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { @@ -536,7 +536,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { InflatableShaftLibraryDeviceDriver inflatableShaftLibraryDeviceDriver; HongXiangStationDeviceDriver hongXiangStationDeviceDriver; LampThreecolorDeviceDriver lampThreecolorDeviceDriver; - BeltConveyorDeviceDriver beltConveyorDeviceDriver ; + BeltConveyorDeviceDriver beltConveyorDeviceDriver; WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver; FoldDiscSiteDeviceDriver foldDiscSiteDeviceDriver; if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { @@ -548,7 +548,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lampThreecolorDeviceDriver.writing(code, value); } if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { - beltConveyorDeviceDriver=(BeltConveyorDeviceDriver) device.getDeviceDriver(); + beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver(); beltConveyorDeviceDriver.writing(code, value); } if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) { @@ -615,11 +615,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { wasteFoilWeighingStationDriver.writing("to_command", "6"); Thread.sleep(1000); //休眠1秒 while (wasteFoilWeighingStationDriver.getMode() == 6) { - jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量 - jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量 - jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差 - break; - } + jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量 + jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量 + jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差 + break; + } wasteFoilWeighingStationDriver.writing("to_command", "0"); } //称重确认信号 @@ -627,10 +627,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { wasteFoilWeighingStationDriver.writing("to_command", "7"); Thread.sleep(1000); //休眠1秒 while (wasteFoilWeighingStationDriver.getMode() == 7) { - jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量 - jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量 - jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差 - break; + jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量 + jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量 + jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差 + break; } wasteFoilWeighingStationDriver.writing("to_command", "0"); } @@ -662,60 +662,61 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { .build(); logDto.setLog_level(4); luceneExecuteLogService.deviceExecuteLog(logDto); - JSONArray datas = JSONArray.parseArray(jsonObject); + JSONObject data = JSONObject.parseObject(jsonObject); Map map = new HashMap(); - for (int i = 0; i < datas.size(); i++) { - JSONObject data = (JSONObject) datas.get(i); - String device_code = data.getString("device_code"); - String to_barcode1 = data.getString("to_barcode1"); - String to_barcode2 = data.getString("to_barcode2"); - String to_barcode3 = data.getString("to_barcode3"); - String to_barcode4 = data.getString("to_barcode4"); - String to_barcode5 = data.getString("to_barcode5"); - String to_target1 = data.getString("to_target1"); - String to_target2 = data.getString("to_target2"); - String to_target3 = data.getString("to_target3"); - String to_target4 = data.getString("to_target4"); - String to_target5 = data.getString("to_target5"); - Device device = deviceAppService.findDeviceByCode(device_code); - if (ObjectUtil.isEmpty(device)) { - throw new Exception("未找到对应设备:" + device_code); + String device_code = data.getString("device_code"); + String to_barcode1 = data.getString("barcode1"); + String to_barcode2 = data.getString("barcode2"); + String to_barcode3 = data.getString("barcode3"); + String to_barcode4 = data.getString("barcode4"); + String to_barcode5 = data.getString("barcode5"); + String to_target1 = data.getString("target1"); + String to_target2 = data.getString("target2"); + String to_target3 = data.getString("target3"); + String to_target4 = data.getString("target4"); + String to_target5 = data.getString("target5"); + String num = data.getString("num"); + Device device = deviceAppService.findDeviceByCode(device_code); + if (ObjectUtil.isEmpty(device)) { + throw new Exception("未找到对应设备:" + device_code); + } + PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; + if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { + pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver(); + if (ObjectUtil.isEmpty(to_barcode1)) { + map.put("to_barcode1", to_barcode1); } - PipeCoreRackStationDeviceDriver pipeCoreRackStationDeviceDriver; - if (device.getDeviceDriver() instanceof PipeCoreRackStationDeviceDriver) { - pipeCoreRackStationDeviceDriver = (PipeCoreRackStationDeviceDriver) device.getDeviceDriver(); - if (ObjectUtil.isEmpty(to_barcode1)){ - map.put("to_barcode1", to_barcode1); - } - if (ObjectUtil.isEmpty(to_barcode2)){ - map.put("to_barcode2", to_barcode2); - } - if (ObjectUtil.isEmpty(to_barcode3)){ - map.put("to_barcode3", to_barcode3); - } - if (ObjectUtil.isEmpty(to_barcode4)){ - map.put("to_barcode4", to_barcode4); - } - if (ObjectUtil.isEmpty(to_barcode5)){ - map.put("to_barcode5", to_barcode5); - } - if (ObjectUtil.isEmpty(to_target1)){ - map.put("to_target1", to_target1); - } - if (ObjectUtil.isEmpty(to_target2)){ - map.put("to_target2", to_target2); - } - if (ObjectUtil.isEmpty(to_target3)){ - map.put("to_target3", to_target3); - } - if (ObjectUtil.isEmpty(to_target4)){ - map.put("to_target4", to_target4); - } - if (ObjectUtil.isEmpty(to_target5)){ - map.put("to_target5", to_target5); - } - pipeCoreRackStationDeviceDriver.writing(map); + if (ObjectUtil.isEmpty(to_barcode2)) { + map.put("to_barcode2", to_barcode2); } + if (ObjectUtil.isEmpty(to_barcode3)) { + map.put("to_barcode3", to_barcode3); + } + if (ObjectUtil.isEmpty(to_barcode4)) { + map.put("to_barcode4", to_barcode4); + } + if (ObjectUtil.isEmpty(to_barcode5)) { + map.put("to_barcode5", to_barcode5); + } + if (ObjectUtil.isEmpty(to_target1)) { + map.put("to_target1", to_target1); + } + if (ObjectUtil.isEmpty(to_target2)) { + map.put("to_target2", to_target2); + } + if (ObjectUtil.isEmpty(to_target3)) { + map.put("to_target3", to_target3); + } + if (ObjectUtil.isEmpty(to_target4)) { + map.put("to_target4", to_target4); + } + if (ObjectUtil.isEmpty(to_target5)) { + map.put("to_target5", to_target5); + } + if (ObjectUtil.isEmpty(num)) { + map.put("to_num", num); + } + pipeCoreRackStationDeviceDriver.writing(map); } JSONObject resultJson = new JSONObject(); resultJson.put("status", HttpStatus.OK.value()); @@ -913,8 +914,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("qty", foldDiscSiteDeviceDriver.getQty()); jo.put("container_type", foldDiscSiteDeviceDriver.getContainer_type()); jo.put("error", foldDiscSiteDeviceDriver.getError()); - } - else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) { + } else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) { inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver(); jo.put("device_code", parent_device_code); jo.put("move", inflatableShaftLibraryDeviceDriver.getMove()); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 0421ac57c..f3b8a0632 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -2,7 +2,6 @@ package org.nl.acs.instruction.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.ListUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; @@ -19,8 +18,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; -import org.nl.acs.AcsConfig; -import org.nl.acs.agv.server.MagicAgvService; import org.nl.acs.agv.server.NDCAgvService; import org.nl.acs.agv.server.XianGongAgvService; import org.nl.acs.auto.initial.ApplicationAutoInitial; @@ -31,6 +28,8 @@ import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.impl.DeviceServiceImpl; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.DeviceDriverDefination; +import org.nl.acs.device_driver.autodoor.lift_door.LiftDoorDeviceDriver; +import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver; import org.nl.acs.ext.wms.liKuData.*; import org.nl.acs.ext.wms.service.AcsToLiKuService; @@ -417,8 +416,8 @@ public class InstructionServiceImpl extends CommonServiceImpl linkDeviceCode = standardOrdinarySiteDeviceDriver.getExtraDeviceCodes("link_device_code"); + if (linkDeviceCode.size() > 1) { + Device lift1 = deviceAppService.findDeviceByCode(linkDeviceCode.get(0)); + Device lift2 = deviceAppService.findDeviceByCode(linkDeviceCode.get(1)); + if (lift1.getDeviceDriver() instanceof LiftDoorDeviceDriver && lift2.getDeviceDriver() instanceof LiftDoorDeviceDriver){ +// if (lift1.getDeviceDriver().get) + dto.setNext_device_code(lift1.getDevice_code()); + } + } + } + } + @Override public void create2(Instruction dto) throws Exception { @@ -594,8 +613,8 @@ public class InstructionServiceImpl extends CommonServiceImpl findByCodeAndExcute(String next_code) { - List instructionList = instructions.stream().filter(item -> item.getNext_device_code().equals(next_code) ).collect(Collectors.toList()); + List instructionList = instructions.stream().filter(item -> item.getNext_device_code().equals(next_code)).collect(Collectors.toList()); return instructionList; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java index 88e66cf34..f78468042 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java @@ -127,6 +127,7 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable { if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) { this.runs.put(deviceDriver.getDeviceCode(), runnable); } + runnable.setIndex(this.runs); this.executorService.execute(runnable); diff --git a/acs2/nladmin-ui/src/api/acs/angle/acsPointAngle.js b/acs2/nladmin-ui/src/api/acs/angle/acsPointAngle.js index c09f5aafb..c46393e2e 100644 --- a/acs2/nladmin-ui/src/api/acs/angle/acsPointAngle.js +++ b/acs2/nladmin-ui/src/api/acs/angle/acsPointAngle.js @@ -8,6 +8,7 @@ export function add(data) { }) } + export function del(ids) { return request({ url: 'api/acsPointAngle/', diff --git a/acs2/nladmin-ui/src/views/acs/device/config.vue b/acs2/nladmin-ui/src/views/acs/device/config.vue index 2ac874060..b7b45ad04 100644 --- a/acs2/nladmin-ui/src/views/acs/device/config.vue +++ b/acs2/nladmin-ui/src/views/acs/device/config.vue @@ -97,6 +97,7 @@ import oven_manipulator from '@/views/acs/device/driver/oven_manipulator' import roll_up_roller_manipulator from '@/views/acs/device/driver/roll_up_roller_manipulator' import pipe_core_rack_manipulator from '@/views/acs/device/driver/pipe_core_rack_manipulator' import pipe_core_rack_station from '@/views/acs/device/driver/pipe_core_rack_station' +import pipe_core_rack_cachebit from '@/views/acs/device/driver/pipe_core_rack_cachebit' import plug_pull_device_site from '@/views/acs/device/driver/plug_pull_device_site' import slit_two_manipulator from '@/views/acs/device/driver/slit_two_manipulator' // import empty_vehicle_stacking_position from '@/views/acs/device/driver/empty_vehicle_stacking_position' @@ -169,6 +170,7 @@ export default { roll_up_roller_manipulator, pipe_core_rack_manipulator, pipe_core_rack_station, + pipe_core_rack_cachebit, plug_pull_device_site, slit_two_manipulator, double_belt_conveyor, diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue b/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue index e0c4a5037..bf5b7be65 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue @@ -66,36 +66,23 @@ - - + + - + - + - - - - - - - - - - - - - - - + + @@ -315,11 +302,15 @@ export default { ignore_release_check: true, apply_task: true, link_three_lamp: '', + feedbackToLms: true, manual_create_task: true, is_pickup: true, is_release: true, + finish_task: true, link_device_code: [], - ship_device_update: true + ship_device_update: true, + request_pickup: false, + request_robot_task: false }, rules: {} } diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/pipe_core_rack_cachebit.vue b/acs2/nladmin-ui/src/views/acs/device/driver/pipe_core_rack_cachebit.vue new file mode 100644 index 000000000..f5cc29b93 --- /dev/null +++ b/acs2/nladmin-ui/src/views/acs/device/driver/pipe_core_rack_cachebit.vue @@ -0,0 +1,544 @@ + + + + + diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/roll_up_roller_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/roll_up_roller_manipulator.vue index f0f554e91..eab09a700 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/roll_up_roller_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/roll_up_roller_manipulator.vue @@ -167,8 +167,8 @@ > diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue index 1e0064849..861703471 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue @@ -84,8 +84,8 @@ - - + + @@ -181,6 +181,7 @@ export default { auto_create_task: true, is_pickup: true, is_release: true, + finish_task: false, station_manager: true, auto_clean_task: true, input_material: true, diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue index 2b096b4a2..8a94edd6d 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue @@ -1,63 +1,20 @@