rev
This commit is contained in:
@@ -504,9 +504,12 @@ public class LnshRGVDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
} else {
|
||||
//申请后工位任务
|
||||
TaskDto task2 = null;
|
||||
List<String> getDeviceCodeList2 = this.getExtraDeviceCodes("get_device_code2");
|
||||
//前工位放货关联设备
|
||||
List<String> 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<String, Object> itemMap = new HashMap<String, Object>();
|
||||
// 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<String, Object> itemMap = new HashMap<String, Object>();
|
||||
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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user