主题
查询待办统计
用于查询系统中的任务统计数据;
接口说明
请求URL:http[s]://{网关地址}/casp-tdc/task/count
请求方式: POST
请求内容类型: application/json
响应内容类型: application/json
请求说明
请求体
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 用户工号 | userId | O | String(50) | 学工号 |
| 开始时间 | startTime | O | String | 格式:yyyy-MM-dd HH:mm:ss |
| 结束时间 | endTime | O | String | 格式:yyyy-MM-dd HH:mm:ss |
| 是否忽略 | isIgnore | O | integer | 0:未忽略 1:已忽略 |
| 是否缓办3.7.3.Beta2+ | isDelay | O | integer | 0:未缓办 1:已缓办 |
| 是否过期 | isExpire | O | integer | 0:未过期 1:已过期 |
请求示例
json
{
"userId":"test-gh",
"startTime":"2020-01-01 12:00:00",
"endTime":"2023-01-01 12:00:00"
}1
2
3
4
5
2
3
4
5
响应说明
响应体
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 返回码 | errcode | String | 返回码 |
| 返回描述 | errmsg | String | 返回描述 |
| 任务总数 3.4.1+ | total | integer | 任务总数 |
| 已办总数 | finishCount | integer | 已办总数 |
| 待办总数 | doingCount | integer | 待办总数 |
响应示例
json
{
"errcode": "0",
"errmsg": "success",
"traceId": null,
"total": 1,
"finishCount": 0,
"doingCount": 1
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
错误码
| 错误码 | 描述 |
|---|---|
| 376999 | 系统异常,详细描述信息参见接口返回 |
| 999 | 统一错误码,详细描述信息参见接口返回 |
Demo
java
// 创建客户端
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
// 创建请求对象
TaskCountRequest request = new TaskCountRequest();
request.setUserId("xxx");
TaskCountResponse response = client.execute(request);
//调用成功,则处理业务逻辑
if (response.isSuccess()) {
//.....
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10

