package com.storlead.centre.dispatch;

import com.storlead.centre.service.AttendanceSignRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.text.ParseException;
import java.util.Date;

/**
 * @program: storlead-centre-platform
 * @description:
 * @author: chenkq
 * @create: 2026-01-07 14:57
 */

@Slf4j
@Component
public class AttendanceSignDispatchTask {

    @Resource
    private AttendanceSignRecordService attendanceSignRecordService;

    /**
     * 同步考勤数据
     * @throws ParseException
     */
    @Scheduled(cron ="0 */5 6-23 * * ? ")
    public void syncSignData() throws ParseException {
        log.error("开始时间--"+new Date());
        log.info("oa company dept job user sync task starting ----");
        attendanceSignRecordService.getSaveSignRecord();
    }
}
