package com.hdkj.lt.feign;

import com.hdkj.lt.base.constants.SystemGlobalConstant;
import com.hdkj.lt.core.bizms.modle.dto.StateEstimation;
import com.hdkj.lt.core.bizms.modle.po.FhzgFeederAutoSwitchMapping;
import com.hdkj.lt.core.bizms.modle.request.StateEstimationEquipRequest;
import com.hdkj.lt.core.bizms.modle.request.StateEstimationRequest;
import com.hdkj.lt.feign.fallback.StateEstimationApiClientFallBack;
import com.hdkj.hussar.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @Description
 * @Author wcx
 * @Date 2025/5/28 16:37
 * @Version 1.0
 */
@FeignClient(value = SystemGlobalConstant.SERVICE_NAME_LOAD_TRANSFER_SI,contextId = "IStateEstimationApiClient", fallbackFactory = StateEstimationApiClientFallBack.class)
public interface IStateEstimationApiClient {

    @PostMapping("feign/stateEstimation/queryPeriodByEquip")
    ApiResponse<StateEstimation> queryPeriodByEquip(StateEstimationEquipRequest stateEstimationEquip);

    @PostMapping("feign/stateEstimation/queryByFeederSave")
    ApiResponse<StateEstimation> queryByFeederSave(StateEstimationRequest request);

    @PostMapping(value = "feign/stateEstimation/saveAutoSwitch")
    ApiResponse<List<FhzgFeederAutoSwitchMapping>> saveAutoSwitch(@Valid @RequestBody StateEstimationRequest request);
}
