//package com.yeejoin.amos.dockingData;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONArray;
//import com.alibaba.fastjson.JSONObject;
//import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
//import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
//import com.yeejoin.amos.api.householdapi.face.orm.entity.HouseholdPvApi;
//import com.yeejoin.amos.api.householdapi.face.orm.entity.HouseholdPvProducerInfo;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvApiServiceImpl;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl;
//import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
//import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
//import org.jetbrains.annotations.TestOnly;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.actuate.influx.InfluxDbHealthIndicator;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.util.*;
//import java.util.zip.Inflater;
//
///**
// * @description:
// * @author: tw
// * @createDate: 2023/6/16
// */
//@Component
//public class DockingData {
//    @Autowired
//    InfluxDbConnection influxDbConnection;
//    @Autowired
//    HouseholdPvUtils householdPvUtils;
//    @Autowired
//    private HouseholdPvProducerInfoServiceImpl householdPvProducerInfoServiceImpl;
//    @Autowired
//    private HouseholdPvApiServiceImpl householdPvApiServiceImpl;
//
//    //初始化执行
//    @PostConstruct
//    public void init() {
//        //锦浪云
//        this.getDataGolong();
//        //固德威
////        this.getDataGoodWE();
//        //首航
////        this.getDataSoFar();
//    }
//
//    //每二十分钟执行一次
//    @Scheduled(cron = "0 0/20 * * * ?")
//    public void fixedRateGolong() {
//        this.getDataGolong();
//    }
//
//    @Scheduled(cron = "0 0/20 * * * ?")
////    public void fixedRateGoodWE() {
////        this.getDataGoodWE();
////    }
//
//
//    @Scheduled(cron = "0 0/20 * * * ?")
////    public void fixedRateSoFar() {
////        this.getDataSoFar();
////    }
//
//    //请求获取数据
//    public void getDataGolong() {
//        List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
//        householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.JLY.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
//    }
//
//    public void getDataGoodWE() {
//        List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
//        householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.GDW.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
//    }
//
//    public void getDataSoFar() {
//        List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
//        householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.SH.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
//    }
//}
