package com.yeejoin.amos.boot.module.hygf.biz.scheduled;

import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpCollectorHistoryServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: tw
 * @createDate: 2023/9/21
 */
@EnableScheduling
@Component
public class WindSpeedScheduled {

	@Autowired
    JpStationServiceImpl jpStationServiceImpl;

	@Autowired
	TdHygfJpCollectorHistoryServiceImpl tdHygfJpCollectorHistoryServiceImpl;

	@Autowired
	TdHygfJpInvertorElecHistoryServiceImpl tdHygfJpInvertorElecHistoryServiceImpl;
//    @Autowired
//    DayGenerateServiceImpl dayGenerateServiceImpl;

	@Scheduled(cron = "${cheduled.crons}")
	private void initData() {
        jpStationServiceImpl.getMonthPower();
		tdHygfJpCollectorHistoryServiceImpl.syncData();
		tdHygfJpInvertorElecHistoryServiceImpl.syncData();
	}



	//发电量

//    @Scheduled(cron = "${generate.crons}")
//    private void initGenerateData() {
//	    //发电量
//        dayGenerateServiceImpl.getGenerate();
//    }

}
