From c0d29538f94255c5b4fc4b7d2666c39d48f7e360 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Thu, 27 Apr 2023 17:31:26 +0800 Subject: [PATCH] add lucence --- .../lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java index 45a150d..98f7c50 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java @@ -16,6 +16,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService; import org.nl.acs.opc.Device; import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; +import org.nl.modules.lucence.service.LuceneExecuteLogService; +import org.nl.modules.lucence.service.dto.LuceneLogDto; import org.nl.modules.wql.util.SpringContextHolder; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -43,6 +45,8 @@ public class LnshCrusherDeviceDriver extends AbstractOpcDeviceDriver implements TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl"); @Autowired DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl"); + @Autowired + LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl"); String device_code; int mode = 0; @@ -115,6 +119,8 @@ public class LnshCrusherDeviceDriver extends AbstractOpcDeviceDriver implements this.setRequireSucess(false); logServer.deviceItemValue(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceExecuteLog(this.device_code,"","","信号mode:" + last_mode + "->" + mode); + luceneExecuteLogService.deviceExecuteLog( + new LuceneLogDto(this.getDevice().getOpc_server_code(),this.getDevice().getOpc_plc_code(),this.device_code,ItemProtocol.to_home_relocation,this.last_home_relocation,this.home_relocation)); } if (status != last_status) { logServer.deviceItemValue(this.device_code,"status" ,String.valueOf(status));