1. 时间计划管理

时间计划管理


1.1. 时间计划列表

基础信息

路径: /v1/api/pass/schedule/page

请求方法: POST

请求参数

Headers:

名称 必须 备注
Content-Type application/json

Body:

名称 类型 必须 默认值 备注
name string 时间计划名称,支持模糊查询
type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划
pageNum integer 1 页码,从1开始
当前页码,不传默认1
pageSize integer 20 页面大小
分页大小,不传默认20

Body示例:

{
  "name":"时间计划",
  "type": 1,
  "pageNum":1,
  "pageSize": 20
}

返回数据

Headers:

名称 必须 备注
content-type application/json;charset=UTF-8

Body:

名称 类型 必须 默认值 备注
code integer 返回值code
msg string 返回值消息
data object 具体的返回值
  |─pageNum integer 页码,从1开始
当前页码
  |─pageSize integer 页面大小
分页大小
  |─total integer 总记录数
总数
  |─list array
    |─ object
      |─uuid string uuid
      |─name string 时间计划名称
      |─type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划

响应示例:

{
  "code":0,
  "data":{
    "list":[
      {
        "name":"基础人员默认时间计划",
        "type":1,
        "uuid":"851b75f2d16b40a18b17e281b1f71111"
      }
    ],
    "pageNum":1,
    "pageSize":20,
    "total":1
  },
  "msg":"成功"
}

1.2. 添加时间计划集合

基础信息

路径: /v1/api/pass/schedule/addBatch

请求方法: POST

请求参数

Headers:

名称 必须 备注
Content-Type application/json

Body:

名称 类型 必须 默认值 备注
scheduleList array 时间计划添加集合
  |─ object
    |─uuid string uuid,唯一,长度1-40,不支持特殊字符
    |─name string 时间计划名称,唯一,长度1-32,不支持特殊字符
    |─holiday array 节假日(安防、事件时间计划不支持节假日)
      |─ object
        |─date string 时间:'2020-01-01'
        |─state boolean 状态开关:false 关闭 true 开启
        |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─holidayList array 节假日(安防、事件时间计划不支持假日),v1.1.0后使用该字段
      |─ object
        |─startDate string 起始时间:'2020-01-01'
        |─endDate string 截止时间:'2020-01-01'
        |─state boolean 状态开关:false 关闭 true 开启
        |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─workDay array 工作日
      |─ object
        |─week integer 星期,取值1~7
        |─during array 时间段(至多3段),后一段的开始时间务必大于前一段的结束时间
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划

Body示例:

{
  "scheduleList": [
    {
      "name": "全天时间计划",
      "holidayList": [
        {
          "startDate": "2023-03-20",
          "endDate": "2023-03-21",
          "state": true,
          "during": [
            {
              "from": "00:00",
              "to": "23:59"
            }
          ]
        }
      ],
      "workDay": [
        {"during":[{"from":"00:00","to":"23:59"}],"week":1},
        {"during":[{"from":"00:00","to":"23:59"}],"week":2},
        {"during":[{"from":"00:00","to":"23:59"}],"week":3},
        {"during":[{"from":"00:00","to":"23:59"}],"week":4},
        {"during":[{"from":"00:00","to":"23:59"}],"week":5},
        {"during":[{"from":"00:00","to":"23:59"}],"week":6},
        {"during":[{"from":"00:00","to":"23:59"}],"week":7}],
      "type": 1
    }
  ]
}

返回数据

Headers:

名称 必须 备注
content-type application/json;charset=UTF-8

Body:

