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.StopAnalysisController;
import com.gyee.frame.model.auto.StopAnalysismainVo;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

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

public class StopAnalysisTest {

    @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.MILLISECOND, 0);
        c.set(Calendar.DAY_OF_MONTH,24);
        c.set(Calendar.MONTH,2);
        c.set(Calendar.YEAR,2021);

        Date date = c.getTime();

        String wtid="MG01_07";
        StopAnalysisController stopAnalysisController= SpringUtils.getBean("stopAnalysisController");
        AjaxResult ajax1 =stopAnalysisController.stopAnalysisList("SBQ_FDC","1","1");

        List<StopAnalysismainVo> vos = (List<StopAnalysismainVo>)ajax1.get("data");
        AjaxResult ajax2  =stopAnalysisController.stopAnalysisTree(vos.get(11).getId(),vos.get(11).getWtid(),vos.get(11).getJudegvulue());
//
//
        stopAnalysisController.saveStopAnalysis("SBQ_FDC","1","2");
        System.out.println(ajax1);

        System.out.println("***************************************************************************************");


    }




}
