package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.service.websocket.*;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.HashMap;
import java.util.Map;

public class GenreSetPushDetialTest {

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

        SpringApplication.run(SpringbootStart.class, args);

          String QS = "0";
          String FD = "-1";
          String GF = "-2";

        String wtId="MG01_03";
        String wpId="MHS_FDC";
        String year="2021";
        String month="1";

        GenreSetPushDetailService genreSetPushDetailService= SpringUtils.getBean("genreSetPushDetailService");
        GenreSetPushDetailWpService genreSetPushDetailWpService= SpringUtils.getBean("genreSetPushDetailWpService");
        GenreSetPushDetailPjService genreSetPushDetailPjService= SpringUtils.getBean("genreSetPushDetailPjService");
        GenreSetPushDetailLnService genreSetPushDetailLnService= SpringUtils.getBean("genreSetPushDetailLnService");
        RealPowerPushService realPowerPushService= SpringUtils.getBean("realPowerPushService");

        Map<String, Object> map = new HashMap<>();


//        map.put("0", genreSetPushDetailService.findDayInfo("0",RFDL));
//        map.put("MHS_FDC", genreSetPushDetailWpService.findDayInfo("MHS_FDC",RFDL));
//        map.put("MHS01_GC", genreSetPushDetailPjService.findDayInfo("MHS01_GC",RFDL));
//        map.put("MHS01_XL", genreSetPushDetailLnService.findDayInfo("MHS01_XL",RFDL));


//        map.put("0", genreSetPushDetailService.findMonthInfo("0","yfdl"));
//        map.put("MHS_FDC", genreSetPushDetailWpService.findMonthInfo("MHS_FDC","yfdl"));
//        map.put("MHS01_GC", genreSetPushDetailPjService.findMonthInfo("MHS01_GC","yfdl"));
//        map.put("MHS01_XL", genreSetPushDetailLnService.findMonthInfo("MHS01_XL","yfdl"));

//        map.put("0", genreSetPushDetailService.findYearInfo("0","nfdl"));
//        map.put("MHS_FDC", genreSetPushDetailWpService.findYearInfo("MHS_FDC","nfdl"));
//        map.put("MHS01_GC", genreSetPushDetailPjService.findYearInfo("MHS01_GC","nfdl"));
//        map.put("MHS01_XL", genreSetPushDetailLnService.findYearInfo("MHS01_XL","nfdl"));


        map.put("0", realPowerPushService.findGLDetail("0","bzgl"));
        map.put("0s",realPowerPushService.findGLDetail("0","yfgl"));


         System.out.println(map.size());



//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
//
//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
//        for(SingleAnalysisVo wtd:vos)
//        {
//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
//        }
//
//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
//
//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
//        List<SingleAnalysisVo> vos=map.get("ff");
//        for(SingleAnalysisVo wtd:vos)
//        {
//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
//        }
//
//        System.out.println("---------------------------------------------------------------------------------");
//        vos=map.get("ws");
//        for(SingleAnalysisVo wtd:vos)
//        {
//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
//        }
//        System.out.println("---------------------------------------------------------------------------------");
//        vos=map.get("jd");
//        for(SingleAnalysisVo wtd:vos)
//        {
//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
//        }
//
//
//
    }
}
