package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.model.auto.Windturbineinfoday3;
import com.gyee.frame.service.Windturbineinfoday3Service;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

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

public class Windturbineinfoday3Test {

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

        Date beginDate = c.getTime();

        c.add(Calendar.DAY_OF_MONTH,1);

        Date endDate = c.getTime();

        String wpid="MHS_FDC";

        Windturbineinfoday3Service windturbineinfoday3Service= SpringUtils.getBean("windturbineinfoday3Service");


        List<Windturbineinfoday3> ls = windturbineinfoday3Service.getWindturbineinfo("MHS_FDC",
                "MHS01_GC,MHS02_GC","MHS01_XL,MHS03_XL",beginDate,endDate,"recorddate","desc");


        for(Windturbineinfoday3 wtd:ls)
        {
            System.out.println(wtd.getWtName()+"----------------"+wtd.getDaydl2()+"----------------"+wtd.getDaynhgzssdl());
        }
        //System.out.println(test);
    }




}
