package com.malk.kangcheng.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import com.malk.kangcheng.service.YSEITaskService;

import java.io.UnsupportedEncodingException;

/**
 * 功能：
 * 作者：hanxue
 * 日期：2026/2/3 10:46
 */
@Slf4j
@Configuration
@EnableScheduling
@ConditionalOnProperty(name = {"enable.scheduling"})
public class attendanceController {
    @Autowired
    private YSEITaskService yseitaskSrevice;
    @Scheduled(cron = "0 0 21 * * ?")
    public void syncMaterial() throws UnsupportedEncodingException, JsonProcessingException {
        yseitaskSrevice.syncAttendance();
    }

}
