package com.gyee.generation;

import com.gyee.generation.service.AnalysisNewService;
import com.gyee.generation.service.PVSystemEfficiencyCalculator;
import com.gyee.generation.service.StationPower.StationPowerService;
import com.gyee.generation.service.initalcache.CacheService;
import com.gyee.generation.service.realtimelibrary.*;
import org.junit.Test;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;

/**
 * @ClassName : GenerationTest
 * @Author : xieshengjie
 * @Date: 2022/3/8 9:17
 * @Description :
 */
@SpringBootTest
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
public class GenerationTest {
    @Resource
    private CacheService cacheService;
    @Resource
    private ElectricityMeteringService electricityMeteringService;
    @Resource
    private RealtimeService realtimeService;   //实时补风，实时功率
    @Resource
    private CycleCalculationService cycleCalculationService;   //日月年
    @Resource
    private StatusService statusService;
    @Resource
    private RegionCalreService regionCalreService;
    @Resource
    private RegionCalService regionCalService;
    @Resource
    private AccessStatusService accessStatusService;
    @Resource
    private CalculationService calculationService;
    @Resource
    private SafetyDayService safetyDayService;
    @Resource
    private StationPowerService stationPowerService;

    @Resource
    private PVSystemEfficiencyCalculator calculator;

    @Resource
    private AnalysisNewService analysisNewService;

    @Test
    public void test1() throws Exception {
        cacheService.initRedisCache();
        //        electricityMeteringService.saveGenerationDatas();
    }


    @Test
    public void test2() throws Exception {

        //        electricityMeteringService.saveGenerationDatas();
        //        realtimeService.savaRealtimeTarget();
        //        cycleCalculationService.saveCyle();
        //        statusService.powerRationing();
        statusService.startStatusReal();
        //        statusService.calculateStatusNumber();
        //        regionCalService.companyCal();
        //        regionCalService.RegionCal();
        //
        //        regionCalreService.companyCal();
        //        regionCalreService.RegionCal();


    }

    @Test
    public void test3() throws Exception {
        //        //场站接入状态，总预测功率
        //        accessStatusService.accessStatus();
        //        //全场状态
        //        accessStatusService.fullFieldState();


        //        statusService.powerRationing();
        //        statusService.statusReal();
        //        statusService.calculateStatusNumber();

        //          realtimeService.savaRealtimeTarget();
        //        cycleCalculationService.saveCyle();

        //        electricityMeteringService.saveGenerationDatas();

        //        calculationService.calWp();

        //        regionCalService.companyCal();
        //        regionCalService.RegionCal();

        //        regionCalreService.companyCal();
        //        regionCalreService.RegionCal();

        //        safetyDayService.saveSafetyday();

        //        stationPowerService.predictedPower();


        calculator.planvalue();

        analysisNewService.companys();
        analysisNewService.saveWindProject();


    }
}
