package com.yeejoin.amos.api.householdapi.face.service.impl;

import com.yeejoin.amos.api.householdapi.Utils.KSolarRequestUtil;
import com.yeejoin.amos.api.householdapi.constant.KSolarConstant;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.KSolarStationList;
import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionService;
import fastjson.JSON;
import jdk.nashorn.internal.ir.RuntimeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class KSolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionService {
    @Autowired
    KSolarRequestUtil kSolarRequestUtil;
    @Override
    public void stationList() {
        HashMap<String, Object> requestInfo = new HashMap<>();
        String requestParaminfo = JSON.toJSONString(requestInfo);
        List<KSolarStationList> kSolarStationListList = kSolarRequestUtil.getResPonse(
                KSolarConstant.stationListUrl,
                KSolarConstant.requestGET,
                requestParaminfo,
                KSolarConstant.resovle_rows,
                KSolarStationList.class);
        for (int i = 0; i < kSolarStationListList.size(); i++) {
            KSolarStationList kSolarStationList = kSolarStationListList.get(i);
            kSolarStationList.getStationId();
        }

    }

    @Override
    public void stationDetail() {

    }

    @Override
    public void collectorList() {

    }

    @Override
    public void collectorDetail() {

    }

    @Override
    public void inverterList() {

    }

    @Override
    public void inverterDetail() {

    }

    @Override
    public void inverAlramInfo() {

    }
}
