IAdapterService.java 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package com.gyee.impala.common.feign;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.gyee.impala.model.custom.TsBooleanData;
  4. import com.gyee.impala.model.custom.TsDoubleData;
  5. import com.gyee.impala.model.custom.diagnose.PointData;
  6. import feign.Headers;
  7. import feign.Param;
  8. import feign.RequestLine;
  9. import java.util.List;
  10. public interface IAdapterService {
  11. @Headers({"Content-Type: application/json", "Accept: application/json"})
  12. @RequestLine("GET /ts/latest?keys={points}")
  13. JSONObject getLatest(@Param(value = "points") String points);
  14. @Headers({"Content-Type: application/json", "Accept: application/json"})
  15. @RequestLine("GET /ts/history/snap?tagName={tagName}&startTs={startTs}&endTs={endTs}&interval={interval}")
  16. List<TsDoubleData> getHistorySnapAI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
  17. @Param(value = "endTs") long endTs, @Param(value = "interval") Integer interval);
  18. @Headers({"Content-Type: application/json", "Accept: application/json"})
  19. @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}")
  20. List<TsDoubleData> getHistoryRawAI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
  21. @Param(value = "endTs") long endTs);
  22. @Headers({"Content-Type: application/json", "Accept: application/json"})
  23. @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}")
  24. List<TsDoubleData> getHistorySectionAI(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts);
  25. @Headers({"Content-Type: application/json", "Accept: application/json"})
  26. @RequestLine("GET /ts/history/snap?tagName={tagName}&startTs={startTs}&endTs={endTs}&interval={interval}")
  27. List<TsBooleanData> getHistorySnapDI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
  28. @Param(value = "endTs") long endTs, @Param(value = "interval") Integer interval);
  29. @Headers({"Content-Type: application/json", "Accept: application/json"})
  30. @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}")
  31. List<TsBooleanData> getHistoryRawDI(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
  32. @Param(value = "endTs") long endTs);
  33. @Headers({"Content-Type: application/json", "Accept: application/json"})
  34. @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}")
  35. List<TsBooleanData> getHistorySectionDI(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts);
  36. /**
  37. * 通过UniformCode获取历史数据(注意其中有的参数设置为了固定值)
  38. * @param uniformCode 唯一识别码
  39. * @param startTs 开始时间戳
  40. * @param endTs 结束时间戳
  41. * @param thingId 风机(或其他)ID
  42. * @return 历史数据列表
  43. */
  44. @RequestLine("GET /ts/history/snap?uniformCode={uniformCode}&startTs={startTs}&endTs={endTs}&thingType=windturbine&thingId={thingId}&interval=1")
  45. List<PointData> getHistoryByUniformCode(@Param(value = "uniformCode") String uniformCode, @Param("startTs") String startTs, @Param("endTs") String endTs, @Param("thingId") String thingId);
  46. }