From 0a6ccbf76b4f596a6249acebfc1fe2019f45e675 Mon Sep 17 00:00:00 2001 From: yanps Date: Wed, 20 Dec 2023 10:58:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8C=87=E4=BB=A4=E6=9C=AA=E6=BB=A1?= =?UTF-8?q?=E8=B6=B3=E6=9D=A1=E4=BB=B6,=E5=8F=98=E6=88=90=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndoorManipulatorDeviceDriver.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) 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 = "";