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对接位
*/ */
@@ -214,12 +215,7 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
// + "." + 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) {
@@ -233,13 +229,24 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
try { try {
this.toCommandControl.control(command); this.toCommandControl.control(command);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发电气信号:" + command)
.build();
logDto.setLog_level(3);
luceneExecuteLogService.deviceExecuteLog(logDto);
} catch (Exception e) { } 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();