44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
|
|
package com.securityControl.system.config;
|
||
|
|
|
||
|
|
import com.securityControl.system.service.impl.ScheduleBallServiceImpl;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 球机状态接口开发
|
||
|
|
*/
|
||
|
|
@Slf4j
|
||
|
|
@EnableScheduling
|
||
|
|
@Configuration
|
||
|
|
public class BallScheduleTaskConfig {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private ScheduleBallServiceImpl service;
|
||
|
|
/**
|
||
|
|
* 球机在线状态-->当日施工球机
|
||
|
|
*/
|
||
|
|
@Scheduled(cron = "0 0/30 * * * ?")
|
||
|
|
private void QxDeviceState(){
|
||
|
|
service.QxDeviceState();
|
||
|
|
}
|
||
|
|
|
||
|
|
@Scheduled(cron = "0 0/29 * * * ?")
|
||
|
|
private void TyDeviceState(){
|
||
|
|
service.TyDeviceState();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 通道二 全部设备更新
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
@Scheduled(cron = "0 0/50 * * * ?")
|
||
|
|
private void QxUpdateDeviceState(){
|
||
|
|
service.QxUpdateDeviceState();
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|