diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java index 17bf6f452..17c5cf1ba 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java @@ -809,9 +809,9 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple Device startdevice = deviceAppService.findDeviceByCode(start_device_code); SiemensConveyorDeviceDriver siemensConveyorDeviceDriver; StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; - instruction.setInstruction_status("1"); + /*instruction.setInstruction_status("1"); instruction.setUpdate_time(DateUtil.now()); - instructionService.update(instruction); + instructionService.update(instruction);*/ Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device nextDevice = deviceAppService.findDeviceByCode(next_device_code); if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) { @@ -838,7 +838,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple map.put("to_onset", Integer.parseInt(start_addr)); map.put("to_task", Integer.parseInt(instruction.getInstruction_code())); map.put("to_target", Integer.parseInt(next_addr)); - this.writing(map); + try { + this.writing(map); + }catch (Exception e) { + logServer.deviceExecuteLog(device_code, "", "", "下发指令:" + instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code() + + ",指令终点:" + instruction.getNext_device_code() + ",指令执行失败:"+e.getMessage()); + } this.setRequireSucess(true); return true; } else { @@ -936,6 +941,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple map.put("to_target", Integer.parseInt(next_addr)); if(!StrUtil.isEmpty(task.getVersion())){map.put("inflatableShaftVersion", task.getVersion());} this.writing(map); + try { + this.writing(map); + }catch (Exception e) { + logServer.deviceExecuteLog(device_code, "", "", "下发指令:" + instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code() + + ",指令终点:" + instdto.getNext_device_code() + ",指令执行失败:"+e.getMessage()); + } this.setRequireSucess(true); notCreateInstMessage = ""; notCreateTaskMessage = "";