package com.gyee.impala.common.feign; import com.alibaba.fastjson.JSONObject; import com.gyee.impala.model.custom.TsBooleanData; import com.gyee.impala.model.custom.TsDoubleData; import com.gyee.impala.model.custom.diagnose.PointData; import feign.Headers; import feign.Param; import feign.RequestLine; import java.util.List; public interface IAdapterService { @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/latest?keys={points}") JSONObject getLatest(@Param(value = "points") String points); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/snap?tagName={tagName}&startTs={startTs}&endTs={endTs}&interval={interval}") List getHistorySnapAI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs, @Param(value = "endTs") long endTs, @Param(value = "interval") Integer interval); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}") List getHistoryRawAI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs, @Param(value = "endTs") long endTs); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}") List getHistorySectionAI(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/snap?tagName={tagName}&startTs={startTs}&endTs={endTs}&interval={interval}") List getHistorySnapDI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs, @Param(value = "endTs") long endTs, @Param(value = "interval") Integer interval); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}") List getHistoryRawDI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs, @Param(value = "endTs") long endTs); @Headers({"Content-Type: application/json", "Accept: application/json"}) @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}") List getHistorySectionDI(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts); /** * 通过UniformCode获取历史数据(注意其中有的参数设置为了固定值) * @param uniformCode 唯一识别码 * @param startTs 开始时间戳 * @param endTs 结束时间戳 * @param thingId 风机(或其他)ID * @return 历史数据列表 */ @RequestLine("GET /ts/history/snap?uniformCode={uniformCode}&startTs={startTs}&endTs={endTs}&thingType=windturbine&thingId={thingId}&interval=1") List getHistoryByUniformCode(@Param(value = "uniformCode") String uniformCode, @Param("startTs") String startTs, @Param("endTs") String endTs, @Param("thingId") String thingId); }