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.health.WindTurbineHealthListController;
import com.gyee.frame.model.custom.HealthmodelrecordsVo;
import com.gyee.frame.model.custom.Tablepar;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.List;

public class WindTurbineHealthTest {

    @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";

        WindTurbineHealthListController windTurbineHealthListController= SpringUtils.getBean("windTurbineHealthListController");

        Tablepar tablepar=new Tablepar();
        tablepar.setPageNum(1);
        tablepar.setPageSize(10);
        tablepar.setOrderByColumn("deviationrate2");
        tablepar.setIsAsc("asc");



        AjaxResult ar = windTurbineHealthListController.windTurbineHealthList("NSS_FDC");
        AjaxResult ar2 = windTurbineHealthListController.windTurbineHealthList("NSS_FDC");
        AjaxResult ar3 = windTurbineHealthListController.windTurbineHealthList("QS_FDC");
        AjaxResult ar4 = windTurbineHealthListController.windTurbineHealthList("SBQ_FDC");
        AjaxResult ar5 = windTurbineHealthListController.windTurbineHealthList("XS_FDC");
        List<HealthmodelrecordsVo> vos=(List<HealthmodelrecordsVo>)ar.get("data");


        for(HealthmodelrecordsVo wtd:vos)
        {
            System.out.println(wtd.getClx()+"----------------"+wtd.getBpq()
                    +"----------------"+wtd.getFdj()+"----------------"+wtd.getFutureHealth());
        }


    }
}
