diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java index af97176..f9396f5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_rgv/LnshRGVDeviceDriver.java @@ -504,9 +504,12 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } else { //申请后工位任务 TaskDto task2 = null; + List getDeviceCodeList2 = this.getExtraDeviceCodes("get_device_code2"); + //前工位放货关联设备 + List putDeviceCodeList2 = this.getExtraDeviceCodes("put_device_code2"); for (int i = 0; i < putDeviceCodeList.size(); i++) { - if (ObjectUtil.isNotEmpty(taskserver.queryTaskByDeviceCode(putDeviceCodeList.get(i).replace("\"", "")))) { - task2 = taskserver.queryTaskByDeviceCode(putDeviceCodeList.get(i).replace("\"", "")).get(0); + if (ObjectUtil.isNotEmpty(taskserver.queryTaskByDeviceCode(getDeviceCodeList2.get(i).replace("\"", "")))) { + task2 = taskserver.queryTaskByDeviceCode(getDeviceCodeList2.get(i).replace("\"", "")).get(0); } if (ObjectUtil.isNotEmpty(task2)) break; } @@ -588,22 +591,38 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi } } +// public void writing(String param, String value) { +// +// String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() +// + "." + param; +// +// Map itemMap = new HashMap(); +// itemMap.put(to_param, value); +// +// try { +// this.checkcontrol(itemMap); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// logServer.deviceExecuteLog(this.device_code, "", "", to_param + " 写入 " + value); +// } + + public void writing(String param, String value) { String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + "." + param; - + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); itemMap.put(to_param, value); - try { - this.checkcontrol(itemMap); - } catch (Exception e) { - e.printStackTrace(); - } - logServer.deviceExecuteLog(this.device_code, "", "", to_param + " 写入 " + value); + ReadUtil.write(itemMap, server); + server.disconnect(); + logServer.deviceExecuteLog(this.device_code, "", "", param + " 写入 " + value); } + public boolean exe_business() { return true; } @@ -945,10 +964,6 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi this.writing("to_target2", next_addr); this.writing("to_task2", dto.getInstruction_code()); this.writing("to_command2", "1"); - this.writing("to_onset2", start_addr); - this.writing("to_target2", next_addr); - this.writing("to_task2", dto.getInstruction_code()); - this.writing("to_command2", "1"); } /** diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java b/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java index 24e8e05..e372c73 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java @@ -80,8 +80,8 @@ public class LogAspect { // 方法路径 String methodName = joinPoint.getTarget().getClass().getName() + "." + signature.getName() + "()"; String params=getParameter(method, joinPoint.getArgs()); - log.info("请求方法:{}",methodName); - log.info("请求方法参数:{}",params); +// log.info("请求方法:{}",methodName); +// log.info("请求方法参数:{}",params); Object result; currentTime.set(System.currentTimeMillis());