package com.jjt.task;

import com.jjt.calc.service.ITwinCalcDayService;
import com.jjt.calc.service.ITwinCalcHourService;
import com.jjt.common.utils.DateUtils;
import com.jjt.emp.service.ITwinEmpCalcService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.time.LocalDate;

/**
 * 员工绩效定时任务
 *
 * @author wukai
 * @date 2025-1-17 23:27:26
 */
@Component("emp")
public class EmpTask {
    @Resource
    private ITwinEmpCalcService empCalcService;


    /**
     * 绩效日报数据
     */
    public void old() {
        LocalDate localDate = LocalDate.now().minusDays(1);
        empCalcService.calc(DateUtils.toDate(localDate));
    }
    /**
     * 绩效日报数据
     */
    public void day(){
        LocalDate localDate = LocalDate.now().minusDays(1);
        empCalcService.calcNew(DateUtils.toDate(localDate));
    }

}
