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/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/BlankManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/BlankManipulatorDeviceDriver.java index d9cbce488..194c433ee 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/BlankManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/BlankManipulatorDeviceDriver.java @@ -608,7 +608,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem action = LangProcess.msg("universal_releasing_completed"); } if(error == 0 && iserror){ - message = "信号连接异常!"; + message = "universal_message11"; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/HongXiangStationDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/HongXiangStationDeviceDriver.java index 37a13ee64..f5f4b67e5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/HongXiangStationDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/HongXiangStationDeviceDriver.java @@ -165,7 +165,7 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); if(error == 0 && iserror){ - message = "信号连接异常!"; + message = "universal_message11"; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode ==2 ? "待机": "脱机"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java index 14b202c3e..b85c4b5e6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/HongXiangConveyorDeviceDriver.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.hongxiang_device; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import lombok.Data; @@ -244,7 +245,31 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple this.control(itemMap); } + public String getToParam() { + return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "."; + } + + /** + * 多个信号一起下发电气 + * + * @param map + */ + public void writing(Map map) throws Exception { + DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + Map itemMap = new LinkedHashMap<>(); + map.forEach((key, value) -> { + if (ObjectUtil.isNotEmpty(value)) { + itemMap.put(getToParam() + key, value); + } + }); + if (ObjectUtil.isNotEmpty(itemMap)) { + this.checkcontrol(itemMap); + logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); + } + } + //将扩展表中的字符串数据转换成集合 + @Override public List getExtraDeviceCodes(String extraName) { String extraValue = (String) this.getDevice().getExtraValue().get(extraName); if (StrUtil.isEmpty(extraValue)) { @@ -308,7 +333,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple jo.put("hasGoods", true); } if(error == 0 && iserror){ - message = "信号连接异常!"; + message = "universal_message11"; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("temperature", temperature); 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 278666f39..06ac5eaa4 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 @@ -187,7 +187,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i String mode = ""; String action = ""; if(iserror){ - message = "信号连接异常!"; + message = "universal_message11"; } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", "联机"); 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 d9220bb80..7a7e821fc 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 @@ -383,9 +383,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code(); return false; } - instruction.setInstruction_status("1"); + /*instruction.setInstruction_status("1"); instruction.setUpdate_time(DateUtil.now()); - instructionService.update(instruction); + instructionService.update(instruction);*/ Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { @@ -410,8 +410,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i map.put("to_target", next_addr); map.put("to_task", instruction.getInstruction_code()); map.put("to_command", "1"); - list.add(map); - this.writing(list); + try { + this.writing(map); + } catch (Exception e) { + e.printStackTrace(); + } if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver(); hongXiangConveyorDeviceDriver.writing("to_open_door", "1"); @@ -743,6 +746,28 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i return isClose; } + public String getToParam() { + return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "."; + } + + /** + * 多个信号一起下发电气 + * + * @param map + */ + public void writing(Map map) throws Exception { + DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + Map itemMap = new LinkedHashMap<>(); + map.forEach((key, value) -> { + if (ObjectUtil.isNotEmpty(value)) { + itemMap.put(getToParam() + key, value); + } + }); + if (ObjectUtil.isNotEmpty(itemMap)) { + this.checkcontrol(itemMap); + logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); + } + } public synchronized void update_instruction_status() throws Exception { Date date = new Date(); @@ -751,6 +776,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else { this.instruction_update_time = date; + Map map = new HashMap(); //更改任务状态 if (task > 0) { Instruction inst1 = checkInst(); @@ -758,6 +784,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (StrUtil.equals(inst1.getInstruction_status(), "0")) { inst1.setInstruction_status("1"); inst1.setExecute_device_code(this.device_code); + inst1.setUpdate_time(DateUtil.now()); instructionService.update(inst1); } } @@ -780,7 +807,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) { if (this.getNow_steps_type() == 2) { ArrayList list = new ArrayList(); - Map map = new HashMap(); map.put("to_command", "2"); list.add(map); this.writing(list); @@ -809,7 +835,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else { if (this.getNow_steps_type() == 2) { ArrayList list = new ArrayList(); - Map map = new HashMap(); map.put("to_command", "2"); list.add(map); this.writing(list); @@ -844,11 +869,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver(); - hongXiangConveyorDeviceDriver.writing("to_close_door", "1"); + map.put("to_close_door", "1"); + hongXiangConveyorDeviceDriver.writing(map); } if (this.getNow_steps_type() == 3) { ArrayList list = new ArrayList(); - Map map = new HashMap(); map.put("to_command", "3"); list.add(map); this.writing(list); @@ -889,7 +914,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i int move = hongXiangConveyorDeviceDriver.getMove(); if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 0) { if (this.getNow_steps_type() == 4) { - this.writing("to_command", "4"); + map.put("to_command", "4"); + this.writing(map); this.setNow_steps_type(5); } else { feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)"; @@ -916,7 +942,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 4) { - this.writing("to_command", "4"); + map.put("to_command", "4"); + this.writing(map); this.setNow_steps_type(5); } } @@ -957,8 +984,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i int time = Integer.parseInt(taskDto.getOven_time()); int hours = (time % (60 * 60 * 24)) / (60 * 60); int minutes = (time % (60 * 60)) / 60; - hongXiangConveyorDeviceDriver.writing("to_time_house", String.valueOf(hours)); - hongXiangConveyorDeviceDriver.writing("to_time_min", String.valueOf(minutes)); + map.put("to_time_house", String.valueOf(hours)); + map.put("to_time_min", String.valueOf(minutes)); + hongXiangConveyorDeviceDriver.writing(map); } } @@ -984,7 +1012,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } - this.writing("to_command", "5"); + map.put("to_command", "5"); + this.writing(map); this.setNow_steps_type(6); this.setNow_steps_type(0); try { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java index 58ca5dcff..331399228 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/PlugPullDeviceSiteDeviceDriver.java @@ -304,8 +304,8 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl break; case 7: if (!requireSucess && task > 0) { - //套管失败无库存 - //todo + //申请拔轴 + applyPullShaft(mode); } break; case 8: @@ -439,6 +439,38 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl } } + /** + * 申请拔轴 + */ + private synchronized void applyPullShaft(int mode) { + ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest(); + ApplyPlugPullSitResponse applyPlugPullSitResponse; + Instruction inst1 = instructionService.findByCode(String.valueOf(task)); + String task_code1 = inst1.getTask_code(); + TaskDto taskDto = taskserver.findByCode(task_code1); + if (ObjectUtil.isNotEmpty(taskDto)){ + + } + applyPlugPullSiteRequest.setDevice_code(device_code); + applyPlugPullSiteRequest.setTask_code(task_code1); + applyPlugPullSiteRequest.setBarcode(String.valueOf(barcode)); + applyPlugPullSiteRequest.setType("4"); + applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest); + if (applyPlugPullSitResponse.getCode() == 200) { + this.writeSignal(mode); + logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse); + message = "拔轴完成成功"; + } else { + message = applyPlugPullSitResponse.getMessage(); + Map map = new LinkedHashMap<>(); + map.put("to_command", 99); + this.writing(map); + requireSucess = true; + message = "申请拔轴失败"; + logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴反馈失败,返回参数:" + applyPlugPullSitResponse); + } + } + /** * 缓存线已满,生成行架任务 */ @@ -449,7 +481,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl String task_code1 = inst1.getTask_code(); applyPlugPullSiteRequest.setDevice_code(device_code); applyPlugPullSiteRequest.setTask_code(task_code1); - applyPlugPullSiteRequest.setType("4"); + applyPlugPullSiteRequest.setType("5"); applyPlugPullSitResponse = acsToWmsService.applyPlugPullSiteRequest(applyPlugPullSiteRequest); if (applyPlugPullSitResponse.getCode() == 200) { logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴,返回参数:" + applyPlugPullSitResponse); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java index bb427d3a2..a5ea432ae 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/PullHeadManipulatorDeviceDriver.java @@ -339,12 +339,12 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp } else { if (mode == 2) { //if (!requireSucess) { - String remark = "";; + String remark = ""; if (mode != 2) { - remark = remark + "工作模式(mode)不是待机状态,"; + remark = remark + "universal_remark2"; } if (move != 0) { - remark = remark + "光电信号(move)为有货状态,"; + remark = remark + "universal_remark3"; } if (task != 0) { remark = remark + "universal_remark4"; @@ -417,10 +417,12 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { - throw new BadRequestException(LangProcess.msg("device_checkAdd", startDevice.getDevice_code())); + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) { - throw new BadRequestException(LangProcess.msg("device_checkAdd", nextDevice.getDevice_code())); + notCreateInstMessage = "universal_notCreateInstMessage1"; + throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); @@ -512,7 +514,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp notCreateInstMessage = ""; notCreateTaskMessage = ""; } else { - notCreateInstMessage = "未找到关联设备的任务,指令无法创建"; + notCreateInstMessage = "universal_notCreateInstMessage"; } return true; } @@ -571,19 +573,19 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp String action = ""; String walk_y = ""; if (this.getMode() == 0) { - mode = "脱机"; + mode = LangProcess.msg("universal_off-line"); } else if (this.getMode() == 1) { - mode = "单机"; + mode = LangProcess.msg("universal_stand-alone"); } else if (this.getMode() == 2) { - mode = "待机"; + mode = LangProcess.msg("universal_standby"); } else if (this.getMode() == 3) { - mode = "运行中"; + mode = LangProcess.msg("universal_operation"); } if (this.getMove() == 0) { - move = "无货"; + move = LangProcess.msg("universal_no"); } else if (this.getMove() == 1) { - move = "有货"; + move = LangProcess.msg("universal_yes"); } String requireSucess = "0"; @@ -592,16 +594,15 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp } jo.put("requireSucess", requireSucess); if (this.getAction() == 1) { - action = "取货中"; + action = LangProcess.msg("universal_delivery"); } else if (this.getAction() == 2) { - action = "取货完成"; + action = LangProcess.msg("universal_completed"); } else if (this.getAction() == 3) { - action = "放货中"; + action = LangProcess.msg("universal_releasing"); } else if (this.getAction() == 4) { - action = "放货完成"; + action = LangProcess.msg("universal_releasing_completed"); } if(error == 0 && this.itemProtocol.isError){ - message = "信号连接异常!"; iserror = true; }else if(error == 0 && !this.itemProtocol.isError){ iserror = false; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/ApplyPlugPullSiteRequest.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/ApplyPlugPullSiteRequest.java index d69512865..7dd89696e 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/ApplyPlugPullSiteRequest.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/data/ApplyPlugPullSiteRequest.java @@ -10,7 +10,8 @@ public class ApplyPlugPullSiteRequest extends BaseRequest { * 1-申请套管 * 2-套管完成 * 3-拔轴完成 - * 4-缓存线已满,生成行架任务 + * 4-申请拔轴 + * 5-缓存线已满,生成行架任务 */ private String type; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/InstructionService.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/InstructionService.java index c6351d5f7..31a0c2f75 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/InstructionService.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/InstructionService.java @@ -250,6 +250,14 @@ public interface InstructionService extends CommonService { void finishAndCreateNextInst(Instruction dto) throws Exception; + /** + * 完成并创建指令 + * + * @param + */ + void finishAndCreateHXInst(Instruction dto) throws Exception; + + /** * 取消指令 * 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 2a33b4ba4..9994ceeed 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 @@ -372,6 +372,13 @@ public class InstructionServiceImpl extends CommonServiceImpl impleme */ private CopyOnWriteArrayList tasks = new CopyOnWriteArrayList<>(); + /** + * 烘箱任务类型 + */ + private static final String TASK_TYPE = "8"; + @Override public PageInfo queryAll(TaskQueryParam query, Pageable pageable) { @@ -447,7 +452,8 @@ public class TaskServiceImpl extends CommonServiceImpl impleme @Override public List queryTaskByDeviceCodeAndStatus(String device_code) { - return Optional + + List collect = Optional .ofNullable(this.tasks) .orElse(new CopyOnWriteArrayList<>()) .stream() @@ -455,6 +461,22 @@ public class TaskServiceImpl extends CommonServiceImpl impleme && StrUtil.equals(task.getTask_status(), TaskStatusEnum.BUSY.getIndex())) .filter(task -> instructionService.findByTaskcodeAndStatus(task.getTask_code()) != null) .collect(Collectors.toList()); + if(CollUtil.isEmpty(collect)){ + tasks.forEach( + task ->{ + if(TASK_TYPE.equals(task.getTask_type()) && StrUtil.isNotEmpty(task.getPut_device_code())){ + Instruction instruction = instructionService.findByDeviceCodeFromCache(task.getNext_device_code()); + if (ObjectUtil.isNotEmpty(instruction)) { + if (StrUtil.equals(instruction.getStart_device_code(), device_code)) { + collect.add(task); + } + } + } + } + ); + } + return collect; + } @Override @@ -534,7 +556,7 @@ public class TaskServiceImpl extends CommonServiceImpl impleme String start_device_code = dto.getStart_device_code(); String next_device_code = dto.getNext_device_code(); String route_plan_code = dto.getRoute_plan_code(); - dto.setCreate_by(currentUsername); + dto.setCreate_by(StrUtil.isNotEmpty(currentUsername) ? currentUsername : "LMS"); dto.setUpdate_by(currentUsername); dto.setUpdate_time(now); dto.setCreate_time(now); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/SecurityUtils.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/SecurityUtils.java index b434369ee..7b3699776 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/SecurityUtils.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/SecurityUtils.java @@ -27,11 +27,20 @@ public class SecurityUtils { JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo"); if (ObjectUtil.isNotEmpty(json)) { return json.toBean(CurrentUser.class); + } else { + CurrentUser currentUser = new CurrentUser(); + currentUser.setId("2"); + currentUser.setPresonName("LMS系统用户"); + currentUser.setUsername("LMS"); + return currentUser; } } catch (Exception e) { - return new CurrentUser(); + CurrentUser currentUser = new CurrentUser(); + currentUser.setId("2"); + currentUser.setPresonName("LMS系统用户"); + currentUser.setUsername("LMS"); + return currentUser; } - return null; } /** 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..b5f900cfe 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 @@ -27,6 +27,7 @@ universal_message7=\u4EFB\u52A1\u5B8C\u6210... universal_message8=\u8BFB\u53D6\u4FE1\u53F7\u503C\u65F6\u51FA\u73B0\u5F02\u5E38: universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38: universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7: +universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01 universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 @@ -41,6 +42,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..0c1ab80e2 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 @@ -26,6 +26,7 @@ universal_message7=Mission accomplished... universal_message8=An exception occurred when reading the signal value: universal_message9=An exception occurred while creating the directive universal_message10=Multiple electrical signals are issued +universal_message11=The signal connection is abnormal! universal_feedMessage1=mode is not in the running state universal_feedMessage2=action signal (action signal) is not a release completed status universal_feedMessage3=Photoelectric signal (move) is not out of stock @@ -41,3 +42,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..10fcbacb4 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 @@ -26,6 +26,7 @@ universal_message7=Misi tercapai ... universal_message8=Pengecualian terjadi saat membaca nilai sinyal: universal_message9=Pengecualian terjadi saat membuat direktif universal_message10=Beberapa sinyal listrik dikeluarkan +universal_message11=Koneksi sinyal tidak normal! universal_feedMessage1=Mode kerja tidak untuk mode dalam mode universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan universal_feedMessage3=tidak ada status pengiriman @@ -41,3 +42,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..6dcc8c05e 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 @@ -26,6 +26,7 @@ universal_message7=\u4EFB\u52A1\u5B8Cuniversal_releasing_completed\u6210... universal_message8=\u8BFB\u53D6\u4FE1\u53F7\u503C\u65F6\u51FA\u73B0\u5F02\u5E38: universal_message9=\u521B\u5EFA\u6307\u4EE4\u65F6\u51FA\u73B0\u5F02\u5E38: universal_message10=\u4E0B\u53D1\u591A\u4E2A\u7535\u6C14\u4FE1\u53F7 +universal_message11=\u4FE1\u53F7\u8FDE\u63A5\u5F02\u5E38\uFF01 universal_feedMessage1=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u4E3A\u8FD0\u884C\u4E2D\u72B6\u6001 universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\u5B8C\u6210\u72B6\u6001 universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001 @@ -41,3 +42,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/system/monitor/device/index.vue b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue index 595e6f475..492c3ea73 100644 --- a/acs2/nladmin-ui/src/views/system/monitor/device/index.vue +++ b/acs2/nladmin-ui/src/views/system/monitor/device/index.vue @@ -1,11 +1,11 @@