package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.domain.AjaxResult;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.controller.contrast.ContrastController;
import com.gyee.frame.model.custom.BenchMarkVo;
import com.gyee.frame.model.custom.Tablepar;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

public class ContrastTest {

    @SneakyThrows
    public static void main(String[] args) {

        SpringApplication.run(SpringbootStart.class, args);


        Calendar c = Calendar.getInstance();

        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);

        c.set(Calendar.DAY_OF_MONTH,1);
        c.set(Calendar.MONTH,0);
        c.set(Calendar.YEAR,2021);

        Date beginDate = c.getTime();

        String wpid="MHS_FDC";

        ContrastController contrastController= SpringUtils.getBean("contrastController");
//
//        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
//
//        List<Windturbineinfodaytop3> test=(List<Windturbineinfodaytop3>)ajaxResult.get("data");

        Tablepar tablepar=new Tablepar();
        tablepar.setPageNum(1);
        tablepar.setPageSize(10);

//        AjaxResult ajaxResult = contrastController.benchmarkPjList(tablepar,wpid,"","2021-01-01 00:00:00","2021-01-04 00:00:00");
//
//        List<BenchMarkVo> test=(List<BenchMarkVo>)ajaxResult.get("data");
//        for(BenchMarkVo wtd:test)
//        {
//            System.out.println(wtd.getDxklylnum()+"----------------"+wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
//        }
//        System.out.println("/***********************************************/");

//        AjaxResult ajaxResult2 = contrastController.benchmarkLnList(tablepar,wpid,"","2021-01-01 00:00:00","2021-01-04 00:00:00");
//
//        List<BenchMarkVo> test2=(List<BenchMarkVo>)ajaxResult2.get("data");
//        for(BenchMarkVo wtd:test2)
//        {
//            System.out.println(wtd.getDxklylnum()+"----------------"+wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
//        }
//        System.out.println("/***********************************************/");

//        AjaxResult ajaxResult = contrastController.findWpPowerOutChat(wpid,"2021-01-01 00:00:00","2021-01-04 00:00:00");
//        List<DataVo> test=(List<DataVo>)ajaxResult.get("data");
//        for(DataVo wtd:test)
//        {
//            System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2());
//        }

        AjaxResult ajaxResult = contrastController.benchmarkWtList(tablepar,wpid,null,"2021-01-01","2021-01-02");

        List<BenchMarkVo> test=(List<BenchMarkVo>)ajaxResult.get("data");
        for(BenchMarkVo wtd:test)
        {
            System.out.println(wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
        }
        System.out.println(test);
    }




}
