diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java index b252885c3..433cdc6d4 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/XianGongAgvService.java @@ -114,4 +114,11 @@ public interface XianGongAgvService { * 查询场景中指定机器人信息 */ HttpResponse getRobotInfo(String robotCode); + + /** + * 下发叉车运单 + * @param dto + * @return + */ + HttpResponse sendOrderSequencesToForklift(Instruction dto); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java index 3cdcca2bc..c976366f0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java @@ -25,6 +25,8 @@ import org.nl.acs.opc.DeviceAppService; import org.nl.acs.device.enums.DeviceType; import org.nl.common.exception.BadRequestException; import org.nl.config.language.LangProcess; +import org.nl.config.lucene.service.LuceneExecuteLogService; +import org.nl.config.lucene.service.dto.LuceneLogDto; import org.nl.system.service.param.ISysParamService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -53,6 +55,9 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { @Autowired private InstructionService instructionService; + @Autowired + private LuceneExecuteLogService luceneExecuteLogService; + @Autowired private AgvWaitUtil agvWaitUtil; @@ -251,6 +256,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { jo.put("blocks", createBlocksData(inst)); //运单优先级 jo.put("priority", inst.getPriority()); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code("下发诺宝运单") + .content("任务号:"+inst.getTask_code()+",指令号:"+inst.getInstruction_code()+",下发agv订单序列参数:"+jo) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); log.info("任务号:{},指令号{},下发agv订单序列参数:{}", inst.getTask_code(), inst.getInstruction_code(), jo); if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), CommonFinalParam.ONE)) { @@ -266,6 +276,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { //超时,毫秒 .timeout(20000) .execute(); + LuceneLogDto logDto1 = LuceneLogDto.builder() + .device_code("诺宝运单响应") + .content("任务号:"+inst.getTask_code()+",指令号:"+inst.getInstruction_code()+",下发诺宝订单序列反馈参数:"+jo) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto1); log.info("任务号:{},指令号{},状态{},下发agv订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body()); return result; @@ -287,15 +302,19 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { String start_point_code = inst.getStart_point_code(); String next_device_code = inst.getNext_device_code(); String next_point_code = inst.getNext_point_code(); - sendStartDeviceOrder(ja, start_device_code, start_point_code, instruction_code); - sendEndDeviceOrder(ja, start_device_code, instruction_code, next_point_code, next_device_code); String start_device_code2 = inst.getStart_device_code2(); String start_point_code2 = inst.getStart_point_code2(); + String next_device_code2 = inst.getNext_device_code2(); + String next_point_code2 = inst.getNext_point_code2(); + //起点1 + sendStartDeviceOrder(ja, start_device_code, start_point_code, instruction_code); + //终点1 + sendEndDeviceOrder(ja, start_device_code, instruction_code, next_point_code, next_device_code); + //起点2 if (StrUtil.isNotEmpty(start_device_code2)) { sendStartDeviceOrder(ja, start_device_code2, start_point_code2, instruction_code); } - String next_device_code2 = inst.getNext_device_code2(); - String next_point_code2 = inst.getNext_point_code2(); + //终点2 if (StrUtil.isNotEmpty(next_device_code2)) { sendEndDeviceOrder(ja, start_device_code2, instruction_code, next_device_code2, next_point_code2); } @@ -337,31 +356,36 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { jo.put("script_args", script_args); ja.add(jo); } - //将货物顶起来 + //将货物顶起来,机器识别提升高度 JSONObject jo1 = new JSONObject(); jo1.put("blockId", IdUtil.simpleUUID()); jo1.put("location", pointCode); jo1.put("operation", "JackLoad"); + jo1.put("operationArgs", new JSONObject() {{ + put("recognize", true); + }}); ja.add(jo1); //取货完成等待 - JSONObject jo2 = new JSONObject(); - jo2.put("blockId", IdUtil.simpleUUID()); - jo2.put("location", pointCode + "OUTGET"); - jo2.put("operation", "script"); - jo2.put("id", pointCode + "OUTGET"); - jo2.put("script_name", "userpy/interact.py"); - JSONObject script_args2 = new JSONObject(); - script_args2.put("addr", addr); - JSONObject data2 = new JSONObject(); - JSONObject reach2 = new JSONObject(); - reach2.put("task_code", instCode); - reach2.put("address", pointCode + "OUTGET"); - data2.put("reach", reach2); - script_args2.put("data", data2); - script_args2.put("protocol", "HTTP"); - jo2.put("script_args", script_args2); - ja.add(jo2); + if ("true".equals(startDevice.getExtraValue().get("ignore_pickup_check"))) { + JSONObject jo2 = new JSONObject(); + jo2.put("blockId", IdUtil.simpleUUID()); + jo2.put("location", pointCode + "OUTGET"); + jo2.put("operation", "script"); + jo2.put("id", pointCode + "OUTGET"); + jo2.put("script_name", "userpy/interact.py"); + JSONObject script_args2 = new JSONObject(); + script_args2.put("addr", addr); + JSONObject data2 = new JSONObject(); + JSONObject reach2 = new JSONObject(); + reach2.put("task_code", instCode); + reach2.put("address", pointCode + "OUTGET"); + data2.put("reach", reach2); + script_args2.put("data", data2); + script_args2.put("protocol", "HTTP"); + jo2.put("script_args", script_args2); + ja.add(jo2); + } } /** @@ -397,7 +421,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { } //放货前下发旋转角度 - JSONObject json1 = new JSONObject(); + /*JSONObject json1 = new JSONObject(); AcsPointAngle acsPointAngleDto = acsPointAngleService.findByCode(device_code, nextDeviceCode); if (ObjectUtil.isNotEmpty(acsPointAngleDto)) { log.info("acsPointAngleDto----參數,{}", acsPointAngleDto.toString()); @@ -409,7 +433,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { json1.put("location", pointCode + "INPUT"); json1.put("operation_args", operation_args); ja.add(json1); - } + }*/ //将货物放下 com.alibaba.fastjson.JSONObject jo4 = new com.alibaba.fastjson.JSONObject(); @@ -732,4 +756,181 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { } } + @Override + public HttpResponse sendOrderSequencesToForklift(Instruction inst) { + com.alibaba.fastjson.JSONObject jo = new com.alibaba.fastjson.JSONObject(); + jo.put("id", inst.getInstruction_code()); + //运单封口,true=创建运单之后不可添加动作块;false=创建运单可以添加动作块 + jo.put("complete", true); + //动作块 + jo.put("blocks", createBlocksForklift(inst)); + //运单优先级 + jo.put("priority", inst.getPriority()); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code("下发叉车运单") + .content("任务号:"+inst.getTask_code()+",指令号:"+inst.getInstruction_code()+",下发叉车订单序列参数:"+jo) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); + log.info("任务号:{},指令号{},下发agv订单序列参数:{}", inst.getTask_code(), inst.getInstruction_code(), jo); + + if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), CommonFinalParam.ONE)) { + String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); + String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); + + agvurl = agvurl + ":" + agvport + "/setOrder"; + + log.info(agvurl); + HttpResponse result = HttpRequest.post(agvurl) + //表单内容 + .body(String.valueOf(jo)) + //超时,毫秒 + .timeout(20000) + .execute(); + LuceneLogDto logDto1 = LuceneLogDto.builder() + .device_code("叉车运单响应") + .content("任务号:"+inst.getTask_code()+",指令号:"+inst.getInstruction_code()+",下发叉车订单序列反馈参数:"+jo) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto1); + log.info("任务号:{},指令号{},状态{},下发agv叉车订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body()); + + return result; + } else { + return null; + } + } + + /** + * 叉车运单动作块 + * @param inst + * @return + */ + private JSONArray createBlocksForklift(Instruction inst) { + JSONArray ja = new JSONArray(); + //起点 + Device startDevice = deviceAppService.findDeviceByCode(inst.getStart_device_code()); + //忽略取货校验 + if ("true".equals(startDevice.getExtraValue().get("ignore_pickup_check"))) { + //取货前等待 + JSONObject jo = new JSONObject(); + //动作块id + jo.put("blockId", IdUtil.simpleUUID()); + //目的地名称 + jo.put("location", inst.getStart_point_code() + "INGET"); + //执行脚本 + jo.put("operation", "script"); + jo.put("id", inst.getStart_point_code() + "INGET"); + //通信脚本,动作前后与现场设备交互的场景 + jo.put("script_name", "userpy/interact.py"); + JSONObject script_args = new JSONObject(); + //更改为现场设备IP及PORT + script_args.put("addr", addr); + JSONObject data = new JSONObject(); + JSONObject reach = new JSONObject(); + reach.put("task_code", inst.getInstruction_code()); + reach.put("address", inst.getStart_point_code() + "INGET"); + data.put("reach", reach); + script_args.put("data", data); + script_args.put("protocol", "HTTP"); + jo.put("script_args", script_args); + ja.add(jo); + } + //货叉加载货物,会将叉车状态变成载货中 + JSONObject jo1 = new JSONObject(); + jo1.put("blockId", IdUtil.simpleUUID()); + jo1.put("location", inst.getStart_point_code()); + jo1.put("operation", "ForkLoad"); + //行走高度 + jo1.put("start_height", "0.1"); + //取货高度 + jo1.put("end_height", inst.getStart_height()); + //升起信号 + jo1.put("operationArgs", new JSONObject() {{ + put("recognize", true); + }}); + ja.add(jo1); + + //取货完成等待 + if ("true".equals(startDevice.getExtraValue().get("ignore_pickup_check"))) { + JSONObject jo2 = new JSONObject(); + jo2.put("blockId", IdUtil.simpleUUID()); + jo2.put("location", inst.getStart_point_code() + "OUTGET"); + jo2.put("operation", "script"); + jo2.put("id", inst.getStart_point_code() + "OUTGET"); + jo2.put("script_name", "userpy/interact.py"); + JSONObject script_args2 = new JSONObject(); + script_args2.put("addr", addr); + JSONObject data2 = new JSONObject(); + JSONObject reach2 = new JSONObject(); + reach2.put("task_code", inst.getInstruction_code()); + reach2.put("address", inst.getStart_point_code() + "OUTGET"); + data2.put("reach", reach2); + script_args2.put("data", data2); + script_args2.put("protocol", "HTTP"); + jo2.put("script_args", script_args2); + ja.add(jo2); + } + + //起点 + Device nextDevice = deviceAppService.findDeviceByCode(inst.getNext_device_code()); + //忽略放货校验 + if ("true".equals(nextDevice.getExtraValue().get("ignore_release_check"))) { + //放货前等待 + JSONObject jo3 = new JSONObject(); + jo3.put("blockId", IdUtil.simpleUUID()); + jo3.put("location", inst.getNext_point_code() + "INPUT"); + jo3.put("operation", "script"); + jo3.put("id", inst.getNext_point_code() + "INPUT"); + jo3.put("script_name", "userpy/interact.py"); + JSONObject script_args3 = new JSONObject(); + script_args3.put("addr", addr); + JSONObject data3 = new JSONObject(); + JSONObject reach3 = new JSONObject(); + reach3.put("task_code", inst.getInstruction_code()); + reach3.put("address", inst.getNext_point_code() + "INPUT"); + data3.put("reach", reach3); + script_args3.put("data", data3); + script_args3.put("protocol", "HTTP"); + jo3.put("script_args", script_args3); + ja.add(jo3); + } + + + //ForkUnload(货叉卸载货物,会将叉车的状态变成非载货中) + JSONObject jo2 = new JSONObject(); + jo2.put("blockId", IdUtil.simpleUUID()); + jo2.put("location", inst.getStart_point_code()); + jo2.put("operation", "ForkUnload"); + //行走高度 + jo2.put("start_height", "0.2"); + //放货高度 + jo2.put("end_height", inst.getNext_height()); + ja.add(jo2); + + + //忽略放货校验 + if ("true".equals(nextDevice.getExtraValue().get("ignore_release_check"))) { + //放货完成等待 + com.alibaba.fastjson.JSONObject jo5 = new com.alibaba.fastjson.JSONObject(); + jo5.put("blockId", IdUtil.simpleUUID()); + jo5.put("location", inst.getNext_point_code() + "OUTPUT"); + jo5.put("operation", "script"); + jo5.put("id", inst.getNext_point_code() + "OUTPUT"); + jo5.put("script_name", "userpy/interact.py"); + com.alibaba.fastjson.JSONObject script_args5 = new com.alibaba.fastjson.JSONObject(); + script_args5.put("addr", addr); + com.alibaba.fastjson.JSONObject data5 = new com.alibaba.fastjson.JSONObject(); + com.alibaba.fastjson.JSONObject reach5 = new com.alibaba.fastjson.JSONObject(); + reach5.put("task_code", inst.getInstruction_code()); + reach5.put("address", inst.getNext_point_code() + "OUTPUT"); + data5.put("reach", reach5); + script_args5.put("data", data5); + script_args5.put("protocol", "HTTP"); + jo5.put("script_args", script_args5); + ja.add(jo5); + } + + + return ja; + } + } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java index fab615663..dfc733930 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java @@ -2,6 +2,7 @@ package org.nl.acs.device_driver.driver; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -99,7 +100,10 @@ public interface OpcDeviceDriver extends DeviceDriver { * @return */ default Integer getIntegeregerValue(String protocol) { - return (Integer) this.getValue(protocol); + if(ObjectUtil.isEmpty(this.getValue(protocol)) && "heartbeat".equals(protocol)){ + return null; + } + return (Integer) (ObjectUtil.isEmpty(this.getValue(protocol)) ? 0 : this.getValue(protocol)); } /** 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 85b776e99..7eb83432a 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 @@ -157,7 +157,6 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem @Override public void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); @@ -173,6 +172,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem to_onset = this.itemProtocol.getTo_onset(); weight = this.itemProtocol.getWeight(); barcode = this.itemProtocol.getBarcode(); + iserror = this.itemProtocol.isError; // 更新指令状态 @@ -521,7 +521,11 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem } }); if (ObjectUtil.isNotEmpty(itemMap)) { - this.control(itemMap); + try { + this.checkcontrol(itemMap); + } catch (Exception e) { + e.printStackTrace(); + } LuceneLogDto logDto = LuceneLogDto.builder() .device_code(device_code) .content("下发多个电气信号:" + itemMap) @@ -584,7 +588,9 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem } else if (this.getAction() == 4) { action = "放货完成"; } - + if(error == 0 && iserror){ + message = "信号连接异常!"; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/ItemProtocol.java index 673a89cfa..1d9615135 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/blank_manipulator/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.blank_manipulator; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -99,9 +100,15 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isNull(value)){ + isError = true; + }else if (item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); setIsonline(false); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/GreenFoilMachineButtonDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/GreenFoilMachineButtonDriver.java index 946995173..b7b018c99 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/GreenFoilMachineButtonDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/GreenFoilMachineButtonDriver.java @@ -114,6 +114,8 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem move = this.itemProtocol.getItem_move(); action = this.itemProtocol.getItem_action(); error = this.itemProtocol.getItem_error(); + iserror = this.itemProtocol.isError; + if (mode != last_mode) { requireSucess = false; logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); @@ -141,13 +143,12 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem // this.setIserror(true); // message = "有报警"; // //无报警 - } else { + } else if (error != 0) { + this.setIserror(true); + message = "有报警"; + }else { this.setIsonline(true); this.setIserror(false); - if (error != 0) { - this.setIserror(true); - message = "有报警"; - } message = ""; Instruction instruction = null; List toInstructions; diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/ItemProtocol.java index ffb4cde15..f39c57e1b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/green_foil_machine_button/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.green_foil_machine_button; +import cn.hutool.core.util.ObjectUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -44,9 +45,15 @@ public class ItemProtocol { } ; Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isNull(value)){ + isError = true; + }else if (item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { 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 7cf2fa7f2..37a13ee64 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 @@ -71,6 +71,7 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem public int last_action = 0; public int last_error = 0; public String last_task = ""; + public String message = ""; Boolean isonline = true; @@ -95,7 +96,6 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem @Override public void execute() { - String message = null; device_code = this.getDeviceCode(); heartbeat = itemProtocol.getItem_heartbeat(); mode = itemProtocol.getItem_mode(); @@ -103,6 +103,15 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem task = itemProtocol.getItem_task(); error = itemProtocol.getItem_error(); action = itemProtocol.getItem_action(); + iserror = itemProtocol.isError; + + if(mode == 0){ + message = "未联机"; + }else if (error > 0){ + message = "有报警"; + }else { + message = ""; + } } @@ -155,6 +164,9 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem @Override public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); + if(error == 0 && iserror){ + message = "信号连接异常!"; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode ==2 ? "待机": "脱机"); jo.put("action", action == 1 ? "允许取放": "不允许取放"); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/ItemProtocol.java index 59ec84678..282ef44e2 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_conveyor/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -75,9 +76,15 @@ public class ItemProtocol { Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isNull(value)){ + isError = true; + }else if (item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { 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 a65a8b957..14b202c3e 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 @@ -156,6 +156,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple currentB = this.itemProtocol.getItem_currentB(); currentC = this.itemProtocol.getItem_currentC(); to_temperature = this.itemProtocol.getItem_to_temperature(); + iserror = this.itemProtocol.isError; + if (door != last_door) { logServer.deviceExecuteLog(this.device_code, "", "", "信号door:" + last_door + "->" + door); } @@ -266,7 +268,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple Map itemMap = new HashMap(); itemMap.put(to_param, Integer.parseInt(value)); - this.control(itemMap); + try { + this.checkcontrol(itemMap); + } catch (Exception e) { + e.printStackTrace(); + } logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value); } @@ -301,6 +307,9 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple move = "有托盘有货"; jo.put("hasGoods", true); } + if(error == 0 && iserror){ + message = "信号连接异常!"; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("temperature", temperature); jo.put("finish", finish); @@ -314,9 +323,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple jo.put("mode", mode); jo.put("move", move); jo.put("action", action); -// jo.put("isOnline", this.getIsonline()); -// jo.put("error", this.getError()); -// jo.put("isError", this.getIserror()); + jo.put("message", message); jo.put("task", this.getTask()); return jo; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/ItemProtocol.java index ab12aae7a..0daa2b19b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/hongxiang_device/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.hongxiang_device; +import cn.hutool.core.util.ObjectUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -123,9 +124,15 @@ public class ItemProtocol { } ; Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isEmpty(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/InflatableShaftLibraryDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/InflatableShaftLibraryDeviceDriver.java index 655b06db5..dd5060edd 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/InflatableShaftLibraryDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/InflatableShaftLibraryDeviceDriver.java @@ -104,6 +104,9 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver error = this.itemProtocol.getItem_error(); qty = this.itemProtocol.getItem_qty(); type = this.itemProtocol.getItem_type(); + iserror = this.itemProtocol.isError; + + if (mode != last_mode) { requireSucess = false; logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode)); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/ItemProtocol.java index 216ec59ab..d628151a1 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/inflatable_shaft_library/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.inflatable_shaft_library; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -51,9 +52,15 @@ public class ItemProtocol { Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtils.isNull(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java index 311cf9a33..e92e52b6b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.manipulator_agv_station; +import cn.hutool.core.util.ObjectUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -33,9 +34,15 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isEmpty(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { 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 ea0fcff4b..278666f39 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 @@ -58,10 +58,14 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i private Date instruction_apply_time = new Date(); private int instruction_require_time_out = 3000; - //工作模式 + /** + * 工作模式 + */ int mode = 0; int last_mode = 0; - //动作信号 + /** + * 动作信号 + */ int action = 0; int last_action = 0; int heartbeat = 0; @@ -71,6 +75,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i int to_command = 0; int last_to_command = 0; + String message = ""; Boolean isonline = true; @@ -95,11 +100,14 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i @Override public void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getItem_mode(); + heartbeat = this.itemProtocol.getItem_heartbeat(); action = this.itemProtocol.getItem_action(); + iserror = this.itemProtocol.isError; + + if (mode != last_mode) { this.setRequireSucess(false); if (mode == 2) { @@ -178,6 +186,9 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i JSONObject jo = new JSONObject(); String mode = ""; String action = ""; + if(iserror){ + message = "信号连接异常!"; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", "联机"); jo.put("action", action); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/ItemProtocol.java index 0866f40b6..a3ce60cd0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/oven_manipulator/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.oven_manipulator; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -99,9 +100,15 @@ public class ItemProtocol { Boolean isonline; + Boolean device_status; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isEmpty(value)){ + device_status = true; + }else if(item_heartbeat.equals(protocol)){ + device_status = false; + } if (value == null) { // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); setIsonline(false); 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 4e91855aa..0f372949e 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 @@ -40,6 +40,8 @@ import org.nl.acs.task.service.dto.TaskDto; import org.nl.common.exception.BadRequestException; import org.nl.config.SpringContextHolder; import org.nl.config.language.LangProcess; +import org.nl.config.lucene.service.LuceneExecuteLogService; +import org.nl.config.lucene.service.dto.LuceneLogDto; import org.springframework.beans.factory.annotation.Autowired; import java.util.*; @@ -70,6 +72,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); @Autowired private LimitRegionalService limitRegionalService=SpringContextHolder.getBean(LimitRegionalService.class); + @Autowired + LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class); //工作模式 int mode = 0; @@ -156,7 +160,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i @Override public void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); @@ -172,6 +175,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i to_onset = this.itemProtocol.getTo_onset(); x_position = this.itemProtocol.getX_position(); y_position = this.itemProtocol.getY_position(); + iserror = this.itemProtocol.device_status; if (to_onset != last_to_onset) { logServer.deviceExecuteLog(this.device_code, "", "", "信号to_onset:" + last_to_onset + "->" + to_onset); @@ -578,7 +582,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i instructionService.create(instdto); } catch (Exception e) { notCreateInstMessage = e.getMessage(); - logServer.deviceExecuteLog(this.getDevice_code(), "", "", "创建指令时出现异常:" + e.getMessage()); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("创建指令时出现异常:" + e.getMessage()) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); return false; } //创建指令后修改任务状态 @@ -590,19 +598,32 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i Device nextDevice = deviceAppService.findDeviceByCode(instdto.getNext_device_code()); if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { notCreateInstMessage = "设备:" + startDevice.getDevice_code() + "未设置电气调度号!"; - logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content(notCreateInstMessage) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!"); } if (ObjectUtil.isEmpty(nextDevice.getExtraValue().get("address"))) { notCreateInstMessage = "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"; - logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content(notCreateInstMessage) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!"); } String start_addr = startDevice.getExtraValue().get("address").toString(); String next_addr = nextDevice.getExtraValue().get("address").toString(); - logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:" + String msg = "当前设备:" + device_code + ",下发指令:" + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() - + ",指令终点:" + instdto.getNext_device_code()); + + ",指令终点:" + instdto.getNext_device_code(); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content(msg) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); List list = new ArrayList<>(); Map map = new HashMap(); map.put("code", "to_onset"); @@ -742,8 +763,12 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } catch (Exception e) { isClose = true; - logServer.deviceExecuteLog(this.getDevice_code(), "", "", "检查烘箱是否关门时出现异常:" + e.getMessage()); notCreateInstMessage = "检查烘箱是否关门时出现异常:" + e.getMessage(); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content(notCreateInstMessage) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); } return isClose; } @@ -784,7 +809,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i int move = hongXiangConveyorDeviceDriver.getMove(); if (mode == 1 && door == 1 && action == 1 && error1 == 0 && move == 1) { if (this.getNow_steps_type() == 2) { - this.writing("to_command", "2"); + ArrayList list = new ArrayList(); + Map map = new HashMap(); + map.put("to_command", "2"); + list.add(map); + this.writing(list); this.setNow_steps_type(3); } } else { @@ -809,7 +838,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } } else { if (this.getNow_steps_type() == 2) { - this.writing("to_command", "2"); + ArrayList list = new ArrayList(); + Map map = new HashMap(); + map.put("to_command", "2"); + list.add(map); + this.writing(list); this.setNow_steps_type(3); } } @@ -844,7 +877,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i hongXiangConveyorDeviceDriver.writing("to_close_door", "1"); } if (this.getNow_steps_type() == 3) { - this.writing("to_command", "3"); + ArrayList list = new ArrayList(); + Map map = new HashMap(); + map.put("to_command", "3"); + list.add(map); + this.writing(list); this.setNow_steps_type(4); } } @@ -966,7 +1003,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } if (lampDevice.getDeviceDriver() instanceof LampThreecolorDeviceDriver) { lampThreecolorDeviceDriver = (LampThreecolorDeviceDriver) lampDevice.getDeviceDriver(); - logServer.deviceExecuteLog(lampDevice.getDeviceDriver().getDeviceCode(), "", "", "下发报警灯" + lamp + "报警信号"); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(lampDevice.getDeviceDriver().getDeviceCode()) + .content("下发报警灯" + lamp + "报警信号") + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); lampThreecolorDeviceDriver.writing("to_command", "1"); } } @@ -1017,24 +1058,24 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i 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 = "复位"; + String requireSucess = LangProcess.msg("mark"); if (this.requireSucess) { - requireSucess = "未复位"; + requireSucess = LangProcess.msg("no_mark"); } jo.put("requireSucess", requireSucess); if (this.getAction() == 1) { @@ -1046,7 +1087,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i } else if (this.getAction() == 4) { action = "放货完成"; } - + if(error == 0 && iserror){ + this.setMessage(LangProcess.msg("universal_message4")); + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); @@ -1085,7 +1128,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i Map itemMap = new HashMap(); itemMap.put(to_param, Integer.parseInt(value)); - this.control(itemMap); + try { + this.checkcontrol(itemMap); + } catch (Exception e) { + e.printStackTrace(); + try { + this.checkcontrol(itemMap); + } catch (Exception e1) { + e1.printStackTrace(); + } + } logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value); } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/ItemProtocol.java index 87e2188a2..411ada24f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/plug_pull_device_site/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.plug_pull_device_site; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -122,10 +123,17 @@ public class ItemProtocol { public int getTo_location() { return this.getOpcIntegerValue(item_to_location); } + Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtils.isNull(value)){ + isError = true; + }else if (item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { 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 53d0f07db..4ff008f2d 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 @@ -26,6 +26,7 @@ import org.nl.acs.monitor.DeviceStageMonitor; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; +import org.nl.config.language.LangProcess; import org.nl.system.service.param.ISysParamService; import org.nl.config.SpringContextHolder; import org.springframework.beans.factory.annotation.Autowired; @@ -152,7 +153,6 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl @Override public void execute() { - String message = null; device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); move = this.itemProtocol.getMove(); @@ -538,12 +538,16 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl move = "有托盘有货"; jo.put("hasGoods", true); } + if(this.itemProtocol.getIsError() && error == 0){ + this.setMessage(LangProcess.msg("universal_message4")); + } 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()); + jo.put("message", this.getMessage()); return jo; } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/ItemProtocol.java index 9c800791e..4203afac0 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_head_manipulator/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.pull_head_manipulator; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -141,11 +142,16 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isEmpty(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { - // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); setIsonline(false); } else { setIsonline(true); 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 62f675772..fe015c5cd 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 @@ -173,7 +173,6 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp @Override public void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); @@ -600,7 +599,12 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp } else if (this.getAction() == 4) { action = "放货完成"; } - + if(error == 0 && this.itemProtocol.isError){ + message = "信号连接异常!"; + iserror = true; + }else if(error == 0 && !this.itemProtocol.isError){ + iserror = false; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/ItemProtocol.java index b900f3ac5..9ded71d24 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.pull_tail_manipulator; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -104,11 +105,16 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isEmpty(value)){ + isError = true; + }else if (item_heartbeat.equals(protocol)) { + isError = false; + } if (value == null) { - // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); setIsonline(false); } else { setIsonline(true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/PullTailManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/PullTailManipulatorDeviceDriver.java index 211236ed1..6e25c552d 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/PullTailManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/pull_tail_manipulator/PullTailManipulatorDeviceDriver.java @@ -152,7 +152,6 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp @Override public void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); @@ -602,7 +601,12 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp } else if (this.getAction() == 4) { action = "放货完成"; } - + if(error == 0 && this.itemProtocol.isError){ + message = "信号连接异常!"; + iserror = true; + }else if(error == 0 && !this.itemProtocol.isError){ + iserror = false; + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java index 795ad82ee..69d68550f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java @@ -1,6 +1,7 @@ package org.nl.acs.device_driver.two_conveyor.slit_two_manipulator; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -116,11 +117,16 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtils.isNull(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { - // log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!"); setIsonline(false); } else { setIsonline(true); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index f8dc71607..ba6e847f8 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -29,6 +29,7 @@ import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.common.exception.BadRequestException; import org.nl.config.SpringContextHolder; +import org.nl.config.language.LangProcess; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -147,7 +148,6 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl @Override public synchronized void execute() { - String message = null; try { device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); @@ -193,6 +193,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl } else { this.setIsonline(true); this.setIserror(false); + message = "运行中"; switch (mode) { case 1: log.debug("设备运转模式:等待工作"); @@ -709,8 +710,15 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl if (this.requireSucess) { requireSucess = CommonFinalParam.ONE; } + if(error == 0){ + if(this.itemProtocol.isError){ + this.setMessage(LangProcess.msg("universal_message4")); + iserror = true; + }else{ + iserror = false; + } + } jo.put("requireSucess", requireSucess); - jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move_1", move_1); @@ -723,6 +731,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl jo.put("isError", this.getIserror()); jo.put("is_disable1", this.getIs_disable()); jo.put("is_disable", is_disable); + jo.put("message", message); jo.put("is_click", true); jo.put("driver_type", "slit_two_manipulator"); jo.put("notCreateTaskMessage", notCreateTaskMessage); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/ItemProtocol.java index ddd9a1fb3..02954835b 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/ItemProtocol.java @@ -1,6 +1,7 @@ package org.nl.acs.device_driver.two_conveyor.sub_roll_conveyor_site; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -78,9 +79,15 @@ public class ItemProtocol { } Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtils.isNull(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java index 613bb3d05..5827cff73 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/sub_roll_conveyor_site/SubRollConveyorSiteDeviceDriver.java @@ -123,7 +123,6 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp @Override public void execute() { - String message = null; device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); move = this.itemProtocol.getMove(); @@ -241,6 +240,14 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp move = "有货"; jo.put("hasGoods", true); } + if(error == 0){ + if(this.itemProtocol.isError){ + iserror = true; + message = "信号连接异常!"; + }else{ + iserror = false; + } + } jo.put("device_name", this.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/subvolume_weighing_station/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/subvolume_weighing_station/ItemProtocol.java index 6ef3cec36..f141c6a55 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/subvolume_weighing_station/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/subvolume_weighing_station/ItemProtocol.java @@ -1,5 +1,6 @@ package org.nl.acs.device_driver.two_conveyor.subvolume_weighing_station; +import cn.hutool.core.util.ObjectUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; @@ -48,9 +49,15 @@ public class ItemProtocol { } ; Boolean isonline; + Boolean isError; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); + if(ObjectUtil.isNull(value)){ + isError = true; + }else if(item_heartbeat.equals(protocol)){ + isError = false; + } if (value == null) { setIsonline(false); } else { 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 51dd975b5..18119109c 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 @@ -32,7 +32,9 @@ import org.nl.acs.device.service.DeviceService; import org.nl.acs.device.service.impl.DeviceServiceImpl; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.DeviceDriverDefination; +import org.nl.acs.device_driver.conveyor.belt_conveyor.BeltConveyorDeviceDriver; import org.nl.acs.device_driver.conveyor.siemens_conveyor.SiemensConveyorDeviceDriver; +import org.nl.acs.device_driver.conveyor.standard_conveyor_control.StandardCoveyorControlDeviceDriver; import org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver; import org.nl.acs.device_driver.conveyor.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver; @@ -343,12 +345,19 @@ public class InstructionServiceImpl extends CommonServiceImpl wrapper = new LambdaQueryWrapper<>(); + /*LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(InstructionMybatis::getTask_id, id); wrapper.apply(StringUtils.isNotBlank(wherecaluse), wherecaluse); InstructionMybatis ins = instructionMapper.selectOne(wrapper); if (ObjectUtil.isNotEmpty(ins)) { return ConvertUtil.convert(ins, Instruction.class); + }*/ + if(instructions.size() > 0){ + List collect = instructions.stream().filter(instruction -> instruction.getTask_id().equals(id) + && Integer.parseInt(instruction.getInstruction_status()) < 2).collect(Collectors.toList()); + if(collect.size() > 0){ + return collect.get(0); + } } return null; } @@ -358,7 +367,9 @@ public class InstructionServiceImpl extends CommonServiceImpl list1 = Arrays.asList(array); + for (String s : list1) { + if (s.equals(next_device_code)) { + nextRegionalExit = false; + } + } + } + String start_exclude_device = limitRegionalDtos.getStart_exclude_device(); + if (StrUtil.isNotEmpty(start_exclude_device)) { + String content = start_exclude_device.substring(1, start_exclude_device.length() - 1); + boolean contains = content.contains(","); + String[] array = contains ? content.split(",") : new String[]{content}; + List list1 = Arrays.asList(array); + for (String s : list1) { + if (s.equals(start_device_code)) { + startRegionalExit = false; + } + } + } + } + if (ObjectUtil.isNotEmpty(limitRegionalDtos) && (startRegionalExit || nextRegionalExit)) { + List instructiones = instructions.stream().filter(instruction -> Integer.parseInt(instruction.getInstruction_status()) <= 1).collect(Collectors.toList()); + for (Instruction instructionMybati : instructiones) { + Device startDevice = deviceAppService.findDeviceByCode(instructionMybati.getStart_device_code()); + Device nextDevice = deviceAppService.findDeviceByCode(instructionMybati.getNext_device_code()); + if ((StrUtil.isNotEmpty(startDevice.getRegion()) ? startDevice.getRegion() : "0").equals(startRegion) && (StrUtil.isNotEmpty(nextDevice.getRegion()) ? nextDevice.getRegion() : "0").equals(nextRegion)) { + String start_exclude_device = limitRegionalDtos.getStart_exclude_device(); + if (StrUtil.isNotEmpty(start_exclude_device)) { + String content = start_exclude_device.substring(1, start_exclude_device.length() - 1); + boolean contains = content.contains(","); + String[] array = contains ? content.split(",") : new String[]{content}; + List list1 = Arrays.asList(array); + for (String s : list1) { + if (s.equals(instructionMybati.getStart_device_code())) { + startRegionalExit = false; + } + } + } + String next_exclude_device = limitRegionalDtos.getNext_exclude_device(); + if (StrUtil.isNotEmpty(next_exclude_device)) { + String content = next_exclude_device.substring(1, next_exclude_device.length() - 1); + boolean contains = content.contains(","); + String[] array = contains ? content.split(",") : new String[]{content}; + List list2 = Arrays.asList(array); + for (String s : list2) { + if (s.equals(instructionMybati.getNext_device_code())) { + nextRegionalExit = false; + } + } + } + if (startRegionalExit || nextRegionalExit) { + ++count; + } + if (count >= Integer.parseInt(limitRegionalDtos.getMax_num())) { + log.info("同区域指令数量过多,等待指令完成再此创建"); + return true; + } + } + } + } + return false; + } + } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index ae89af9f0..b145d827f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -199,9 +199,12 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC if (true) { this.logItemChanged(itemId, accessor_value, value, itemDto); } - if(!ObjectUtil.isEmpty(value)){ + if(!ObjectUtil.isEmpty(value) || "".equals(value)){ accessor_value.setValue(itemId, value); } + if(ObjectUtil.isEmpty(value) && !"".equals(value)){ + accessor_value.removeValue(itemId); + } } } diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/UnifiedDataAccessor.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/UnifiedDataAccessor.java index a23fcabb6..0a8d2ac23 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/UnifiedDataAccessor.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/UnifiedDataAccessor.java @@ -29,6 +29,12 @@ public interface UnifiedDataAccessor { */ void setValue(String key, Object value); + /** + * 删除值 + * @param key + */ + void removeValue(String key); + /** * 获取统一数据 * diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/service/impl/UnifiedDataAccessorImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/service/impl/UnifiedDataAccessorImpl.java index 02680aeea..c81010579 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/service/impl/UnifiedDataAccessorImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/udw/service/impl/UnifiedDataAccessorImpl.java @@ -39,6 +39,11 @@ public class UnifiedDataAccessorImpl implements UnifiedDataAccessor { this.unifiedDataAppService.setValue(this.unified_key, key, value); } + @Override + public void removeValue( String key) { + this.unifiedDataAppService.removeValue(this.unified_key, key); + } + @Override public void setValueWithPersistence(String key, Object value) { this.unifiedDataAppService.setValueWithPersistence(this.unified_key, key, value); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java index a9ee25479..ff3214b61 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/task/AutoCreateInst.java @@ -25,6 +25,9 @@ import org.nl.acs.task.enums.TaskTypeEnum; import org.nl.acs.task.service.TaskService; import org.nl.acs.task.service.dto.TaskDto; import org.nl.config.SpringContextHolder; +import org.nl.config.lucene.service.LuceneExecuteLogService; +import org.nl.config.lucene.service.dto.LuceneLogDto; +import org.nl.config.lucene.service.impl.LuceneExecuteLogServiceImpl; import org.springframework.stereotype.Component; import java.util.Arrays; @@ -47,6 +50,7 @@ public class AutoCreateInst { RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); LimitRegionalService limitRegionalService = SpringContextHolder.getBean(LimitRegionalService.class); + LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogServiceImpl.class); List list = taskserver.queryAllByStatus("0"); for (int i = 0; i < list.size(); i++) { TaskDto acsTask = list.get(i); @@ -96,7 +100,7 @@ public class AutoCreateInst { continue; } - if (!StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE)) { + if (!StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && !StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.TWO)) { continue; } @@ -182,86 +186,16 @@ public class AutoCreateInst { } else { instdto.setAgv_inst_type("4"); } - Device startdevice = appService.findDeviceByCode(start_device_code); - Device nextdevice = appService.findDeviceByCode(next_device_code); - String startRegion = startdevice.getRegion(); - String nextRegion = nextdevice.getRegion(); - int count = 0; - boolean startRegionalExit = true; - boolean nextRegionalExit = true; - //控制指令生成 - LimitRegionalDto limitRegionalDtos = limitRegionalService.selectByReging(startRegion, nextRegion); - if (ObjectUtil.isNotEmpty(limitRegionalDtos)) { - String next_exclude_device = limitRegionalDtos.getNext_exclude_device(); - if (StrUtil.isNotEmpty(next_exclude_device)) { - String content = next_exclude_device.substring(1, next_exclude_device.length() - 1); - boolean contains = content.contains(","); - String[] array = contains ? content.split(",") : new String[]{content}; - List list1 = Arrays.asList(array); - for (String s : list1) { - if (s.equals(next_device_code)) { - nextRegionalExit = false; - } - } - } - String start_exclude_device = limitRegionalDtos.getStart_exclude_device(); - if (StrUtil.isNotEmpty(start_exclude_device)) { - String content = start_exclude_device.substring(1, start_exclude_device.length() - 1); - boolean contains = content.contains(","); - String[] array = contains ? content.split(",") : new String[]{content}; - List list1 = Arrays.asList(array); - for (String s : list1) { - if (s.equals(start_device_code)) { - startRegionalExit = false; - } - } - } - } - if (ObjectUtil.isNotEmpty(limitRegionalDtos) && (startRegionalExit || nextRegionalExit)) { - List instructionMybatis = instructionService.list(Wrappers.lambdaQuery(InstructionMybatis.class).le(InstructionMybatis::getInstruction_status, 1)); - for (InstructionMybatis instructionMybati : instructionMybatis) { - Device startDevice = appService.findDeviceByCode(instructionMybati.getStart_device_code()); - Device nextDevice = appService.findDeviceByCode(instructionMybati.getNext_device_code()); - if ((StrUtil.isNotEmpty(startDevice.getRegion()) ? startDevice.getRegion() : "0").equals(startRegion) && (StrUtil.isNotEmpty(nextDevice.getRegion()) ? nextDevice.getRegion() : "0").equals(nextRegion)) { - String start_exclude_device = limitRegionalDtos.getStart_exclude_device(); - if (StrUtil.isNotEmpty(start_exclude_device)) { - String content = start_exclude_device.substring(1, start_exclude_device.length() - 1); - boolean contains = content.contains(","); - String[] array = contains ? content.split(",") : new String[]{content}; - List list1 = Arrays.asList(array); - for (String s : list1) { - if (s.equals(instructionMybati.getStart_device_code())) { - startRegionalExit = false; - } - } - } - String next_exclude_device = limitRegionalDtos.getNext_exclude_device(); - if (StrUtil.isNotEmpty(next_exclude_device)) { - String content = next_exclude_device.substring(1, next_exclude_device.length() - 1); - boolean contains = content.contains(","); - String[] array = contains ? content.split(",") : new String[]{content}; - List list2 = Arrays.asList(array); - for (String s : list2) { - if (s.equals(instructionMybati.getNext_device_code())) { - nextRegionalExit = false; - } - } - } - if (startRegionalExit || nextRegionalExit) { - ++count; - } - if (count >= Integer.parseInt(limitRegionalDtos.getMax_num())) { - log.info("同区域指令数量过多,等待指令完成再此创建"); - return; - } - } - } - } try { instructionService.create(instdto); } catch (Exception e) { acsTask.setRemark(e.getMessage()); taskserver.updateByCodeFromCache(acsTask); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code("定时创建指令失败") + .content(e.getMessage()) + .build(); + luceneExecuteLogService.deviceExecuteLog(logDto); continue; } //创建指令后修改任务状态 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties index 6982895a1..32dc800b5 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties @@ -25,3 +25,4 @@ error_sysFile=\u4E0A\u4F20\u5931\u8D25 error_sysLimit=\u8BBF\u95EE\u6B21\u6570\u9650\u5236\! zh_device_name_isNotNull = \u4E2D\u6587\u8BBE\u5907\u540D\u79F0\u4E0D\u80FD\u4F4D\u7A7A error_not_configured=\u5B57\u5178\u8868\u672A\u914D\u7F6E\u5BF9\u5E94\u7684\u62A5\u8B66\u4FE1\u606F +error_regional_max=区域指令数量已最大值 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties index a22a6cc7a..eb836df8a 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties @@ -25,4 +25,5 @@ error_sysFile=Upload failed error_sysLimit=Access limit\! zh_device_name_isNotNull = Chinese device name cannot be empty\! error_not_configured=The dictionary table is not configured with alarm information +error_regional_max=Maximum limit for regional instructions reached diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties index 6daa5f40d..68a7713bb 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties @@ -25,3 +25,4 @@ error_sysFile=Upload gagal error_sysLimit=Batas akses\! zh_device_name_isNotNull= Nama perangkat dalam bahasa Cina tidak boleh kosong! error_not_configured=Informasi alarm tak dikonfigurasi dari tabel kamus +error_regional_max=Jumlah maksimum instruksi wilayah telah tercapai diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties index 98d52613e..34a35dfab 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties @@ -25,4 +25,5 @@ error_sysFile=\u4E0A\u4F20\u5931\u8D25 error_sysLimit=\u8BBF\u95EE\u6B21\u6570\u9650\u5236\! zh_device_name_isNotNull = \u4E2D\u6587\u8BBE\u5907\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A error_not_configured=\u5B57\u5178\u8868\u672A\u914D\u7F6E\u5BF9\u5E94\u7684\u62A5\u8B66\u4FE1\u606F +error_regional_max=区域指令数量已最大值 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties index c6d273580..0eff68e58 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device.properties @@ -18,11 +18,14 @@ universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\ universal_message1=\u653E\u8D27\u5B8C\u6210 universal_message2=\u653E\u8D27\u5931\u8D25 universal_message3=\u6709\u62A5\u8B66 +universal_message4=信号连接异常! 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 universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0 universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B +mark=复位 +no_mark=未复位 diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties index 9d34a9d14..53f71e2bc 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_en_US.properties @@ -18,8 +18,11 @@ universal_notCreateInstMessage=Instructions cannot be created because the task f universal_message1=Release completed universal_message2=Delivery failure universal_message3=Have an alarm +universal_message4=Signal connection 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 universal_feedMessage4=The current report task number (task) should not be 0 universal_feedMessage5=Gantry manipulator +mark=Reset +no_mark=Unreset diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties index 73b7941ac..cb7bb07c4 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_in_ID.properties @@ -18,8 +18,11 @@ universal_notCreateInstMessage=Misi untuk divais yang diasosiasikan tidak ditemu universal_message1=Pengiriman selesai universal_message2=Gagal memasukkan barang universal_message3=Alarm berbunyi +universal_message4=Koneksi sinyal abnormal universal_feedMessage1=Mode kerja tidak untuk mode dalam mode universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan universal_feedMessage3=tidak ada status pengiriman universal_feedMessage4=Tugaskan tugaskan tugaskan bukan hanya 0 universal_feedMessage5=Pengemudi-mekanik line +mark=Setel ulang +no_mark=Belum diatur ulang \ No newline at end of file diff --git a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties index 28932b552..96e88c8ed 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties +++ b/acs2/nladmin-system/nlsso-server/src/main/resources/language/monitor/two_device/two_device_zh_CN.properties @@ -18,8 +18,11 @@ universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\ universal_message1=\u653E\u8D27\u5B8C\u6210 universal_message2=\u653E\u8D27\u5931\u8D25 universal_message3=\u6709\u62A5\u8B66 +universal_message4=信号连接异常! 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 universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0 universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B +mark=复位 +no_mark=未复位 \ No newline at end of file diff --git a/acs2/nladmin-ui/src/main.js b/acs2/nladmin-ui/src/main.js index 8bce37da6..5082efe16 100644 --- a/acs2/nladmin-ui/src/main.js +++ b/acs2/nladmin-ui/src/main.js @@ -9,7 +9,6 @@ import 'font-awesome/css/font-awesome.css' import mavonEditor from 'mavon-editor' import 'mavon-editor/dist/css/index.css' - import VueParticles from 'vue-particles' Vue.use(VueParticles) diff --git a/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue b/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue index fd453cf2a..f1f06f7a2 100644 --- a/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue +++ b/acs2/nladmin-ui/src/views/acs/device/customPolicy/task/index.vue @@ -135,7 +135,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, cruds() { @@ -164,9 +164,9 @@ export default { created() { deviceCrud.selectDeviceList().then(data => { this.deviceList = data - }), + }) selectById(this.id).then(data => { - if (data != null && data != '') { + if (data != null && data !== '') { console.log(data) this.modeform = data } diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue b/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue index cac7f55ae..db13247a3 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue @@ -48,7 +48,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue b/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue index 013bc2530..867afadd0 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue @@ -46,7 +46,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv.vue b/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv.vue index 26832e498..eba503a24 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv.vue @@ -229,7 +229,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv_car.vue b/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv_car.vue index e076de3cb..3faf772e7 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv_car.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/agv/xg_agv_car.vue @@ -229,7 +229,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/belt_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/belt_conveyor.vue index e32572432..b0e4cb7a0 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/belt_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/belt_conveyor.vue @@ -41,7 +41,26 @@ + + +
+ 指令相关: +
+ + + + + + + + + + + + + +
@@ -226,7 +245,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/blank_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/blank_manipulator.vue index 121bc7c17..3d8673aae 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/blank_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/blank_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/blanking_button.vue b/acs2/nladmin-ui/src/views/acs/device/driver/blanking_button.vue index 893de4515..ebe3adaee 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/blanking_button.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/blanking_button.vue @@ -234,7 +234,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator.vue index f36f1c5d0..1305885dc 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator_site.vue index ff3604575..e587dd7a1 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/box_manipulator_site.vue @@ -71,12 +71,12 @@ - + - + @@ -332,7 +332,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/box_palletizing_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/box_palletizing_manipulator.vue index 07e38c9c2..a72560a99 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/box_palletizing_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/box_palletizing_manipulator.vue @@ -72,12 +72,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -309,7 +310,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -391,7 +392,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -418,7 +419,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/conveyor_with_scanner_weight.vue b/acs2/nladmin-ui/src/views/acs/device/driver/conveyor_with_scanner_weight.vue index 6079e15ee..d32028d13 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/conveyor_with_scanner_weight.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/conveyor_with_scanner_weight.vue @@ -71,12 +71,12 @@ - + - + @@ -332,7 +332,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/double_belt_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/double_belt_conveyor.vue index 7cacccd2d..b0c03948d 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/double_belt_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/double_belt_conveyor.vue @@ -71,12 +71,12 @@ - + - + @@ -307,7 +307,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/double_station_stacker.vue b/acs2/nladmin-ui/src/views/acs/device/driver/double_station_stacker.vue index 1968e0606..b5dc5350e 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/double_station_stacker.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/double_station_stacker.vue @@ -300,7 +300,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/dry_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/dry_manipulator.vue index 237eb1887..7c5c1d480 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/dry_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/dry_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/fold_disc_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/fold_disc_site.vue index 95bbb02db..2a001b343 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/fold_disc_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/fold_disc_site.vue @@ -71,12 +71,12 @@ - + - + @@ -332,7 +332,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/green_foil_machine_button.vue b/acs2/nladmin-ui/src/views/acs/device/driver/green_foil_machine_button.vue index 0240c985e..286c73169 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/green_foil_machine_button.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/green_foil_machine_button.vue @@ -234,7 +234,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_conveyor.vue index e0d20f8f3..4879f3fe2 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_conveyor.vue @@ -72,12 +72,12 @@ - + - + @@ -280,7 +280,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_device.vue b/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_device.vue index fa786110e..1c2833a3b 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_device.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/hongxiang_device.vue @@ -71,12 +71,12 @@ - + - + @@ -279,7 +279,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/inflatable_shaft_library.vue b/acs2/nladmin-ui/src/views/acs/device/driver/inflatable_shaft_library.vue index 883086f09..fd3ce6d36 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/inflatable_shaft_library.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/inflatable_shaft_library.vue @@ -71,12 +71,12 @@ - + - + @@ -328,7 +328,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue b/acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue index bdb907919..928452a1b 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue @@ -155,7 +155,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/led_screen.vue b/acs2/nladmin-ui/src/views/acs/device/driver/led_screen.vue index 58ab2ec70..5cc1911d3 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/led_screen.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/led_screen.vue @@ -124,7 +124,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -206,7 +206,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -233,7 +233,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue b/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue index b807fccae..08d9e2a80 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/manipulator_agv_station.vue @@ -71,12 +71,12 @@ - + - + @@ -286,7 +286,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_storage_out_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_storage_out_conveyor.vue index e8bfe122a..5daf09eb1 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_storage_out_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_storage_out_conveyor.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_subvolumes_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_subvolumes_conveyor.vue index bfdf4068b..aca9143b6 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_subvolumes_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/box_subvolumes_conveyor.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/finished_product_out_with_bind_lable_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/finished_product_out_with_bind_lable_conveyor.vue index 7889a3857..553682284 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/finished_product_out_with_bind_lable_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/finished_product_out_with_bind_lable_conveyor.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/fold_disc_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/fold_disc_site.vue index c260bab39..8c0e12a53 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/fold_disc_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/fold_disc_site.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/scanner_weight_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/scanner_weight_conveyor.vue index d0ea367fa..2c27a75d4 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/scanner_weight_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/scanner_weight_conveyor.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/un_box_lable_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/un_box_lable_conveyor.vue index e30c0855e..41eeb16ea 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/un_box_lable_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_conveyor/un_box_lable_conveyor.vue @@ -226,7 +226,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_package_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_package_manipulator.vue index e4cb04567..4efbc0d99 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_package_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_package_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_storage_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_storage_manipulator.vue index 98b0b2fcf..d4e96c7a7 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_storage_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/box_storage_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/return_good_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/return_good_manipulator.vue index eead42460..f26fb8e84 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/return_good_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/return_good_manipulator.vue @@ -53,6 +53,7 @@ > @@ -107,12 +108,12 @@ - + - + @@ -185,6 +186,7 @@ > @@ -353,7 +355,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -435,7 +437,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -462,7 +464,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/trapped_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/trapped_manipulator.vue index d9df1cab2..db887d2d1 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/trapped_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/trapped_manipulator.vue @@ -53,6 +53,7 @@ > @@ -107,12 +108,12 @@ - + - + @@ -185,6 +186,7 @@ > @@ -353,7 +355,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -435,7 +437,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -462,7 +464,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/volume_two_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/volume_two_manipulator.vue index a2d26dd1f..167c83e0a 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/volume_two_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/one_manipulator/volume_two_manipulator.vue @@ -53,6 +53,7 @@ > @@ -107,12 +108,12 @@ - + - + @@ -185,6 +186,7 @@ > @@ -353,7 +355,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -435,7 +437,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -462,7 +464,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/oven_inspect_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/oven_inspect_site.vue index 3a9f75126..1353236c0 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/oven_inspect_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/oven_inspect_site.vue @@ -71,12 +71,12 @@ - + - + @@ -271,7 +271,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/oven_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/oven_manipulator.vue index d988d3c15..8915ddb77 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/oven_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/oven_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/paper_tube_conveyor2.vue b/acs2/nladmin-ui/src/views/acs/device/driver/paper_tube_conveyor2.vue index 032907b97..2b5a43956 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/paper_tube_conveyor2.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/paper_tube_conveyor2.vue @@ -71,12 +71,12 @@ - + - + @@ -279,7 +279,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue index 01f79dc7d..fc785055a 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/plug_pull_device_site.vue @@ -72,12 +72,12 @@ - + - + @@ -280,7 +280,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/pull_head_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/pull_head_manipulator.vue index b11589321..c00571a16 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/pull_head_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/pull_head_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/pull_tail_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/pull_tail_manipulator.vue index 2281bea74..30e74840c 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/pull_tail_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/pull_tail_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/rgv.vue b/acs2/nladmin-ui/src/views/acs/device/driver/rgv.vue index 5b8e3a10b..b2c75978e 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/rgv.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/rgv.vue @@ -71,12 +71,12 @@ - + - + @@ -332,7 +332,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor.vue index 7ecfb7dfb..9cd29812f 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor.vue @@ -71,12 +71,12 @@ - + - + @@ -286,7 +286,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_ckk.vue b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_ckk.vue index 54f6fd83a..51abe1869 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_ckk.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_ckk.vue @@ -71,12 +71,12 @@ - + - + @@ -279,7 +279,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_labeling.vue b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_labeling.vue index 98c28fe75..73d16711c 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_labeling.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/siemens_conveyor_labeling.vue @@ -71,12 +71,12 @@ - + - + @@ -279,7 +279,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/slit_two_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/slit_two_manipulator.vue index 3325b736d..bbd428227 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/slit_two_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/slit_two_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_autodoor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_autodoor.vue index 41e2f4695..c1fb0acc9 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_autodoor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_autodoor.vue @@ -170,7 +170,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue index 99611ca56..2d6091a52 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue @@ -71,12 +71,12 @@ - + - + @@ -271,7 +271,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue index 8b0257806..71a00c8ce 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue @@ -71,12 +71,12 @@ - + - + @@ -332,7 +332,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue index 62cd62239..da75d41ee 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue @@ -71,12 +71,12 @@ - + - + @@ -271,7 +271,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue index 2a71c31c7..c421eda4d 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue @@ -71,12 +71,12 @@ - + - + @@ -271,7 +271,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_manipulator.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_manipulator.vue index 89ec131b3..8396fbf13 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_manipulator.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_manipulator.vue @@ -71,12 +71,12 @@ - + - + @@ -149,6 +149,7 @@ > @@ -317,7 +318,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { @@ -399,7 +400,7 @@ export default { debugger const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 @@ -426,7 +427,7 @@ export default { if (data.code.indexOf('to_command') !== -1) { const dbValue = data.db // .之前的字符串 - const beforeStr = dbValue.match(/(\S*)\./)[1] + // const beforeStr = dbValue.match(/(\S*)\./)[1] // .之后的字符串 const afterStr = dbValue.match(/\.(\S*)/)[1] // 取最后数字 diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue index 0cd0926cf..ed4bf0d84 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_ordinary_site.vue @@ -29,12 +29,12 @@ - + - + @@ -156,7 +156,7 @@ export default { // eslint-disable-next-line vue/require-default-prop parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue index 21f4a7f80..4f324e3db 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue @@ -46,7 +46,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_stacker.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_stacker.vue index dbc947e92..2d572d3bb 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_stacker.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_stacker.vue @@ -287,7 +287,7 @@ export default { props: { parentForm: { type: Object, - require: true, + required: true, default: () => ({}) } }, diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_station.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_station.vue index c5a948822..5e97c980c 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_station.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_station.vue @@ -85,12 +85,12 @@ - + - + diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue b/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue index 3b3cd05c4..2b096b4a2 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/standard_storage.vue @@ -96,7 +96,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/subvolume_weighing_station.vue b/acs2/nladmin-ui/src/views/acs/device/driver/subvolume_weighing_station.vue index 4dd5cbf43..450798415 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/subvolume_weighing_station.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/subvolume_weighing_station.vue @@ -234,7 +234,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/waste_foil_weighing_station.vue b/acs2/nladmin-ui/src/views/acs/device/driver/waste_foil_weighing_station.vue index d7c78247b..b26f04df3 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/waste_foil_weighing_station.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/waste_foil_weighing_station.vue @@ -71,12 +71,12 @@ - + - + @@ -328,7 +328,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/driver/with_station_device.vue b/acs2/nladmin-ui/src/views/acs/device/driver/with_station_device.vue index 0f24ecc9e..334a5213d 100644 --- a/acs2/nladmin-ui/src/views/acs/device/driver/with_station_device.vue +++ b/acs2/nladmin-ui/src/views/acs/device/driver/with_station_device.vue @@ -71,12 +71,12 @@ - + - + @@ -328,7 +328,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/device/index.vue b/acs2/nladmin-ui/src/views/acs/device/index.vue index 992c7b57b..47188a1af 100644 --- a/acs2/nladmin-ui/src/views/acs/device/index.vue +++ b/acs2/nladmin-ui/src/views/acs/device/index.vue @@ -254,6 +254,9 @@ export default { ], device_type: [ { required: true, message: '设备类型不能为空', trigger: 'blur' } + ], + region: [ + { required: true, message: '所属区域不能为空', trigger: 'blur' } ] } diff --git a/acs2/nladmin-ui/src/views/acs/protocolConfig/config.vue b/acs2/nladmin-ui/src/views/acs/protocolConfig/config.vue index 23c2721c3..e4da5cf81 100644 --- a/acs2/nladmin-ui/src/views/acs/protocolConfig/config.vue +++ b/acs2/nladmin-ui/src/views/acs/protocolConfig/config.vue @@ -94,7 +94,7 @@ export default { props: { parentForm: { type: Object, - require: true + required: true } }, data() { diff --git a/acs2/nladmin-ui/src/views/acs/route/routeLine/index.vue b/acs2/nladmin-ui/src/views/acs/route/routeLine/index.vue index ed2969a75..149b4a9c2 100644 --- a/acs2/nladmin-ui/src/views/acs/route/routeLine/index.vue +++ b/acs2/nladmin-ui/src/views/acs/route/routeLine/index.vue @@ -66,7 +66,7 @@ diff --git a/acs2/nladmin-ui/src/views/acs/task/index.vue b/acs2/nladmin-ui/src/views/acs/task/index.vue index 01e89d96d..71f32ca3a 100644 --- a/acs2/nladmin-ui/src/views/acs/task/index.vue +++ b/acs2/nladmin-ui/src/views/acs/task/index.vue @@ -689,7 +689,7 @@ export default { to_x2: null, to_y2: null, to_z2: null, - agv_system_type: '1', + agv_system_type: '', interactionJson: null }, extension: [{ diff --git a/acs2/nladmin-ui/src/views/system/logicflow/editor/components/node/html/htmlNode.js b/acs2/nladmin-ui/src/views/system/logicflow/editor/components/node/html/htmlNode.js index 6f84cbcfc..10decf242 100644 --- a/acs2/nladmin-ui/src/views/system/logicflow/editor/components/node/html/htmlNode.js +++ b/acs2/nladmin-ui/src/views/system/logicflow/editor/components/node/html/htmlNode.js @@ -68,8 +68,8 @@ class ButtonNode extends HtmlResize.view {
- +
` el.innerHTML = html