名称 类型 必须 默认值 备注
code integer 返回值code
msg string 返回值消息
data object 具体的返回值
  |─successes array 成功列表
    |─ object
      |─uuid string uuid
      |─name string 时间计划名称
      |─holiday array 节假日
        |─ object
          |─startDate string 起始时间:'2020-01-01'
          |─endDate string 截止时间:'2020-01-01'
          |─state boolean 状态开关:false 关闭 true 开启
          |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
            |─ object
              |─from string 开始时间,格式:HH:mm
              |─to string 结束时间,格式:HH:mm
      |─workDay array 工作日
        |─ object
          |─week integer 星期,取值1~7
          |─during array 时间段(至多3段),后一段的开始时间务必大于前一段的结束时间
            |─ object
              |─from string 开始时间,格式:HH:mm
              |─to string 结束时间,格式:HH:mm
      |─type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划
      |─code integer 结果状态码
      |─msg string 结果信息提示
  |─failures array 失败列表
    |─ object
      |─uuid string uuid
      |─name string 时间计划名称
      |─holiday array 节假日
        |─ object
          |─startDate string 起始时间:'2020-01-01'
          |─endDate string 截止时间:'2020-01-01'
          |─state boolean 状态开关:false 关闭 true 开启
          |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
            |─ object
              |─from string 开始时间,格式:HH:mm
              |─to string 结束时间,格式:HH:mm
      |─workDay array 工作日
        |─ object
          |─week integer 星期,取值1~7
          |─during array 时间段(至多3段),后一段的开始时间务必大于前一段的结束时间
            |─ object
              |─from string 开始时间,格式:HH:mm
              |─to string 结束时间,格式:HH:mm
      |─type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划
      |─code integer 结果状态码
      |─msg string 结果信息提示

响应示例:

{
  "code":0,
  "data":{
    "failures":[],
    "successes":[
      {
        "holiday":[
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "endDate":"2023-03-21",
            "startDate":"2023-03-20",
            "state":true
          }
        ],
        "name":"全天时间计划",
        "type":1,
        "uuid":"2f27f88562c14402ac889e06c2368ffb",
        "workDay":[
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":1
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":2
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":3
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":4
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":5
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":6
          },
          {
            "during":[
              {
                "from":"00:00",
                "to":"23:59"
              }
            ],
            "week":7
          }
        ]
      }
    ]
  },
  "msg":"成功"
}

1.3. 修改时间计划

基础信息

路径: /v1/api/pass/schedule/update

请求方法: POST

请求参数

Headers:

名称 必须 备注
Content-Type application/json

Body:

名称 类型 必须 默认值 备注
uuid string uuid,唯一,长度1-40,不支持特殊字符
name string 时间计划名称,唯一,长度1-32,不支持特殊字符
holiday array 节假日(安防、事件时间计划不支持假日)
  |─ object
    |─date string 时间:'2020-01-01'
    |─state boolean 状态开关:false 关闭 true 开启
    |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
      |─ object
        |─from string 开始时间,格式:HH:mm
        |─to string 结束时间,格式:HH:mm
holidayList array 节假日(安防、事件时间计划不支持假日),v1.1.0后使用该字段
  |─ object
    |─startDate string 起始时间:'2020-01-01'
    |─endDate string 截止时间:'2020-01-01'
    |─state boolean 状态开关:false 关闭 true 开启
    |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
      |─ object
        |─from string 开始时间,格式:HH:mm
        |─to string 结束时间,格式:HH:mm
workDay array 工作日
  |─ object
    |─week integer 星期,取值1~7
    |─during array 时间段(至多3段),后一段的开始时间务必大于前一段的结束时间
      |─ object
        |─from string 开始时间,格式:HH:mm
        |─to string 结束时间,格式:HH:mm

Body示例:

{
  "uuid": "2f27f88562c14402ac889e06c2368ffb",
  "name": "全天时间计划-1",
  "holidayList": [
    {
      "startDate": "2023-03-21",
      "endDate": "2023-03-22",
      "state": true,
      "during": [
        {
          "from": "00:00",
          "to": "22:00"
        }
      ]
    }
  ],
  "workDay": [
    {"during":[{"from":"00:00","to":"23:59"}],"week":1},
    {"during":[{"from":"00:00","to":"23:59"}],"week":2},
    {"during":[{"from":"00:00","to":"23:59"}],"week":3},
    {"during":[{"from":"00:00","to":"23:59"}],"week":4},
    {"during":[{"from":"00:00","to":"23:59"}],"week":5},
    {"during":[{"from":"00:00","to":"23:59"}],"week":6},
    {"during":[{"from":"00:00","to":"23:59"}],"week":7}]
  ]
}

