通行记录查询

更新时间:2023-01-12 07:16:23下载pdf

通行记录 API

请求方式 API 描述
GET /v1.0/iot-02/building/access-record/actions/event-filter 筛选通行记录列表事件类型
POST /v1.0/iot-02/building/access-record 查询通行记录列表

筛选通行记录列表事件类型

功能描述

筛选通行记录列表事件类型。

接口地址

GET /v1.0/iot-02/building/access-record/actions/event-filter

请求参数

参数名 类型 参数类型 说明 是否必需
projectId String body 项目 ID true

返回参数

参数名 类型 说明
code Integer 响应码(详情见错误码章节),成功时为空
success Boolean 是否成功。true:成功,false:失败
msg String 请求失败的信息,成功时为空
t Long 返回时间戳,13 位
result Object 返回结果

result 参数说明

请求示例

GET /v1.0/iot-02/building/access-record/actions/event-filter?project_id=0l9sT07CLN

响应示例

{
    "result": [
        {
            "children": [
                {
                    "children": [
                        {
                            "children": [],
                            "event_code": "1002",
                            "i18n_code": "1123003023",
                            "node_id": "51",
                            "parent_id": "35",
                            "title": "密码合法通行",
                            "type": "event",
                            "value": "51"
                        },
                        {
                            "children": [],
                            "event_code": "1003",
                            "i18n_code": "1123003024",
                            "node_id": "52",
                            "parent_id": "35",
                            "title": "卡片合法通行",
                            "type": "event",
                            "value": "52"
                        },
                        {
                            "children": [],
                            "event_code": "1004",
                            "i18n_code": "1123003025",
                            "node_id": "53",
                            "parent_id": "35",
                            "title": "人脸合法通行",
                            "type": "event",
                            "value": "53"
                        }
                    ],
                    "event_code": "",
                    "i18n_code": "1123003004",
                    "node_id": "35",
                    "parent_id": "30",
                    "title": "门禁",
                    "type": "category",
                    "value": "35"
                },
                {
                    "children": [
                        {
                            "children": [],
                            "event_code": "1033",
                            "i18n_code": "1123003027",
                            "node_id": "55",
                            "parent_id": "36",
                            "title": "卡片解锁",
                            "type": "event",
                            "value": "55"
                        },
                        {
                            "children": [],
                            "event_code": "1034",
                            "i18n_code": "1123003028",
                            "node_id": "56",
                            "parent_id": "36",
                            "title": "密码解锁",
                            "type": "event",
                            "value": "56"
                        }
                    ],
                    "event_code": "",
                    "i18n_code": "1123003010",
                    "node_id": "36",
                    "parent_id": "30",
                    "title": "智能锁",
                    "type": "category",
                    "value": "36"
                }
            ],
            "event_code": "",
            "i18n_code": "1123003006",
            "node_id": "30",
            "parent_id": "28",
            "title": "合法通行事件",
            "type": "category",
            "value": "30"
        },
        {
            "children": [
                {
                    "children": [
                        {
                            "children": [],
                            "event_code": "1005",
                            "i18n_code": "1123003029",
                            "node_id": "57",
                            "parent_id": "37",
                            "title": "非法通行",
                            "type": "event",
                            "value": "57"
                        }
                    ],
                    "event_code": "",
                    "i18n_code": "1123003004",
                    "node_id": "37",
                    "parent_id": "31",
                    "title": "门禁",
                    "type": "category",
                    "value": "37"
                },
                {
                    "children": [
                        {
                            "children": [],
                            "event_code": "1030",
                            "i18n_code": "1123003030",
                            "node_id": "58",
                            "parent_id": "38",
                            "title": "卡片解锁连续试错告警",
                            "type": "event",
                            "value": "58"
                        },
                        {
                            "children": [],
                            "event_code": "1031",
                            "i18n_code": "1123003031",
                            "node_id": "59",
                            "parent_id": "38",
                            "title": "密码解锁连续试错告警",
                            "type": "event",
                            "value": "59"
                        }
                    ],
                    "event_code": "",
                    "i18n_code": "1123003010",
                    "node_id": "38",
                    "parent_id": "31",
                    "title": "智能锁",
                    "type": "category",
                    "value": "38"
                }
            ],
            "event_code": "",
            "i18n_code": "1123003007",
            "node_id": "31",
            "parent_id": "28",
            "title": "异常通行事件",
            "type": "category",
            "value": "31"
        }
    ],
    "success": true,
    "t": 1664187322182,
    "tid": "214276763d8411ed84fd2237f0528b74"
}

