package test;

import com.gyee.SpringbootStart;
import com.gyee.frame.common.spring.SpringUtils;
import com.gyee.frame.service.Windpowerinfoday3Service;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;

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

public class Windpowerinfoday3Test {

    @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";

        Windpowerinfoday3Service windpowerinfoday3Service= SpringUtils.getBean("windpowerinfoday3Service");


        Map<String, List<String>> map = windpowerinfoday3Service.getWindturbineinfoAllJson("MHS_FDC",beginDate,endDate,0);


        for(String name:map.get("names"))
        {
            System.out.println(name);
        }

        for(String yfdl:map.get("yfdl"))
        {
            System.out.println(yfdl);
        }
        //System.out.println(test);
    }




}
