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.outputspeed.OutputSpeedController;
import com.gyee.frame.model.auto.Inputoroutputspeedtotal;
import com.gyee.frame.model.custom.Tablepar;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

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

public class OutputspeedTest {

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

        Date date = c.getTime();

        String wpId="MHS_FDC";

        OutputSpeedController outputSpeedController= SpringUtils.getBean("outputSpeedController");


        Tablepar tablepar=new Tablepar();
        tablepar.setPageNum(1);
        tablepar.setPageSize(10);

        AjaxResult ajaxResult =outputSpeedController.outputSpeedlist(tablepar,wpId,"2021-01-02");

        List<Inputoroutputspeedtotal> test=(List<Inputoroutputspeedtotal>)ajaxResult.get("data");
        for(Inputoroutputspeedtotal wtd:test)
        {
            System.out.println(wtd.getDayinputbig()+"----------------"+wtd.getDayinputbigmin()+"----------------"+wtd.getDayinputbigmax());
        }



    }




}