查询通行记录列表

功能描述

查询通行记录列表。

接口地址

POST /v1.0/iot-02/building/access-record

请求参数

参数名 参数类型 类型 是否必需 说明 举例
project_id body String false 项目 ID Lo4KO88gXF
access_start_time body Long false 通行开始时间 28817
access_end_time body Long false 通行结束时间 814559
name body String false 姓名 ph08hnxvz2
sex body Integer false 性别 145371
mobile body String false 手机号 w5AkHvvyOk
structure_name body String false 所属组织 cSNFM8vULs
person_code body String false 工号 MdfBBZQ1yf
access_direction body Integer false 通行方向。
1:进
2:出
986048
access_control_channel_name body String false 出入口名称 RSRd4tbrUT
access_channel_position_path body String false 出入口安装位置 B9enQD9nQM
business_device_name body String false 门禁业务设备名称 GZCM2s6QyN
certificate body String false 通行方式。
1:卡
2:人脸
3:指纹
i5rPql2S4T
event_node_ids body String[] false 通行事件 Q7y38SBgiv
page body Integer false 页数 251001
page_size body Integer false 页大小 534449
need_log body Boolean false 是否需要记录日志 true

返回参数

参数名 类型 说明
code Integer 响应码(详情见错误码章节),成功时为空
success Boolean 是否成功。true:成功,false:失败
msg String 请求失败的信息,成功时为空
t Long 返回时间戳,13 位
result Object 返回结果

result 参数说明

{
  "total": "Integer",
  "list": [
    {
      "access_record_id": "String //通行记录业务业务主键",
      "access_time": "Long //通行时间",
      "person_id": "String //人员 ID",
      "name": "String //姓名",
      "sex": "Integer //性别",
      "mobile_country": "String //手机码",
      "mobile": "String //手机号",
      "structure_name": "String //所属组织",
      "person_code": "String //工号",
      "access_direction": "Integer //通行方向,0:进,1:出",
      "access_control_channel_name": "String //出入口名称",
      "access_control_channel_no": "Integer //出入口通道号",
      "access_channel_position_path": "String //出入口安装位置",
      "business_device_name": "String //业务设备名称",
      "access_type": "Integer //通行方式,1(卡)/2(密码)/4(⼈脸)/9(远程)",
      "event_name": "String //通行事件"
    }
  ],
  "has_more": "Boolean"
}

请求示例

POST /v1.0/iot-02/building/access-record
{
  "project_id": "Lo4KO88***",
  "access_start_time": 28817,
  "access_end_time": 814559,
  "name": "ph08hnx***",
  "sex": 145371,
  "mobile": "w5AkHvv***k",
  "structure_name": "cSNFM8v***",
  "person_code": "MdfBBZQ***",
  "access_direction": 986048,
  "access_control_channel_name": "RSRd4tb***",
  "access_channel_position_path": "B9enQD9n***",
  "business_device_name": "GZCM2s6***",
  "certificate": "i5rPql2S4T",
  "event_node_ids": [
    "Q7y38SBgiv"
  ],
  "page": 251001,
  "page_size": 534449,
  "need_log": true
}

响应示例

{
    "result": {
        "list": [
            {
                "access_channel_position_path": "中心-11",
                "access_control_channel_name": "605c出入口",
                "access_control_channel_no": 1,
                "access_direction": 0,
                "access_record_id": "1568067517614698***",
                "access_time": 1662691403186,
                "access_type": 0,
                "business_device_name": "门禁605c",
                "event_name": "非法通行",
                "mobile": "",
                "mobile_country": "",
                "name": "",
                "person_code": "",
                "person_id": "",
                "structure_name": ""
            }
        ],
        "total": 209
    },
    "success": true,
    "t": 1664187427006,
    "tid": "5fbbfa563d8411ed84fd2237f0528b74"
}

错误码

以下为该接口常见的业务异常。更多的异常错误,请参见 全局错误码

错误码 说明
500 系统错误