From c0b36da2747c263cd74a08c5be42be95a48b158e Mon Sep 17 00:00:00 2001 From: liuxy Date: Mon, 11 Mar 2024 09:53:07 +0800 Subject: [PATCH 1/6] =?UTF-8?q?rev=EF=BC=9A=E5=8C=BA=E5=9F=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/basedata/master/service/impl/SalesServiceImpl.java | 4 +++- .../src/main/java/org/nl/wms/sch/wql/TEST0002.wql | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/SalesServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/SalesServiceImpl.java index 351d6340d..c35e148a7 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/SalesServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/service/impl/SalesServiceImpl.java @@ -84,7 +84,9 @@ public class SalesServiceImpl implements SalesService { String sales_code = dto.getSales_code(); SalesDto unitDto = this.findByCode(sales_code); if (unitDto != null) { - throw new BadRequestException("存在相同的编码"); + if (unitDto.getArea().equals(dto.getArea())) { + throw new BadRequestException("存在相同区域的业务员!"); + } } dto.setSales_id(IdUtil.getSnowflake(1, 1).nextId()); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/TEST0002.wql b/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/TEST0002.wql index 401bcddb0..388e00f01 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/TEST0002.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/TEST0002.wql @@ -40,11 +40,13 @@ IF 输入.flag = "1" QUERY SELECT - cust.*, + cust.cust_code, + cust.cust_name, + SUBSTRING_INDEX(cust.sales_owner, '|', 1) AS sales_owner, info1.area FROM md_cs_customerbase cust - INNER JOIN md_cs_areasalesinfo info1 ON info1.sales_name = cust.sales_owner + INNER JOIN md_cs_areasalesinfo info1 ON info1.sales_name = SUBSTRING_INDEX(cust.sales_owner, '|', 1) WHERE cust.is_delete = '0' AND cust.is_used = '1' From 4d18c231b913e28d68e0e70d41424cfa0493254b Mon Sep 17 00:00:00 2001 From: LENOVO <1793460677@qq.com> Date: Mon, 11 Mar 2024 13:55:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E8=A1=8C=E6=9E=B6=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E4=BD=8D=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acs2/nladmin-system/nlsso-server/pom.xml | 2 +- .../manipulator_cache/ItemProtocol.java | 59 ++++ .../ManipulatorCacheDefination.java | 49 ++++ .../ManipulatorCacheDeviceDriver.java | 113 ++++++++ .../BoxPackageManipulatorDeviceDriver.java | 24 +- .../InteractionJsonDTO.java | 5 +- ...TwoManipulatorManipulatorDeviceDriver.java | 13 + .../acs/device_driver/rgv/ItemProtocol.java | 264 +++++++++--------- .../monitor/universal/universal.properties | 1 + .../universal/universal_en_US.properties | 1 + .../universal/universal_in_ID.properties | 1 + .../universal/universal_zh_CN.properties | 2 + acs2/nladmin-ui/src/views/acs/angle/index.vue | 2 +- 13 files changed, 398 insertions(+), 138 deletions(-) create mode 100644 acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ItemProtocol.java create mode 100644 acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDefination.java create mode 100644 acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDeviceDriver.java diff --git a/acs2/nladmin-system/nlsso-server/pom.xml b/acs2/nladmin-system/nlsso-server/pom.xml index 372ada6df..ee3e714ea 100644 --- a/acs2/nladmin-system/nlsso-server/pom.xml +++ b/acs2/nladmin-system/nlsso-server/pom.xml @@ -410,7 +410,7 @@ org.bouncycastle bcprov-jdk15on - 1.50 + 1.54 diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ItemProtocol.java new file mode 100644 index 000000000..71b485ae6 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ItemProtocol.java @@ -0,0 +1,59 @@ +package org.nl.acs.device_driver.manipulator_cache; + +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 { + + + //工作模式 + public static String item_mode = "mode"; + //动作信号 + public static String item_action = "action"; + + private ManipulatorCacheDeviceDriver driver; + + public ItemProtocol(ManipulatorCacheDeviceDriver driver) { + this.driver = driver; + } + + + public int getMode() { + return this.getOpcIntegerValue(item_mode); + } + + public int getAction() { + return this.getOpcIntegerValue(item_action); + } + + + 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 static List getReadableItemDtos() { + ArrayList list = new ArrayList<>(); + list.add(new ItemDto(item_mode, "工作模式", "DB1.B1")); + list.add(new ItemDto(item_action, "动作信号", "DB1.B3")); + + return list; + } + + +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDefination.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDefination.java new file mode 100644 index 000000000..8f4788020 --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDefination.java @@ -0,0 +1,49 @@ +package org.nl.acs.device_driver.manipulator_cache; + +import org.nl.acs.device.domain.Device; +import org.nl.acs.device.enums.DeviceType; +import org.nl.acs.device_driver.DeviceDriver; +import org.nl.acs.device_driver.DeviceDriverDefination; +import org.springframework.stereotype.Service; + +import java.util.LinkedList; +import java.util.List; + +/** + * 扫码器 + */ +@Service +public class ManipulatorCacheDefination implements DeviceDriverDefination { + @Override + public String getDriverCode() { + return "manipulator_cache"; + } + + @Override + public String getDriverName() { + return "行架对接缓存位"; + } + + @Override + public String getDriverDescription() { + return "行架对接缓存位"; + } + + @Override + public DeviceDriver getDriverInstance(Device device) { + return (new ManipulatorCacheDeviceDriver()).setDevice(device).setDriverDefination(this); + + } + + @Override + public Class getDeviceDriverType() { + return ManipulatorCacheDeviceDriver.class; + } + + @Override + public List getFitDeviceTypes() { + List types = new LinkedList(); + types.add(DeviceType.conveyor); + return types; + } +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDeviceDriver.java new file mode 100644 index 000000000..b3a81d76d --- /dev/null +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/manipulator_cache/ManipulatorCacheDeviceDriver.java @@ -0,0 +1,113 @@ +package org.nl.acs.device_driver.manipulator_cache; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.Data; +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.FeedLmsRealFailed; +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.instruction.domain.Instruction; +import org.nl.acs.monitor.DeviceStageMonitor; +import org.nl.config.language.LangProcess; +import org.nl.config.thread.ThreadPoolExecutorUtil; +import org.openscada.opc.lib.da.Server; + +import java.util.*; +import java.util.concurrent.ThreadPoolExecutor; + +/** + * 标准版扫码器 + */ +@Slf4j +@Data +public class ManipulatorCacheDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, FeedLmsRealFailed { + private final static ThreadPoolExecutor EXECUTOR = ThreadPoolExecutorUtil.getPoll(); + protected ItemProtocol itemProtocol = new ItemProtocol(this); + + //当前指令 + Instruction inst = null; + + private String error_type = "ssx_error_type"; + + //工作模式 + int mode = 0; + int last_mode = 0; + + //任务号 + int action = 0; + int last_action = 0; + + @Override + public Device getDevice() { + return this.device; + } + + + @Override + public void execute() { + action = this.itemProtocol.getAction(); + mode = this.itemProtocol.getMode(); + } + + + + + public boolean exe_business() { + return true; + } + + + + + + public void executing(Server server, Map itemMap) { + this.control(itemMap); + } + + public void writing(int command) { + Map itemMap = new HashMap(); + this.control(itemMap); + } + + + @Override + public JSONObject getDeviceStatusName() { + JSONObject jo = new JSONObject(); + String mode = ""; + String move = ""; + if (this.getMode() == 0) { + mode = LangProcess.msg("universal_off-line"); + } else if (this.getMode() == 1) { + mode = LangProcess.msg("universal_stand-alone"); + } else if (this.getMode() == 2) { + mode = LangProcess.msg("universal_standby"); + } else if (this.getMode() == 3) { + mode = LangProcess.msg("universal_operation"); + } + jo.put("device_name", this.getDevice().getDevice_name()); + jo.put("mode", mode); + jo.put("action", action); + + return jo; + } + + @Override + public void setDeviceStatus(JSONObject data) { + + } + + + @Override + public JSONObject feedLmsRealFailedInfo() { + return null; + } +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java index de0096f7b..f78323db8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/BoxPackageManipulatorDeviceDriver.java @@ -20,6 +20,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.conveyor.siemens_conveyor.SiemensConveyorDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.device_driver.manipulator_cache.ManipulatorCacheDeviceDriver; import org.nl.acs.device_driver.one_conveyor.box_subvolumes_conveyor.BoxSubvolumesConveyorDeviceDriver; import org.nl.acs.history.ErrorUtil; import org.nl.acs.history.service.DeviceErrorLogService; @@ -359,8 +360,9 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i Map map6 = new HashMap<>(); Map map7 = new HashMap<>(); Map map8 = new HashMap<>(); + Map map9 = new HashMap<>(); try { - pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8); + pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8,map9); } catch (Exception e) { logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" @@ -399,6 +401,15 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } + ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriver; + if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) { + manipulatorCacheDeviceDriver = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver(); + if (manipulatorCacheDeviceDriver.getMode() != 2 && manipulatorCacheDeviceDriver.getMode() !=1) { + notCreateInstMessage = "universal_notCreateInstMessage3"; + return false; + } + } + String taskid = taskDto.getTask_id(); String taskcode = taskDto.getTask_code(); String start_point_code = taskDto.getStart_point_code(); @@ -427,8 +438,9 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i Map map6 = new HashMap<>(); Map map7 = new HashMap<>(); Map map8 = new HashMap<>(); + Map map9 = new HashMap<>(); try { - pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8); + pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8,map9); } catch (Exception e) { logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() @@ -446,7 +458,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } - private void pushPLC(Map map1, Map map2, String next_addr, Map map3, String start_addr, Map map4, String task, InteractionJsonDTO interactionJsonDTO, Map map5, Map map6, Map map7, Map map8) { + private void pushPLC(Map map1, Map map2, String next_addr, Map map3, String start_addr, Map map4, String task, InteractionJsonDTO interactionJsonDTO, Map map5, Map map6, Map map7, Map map8,Map map9) { List list = new ArrayList(); map1.put("code", "to_command"); map1.put("value", 1); @@ -481,6 +493,12 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i map8.put("value", interactionJsonDTO.getMaxNo()); list.add(map8); } + + if (ObjectUtil.isNotEmpty(interactionJsonDTO.getBarcode())) { + map8.put("code", "to_barcode"); + map8.put("value", interactionJsonDTO.getBarcode()); + list.add(map9); + } } this.writing(list); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java index 63c199bea..a7695163f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/box_package_manipulator/InteractionJsonDTO.java @@ -24,5 +24,8 @@ public class InteractionJsonDTO { private String lastOne; - + /** + *子卷号 + */ + private String barcode; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java index 2b462938a..ff4315ddc 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/one_manipulator/volume_two_manipulator/VolumeTwoManipulatorManipulatorDeviceDriver.java @@ -19,6 +19,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.conveyor.siemens_conveyor.SiemensConveyorDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.device_driver.manipulator_cache.ManipulatorCacheDeviceDriver; import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.InteractionJsonDTO; import org.nl.acs.enums.VolumeTwoTypeEnum; import org.nl.acs.history.ErrorUtil; @@ -397,6 +398,18 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi return false; } } + + + ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriver; + if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) { + manipulatorCacheDeviceDriver = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver(); + if (manipulatorCacheDeviceDriver.getMode() != 2 && manipulatorCacheDeviceDriver.getMode() !=1) { + notCreateInstMessage = "universal_notCreateInstMessage3"; + return false; + } + } + + String taskid = taskDto.getTask_id(); String taskcode = taskDto.getTask_code(); String start_point_code = taskDto.getStart_point_code(); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/ItemProtocol.java index 566aaae5c..50ae39e21 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/rgv/ItemProtocol.java @@ -1,132 +1,132 @@ -package org.nl.acs.device_driver.rgv; - -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 { - - //心跳 - public static String item_heartbeat = "heartbeat"; - //工作模式 - public static String item_mode = "mode"; - //光电信号 - public static String item_move = "move"; - //动作信号 - public static String item_action = "action"; - //行走列 - public static String item_walk_y = "walk_y"; - //任务号 - public static String item_task = "task"; - //报警 - public static String item_error = "error"; - //气涨轴编号 - public static String item_barcode = "barcode"; - - //下发命令 - public static String item_to_command = "to_command"; - //下发目标站 - public static String item_to_target = "to_target"; - //下发任务号 - public static String item_to_task = "to_task"; - //下发子卷号 - public static String item_to_sub_volume_no = "to_sub_volume_no"; - - private RgvDeviceDriver driver; - - public ItemProtocol(RgvDeviceDriver driver){ - this.driver=driver; - } - - public int getHeartbeat() { - return this.getOpcIntegerValue(item_heartbeat); - } - - public int getMode() { - return this.getOpcIntegerValue(item_mode); - } - - public int getMove() { - return this.getOpcIntegerValue(item_move); - } - - public int getAction() { - return this.getOpcIntegerValue(item_action); - } - - public int getWalk_y() { - return this.getOpcIntegerValue(item_walk_y); - } - - public int getError() { - return this.getOpcIntegerValue(item_error); - } - - public int getBarcode() { - return this.getOpcIntegerValue(item_barcode); - } - - public int getTask() { - return this.getOpcIntegerValue(item_task); - } - - public int getTo_task() { - return this.getOpcIntegerValue(item_to_task); - } - - - public int getTo_command() { - return this.getOpcIntegerValue(item_to_command); - } - - public int getTo_target() { - return this.getOpcIntegerValue(item_to_target); - } - - - public int getTo_sub_volume_no(){ - return this.getOpcIntegerValue(item_to_sub_volume_no); - } - - Boolean isonline; - - public int getOpcIntegerValue(String protocol) { - Integer value = this.driver.getIntegeregerValue(protocol); - if (value == null) { - // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); - setIsonline(false); - } else { - setIsonline(true); - return value; - } - return 0; - } - - public static List getReadableItemDtos() { - ArrayList list = new ArrayList<>(); - list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); - list.add(new ItemDto(item_mode, "工作模式", "DB1.B1")); - list.add(new ItemDto(item_move, "光电信号", "DB1.B2")); - list.add(new ItemDto(item_action, "动作信号", "DB1.B3")); - list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4")); - list.add(new ItemDto(item_error, "报警信号", "DB1.B5")); - list.add(new ItemDto(item_task, "任务号", "DB1.D6")); - list.add(new ItemDto(item_barcode, "任务号", "DB1.B7")); - return list; - } - - public static List getWriteableItemDtos() { - ArrayList list = new ArrayList<>(); - list.add(new ItemDto(item_to_command, "下发命令", "DB2.W0")); - list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4")); - list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6")); - list.add(new ItemDto(item_to_sub_volume_no, "下发子卷号", "DB2.W8")); - return list; - } -} +package org.nl.acs.device_driver.rgv; + +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 { + + //心跳 + public static String item_heartbeat = "heartbeat"; + //工作模式 + public static String item_mode = "mode"; + //光电信号 + public static String item_move = "move"; + //动作信号 + public static String item_action = "action"; + //行走列 + public static String item_walk_y = "walk_y"; + //任务号 + public static String item_task = "task"; + //报警 + public static String item_error = "error"; + //气涨轴编号 + public static String item_barcode = "barcode"; + + //下发命令 + public static String item_to_command = "to_command"; + //下发目标站 + public static String item_to_target = "to_target"; + //下发任务号 + public static String item_to_task = "to_task"; + //下发子卷号 + public static String item_to_sub_volume_no = "to_sub_volume_no"; + + private RgvDeviceDriver driver; + + public ItemProtocol(RgvDeviceDriver driver){ + this.driver=driver; + } + + public int getHeartbeat() { + return this.getOpcIntegerValue(item_heartbeat); + } + + public int getMode() { + return this.getOpcIntegerValue(item_mode); + } + + public int getMove() { + return this.getOpcIntegerValue(item_move); + } + + public int getAction() { + return this.getOpcIntegerValue(item_action); + } + + public int getWalk_y() { + return this.getOpcIntegerValue(item_walk_y); + } + + public int getError() { + return this.getOpcIntegerValue(item_error); + } + + public int getBarcode() { + return this.getOpcIntegerValue(item_barcode); + } + + public int getTask() { + return this.getOpcIntegerValue(item_task); + } + + public int getTo_task() { + return this.getOpcIntegerValue(item_to_task); + } + + + public int getTo_command() { + return this.getOpcIntegerValue(item_to_command); + } + + public int getTo_target() { + return this.getOpcIntegerValue(item_to_target); + } + + + public int getTo_sub_volume_no(){ + return this.getOpcIntegerValue(item_to_sub_volume_no); + } + + Boolean isonline; + + public int getOpcIntegerValue(String protocol) { + Integer value = this.driver.getIntegeregerValue(protocol); + if (value == null) { + // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); + setIsonline(false); + } else { + setIsonline(true); + return value; + } + return 0; + } + + public static List getReadableItemDtos() { + ArrayList list = new ArrayList<>(); + list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); + list.add(new ItemDto(item_mode, "工作模式", "DB1.B1")); + list.add(new ItemDto(item_move, "光电信号", "DB1.B2")); + list.add(new ItemDto(item_action, "动作信号", "DB1.B3")); + list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4")); + list.add(new ItemDto(item_error, "报警信号", "DB1.B5")); + list.add(new ItemDto(item_task, "任务号", "DB1.D6")); + list.add(new ItemDto(item_barcode, "任务号", "DB1.B7")); + return list; + } + + public static List getWriteableItemDtos() { + ArrayList list = new ArrayList<>(); + list.add(new ItemDto(item_to_command, "下发命令", "DB2.W0")); + list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4")); + list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6")); + list.add(new ItemDto(item_to_sub_volume_no, "下发子卷号", "DB2.W8")); + return list; + } +} diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties index c233f5257..b973e961b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal.properties @@ -41,6 +41,7 @@ universal_feedMessage11=\u540E\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25 universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7! universal_notCreateInstMessage2=\u5149\u7535\u65E0\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! +universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8\u8FDB\u5165 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties index 21954f28b..d41cf80f5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_en_US.properties @@ -41,3 +41,4 @@ universal_write_erro=Write signal failure universal_notCreateInstMessage=Instructions cannot be created because the task for the associated device is not found universal_notCreateInstMessage1=The electrical dispatch number is not set! universal_notCreateInstMessage2=Photoelectric no goods, can not generate commands! +universal_notCreateInstMessage3=The device is in standby mode or is not allowed to enter diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties index e834402cc..551b9ce95 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_in_ID.properties @@ -41,3 +41,4 @@ universal_write_erro=Sinyal penulis gagal universal_notCreateInstMessage=Misi untuk divais yang diasosiasikan tidak ditemukan, perintah tidak dapat dibuat universal_notCreateInstMessage1=Nomor pengiriman listrik tidak diatur! universal_notCreateInstMessage2=Photo-electric tidak tersedia dan tidak dapat menghasilkan perintah! +universal_notCreateInstMessage3=Siaga perangkat atau tidak diizinkan masuk diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties index 39b984bbc..b02e0788e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/universal/universal_zh_CN.properties @@ -41,3 +41,5 @@ universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25 universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\u4EFB\u52A1\uFF0C\u6307\u4EE4\u65E0\u6CD5\u521B\u5EFA universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7! universal_notCreateInstMessage2=\u5149\u7535\u65E0\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! +universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8\u8FDB\u5165 + diff --git a/acs2/nladmin-ui/src/views/acs/angle/index.vue b/acs2/nladmin-ui/src/views/acs/angle/index.vue index 2a0b13def..3dc34b116 100644 --- a/acs2/nladmin-ui/src/views/acs/angle/index.vue +++ b/acs2/nladmin-ui/src/views/acs/angle/index.vue @@ -163,7 +163,7 @@