package com.huatek.busi.task;

import com.huatek.busi.service.cable.CableCirculationStatisticsService;
import com.huatek.busi.service.cable.CableCirculationtemperIncreaseRateService;
import com.huatek.busi.task.base.AbstractBusiTaskExecutor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.time.LocalDate;

/**
 * 电缆环流增长率定时任务
 */
@Slf4j
@Component("cableCirculationtemperIncreaseRateTask")
public class CableCirculationtemperIncreaseRateTask extends AbstractBusiTaskExecutor {

    @Autowired
    CableCirculationtemperIncreaseRateService cableCirculationtemperIncreaseRateService;
    @Override
    public void execute()throws Exception {
        super.execute();
    }
    @Override
    public void execute(LocalDate day) {
        log.info("电缆环流增长率定时任务开始时间----------------{} start...", day);
        // 电缆环流每天汇总前一天监测数据
        cableCirculationtemperIncreaseRateService.saveCableCirculationIncreaseRate(day);
        log.info("{} end!", day);
    }
}
