package com.gyee.generation;

import com.gyee.generation.service.InitialRedisService;
import com.gyee.generation.service.initalcache.CacheService;
import com.gyee.generation.service.realtimelibrary.AccessStatusService;
import com.gyee.generation.task.SaticScheduleCALTask;
import com.gyee.generation.task.SaticSchedulePgTask;
import com.xxl.job.core.context.XxlJobHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * Author: malijun
 * Data  : 2023: 12: 13
 **/
@SpringBootTest
@RunWith(SpringRunner.class)
public class SaticScheduleCALTaskTest {

    @Resource
    public AccessStatusService accessStatusService;
    @Resource
    private InitialRedisService initialRedisService;
    @Resource
    private SaticScheduleCALTask saticScheduleCALTask;
    @Resource
    private SaticSchedulePgTask saticSchedulePgTask;

    @Resource
    private CacheService cacheService;
    /**
     * 缓存Redis散点图数据
     * 每天执行一次
     */
    @Test
    public void initialRedis_PG() {

        try {
            cacheService.initRedisCache();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Test
    public void all() throws Exception {
//        saticScheduleCALTask.status_powerRationing();
//        saticScheduleCALTask.status_powerRationing();//status_middleStatusReal
//        saticScheduleCALTask.status_statusReal();
//        saticScheduleCALTask.calculate_powerRationing();
//        saticScheduleCALTask.calculateStatusNumber();
//
////        saticSchedulePgTask.shutdown_All_STA();
//
//        saticScheduleCALTask.theoreticalPower_CAL();
//        saticScheduleCALTask.realtime_CAL();
//        saticScheduleCALTask.realtime_Wp_CAL();
//        saticScheduleCALTask.electricityMetering_CAL();

        //saticScheduleCALTask.accessStatus_CAL();
        saticScheduleCALTask.cycleCalculation_CAL();


        //saticSchedulePgTask.inputOrOutPutSpeed_PG();
        //saticSchedulePgTask.inputOrOutPut_PG();
        //saticSchedulePgTask.shutdown_PG();

        //saticSchedulePgTask.wtwindDayInfo_PG();
        //saticSchedulePgTask.wpwindDayInfo_PG();

//        saticSchedulePgTask.equipment_PowerInfo1_PG();
        //saticSchedulePgTask.equipment_PowerInfo2_PG();
        //saticSchedulePgTask.equipment_PowerInfo3_PG();
        //saticSchedulePgTask.equipment_PowerInfo5_PG();
        //saticSchedulePgTask.equipment_PowerInfo4_PG();
        //saticSchedulePgTask.equipmentInfoDayTop_PG();
        //saticSchedulePgTask.wtAlysisDay_PG();

        //saticSchedulePgTask.windturbineGoodness_PG();
        //saticSchedulePgTask.calWindDeviation_PG();
        //saticSchedulePgTask.calFailRate_PG();
        //saticSchedulePgTask.brownouts_PG();

        //saticSchedulePgTask.windPowerInfo1_PG();
        //saticSchedulePgTask.windPowerInfo2_PG();
        //saticSchedulePgTask.windPowerInfo3_PG();
        //saticSchedulePgTask.windPowerInfo4_PG();
        //saticSchedulePgTask.windPowerInfo5_PG();
        //saticSchedulePgTask.windPowerInfo6_PG();


    }
}