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.report.WtHealthReportMonthController;
import com.gyee.frame.model.auto.Recommenmain;
import com.gyee.frame.model.auto.Wobugeq;
import com.gyee.frame.model.auto.WtTragetReportChart;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.List;

public class WtHealthReportMonthTest {

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

        SpringApplication.run(SpringbootStart.class, args);




        String wtid="MG01_01";

        WtHealthReportMonthController wtHealthReportMonthController= SpringUtils.getBean("wtHealthReportMonthController");


        AjaxResult ajaxResult =wtHealthReportMonthController.healthReportChart(wtid,"zk","2021-03-24");
        List<WtTragetReportChart> test2=(List<WtTragetReportChart>)ajaxResult.get("data");

        for(WtTragetReportChart wtd:test2)
        {
            System.out.println(wtd.getRecorddate()+"----------------"+wtd.getValue()+"----------------"+wtd.getWtname());
        }
        System.out.println("***************************************************************************************");

        AjaxResult ajaxResult2=wtHealthReportMonthController.getWobugeqList(wtid,"2021-03-24");
        List<Wobugeq> vos2=(List<Wobugeq>)ajaxResult2.get("data");

        for(Wobugeq wtd:vos2)
        {
            System.out.println(wtd.getBugnum()+"----------------"+wtd.getCheckdeptopinion()+"----------------"+wtd.getArrivaltime());
        }
        AjaxResult ajaxResult3=wtHealthReportMonthController.getRecommenmainList(wtid,"2021-03-24");
        List<Recommenmain> vos3=(List<Recommenmain>)ajaxResult3.get("data");

        for(Recommenmain wtd:vos3)
        {
            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getOperation());
        }
//        System.out.println("***************************************************************************************");

//

    }




}
