package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.controller.monitor.MonitorPushController;
import com.gyee.frame.service.websocket.MatrixPushByWpService;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.Map;

public class MatrixByWpPushTest {

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

        SpringApplication.run(SpringbootStart.class, args);



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

        MatrixPushByWpService matrixPushByWpService= SpringUtils.getBean("matrixPushByWpService");
        MonitorPushController monitorPushController= SpringUtils.getBean("monitorPushController");




//        Map<String, Object> map = matrixPushByWpService.findMatrixById("MG01_01");
//
//
//
//         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());
//        }
//
//
//


        Map<String, Object> map1=monitorPushController.findGeneralAppearance("MHS_FDC");
        Map<String, Object> map2=monitorPushController.findGeneralAppearance("NSS_FDC");
        Map<String, Object> map3=monitorPushController.findGeneralAppearance("QS_FDC");
        Map<String, Object> map4=monitorPushController.findGeneralAppearance("SBQ_FDC");
        Map<String, Object> map5=monitorPushController.findGeneralAppearance("XS_FDC");
        Map<String, Object> map6=monitorPushController.findGeneralAppearance("DWK_GDC");
        Map<String, Object> map7=monitorPushController.findGeneralAppearance("PL01_GC");
        Map<String, Object> map8=monitorPushController.findGeneralAppearance("PL02_GC");
        Map<String, Object> map9=monitorPushController.findGeneralAppearance("MCH_GDC");
        Map<String, Object> map10=monitorPushController.findGeneralAppearance("XH_GDC");
        System.out.println(map1.size());
    }
}
