package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.model.auto.Windpowerinfoday;
import com.gyee.frame.model.auto.Windturbineinfoday;
import com.gyee.frame.service.WindpowerinfodayService;
import com.gyee.frame.service.WindturbineinfodayService;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

import java.util.Calendar;

public class RelationalDataBaseTest {

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

        SpringApplication.run(SpringbootStart.class, args);

        WindturbineinfodayService windturbineinfodayService = SpringUtils.getBean("windturbineinfodayService");
        WindpowerinfodayService windpowerinfodayService = SpringUtils.getBean("windpowerinfodayService");

//        LineExample lineExample=new LineExample();
//
//        List<Line> ls=lineService.selectByExample(lineExample);

        Calendar c = Calendar.getInstance();

        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);

        Windturbineinfoday wt=windturbineinfodayService.findListByDate("MG01_01",c.getTime());
        Windpowerinfoday wp=windpowerinfodayService.findListByDate("MHS_FDC",c.getTime());

        //System.out.println(wt.getRecorddate()+ "___" +wt.getGeneratingcapacity2());
        //System.out.println(wp.getRecorddate()+ "___" +wp.getDaylyxs());


    }


}
