文档
测试

获取设施列表

POST
/api/filterDevices

接口描述

获取设施列表

请求头

参数名
类型
描述
必填
x-access-token
String
登录后的token
必填
company_id
String
公司ID,登录时获取,切换企业时更新
必填

请求参数

参数名
类型
描述
必填
floorId
int
地图楼层ID,可传空,传空时为查询所有楼层快到下一巡检周期的数据
必填
facilitieTypes
Array
消防设施类型Id数组,根据设备类型获取某楼层报警,可传空,为空时表示不以该条件检索,非空时floorId不可为空
必填
persons
Array
部门人员的id数组,根据人员获取某楼层这些人员负责区域报警,可传空,为空时表示不以该条件检索,非空时floorId不可为空
必填
date
String
日期,根据日期获取楼层报警,可传空,为空时表示不以该条件检索,非空时floorId不可为空
必填

响应参数

参数名
类型
描述
必填
code
int
响应code 成功=200,失败=201,token失效=401
必填
message
String
响应提示语
必填
data
Map
业务数据
必填
floorId
Array
各楼层设施列表
必填
device
Map
设备
必填
deviceId
String
设备Id
必填
x
double
x坐标
必填
y
double
y坐标
必填
floorId
int
楼层id
必填
typeAlias
String
设备类型的别名
必填
nextInspectionTime
double
距离下次巡检时间
必填
isBroken
bool
是否有故障
必填
level
int
风险等级,根据距离下次巡检时间计算,
必填

说明 / 示例

# 1,请求示例 ```json { "floorId": 1, "facilitieTypes": [ "ea3455c6fbe246ab", "ea3455c6fbe246ab", "ea3455c6fbe246ab" ], "persons": [ "ea3455c6fbe246ab", "ea3455c6fbe246ab", "ea3455c6fbe246ab" ], "date": "2020-12-12" } ``` # 2,返回示例 ```json { "code": 200, "message": "请求成功", "data": { "1": [ { "deviceId": "ea3455c6fbe246ab", "x": 12904440.973, "y": 4919535.5201, "floorId": 1, "typeAlias": "baojingfa", "nextInspectionTime": 1599201635, "isBroken": 1 }, { "deviceId": "ea3455c6fbe246ab", "x": 12904440.973, "y": 4919535.5201, "floorId": 1, "typeAlias": "baojingfa", "nextInspectionTime": 1599201635, "isBroken": 0 } ], "2": [ { "deviceId": "ea3455c6fbe246ab", "x": 12904440.973, "y": 4919535.5201, "floorId": 2, "typeAlias": "baojingfa", "nextInspectionTime": 1599201635, "isBroken": 1 } ] } } ```