diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java index ac74716..ffc33ff 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java @@ -184,6 +184,20 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements logServer.deviceExecuteLog(this.device_code,"","","信号specifications:" + last_specifications + "->" + specifications); } + if (mode == 2 && move != 0 && task > 0) { + //inst_message + inst = instructionService.findByCodeFromCache(String.valueOf(task)); + if (inst != null) { + if (StrUtil.equals(inst.getInstruction_status(), "1") && StrUtil.equals(this.getDeviceCode(), inst.getNext_device_code())) { + finish_instruction(); + } + if (StrUtil.equals(inst.getInstruction_status(), "0") && StrUtil.equals(this.getDeviceCode(), inst.getStart_device_code())) { + inst.setInstruction_status("1"); + instructionService.update(inst); + } + } + } + } catch (Exception var17) { return; } @@ -662,6 +676,11 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements ReadUtil.write(itemMap, server); } + public synchronized boolean finish_instruction() throws Exception { + instructionService.finish(inst); + return true; + } + public synchronized void OpenOrClose(String type) { //进入区域