Browse Source

add lucence

master
汪菘 2 years ago
parent
commit
c0d29538f9
  1. 6
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_crusher/LnshCrusherDeviceDriver.java

6
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));

Loading…
Cancel
Save