From 7f62529bd778df420dad0cb1b1a434e1ecb26aeb Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Mon, 9 Jan 2023 20:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../run/OneNDCSocketConnectionAutoRun.java | 11 +- .../device/device_driver/DriverTypeEnum.java | 4 +- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 171 +++--- .../plug_pull_device_site/ItemProtocol.java | 157 ++++++ .../PlugPullDeviceSiteDefination.java | 60 +++ .../PlugPullDeviceSiteDeviceDriver.java | 226 ++++++++ .../SiemensConveyorDeviceDriver.java | 126 ++--- ...CoveyorControlWithScannerDeviceDriver.java | 38 ++ .../task/service/impl/TaskServiceImpl.java | 6 +- .../main/resources/config/application-dev.yml | 6 +- .../resources/config/application-prod.yml | 6 +- .../src/main/resources/config/application.yml | 4 +- .../src/main/resources/log/AcsToLk.xml | 32 ++ .../src/main/resources/log/AcsToWms.xml | 4 +- .../resources/log/AgvNdcOneDeviceDriver.xml | 32 ++ .../src/main/resources/log/LkToAcs.xml | 32 ++ .../src/main/resources/log/WmsToAcs.xml | 4 +- .../src/main/resources/logback-spring.xml | 13 +- .../src/views/acs/device/config.vue | 5 +- .../device/driver/plug_pull_device_site.vue | 490 ++++++++++++++++++ 20 files changed, 1235 insertions(+), 192 deletions(-) create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/ItemProtocol.java create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDefination.java create mode 100644 acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java create mode 100644 acs/nladmin-system/src/main/resources/log/AcsToLk.xml create mode 100644 acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml create mode 100644 acs/nladmin-system/src/main/resources/log/LkToAcs.xml create mode 100644 acs/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java index 6e176c00a..7b5decdcc 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java @@ -84,6 +84,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { dos = new DataOutputStream(s.getOutputStream()); dis = new DataInputStream(s.getInputStream()); System.out.println("1楼NDCAgv链接成功"); + log.info("1楼NDCAgv链接成功"); while (bConnected) { int count = dis.read(b); @@ -187,10 +188,13 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } else { device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); } - if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { - agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); - agvNdcOneDeviceDriver.processSocket(arr); + if(ObjectUtil.isNotEmpty(device)){ + if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { + agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); + agvNdcOneDeviceDriver.processSocket(arr); + } } + } if (!ObjectUtil.isEmpty(data)) { write(data); @@ -203,6 +207,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } catch (Exception e) { System.out.println("OneAgv链接异常"); + log.info("OneAgv链接异常"); if(ObjectUtil.isNotEmpty(s)){ s.close(); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java index ef600f8b2..366772ae0 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java @@ -37,7 +37,9 @@ public enum DriverTypeEnum { HONGXIANG_CONVEYOR(13, "hongxiang_conveyor", "烘箱对接位", "conveyor"), - INSPECT_CONVEYOR_CONTROL_WITH_SCANNER(14, "standard_conveyor_control_with_scanner", "标准版-输送机-控制点-关联扫码", "conveyor"); + INSPECT_CONVEYOR_CONTROL_WITH_SCANNER(14, "standard_conveyor_control_with_scanner", "标准版-输送机-控制点-关联扫码", "conveyor"), + + PLUG_PULL_DEVICE_SITE(15, "plug_pull_device_site", "插拔轴站点", "conveyor"); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 6e3c42fb7..00bf8cf4c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -79,13 +79,14 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic int carno = arr[20]; Instruction link_inst = null; List insts = null; + Instruction inst = null; boolean link_flag = false; Device agv_device = null; if (carno != 0) { agv_device = deviceAppService.findDeviceByCode(String.valueOf(carno)); } if (ikey != 0) { - insts = instructionService.findByLinkNum(String.valueOf(ikey)); + inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); } if (!ObjectUtil.isEmpty(link_inst)) { link_flag = true; @@ -114,10 +115,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic //分配 车id //(不需要WCS反馈) if (phase == 0x02) { - for (Instruction inst : insts) { - inst.setCarno(String.valueOf(carno)); - instructionService.update(inst); - } + inst.setCarno(String.valueOf(carno)); + instructionService.update(inst); logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); //到达取货点 @@ -151,33 +150,34 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", agvaddr + "对应设备号为空"); return; } - for (Instruction inst : insts) { - //校验agv上报站点编号与指令起始点相同 - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到关联编号{}对应的指令", ikey); - logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); - break; - } - - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - standardOrdinarySiteDeviceDriver.setAgvphase(phase); - standardOrdinarySiteDeviceDriver.setIndex(index); - standardOrdinarySiteDeviceDriver.setInst(inst); - } - - if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { - siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver(); - if(siemensConveyorDeviceDriver.getMove() == 1 && siemensConveyorDeviceDriver.getMode() == 2 ){ - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } - } - - if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + //校验agv上报站点编号与指令起始点相同 + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到编号{}对应的指令", ikey); + logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); + return; } + + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); + } + + if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { + siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver(); + if(siemensConveyorDeviceDriver.getMove() == 1 ){ + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } else { + log.info("请求取货条件不满足待机有货"); + } + } + + if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); + //取货完毕 //(需要WCS反馈) } else if (phase == 0x05) { @@ -208,34 +208,33 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic logServer.deviceExecuteLog(this.device_code, "", "", "对应设备号为空" + device_code); return; } - for (Instruction inst : insts) { - //校验agv上报站点编号与指令起始点相同 - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到关联编号{}对应的指令", ikey); - logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); - break; + //校验agv上报站点编号与指令起始点相同 + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到关联编号{}对应的指令", ikey); + logServer.deviceExecuteLog(this.device_code, "", "", "未找到关联编号对应的指令" + ikey); + return; + } + + if (StrUtil.equals(inst.getStart_device_code(), device_code)) { + + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); } - if (StrUtil.equals(inst.getStart_device_code(), device_code)) { - - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); - standardOrdinarySiteDeviceDriver.setAgvphase(phase); - standardOrdinarySiteDeviceDriver.setIndex(index); - standardOrdinarySiteDeviceDriver.setInst(inst); - } - - if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { - siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver(); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - siemensConveyorDeviceDriver.writing(2); - } - - if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { - standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } + if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) { + siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver(); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + siemensConveyorDeviceDriver.writing(2); } + + if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { + standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } + } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); @@ -267,27 +266,26 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic log.info(agvaddr + "对应设备号为空!"); return; } - for (Instruction inst : insts) { - //校验agv上报站点编号与指令起始点相同 - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到关联编号{}对应的指令", ikey); - break; - } - if (StrUtil.equals(inst.getNext_device_code(), device_code)) { + //校验agv上报站点编号与指令起始点相同 + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到关联编号{}对应的指令", ikey); + return; + } + if (StrUtil.equals(inst.getNext_device_code(), device_code)) { - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); // standardOrdinarySiteDeviceDriver.setAgvphase(phase); // standardOrdinarySiteDeviceDriver.setIndex(index); // standardOrdinarySiteDeviceDriver.setInst(inst); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } - - if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { - standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); } + + if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { + standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } + } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); @@ -320,27 +318,26 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic log.info(agvaddr + "对应设备号为空!"); return; } - for (Instruction inst : insts) { - //校验agv上报站点编号与指令起始点相同 - if (ObjectUtil.isEmpty(inst)) { - log.info("未找到关联编号{}对应的指令", ikey); - break; + //校验agv上报站点编号与指令起始点相同 + if (ObjectUtil.isEmpty(inst)) { + log.info("未找到编号{}对应的指令", ikey); + return; + } + if (StrUtil.equals(inst.getNext_device_code(), device_code)) { + + if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { + standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); } - if (StrUtil.equals(inst.getNext_device_code(), device_code)) { - if (device.getDeviceDriver() instanceof StandardStorageDeviceDriver) { - standardStorageDeviceDriver = (StandardStorageDeviceDriver) device.getDeviceDriver(); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } - - if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { - standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); + if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { + standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); // standardOrdinarySiteDeviceDriver.setAgvphase(phase); // standardOrdinarySiteDeviceDriver.setIndex(index); // standardOrdinarySiteDeviceDriver.setInst(inst); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); } + } logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/ItemProtocol.java new file mode 100644 index 000000000..99f7bedf8 --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/ItemProtocol.java @@ -0,0 +1,157 @@ +package org.nl.acs.device_driver.basedriver.plug_pull_device_site; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Data +public class ItemProtocol { + + //1/0 手动/自动 + public static String item_mode = "mode"; + //0/1 半自动/全自动 + public static String item_action = "action"; + //0/1 远程/本地控制 + public static String item_control = "control"; + //2 运行中 + //1 急停/故障 + //0 待机中 + public static String item_status = "status"; + //1 机头上有轴 + public static String item_move = "move"; + //1/0 穿轴中/穿轴完成 + public static String item_plug_finish = "plug_finish"; + //1/0 把轴中/拔轴完成 + public static String item_pull_finish = "pull_finish"; + //3寸轴穿轴次数 + public static String item_3plug_times = "3plug_times"; + //6寸轴穿轴次数 + public static String item_6plug_times = "6plug_times"; + //3寸轴拔轴次数 + public static String item_3pull_times = "3pull_times"; + //6寸轴拔轴次数 + public static String item_6pull_times = "6pull_times"; + //穿轴总次数 + public static String item_plug_alltimes = "plug_alltimes"; + //拔轴总次数 + public static String item_pull_alltimes = "pull_alltimes"; + + + //1 全自动启动 + public static String item_to_command = "to_command"; + //0/1 穿轴/拔轴 + public static String item_to_type = "to_type"; + //3/6 轴尺寸 + public static String item_to_size = "to_size"; + + + private PlugPullDeviceSiteDeviceDriver driver; + + public ItemProtocol(PlugPullDeviceSiteDeviceDriver driver) { + this.driver = driver; + } + + public int getItem_mode(){ + return this.getOpcIntegerValue(item_mode); + } ; + public int getItem_move(){ + return this.getOpcIntegerValue(item_move); + } ; + public int getItem_action(){ + return this.getOpcIntegerValue(item_action); + }; + public int getItem_control(){ + return this.getOpcIntegerValue(item_control); + } ; + public int getItem_status(){ + return this.getOpcIntegerValue(item_status); + } ; + public int getItem_plug_finish(){ + return this.getOpcIntegerValue(item_plug_finish); + } ; + public int getItem_pull_finish(){ + return this.getOpcIntegerValue(item_pull_finish); + } ; + public int getItem_3plug_times(){ + return this.getOpcIntegerValue(item_3plug_times); + } ; + public int getItem_6plug_times(){ + return this.getOpcIntegerValue(item_6plug_times); + } ; + public int getItem_3pull_times(){ + return this.getOpcIntegerValue(item_3pull_times); + } ; + public int getItem_6pull_times(){ + return this.getOpcIntegerValue(item_6pull_times); + } ; + public int getItem_plug_alltimes(){ + return this.getOpcIntegerValue(item_plug_alltimes); + } ; + public int getItem_pull_alltimes(){ + return this.getOpcIntegerValue(item_pull_alltimes); + } ; + + + Boolean isonline; + + public int getOpcIntegerValue(String protocol) { + Integer value = this.driver.getIntegeregerValue(protocol); + if (value == null) { + setIsonline(false); + } else { + setIsonline(true); + return value; + } + return 0; + + } + + public float getOpcFloatValue(String protocol) { + Float value = this.driver.getDoubleValue(protocol); + if (value == null) { + setIsonline(false); + } else { + setIsonline(true); + return value; + } + return 0; + + } + + + + public static List getReadableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_mode, "工作模式", "30243")); + list.add(new ItemDto(item_action, "半自动/全自动", "30245")); + list.add(new ItemDto(item_control, "远程控制", "30254")); + list.add(new ItemDto(item_status, "状态", "30181")); + list.add(new ItemDto(item_move, "机头上有轴", "30252")); + list.add(new ItemDto(item_plug_finish, "穿轴完成", "30249")); + list.add(new ItemDto(item_pull_finish, "拔轴完成", "30250")); + list.add(new ItemDto(item_3plug_times, "3寸轴穿轴次数", "30231")); + list.add(new ItemDto(item_6plug_times, "6寸轴穿轴次数", "30235")); + list.add(new ItemDto(item_3pull_times, "3寸轴拔轴次数", "30233")); + list.add(new ItemDto(item_6pull_times, "6寸轴拔轴次数", "30237")); + list.add(new ItemDto(item_plug_alltimes, "穿轴总次数", "30239")); + list.add(new ItemDto(item_pull_alltimes, "拔轴总次数", "30241")); + + return list; + } + + public static List getWriteableItemDtos() { + ArrayList list = new ArrayList(); + list.add(new ItemDto(item_to_command, "下发命令", "40246")); + list.add(new ItemDto(item_to_type, "类型", "40244")); + list.add(new ItemDto(item_to_size, "尺寸", "40247")); + + return list; + } + + +} + diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDefination.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDefination.java new file mode 100644 index 000000000..bce3297ed --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDefination.java @@ -0,0 +1,60 @@ +package org.nl.acs.device_driver.basedriver.plug_pull_device_site; + +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; +import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceType; +import org.springframework.stereotype.Service; + +import java.util.LinkedList; +import java.util.List; + +/** + * 插拔轴工位 + */ +@Service +public class PlugPullDeviceSiteDefination implements OpcDeviceDriverDefination { + @Override + public String getDriverCode() { + return "plug_pull_device_site"; + } + + @Override + public String getDriverName() { + return "插拔轴工位"; + } + + @Override + public String getDriverDescription() { + return "插拔轴工位"; + } + + @Override + public DeviceDriver getDriverInstance(Device device) { + return (new PlugPullDeviceSiteDeviceDriver()).setDevice(device).setDriverDefination(this); + } + + @Override + public Class getDeviceDriverType() { + return PlugPullDeviceSiteDeviceDriver.class; + } + + @Override + public List getFitDeviceTypes() { + List types = new LinkedList(); + types.add(DeviceType.conveyor); + return types; + } + + @Override + public List getReadableItemDtos() { + return ItemProtocol.getReadableItemDtos(); + } + + @Override + public List getWriteableItemDtos() { + return ItemProtocol.getWriteableItemDtos(); + } + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java new file mode 100644 index 000000000..b28f0f5d5 --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java @@ -0,0 +1,226 @@ +package org.nl.acs.device_driver.basedriver.plug_pull_device_site; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.Data; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.nl.acs.agv.server.AgvService; +import org.nl.acs.device.device_driver.standard_inspect.ReadUtil; +import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.RouteableDeviceDriver; +import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; +import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest; +import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse; +import org.nl.acs.ext.wms.service.AcsToWmsService; +import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; +import org.nl.acs.instruction.service.InstructionService; +import org.nl.acs.log.service.DeviceExecuteLogService; +import org.nl.acs.monitor.DeviceStageMonitor; +import org.nl.acs.opc.Device; +import org.nl.acs.opc.DeviceAppService; +import org.nl.acs.route.service.RouteLineService; +import org.nl.acs.task.service.TaskService; +import org.nl.modules.system.service.ParamService; +import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.modules.wql.util.SpringContextHolder; +import org.openscada.opc.lib.da.Server; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.*; + +/** + * 插拔轴工位 + */ +@Slf4j +@Data +@RequiredArgsConstructor +public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor { + protected ItemProtocol itemProtocol = new ItemProtocol(this); + @Autowired + DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class); + @Autowired + InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class); + @Autowired + DeviceService deviceservice = SpringContextHolder.getBean(DeviceService.class); + @Autowired + TaskService taskserver = SpringContextHolder.getBean(TaskService.class); + @Autowired + RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); + @Autowired + AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); + @Autowired + ParamService paramService = SpringContextHolder.getBean(ParamService.class); + @Autowired + DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); + @Autowired + AgvService agvService = SpringContextHolder.getBean(AgvService.class); + + private Date instruction_require_time = new Date(); + private Date instruction_finished_time = new Date(); + private Date instruction_apply_time = new Date(); + private int instruction_require_time_out = 3000; + + public int mode = 0; + public int move = 0; + public int action = 0; + public int status = 0; + public int control = 0; + public int plug_finish = 0; + public int pull_finish = 0; + public int plug3_times = 0; + public int plug6_times = 0; + public int pull3_times = 0; + public int pull6_times = 0; + public int plug_alltimes = 0; + public int pull_alltimes = 0; + + public int last_mode = 0; + public int last_move = 0; + public int last_action = 0; + public int last_status = 0; + public int last_control = 0; + public int last_plug_finish = 0; + public int last_pull_finish = 0; + + + Boolean isonline = true; + + Boolean iserror = false; + + //1-执行任务;2-取货完成;3-放货完成; + int flag; + + String device_code; + + @Override + public Device getDevice() { + return this.device; + } + + //请求成功标记 + Boolean requireSucess = false; + + @Override + public void execute() { + String message = null; + + device_code = this.getDeviceCode(); + mode = this.itemProtocol.getItem_mode(); + move = this.itemProtocol.getItem_move(); + action = this.itemProtocol.getItem_action(); + status = this.itemProtocol.getItem_status(); + control = this.itemProtocol.getItem_control(); + plug_finish = this.itemProtocol.getItem_plug_finish(); + pull_finish = this.itemProtocol.getItem_pull_finish(); + plug3_times = this.itemProtocol.getItem_3plug_times(); + plug6_times = this.itemProtocol.getItem_6plug_times(); + pull3_times = this.itemProtocol.getItem_3pull_times(); + pull6_times = this.itemProtocol.getItem_6pull_times(); + plug_alltimes = this.itemProtocol.getItem_plug_alltimes(); + pull_alltimes = this.itemProtocol.getItem_pull_alltimes(); + + + + + if (status != 1) { + this.setIsonline(false); + this.setIserror(true); + message = "有报警"; + //无报警 + } else { + + + } + + last_mode = mode; + last_move = move; + last_action = action; + } + + + protected void thingToNothing() { + //this.setRequireSucess(false); + } + + public void writing(List list) { + + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + for (int i = 0; i < list.size(); i++) { + Object ob = list.get(i); + JSONObject json = (JSONObject) JSONObject.toJSON(ob); + if (!StrUtil.isEmpty(json.getString("value"))) { + String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + json.getString("code"); + itemMap.put(to_param, json.getString("value")); + } + } + logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap); + ReadUtil.write(itemMap, server); + } + + //将扩展表中的字符串数据转换成集合 + public List getExtraDeviceCodes(String extraName) { + String extraValue = (String) this.getDevice().getExtraValue().get(extraName); + if (StrUtil.isEmpty(extraValue)) { + return new ArrayList<>(); + } + String devicesString = extraValue.substring(1, extraValue.length() - 1); + List devicesList = new ArrayList<>(); + String[] devices = devicesString.split(","); + for (int i = 0; i < devices.length; i++) { + String s = devices[i].replace("\"", "").replace("\"", ""); + devicesList.add(s); + } + return devicesList; + } + + + + @Override + public JSONObject getDeviceStatusName() { + JSONObject jo = new JSONObject(); + String mode = ""; + String action = ""; + String move = ""; + if (this.getMode() == 0) { + mode = "未联机"; + } else if (this.getMode() == 1) { + mode = "单机"; + } else if (this.getMode() == 2) { + mode = "联机"; + } else if (this.getMode() == 3) { + mode = "运行中"; + } + + if (this.getMove() == 0) { + move = "无货"; + jo.put("hasGoods", false); + } else if (this.getMove() == 1) { + move = "有货"; + jo.put("hasGoods", true); + } else if (this.getMove() == 2) { + move = "有托盘有货"; + jo.put("hasGoods", true); + } + jo.put("device_name", this.getDevice().getDevice_name()); + jo.put("mode", mode); + jo.put("move", move); + jo.put("action", action); + jo.put("isOnline", this.getIsonline()); + jo.put("isError", this.getIserror()); + return jo; + } + + @Override + public void setDeviceStatus(JSONObject data) { + + } + + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java index db4ec0a31..602380f06 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java @@ -134,45 +134,43 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme String message = null; try { device_code = this.getDeviceCode(); - mode = this.itemProtocol.getMode(); - move = this.itemProtocol.getMove(); + mode = this.itemProtocol.getMode();move = this.itemProtocol.getMove(); carrier_direction = this.itemProtocol.getCarrier_direction(); error = this.itemProtocol.getError(); task = this.itemProtocol.getTask(); if (mode != last_mode) { + requireSucess = false; + requireApplyLabelingSuccess = false; + requireApplyLaStrangulationSuccess =false; + requireEmptyInSuccess =false; + requireEmptyOutSuccess =false; if (mode == 2) { logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireSucess:" + requireSucess); - requireSucess = false; - requireApplyLabelingSuccess = false; - requireApplyLaStrangulationSuccess =false; - requireEmptyInSuccess =false; - requireEmptyOutSuccess =false; logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireSucess:" + requireSucess); } if (mode == 4) { logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess); - requireApplyLaStrangulationSuccess = false; logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLabelingSuccess:" + requireApplyLabelingSuccess); } if (mode == 5) { logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess); - requireApplyLabelingSuccess = false; logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireApplyLaStrangulationSuccess:" + requireApplyLaStrangulationSuccess); } if (mode == 6) { logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess); - requireEmptyInSuccess = false; logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyInSuccess:" + requireEmptyInSuccess); } if (mode == 7) { logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess); - requireEmptyOutSuccess = false; logServer.deviceExecuteLog(device_code, "", "", "请求标记复位成功`此时请求标记值为requireEmptyOutSuccess:" + requireEmptyOutSuccess); } logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode); } if (move != last_move) { + if(move == 0 ){ + this.clearWrite(); + } logServer.deviceItemValue(this.device_code, "move", String.valueOf(move)); logServer.deviceExecuteLog(this.device_code, "", "", "信号move:" + last_move + "->" + move); } @@ -225,68 +223,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } } - } - if (agvphase == 0x03) { - if (ObjectUtil.isNotEmpty(inst)) { - inst.setExecute_status("1"); - instructionService.update(inst); - byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); - agvphase = 0; - index = 0; - inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); - } else { - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); - - } - } - - if (agvphase == 0x05) { - if (ObjectUtil.isNotEmpty(inst)) { - inst.setExecute_status("2"); - instructionService.update(inst); - byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); - agvphase = 0; - index = 0; - inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); - } else { - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); - - } - } - - if (agvphase == 0x07) { - if (ObjectUtil.isNotEmpty(inst)) { - inst.setExecute_status("5"); - instructionService.update(inst); - byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); - agvphase = 0; - index = 0; - inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); - } else { - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); - } - } - - if (agvphase == 0x09) { - if (ObjectUtil.isNotEmpty(inst)) { - inst.setExecute_status("6"); - instructionService.update(inst); - byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); - agvphase = 0; - index = 0; - inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); - } else { - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); - - } } } catch (Exception var17) { inst_message = var17.getMessage(); @@ -366,8 +303,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } break; case 7: - //空托盘满垛出库申请 - if (move > 0 && !requireEmptyOutSuccess) { + //空盘出库申请 + if (move == 0 && !requireEmptyOutSuccess) { emptyOut(); } break; @@ -392,13 +329,38 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme } public void clearWrite() { - this.writing("to_command", "0"); - this.writing("to_target", "0"); - this.writing("to_container_type", "0"); - this.writing("to_strap_times", "0"); - this.writing("to_length", "0"); - this.writing("to_weight", "0"); - this.writing("to_height", "0"); + + List list = new ArrayList(); + Map map = new HashMap(); + map.put("code","to_target"); + map.put("value","0"); + list.add(map); +// Map map2 = new HashMap(); +// map2.put("code","to_task"); +// map2.put("value","0"); +// list.add(map2); + Map map3 = new HashMap(); + map3.put("code","to_command"); + map3.put("value","0"); + list.add(map3); + Map map4 = new HashMap(); + map4.put("code","to_strap_times"); + map4.put("value","0"); + list.add(map4); + Map map5 = new HashMap(); + map5.put("code","to_length"); + map5.put("value","0"); + list.add(map5); + Map map6 = new HashMap(); + map6.put("code","to_weight"); + map6.put("value","0"); + list.add(map6); + Map map7 = new HashMap(); + map7.put("code","to_height"); + map7.put("value","0"); + list.add(map7); + this.writing(list); + } public boolean exe_business() { @@ -813,7 +775,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme message = "申请任务中..."; JSONObject apply = new JSONObject(); apply.put("device_code", device_code); - apply.put("type","2"); + apply.put("type","3"); String str = acsToWmsService.applyTaskToWms(apply); JSONObject jo = JSON.parseObject(str); if (ObjectUtil.isEmpty(jo)) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java index fbc35bfff..c4882ae4c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_conveyor_control_with_scanner/StandardCoveyorControlWithScannerDeviceDriver.java @@ -270,6 +270,37 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe this.setApplySucess(false); clearBarcode(); this.set_last_container(container); + List list = new ArrayList(); + Map map = new HashMap(); + map.put("code","to_target"); + map.put("value","0"); + list.add(map); +// Map map2 = new HashMap(); +// map2.put("code","to_task"); +// map2.put("value","0"); +// list.add(map2); + Map map3 = new HashMap(); + map3.put("code","to_command"); + map3.put("value","0"); + list.add(map3); + Map map4 = new HashMap(); + map4.put("code","to_strap_times"); + map4.put("value","0"); + list.add(map4); + Map map5 = new HashMap(); + map5.put("code","to_length"); + map5.put("value","0"); + list.add(map5); + Map map6 = new HashMap(); + map6.put("code","to_weight"); + map6.put("value","0"); + list.add(map6); + Map map7 = new HashMap(); + map7.put("code","to_height"); + map7.put("value","0"); + list.add(map7); + this.writing(list); + } public void set_last_container(String barcode) { @@ -617,6 +648,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe JSONObject apply = new JSONObject(); apply.put("vehicle_code", container_code); apply.put("device_code", device_code); + apply.put("type","1"); String str = acsToWmsService.applyTaskToWms(apply); JSONObject jo = JSON.parseObject(str); if (ObjectUtil.isEmpty(jo)) { @@ -716,6 +748,12 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe jo.put("message", this.getMessage()); jo.put("task", this.getTask()); jo.put("barcode", this.getBarcode()); + String requireSucess = "0"; + if (this.requireSucess) { + requireSucess = "1"; + } + jo.put("requireSucess", requireSucess); + return jo; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 15ea30fb0..a613c0b3f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -1138,9 +1138,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { while (var3.hasNext()) { TaskDto task = (TaskDto) var3.next(); - if (!StrUtil.equals(task.getTask_type(), "5")) { - continue; - } +// if (!StrUtil.equals(task.getTask_type(), "5")) { +// continue; +// } if (StrUtil.equals(task.getStart_device_code(), device_code) && StrUtil.equals(task.getTask_status(), "0")) { return task; } diff --git a/acs/nladmin-system/src/main/resources/config/application-dev.yml b/acs/nladmin-system/src/main/resources/config/application-dev.yml index 9fd265c16..4b0734aeb 100644 --- a/acs/nladmin-system/src/main/resources/config/application-dev.yml +++ b/acs/nladmin-system/src/main/resources/config/application-dev.yml @@ -6,9 +6,9 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy -# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true # url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true - url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true +# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} # password: ${DB_PWD:P@ssw0rd} # password: ${DB_PWD:Root.123456} @@ -131,7 +131,7 @@ file: avatarMaxSize: 5 logging: file: - path: C:\log\wms + path: C:\log\acs config: classpath:logback-spring.xml # Sa-Token配置 diff --git a/acs/nladmin-system/src/main/resources/config/application-prod.yml b/acs/nladmin-system/src/main/resources/config/application-prod.yml index dd2359363..4a18ca476 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/acs/nladmin-system/src/main/resources/config/application-prod.yml @@ -1,12 +1,12 @@ server: - port: 8010 + port: 8011 #配置数据源 spring: datasource: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 @@ -53,7 +53,7 @@ spring: multi-statement-allow: true redis: #数据库索引 - database: ${REDIS_DB:15} + database: ${REDIS_DB:9} host: ${REDIS_HOST:127.0.0.1} port: ${REDIS_PORT:6379} password: ${REDIS_PWD:} diff --git a/acs/nladmin-system/src/main/resources/config/application.yml b/acs/nladmin-system/src/main/resources/config/application.yml index 7e3fbea7d..2c2cb8d53 100644 --- a/acs/nladmin-system/src/main/resources/config/application.yml +++ b/acs/nladmin-system/src/main/resources/config/application.yml @@ -2,7 +2,7 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: prod jackson: time-zone: GMT+8 data: @@ -44,7 +44,7 @@ rsa: private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A== logging: file: - path: C:\log\wms + path: C:\log\acs config: classpath:logback-spring.xml # sa-token白名单配置 security: diff --git a/acs/nladmin-system/src/main/resources/log/AcsToLk.xml b/acs/nladmin-system/src/main/resources/log/AcsToLk.xml new file mode 100644 index 000000000..55a7a6329 --- /dev/null +++ b/acs/nladmin-system/src/main/resources/log/AcsToLk.xml @@ -0,0 +1,32 @@ + + + + + + + + + ${LOG_HOME}/ACS请求立库/%d{yyyy-MM-dd}.%i.log + + 15 + + 200MB + + 2GB + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + + + + + + + + diff --git a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml b/acs/nladmin-system/src/main/resources/log/AcsToWms.xml index 94a118025..2262d7c4f 100644 --- a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml +++ b/acs/nladmin-system/src/main/resources/log/AcsToWms.xml @@ -3,7 +3,7 @@ - + ${LOG_HOME}/ACS请求WMS/%d{yyyy-MM-dd}.%i.log @@ -27,6 +27,6 @@ - + diff --git a/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml b/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml new file mode 100644 index 000000000..7a7c5ff10 --- /dev/null +++ b/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml @@ -0,0 +1,32 @@ + + + + + + + + + ${LOG_HOME}/AgvNdcOneDeviceDriver/%d{yyyy-MM-dd}.%i.log + + 15 + + 200MB + + 2GB + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + + + + + + + + diff --git a/acs/nladmin-system/src/main/resources/log/LkToAcs.xml b/acs/nladmin-system/src/main/resources/log/LkToAcs.xml new file mode 100644 index 000000000..508edd726 --- /dev/null +++ b/acs/nladmin-system/src/main/resources/log/LkToAcs.xml @@ -0,0 +1,32 @@ + + + + + + + + + ${LOG_HOME}/立库请求ACS/%d{yyyy-MM-dd}.%i.log + + 15 + + 200MB + + 2GB + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + + + + + + + + diff --git a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml b/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml index 630446d51..7adef980c 100644 --- a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml +++ b/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml @@ -3,7 +3,7 @@ - + ${LOG_HOME}/WMS下发ACS/%d{yyyy-MM-dd}.%i.log @@ -27,6 +27,6 @@ - + diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index 9b5fa1a19..c24e8e7d2 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -31,7 +31,15 @@ https://juejin.cn/post/6844903775631572999 --> + + + + + + + + @@ -138,9 +146,10 @@ https://juejin.cn/post/6844903775631572999 - - + + + diff --git a/acs/nladmin-ui/src/views/acs/device/config.vue b/acs/nladmin-ui/src/views/acs/device/config.vue index fc36312cb..41477dcc5 100644 --- a/acs/nladmin-ui/src/views/acs/device/config.vue +++ b/acs/nladmin-ui/src/views/acs/device/config.vue @@ -92,7 +92,7 @@ import siemens_conveyor from '@/views/acs/device/driver/siemens_conveyor' import slit_two_manipulator from '@/views/acs/device/driver/slit_two_manipulator' import hongxiang_device from '@/views/acs/device/driver/hongxiang_device' import hongxiang_conveyor from '@/views/acs/device/driver/hongxiang_conveyor' - +import plug_pull_device_site from '@/views/acs/device/driver/plug_pull_device_site' export default { name: 'DeviceConfig', @@ -115,7 +115,8 @@ export default { box_palletizing_manipulator, oven_manipulator, siemens_conveyor, - slit_two_manipulator + slit_two_manipulator, + plug_pull_device_site }, dicts: ['device_type'], mixins: [crud], diff --git a/acs/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue b/acs/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue new file mode 100644 index 000000000..20593fd17 --- /dev/null +++ b/acs/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue @@ -0,0 +1,490 @@ + + + + +