package com.njcn.device.pq.api;

import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
import com.njcn.device.pq.pojo.vo.OnlineMonitorVo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * 监测点数据完整性
 * @author cdf
 * @date 2023/6/7
 */
@FeignClient(value = ServerInfo.DEVICE,
        path = "/LineIntegrityData",
        fallbackFactory = LineIntegrityClientFallbackFactory.class,
        contextId = "LineIntegrityData")
public interface LineIntegrityClient {

    /**
     *
     * @author cdf
     * @date 2023/6/7
     */
    @PostMapping("/getIntegrityByLineIds")
    HttpResult<List<RStatIntegrityD>> getIntegrityByLineIds(@RequestBody List<String> lineIds, @RequestParam("startTime")String startTime, @RequestParam("endTime")String endTime);

    /**
     * @Description: 通过监测点集合查询总监测点数据完整性
     * @param param
     * @return: com.njcn.common.pojo.response.HttpResult<java.lang.Float>
     * @Author: wr
     * @Date: 2024/1/8 14:06
     */
    @PostMapping("/getTotalIntegrityByLineIds")
    HttpResult<Float> getTotalIntegrityByLineIds(@RequestBody LineBaseQueryParam param);

    @PostMapping("/lineDataQuality")
    HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);

    @PostMapping("/noData")
    HttpResult<List<OnlineMonitorVo>> getNoData(@RequestBody LineBaseQueryParam param);
}
