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