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 0ac1e0fac..a8977b0bd 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 @@ -895,9 +895,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"))) { @@ -924,7 +924,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 { @@ -1020,7 +1025,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple map.put("to_onset", Integer.parseInt(start_addr)); map.put("to_task", Integer.parseInt(instdto.getInstruction_code())); map.put("to_target", Integer.parseInt(next_addr)); - 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 = "";