diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java index e3458ccb7..b2bb2cec6 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/manipulator_agv_station/ManipulatorAgvStationDeviceDriver.java @@ -34,6 +34,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; + /** * 行架-agv对接位 */ @@ -209,17 +210,12 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i 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() // + "." + org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.ItemProtocol.item_to_command; // Map itemMap = new HashMap(); // itemMap.put(to_command, command); -// LuceneLogDto logDto = LuceneLogDto.builder() -// .device_code(device_code) -// .content("下发电气信号:" + itemMap) -// .build(); -// logDto.setLog_level(3); -// luceneExecuteLogService.deviceExecuteLog(logDto); + // try { // this.checkcontrol(itemMap); // } catch (Exception e) { @@ -231,21 +227,32 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i // } // } - try{ + try { 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(); + LuceneLogDto logDto = LuceneLogDto.builder() + .device_code(device_code) + .content("下发电气信号:" + command + "失败") + .build(); + logDto.setLog_level(3); + luceneExecuteLogService.deviceExecuteLog(logDto); } } - - @Override + @Override public JSONObject getDeviceStatusName() { JSONObject jo = new JSONObject(); String mode = ""; String action = ""; - if(iserror){ + if (iserror) { message = "universal_message11"; } if (this.getMode() == 0) {