设备列表名称和ID搜索设备增加模糊搜索

image.png
查询条件中通过增加对应的字段key到funzzyParam即可。目前仅支持设备ID,设备别名和地理位置坐标
的模糊检索(注意 不过这里是对应的分词检索哈,不是like %%子句

设备大盘地图点位增加设备权属机构的筛选,点位获取接口增加权属机构这个参数

  1. 其实当前接口 /platform/device/cluster/queryDeviceClustersByDistrictCode

已经支持了点位查询过滤条件包含权属机构,不过阿里的平台前端没有透出它,其字段名称叫:
organizationId

  1. 获取organizationId的列表办法,对应这个接口

image.png

设备类型筛选条件增加设备数量与占比的返回

阿里这侧是把筛选和统计两个接口分开了
所以我们可以通过调用两次对应接口达到这个效果:
第一个接口就是正常的大盘设备检索查询
/platform/device/cluster/queryDeviceClustersByDistrictCode
第二个接口用这个:
image.png
这个统计是全量的
所以有上述筛选的,对应这个全量的关联一下即可。

设备列表的设备详情页,设备上报数据需要根据历史时间返回该时间的所有属性值

image.png
(查询当前属性)此图用现有接口:
/platform/tsdata/queryInstantPropertyContent
�com.aliyun.iotx.city.device.client.TimeSeriesDataClient#queryInstantPropertyContent

image.pngimage.png
(查询某特定属性和特定时间段)此图用现有接口:
不分页
/platform/tsdata/queryAllPropertyContent
com.aliyun.iotx.city.device.client.TimeSeriesDataClient#queryAllPropertyContent
分页
/platform/tsdata/queryPropertyContent
com.aliyun.iotx.city.device.client.TimeSeriesDataClient#queryPropertyContent
image.png
如讨论示意image.png
(查询设备在特定时间段的所有属性)此图用新增接口:
/platform/tsdata/queryMultiPropertyContent
�com.aliyun.iotx.city.device.client.TimeSeriesDataClient#queryMultiPropertyContent
调用参数如同上述指定属性的时间段查询一样,但是不需要传入identifier:TimeSeriesQueryParam
查询结果示例:
image.png

另外表格的标题行使用现有接口:
/platform/thingmodel/getThingModelProperty
�com.aliyun.iotx.city.device.client.ProductClient#getThingModelProperties

以上两个接口接合可达到最终客户想要的效果

物联设备需要支持散点展示

使用新增接口
/platform/device/cluster/queryDevicesByDistrictCode
�com.aliyun.iotx.city.device.client.DeviceClusterClient#queryDevicesByDistrictCode
image.png
List identifier; 为当前页面所有聚合点的标识符列表
其余跟现有查询聚合点接口queryDeviceClustersByDistrictCode相同

设备导入Excel功能服务端接口

1.通过接口/platform/export/deviceList调用执行设备列表生成任务

  1. /**
  2. * 导出设备文件
  3. *
  4. * @param deviceQueryParam
  5. * @return
  6. */
  7. @Router(path = "/platform/export/deviceList", method = RouterMethodTypeEnum.GET)
  8. CityResult<ExportDto> exportDevices(DeviceQueryParam deviceQueryParam);
  9. public class DeviceQueryParam extends CurrentContext {
  10. private String productKey;
  11. private String deviceName;
  12. private String alias;
  13. @Deprecated
  14. private String description;
  15. @NotEmpty
  16. private List<String> organizationIds;
  17. private String status;
  18. private String categoryKey;
  19. private List<String> categoryKeys;
  20. private String supplier;
  21. private String nodeType;
  22. private String netType;
  23. private String protocolType;
  24. private String foreignProductKey;
  25. private String tagName;
  26. private String platformKey;
  27. private String instanceId;
  28. private String address;
  29. private String postStartTime;
  30. private String postEndTime;
  31. /**
  32. * 正常不正常
  33. */
  34. private String orderParam;
  35. private String sort;
  36. private String anomalyStatus;
  37. /**
  38. * 模糊查询参数,和上面参数互斥
  39. */
  40. private List<String> fuzzyParam;
  41. }

返回值中包含本次导出的ID

  1. @Data
  2. public class ExportDto {
  3. /**
  4. * 导出id
  5. */
  6. private String exportId;
  7. /**
  8. * 创建时间
  9. */
  10. private Date gmtCreate;
  11. /**
  12. * 操作人
  13. */
  14. private String operatorId;
  15. /**
  16. * 组织
  17. */
  18. private String orgId;
  19. /**
  20. * 导出类型
  21. */
  22. private String exportType;
  23. /**
  24. * 导出条件
  25. */
  26. private String exportCondition;
  27. /**
  28. * 导出状态
  29. */
  30. private String exportStatus;
  31. /**
  32. * 导出url
  33. */
  34. private String exportResult;
  35. }

2.根据ID获取导出的Excel文件,返回值exportResult中包含了bucketName 和 文件Object路径,导出状态是success才是可以下载

  1. /**
  2. * 按照id查询导出结果
  3. *
  4. * @param tenantId
  5. * @param exportId
  6. * @return
  7. */
  8. @Router(path = "/platform/export/get", method = RouterMethodTypeEnum.GET)
  9. CityResult<ExportDto> getExport(@NotBlank String tenantId, @NotBlank String exportId);

3.查询导出的历史列表

  1. /**
  2. * 查询导出记录
  3. *
  4. * @param exportQueryParam
  5. * @param pagination
  6. * @return
  7. */
  8. @Router(path = "/platform/export/query", method = RouterMethodTypeEnum.GET)
  9. CityResult<PaginationResult<ExportDto>> queryExport(@NotNull @Valid ExportQueryParam exportQueryParam,
  10. @NotNull @Valid Pagination pagination);
  11. public class ExportQueryParam extends CurrentContext {
  12. private String exportCondition;
  13. private String exportStatus;
  14. private String exportType;
  15. private Date startTime;
  16. private Date endTime;
  17. }

设备统计查询修改接口

接口还是使用:/platform/device/queryDeviceMessageStatistics
�入参数有变化:
deviceStatisticQueryParam
image.png