add:添加桁架下发信号日志

This commit is contained in:
2025-06-11 16:44:08 +08:00
parent 5e4d114435
commit 1827f702bd

View File

@@ -34,6 +34,7 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 行架-agv对接位 * 行架-agv对接位
*/ */
@@ -209,17 +210,12 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
this.setRequireSucess(false); this.setRequireSucess(false);
} }
public void writing(int command){ public void writing(int command) {
// String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() // String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
// + "." + org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.ItemProtocol.item_to_command; // + "." + org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.ItemProtocol.item_to_command;
// Map<String, Object> itemMap = new HashMap<String, Object>(); // Map<String, Object> itemMap = new HashMap<String, Object>();
// itemMap.put(to_command, command); // itemMap.put(to_command, command);
// LuceneLogDto logDto = LuceneLogDto.builder()
// .device_code(device_code)
// .content("下发电气信号:" + itemMap)
// .build();
// logDto.setLog_level(3);
// luceneExecuteLogService.deviceExecuteLog(logDto);
// try { // try {
// this.checkcontrol(itemMap); // this.checkcontrol(itemMap);
// } catch (Exception e) { // } catch (Exception e) {
@@ -231,21 +227,32 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
// } // }
// } // }
try{ try {
this.toCommandControl.control(command); this.toCommandControl.control(command);
} catch (Exception e){ LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发电气信号:" + command)
.build();
logDto.setLog_level(3);
luceneExecuteLogService.deviceExecuteLog(logDto);
} catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发电气信号:" + command + "失败")
.build();
logDto.setLog_level(3);
luceneExecuteLogService.deviceExecuteLog(logDto);
} }
} }
@Override
@Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
String mode = ""; String mode = "";
String action = ""; String action = "";
if(iserror){ if (iserror) {
message = "universal_message11"; message = "universal_message11";
} }
if (this.getMode() == 0) { if (this.getMode() == 0) {