123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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<TsDoubleData> 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<TsDoubleData> 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<TsDoubleData> 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<TsBooleanData> 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<TsBooleanData> 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<TsBooleanData> 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<PointData> getHistoryByUniformCode(@Param(value = "uniformCode") String uniformCode, @Param("startTs") String startTs, @Param("endTs") String endTs, @Param("thingId") String thingId);
- }
|