IntelligentRecognition/ah-jjsp-service/.svn/pristine/2b/2bce1095f4bcc7a51d754c7cfd8...

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-05-24 16:09:40 +08:00
package com.securityControl.task.schedule;
import com.securityControl.common.core.utils.aes.DateTimeHelper;
import com.securityControl.task.service.TaskService;
import com.securityControl.task.service.impl.WorkTeamSchedule;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
/**
* 站班会自动分配
*/
@Component
@EnableScheduling
public class ScheduledClassMettingZdfp implements Job {
private static final Logger log = LoggerFactory.getLogger(ScheduledClassMettingZdfp.class);
/**
* 任务管理
*/
@Autowired
public WorkTeamSchedule schedule;
@Autowired
private TaskService taskService;
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
try{
log.info("开始进行站班会分配>>>");
taskService.updateTask("bns_class","1", DateTimeHelper.getNowTime());
schedule.classMettingZdFp();
log.info("站班会分配结束>>>");
} catch (Exception e){
log.error(e.toString(),e);
}
}
}