package com.ho.datacollect.feignclient;

import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.exception.DataResult;
import com.ho.datacollect.api.vo.req.add.*;
import com.ho.datacollect.api.vo.req.energyConsumption.TdEnergyConsumptionReq;
import com.ho.datacollect.api.vo.req.inverter.InverterAddReq;
import com.ho.td.api.entity.query.QueryTableVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @描述 调用td-service
 * @创建时间 2021/8/9
 * @修改人
 */
@FeignClient(value = ContextConstant.TD_SERVICE,contextId = "DataCollectTdFeignClient")
public interface DataCollectTdFeignClient {

    /**
     * 新增一条一体机柜数据
     * @param device
     * @return
     */
    @PostMapping(value = ContextConstant.TD_CONTEXT + "device001/insertDeviceSimple")
    DataResult insertDeviceSimple(@RequestBody TdDeviceAddReq device);

    /**
     * 新增一条一体机柜数据
     * @param device
     * @return
     */
    @PostMapping(value = ContextConstant.TD_CONTEXT + "device001/insertDeviceComplex")
    DataResult insertDeviceComplex(@RequestBody TdDeviceAddReq device);

    //新增一条新能源光伏数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "PVEnergy/insertEnergyPVOne")
    DataResult insertEnergyPV(@RequestBody TdDevicePVEnergyReq tdAddReq);

    //新增一条能耗表数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "unMeter/insertUnMeterOne")
    DataResult insertUnMeterOne(@RequestBody TdMeterAddReq tdAddReq);

    //新增一条并网点统计用电表数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "GridMeter/insertGridMeterOne")
    DataResult insertGridMeterOne(@RequestBody TdMeterAddReq tdAddReq);

    //新增一条厂(站)用电表数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "StationMeter/insertStationMeterOne")
    DataResult insertStationMeterOne(@RequestBody TdMeterAddReq tdAddReq);

    //新增一条能耗表数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "energyConsumption/insertEnergyConsumptionOne")
    DataResult insertEnergyConsumptionOne(@RequestBody TdEnergyConsumptionReq tdAddReq);

    //新增一条逆变器
    @PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/insertInverterOne")
    DataResult insertInverterOne(@RequestBody InverterAddReq tdAddReq);

    //新增一条通用电表数据
    @PostMapping(value = ContextConstant.TD_CONTEXT + "unMeter/insertUniversalMeterOne")
    DataResult insertUniversalMeterOne(@RequestBody TdUniversalMeterReq tdUniversalMeterReq);

    @PostMapping(value = ContextConstant.TD_CONTEXT + "unMeter/insertWeatherStationOne")
    DataResult insertWeatherStationOne(@RequestBody TdWeatherStationReq tdWeatherStationReq);
}
