package com.huatek.busi.task.transformer;

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

import com.huatek.busi.task.transformer.part.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.huatek.busi.task.base.AbstractBusiTaskExecutor;

import lombok.extern.slf4j.Slf4j;

/**
 * 变压器每日定时任务统计
 * 
 * @author anker_cheng
 * @date 2019/10/28
 */
@Slf4j
@Component("transformerDailyTask")
public class TransformerDailyTask extends AbstractBusiTaskExecutor {
    @Autowired
    private TransfromIcgeTask transfromIcgeTask;
    @Autowired
    private TransfromPdTask transfromPdTask;
    @Autowired
    private TransfromQxTask transfromQxTask;
    @Autowired
    private TransfromReadTask transfromReadTask;
    @Autowired
    private TransformerInfraredTask transformerInfraredTask;
    @Autowired
    private TransfromEqmTask transfromEqmTask;
    @Autowired
    private TransfromEqmDeviationTask transfromEqmDeviationTask;
    @Autowired
    private TransformerRunStatusTask transfromRunStatusTask;
    @Autowired
    private TransformerCwzzTask transformerCwzzTask;

    @Autowired
    private TransformerRzcwTask transformerRzcwTask;

    @Override
    public void execute() throws Exception {
        super.execute();
    }

    @Override
    public void execute(LocalDate day) {
        log.info("{} start...", day);
        // 油色谱
        transfromEqmTask.execute(day);
        transfromEqmDeviationTask.execute(day);
        // 局放
        transfromPdTask.execute(day);
        // 红外
        transformerInfraredTask.execute(day);
        // 图片读表
        transfromReadTask.execute(day);
        // 运行工况
        transfromRunStatusTask.execute(day);
        // TODO 容性
        // 气象
        transfromQxTask.execute(day);
        // 铁芯夹件
        transfromIcgeTask.execute(day);
        // TODO 套管
        // TODO 升级震动
        // 20230410 新增测温装置
        transformerCwzzTask.execute(day);
        //20230420 新增绕组测温
        transformerRzcwTask.execute(day);
        log.info("{} end!", day);
    }
}