package com.jjt.task;

import com.jjt.calc.service.ITwinCalcDayYhjService;
import com.jjt.calc.service.ITwinCalcHourYhjService;
import com.jjt.rz.service.ITwinCalcHourRzService;
import com.jjt.utils.Tools;
import org.springframework.stereotype.Component;

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

/**
 * 统计定时任务
 *
 * @author wukai
 * @date 2025-1-17 23:27:26
 */
@Component("yhj")
public class YhjTask {
    @Resource
    private ITwinCalcHourYhjService yhjService;
    @Resource
    private ITwinCalcDayYhjService dayService;
    @Resource
    private ITwinCalcHourRzService rzService;

    /**
     * 统计上一时段数据
     */
    public void last() {
        yhjService.last();
        rzService.last();
    }

    /**
     * 统计昨日数据
     */

    public void day() {
        LocalDate localDate = LocalDate.now().minusDays(1);
        dayService.day(localDate);
    }

}
