IntelligentRecognition/ah-jjsp-service/.svn/pristine/fb/fb8b9d9097e7de2abe154173c64...

63 lines
1.5 KiB
Plaintext

package com.securityControl.task.config;
import com.securityControl.task.service.DeviceService;
import com.securityControl.task.service.TaskService;
import com.securityControl.task.service.impl.*;
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;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
/**
* 班组定时器
*/
@Slf4j
//@EnableScheduling
//@Configuration
public class WorkTeamScheduleTaskConfig {
@Resource
public WorkTeamSchedule schedule;
@Resource
private TaskService taskService;
@Resource
private DailyReportService dailyReportService;
/**
* 站班会自动分配
*/
@Scheduled(cron = "0 0/30 * * * ?")
private void classMettingZdFp(){
schedule.classMettingZdFp();
}
/**
* 站班会预警
*/
@Scheduled(cron = "0 0/20 * * * ?")
private void getAllClassMettingWarn(){
taskService.getAllClassMettingWarn();
}
/**
* 对日报进行记录解析-+
* 十五分钟一次
*/
@Scheduled(cron = "0 0/30 * * * ?")
private void addOrUpdateDailyReport(){
dailyReportService.addOrUpdateDailyReport();
}
/**
* 定时器 每天0点
*/
@Scheduled(cron = "0 0 0 * * ?")
public void schedule() {
schedule.updaeUserInformation();
}
}