package com.qmth.sop.task.job;

import com.qmth.sop.common.enums.ExceptionResultEnum;
import com.qmth.sop.task.job.service.JobService;
import org.quartz.JobExecutionContext;
import org.springframework.scheduling.quartz.QuartzJobBean;

import javax.annotation.Resource;

/**
 * @Description: 考勤统计定时任务
 * @Author: CaoZixuan
 * @Date: 2024-05-24
 */
public class DingStatisticJob extends QuartzJobBean {
    @Resource
    JobService jobService;

    @Override
    protected void executeInternal(JobExecutionContext context) {
        try {
            jobService.dingStatistic();
        } catch (Exception e) {
            throw ExceptionResultEnum.ERROR.exception(e.getMessage());
        }
    }
}