返回数据

Headers:

名称 必须 备注
content-type application/json;charset=UTF-8

Body:

名称 类型 必须 默认值 备注
code integer 返回值code
msg string 返回值消息
data object 具体的返回值

响应示例:

{
  "code":0,
  "msg":"成功"
}

1.4. 批量删除时间计划

基础信息

路径: /v1/api/pass/schedule/delete

请求方法: POST

请求参数

Headers:

名称 必须 备注
Content-Type application/json

Body:

名称 类型 必须 默认值 备注
uuidList array 时间计划删除uuid集合
  |─ string

Body示例:

{
  "uuidList": [
    "11f7815fe7834be39a56b6cd9562b0de"
  ]
}

返回数据

Headers:

名称 必须 备注
content-type application/json;charset=UTF-8

Body:

名称 类型 必须 默认值 备注
code integer 返回值code
msg string 返回值消息
data object 具体的返回值
  |─successes array 成功列表
    |─ object
      |─uuid string uuid
      |─code integer 结果状态码
      |─msg string 结果信息提示
  |─failures array 失败列表
    |─ object
      |─uuid string uuid
      |─code integer 结果状态码
      |─msg string 结果信息提示

响应示例:

{
  "code":0,
  "data":{
    "failures":[],
    "successes":[
      {
        "uuid":"11f7815fe7834be39a56b6cd9562b0de"
      }
    ]
  },
  "msg":"成功"
}

1.5. 查询时间计划详情列表

基础信息

路径: /v1/api/pass/schedule/details

请求方法: POST

请求参数

Headers:

名称 必须 备注
Content-Type application/json

Body:

名称 类型 必须 默认值 备注
uuidList array 时间计划uuid集合
  |─ string

Body示例:

{
  "uuidList": [
    "2f27f88562c14402ac889e06c2368ffb"
  ]
}

返回数据

Headers:

名称 必须 备注
content-type application/json;charset=UTF-8

Body:

名称 类型 必须 默认值 备注
code integer 返回值code
msg string 返回值消息
data array 具体的返回值
  |─ object
    |─uuid string uuid
    |─name string 时间计划名称
    |─workDay array 工作日
      |─ object
        |─week integer 星期,取值1~7
        |─during array 时间段(至多3段),后一段的开始时间务必大于前一段的结束时间
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─holiday array 节假日
      |─ object
        |─date string 时间:'2020-01-01'
        |─state boolean 状态开关:false 关闭 true 开启
        |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─holidayList array 节假日,v1.1.0后使用该字段
      |─ object
        |─startDate string 起始时间:'2020-01-01'
        |─endDate string 截止时间:'2020-01-01'
        |─state boolean 状态开关:false 关闭 true 开启
        |─during array 持续时间,如果state为true,则该参数必须传,且不能是空集合,参数按照集合里面对象参数说明为准
          |─ object
            |─from string 开始时间,格式:HH:mm
            |─to string 结束时间,格式:HH:mm
    |─type integer 类型
1 :基础人员
2 :事件
3 :人车管控
4 :人数统计
5 :智能分析
6 :重点人员默认时间计划
7 :访客时间计划
8 :openapi默认访客全天时间计划

响应示例:

{
  "code":0,
  "data":[
    {
      "holiday":[
        {
          "date":"2023-03-20",
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "state":true
        },
        {
          "date":"2023-03-21",
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "state":true
        }
      ],
      "holidayList":[
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "endDate":"2023-03-21",
          "startDate":"2023-03-20",
          "state":true
        }
      ],
      "name":"全天时间计划",
      "type":1,
      "uuid":"2f27f88562c14402ac889e06c2368ffb",
      "workDay":[
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":1
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":2
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":3
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":4
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":5
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":6
        },
        {
          "during":[
            {
              "from":"00:00",
              "to":"23:59"
            }
          ],
          "week":7
        }
      ]
    }
  ],
  "msg":"成功"
}

results matching ""

    No results matching ""