refresh api

main
chunquansang 2 months ago
parent 208f5dd0bd
commit 81a925ff1b

@ -24,10 +24,13 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "登录成功", "success": true,
"data": { "data": {
"token": "xxx-xxx-xxx" // 登录成功返回的 token "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTc0MzA2ODU4NiwiaWF0IjoxNzQxNzcyNTg2LCJqdGkiOiI2MjNhNmUxM2Q3YjM0NmE4YTMzMGQ3ZGY5MTQ2YTliMCIsInVzZXJfaWQiOjF9.nhUnJuMDsQbKG96ma08bH17tWj-4PbQNUYx4vRzpbIQ",
} "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQyMzc3Mzg2LCJpYXQiOjE3NDE3NzI1ODYsImp0aSI6ImMzMmU0ZWQ5ZWU5MTQ3Nzc5MmFkNjQ1ZmM3NmZlYmE4IiwidXNlcl9pZCI6MX0.2IFz-zWaQF7HeL-SrjNR4o1A-9BebPx3KG7_OU1Y4yg",
"status": "ok"
},
"errorMessage": ""
} }
``` ```
@ -43,6 +46,9 @@
```json ```json
{ {
"code": 200, "code": 200,
"success": true,
"data": {},
"errorMessage": ""
} }
``` ```

@ -9,26 +9,26 @@
# 仪表盘模块Dashboard接口文档 # 仪表盘模块Dashboard接口文档
## 一、设备状态分页列表接口 ## 一、设备状态分页列表接口
### 1.1 接口基本信息 ### 1.1 接口基本信息
- **接口地址**/api/dashboard/device-status/list - **接口地址**/api/v1/device/device/
- **请求方式**GET - **请求方式**GET
- **功能描述**:获取设备状态分页列表,支持条件查询 - **功能描述**:获取设备状态分页列表,支持条件查询
### 1.2 请求参数 ### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|--------|----------|--------------------------|----------------| |---------------|--------|----------|--------------------------|----------------|
| device_name | string | 否 | 设备名称(模糊查询) | "设备A" | | device_name | string | 否 | 设备名称(模糊查询) | "设备A" |
| device_id | string | 否 | 设备ID精确查询 | "DEV-001" | | device_number | string | 否 | 设备ID精确查询 | "DEV-001" |
| page | int | 是 | 分页页码 | 1 | | current | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 | | pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数 ### 1.3 响应参数
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
|--------------|----------|--------------------------| |---------------------------|----------|----------------------|
| code | int | 响应码200为成功 | | code | int | 响应码200为成功 |
| message | string | 响应信息 | | errorMessage | string | 异常信息 |
| data | object | 数据体 | | data | object | 数据体 |
| ├─ total | int | 总记录数 | | ├─ total | int | 总记录数 |
| ├─ list | array | 设备状态列表 | | ├─ data | array | 设备状态列表 |
| └─ ├─ device_name | string | 设备名称 | | └─ ├─ device_name | string | 设备名称 |
| └─ ├─ device_id | string | 设备ID | | └─ ├─ device_id | string | 设备ID |
| └─ ├─ device_location | string | 设备位置 | | └─ ├─ device_location | string | 设备位置 |
@ -39,33 +39,52 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"total": 50, "total": 21,
"list": [ "data": [
{ {
"device_name": "工业机器人A", "id": 21,
"device_id": "DEV-001", "key": "21",
"device_location": "工厂1楼车间", "device_number": "DEV-020",
"device_status": 0, "device_name": "Say Device",
"real_time_video_url": "https://xxx.com/real_time_001.mp4" "device_position": "Floor 6, Room 101",
} "device_status": "online",
] "url": "https://www.johnson-malone.com/",
"created_at": "2025-03-12 14:52:21",
"updated_at": "2025-03-12 14:52:21"
},
{
"id": 20,
"key": "20",
"device_number": "DEV-019",
"device_name": "Reality Device",
"device_position": "Floor 10, Room 105",
"device_status": "offline",
"url": "https://www.lewis.com/",
"created_at": "2025-03-12 14:52:21",
"updated_at": "2025-03-12 14:52:21"
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-1.png) ![alt text](image-1.png)
## 二、设备历史视频列表接口 ## 二、设备历史视频列表接口
### 2.1 接口基本信息 ### 2.1 接口基本信息
- **接口地址**/api/dashboard/device-history-video/list - **接口地址**/api/v1/device/device_history/
- **请求方式**GET - **请求方式**GET
- **功能描述**:根据设备 ID 查询历史视频列表,支持日期时间过滤 - **功能描述**:根据设备 ID 查询历史视频列表,支持日期时间过滤
### 2.2 请求参数 ### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|------------|--------|----------|-----------------------------|----------------| |------------|--------|----------|-----------------------------|--------------|
| device_id | string | 是 | 设备 ID关联设备详情 | "DEV-001" | | device_id | int | 是 | 设备 ID关联设备详情 | 1 |
| start_time | string | 否 | 开始时间格式YYYY-MM-DD | "2025-03-01" | | start_time | string | 否 | 开始时间格式YYYY-MM-DD | "2025-03-01" |
| end_time | string | 否 | 结束时间格式YYYY-MM-DD | "2025-03-31" | | end_time | string | 否 | 结束时间格式YYYY-MM-DD | "2025-03-31" |
@ -84,16 +103,32 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"total": 15, "total": 10,
"list": [ "data": [
{ {
"video_url": "https://xxx.com/history_001.mp4", "id": 10,
"record_time": "2025-03-10 14:30:00" "key": "10",
} "video_url": "ftp://192.168.10.38/1.mp4",
] "created_at": "2025-03-12 14:53:36",
"updated_at": "2025-03-12 14:53:36",
"device": 1
},
{
"id": 9,
"key": "9",
"video_url": "ftp://192.168.10.38/1.mp4",
"created_at": "2025-03-12 14:53:36",
"updated_at": "2025-03-12 14:53:36",
"device": 1
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-2.png) ![alt text](image-2.png)
@ -102,24 +137,24 @@
## 一、撑杆监测分页列表接口 ## 一、撑杆监测分页列表接口
### 1.1 接口基本信息 ### 1.1 接口基本信息
- **接口地址**/api/pole-monitor/list - **接口地址**/api/v1/record/record/
- **请求方式**GET - **请求方式**GET
- **功能描述**:获取撑杆监测分页列表,支持多条件筛选 - **功能描述**:获取撑杆监测分页列表,支持多条件筛选
### 1.2 请求参数 ### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|---------|----------|-----------------------------|----------------| |-----------------------|---------|----------|--------------------------|--------------|
| carNo | string | 否 | 车号(精确/模糊查询) | "JZ20250301" | | train_number | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| carType | string | 否 | 车型 | "货车" | | train_model | string | 否 | 车型 | "货车" |
| carriageNo | string | 否 | 车厢号(精确查询) | "C001" | | train_carriage_number | string | 否 | 车厢号(精确查询) | "C001" |
| warnType | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" | | alarm_type | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| faultType | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" | | fault_type | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 | | level | int | 否 | 等级1-3数值越大越严重 | 2 |
| review | boolean | 否 | 复核状态true=已复核false=未复核) | true | | is_reviewed | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| date | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" | | created_at | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| page | int | 是 | 分页页码 | 1 | | current | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 | | pageSize | int | 是 | 每页数量 | 10 |
| type | string | 是 | 固定为 pole | pole |
### 1.3 响应参数 ### 1.3 响应参数
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
|------------------|----------|--------------------------| |------------------|----------|--------------------------|
@ -142,37 +177,60 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"total": 200, "total": 8,
"list": [ "data": [
{ {
"id": "PM001", "id": 19,
"carNo": "JZ20250301", "key": "19",
"carType": "货车", "train_number": "pS399",
"carriageNo": "C001", "train_model": "home",
"warnType": "倾斜", "train_carriage_number": "C16",
"faultType": "机械故障", "alarm_type": "candidate",
"fault_type": "several",
"level": 2, "level": 2,
"review": false, "is_reviewed": false,
"date": "2025-03-10 09:00:00" "created_at": "2025-03-12 14:46:55",
} "updated_at": "2025-03-12 14:46:55",
] "type": "pole"
},
{
"id": 16,
"key": "16",
"train_number": "vO272",
"train_model": "enough",
"train_carriage_number": "C49",
"alarm_type": "sing",
"fault_type": "scientist",
"level": 5,
"is_reviewed": true,
"created_at": "2025-03-12 14:46:54",
"updated_at": "2025-03-12 14:46:54",
"type": "pole"
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-3.png) ![alt text](image-3.png)
## 二、撑杆监测详情接口 ## 二、撑杆监测详情接口
### 2.1 接口基本信息 ### 2.1 接口基本信息
- **接口地址**/api/pole-monitor/detail/{id} - **接口地址**/api/v1/record/record_detail_list/
- **请求方式**GET - **请求方式**GET
- **功能描述**:根据监测数据 ID 获取详细信息,包含图文列表及监测数据 - **功能描述**:根据监测数据 ID 获取详细信息,包含图文列表及监测数据
### 2.2 请求参数 ### 2.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|--------|----------|--------------------------|--------------| |--------|-----|----------|--------------------------|-----|
| id | string | 是 | 监测数据唯一标识(关联分页列表 ID | "PM001" | | id | int | 是 | 监测数据唯一标识(关联分页列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 2.3 响应参数 ### 2.3 响应参数
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
@ -202,29 +260,44 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"id": "PM001", "total": 10,
"carNo": "JZ20250301", "data": [
"carType": "货车",
"carriageNo": "C001",
"warnType": "倾斜",
"faultType": "机械故障",
"level": 2,
"review": false,
"date": "2025-03-10 09:00:00",
"image_list": [
{ {
"image_name": "pole_001.jpg", "id": 1,
"image_url": "https://xxx.com/pole_001.jpg", "key": "1",
"capture_time": "2025-03-10 09:01:30", "name": "Christopher Lynch",
"length": 5.2, "video_url": "ftp://192.168.10.38/1.mp4",
"width": 0.3, "image_url": "https://picsum.photos/963/650",
"height": 0.3, "created_at": "2025-03-12 14:51:12",
"weight": 120.5 "updated_at": "2025-03-12 14:51:12",
} "length": 6.08,
] "width": 0.81,
"height": 0.67,
"weight": 14.14,
"record": 1
},
{
"id": 2,
"key": "2",
"name": "Jon Williams",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://placekitten.com/603/345",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.57,
"width": 1.63,
"height": 2.04,
"weight": 26.9,
"record": 1
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-4.png) ![alt text](image-4.png)
@ -238,17 +311,18 @@
### 1.2 请求参数 ### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------------|---------|----------|-----------------------------|----------------| |-----------------------|---------|----------|--------------------------|--------------|
| carNo | string | 否 | 车号(精确/模糊查询) | "JZ20250301" | | train_number | string | 否 | 车号(精确/模糊查询) | "JZ20250301" |
| carType | string | 否 | 车型 | "货车" | | train_model | string | 否 | 车型 | "货车" |
| carriageNo | string | 否 | 车厢号(精确查询) | "C001" | | train_carriage_number | string | 否 | 车厢号(精确查询) | "C001" |
| warnType | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" | | alarm_type | string | 否 | 告警类型(如:倾斜、断裂) | "倾斜" |
| faultType | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" | | fault_type | string | 否 | 故障类型(如:机械故障、电气故障) | "机械故障" |
| level | int | 否 | 等级1-3数值越大越严重 | 2 | | level | int | 否 | 等级1-3数值越大越严重 | 2 |
| review | boolean | 否 | 复核状态true=已复核false=未复核) | true | | is_reviewed | boolean | 否 | 复核状态true=已复核false=未复核) | true |
| date | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" | | created_at | string | 否 | 监测日期格式YYYY-MM-DD | "2025-03-10" |
| page | int | 是 | 分页页码 | 1 | | current | int | 是 | 分页页码 | 1 |
| page_size | int | 是 | 每页数量 | 10 | | pageSize | int | 是 | 每页数量 | 10 |
| type | string | 是 | 固定为 appearance | appearance |
### 1.3 响应参数 ### 1.3 响应参数
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
@ -272,23 +346,44 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"total": 200, "total": 5,
"list": [ "data": [
{
"id": 17,
"key": "17",
"train_number": "zE074",
"train_model": "create",
"train_carriage_number": "C28",
"alarm_type": "decision",
"fault_type": "material",
"level": 4,
"is_reviewed": false,
"created_at": "2025-03-12 14:46:55",
"updated_at": "2025-03-12 14:46:55",
"type": "appearance"
},
{ {
"id": "PM001", "id": 14,
"carNo": "JZ20250301", "key": "14",
"carType": "货车", "train_number": "Bp417",
"carriageNo": "C001", "train_model": "ground",
"warnType": "倾斜", "train_carriage_number": "C43",
"faultType": "机械故障", "alarm_type": "market",
"fault_type": "rise",
"level": 2, "level": 2,
"review": false, "is_reviewed": true,
"date": "2025-03-10 09:00:00" "created_at": "2025-03-12 14:46:54",
} "updated_at": "2025-03-12 14:46:54",
] "type": "appearance"
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-5.png) ![alt text](image-5.png)
@ -303,8 +398,10 @@
### 1.2 请求参数 ### 1.2 请求参数
| 参数名 | 类型 | 是否必填 | 说明 | 示例值 | | 参数名 | 类型 | 是否必填 | 说明 | 示例值 |
|--------|--------|----------|--------------------------|--------------| |--------|-----|----------|--------------------------|-----|
| id | string | 是 | 监测数据唯一标识(关联列表 ID | "AM001" | | id | int | 是 | 监测数据唯一标识(关联列表 ID | 1 |
| current | int | 是 | 分页页码 | 1 |
| pageSize | int | 是 | 每页数量 | 10 |
### 1.3 响应参数 ### 1.3 响应参数
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
@ -335,30 +432,44 @@
```json ```json
{ {
"code": 200, "code": 200,
"message": "获取成功", "success": true,
"data": { "data": {
"id": "AM001", "total": 10,
"carNo": "JZ20250302", "data": [
"carType": "客车",
"carriageNo": "C002",
"warnType": "变形",
"faultType": "结构损伤",
"level": 3,
"review": true,
"date": "2025-03-10 10:00:00",
"video_list": [
{ {
"video_name": "appearance_001.mp4", "id": 1,
"video_url": "https://xxx.com/appearance_001.mp4", "key": "1",
"capture_time": "2025-03-10 10:02:00", "name": "Christopher Lynch",
"length": 6.5, "video_url": "ftp://192.168.10.38/1.mp4",
"width": 2.8, "image_url": "https://picsum.photos/963/650",
"height": 3.2, "created_at": "2025-03-12 14:51:12",
"volume": 58.24, "updated_at": "2025-03-12 14:51:12",
"weight": 8500.0 "length": 6.08,
} "width": 0.81,
] "height": 0.67,
"weight": 14.14,
"record": 1
},
{
"id": 2,
"key": "2",
"name": "Jon Williams",
"video_url": "ftp://192.168.10.38/1.mp4",
"image_url": "https://placekitten.com/603/345",
"created_at": "2025-03-12 14:51:12",
"updated_at": "2025-03-12 14:51:12",
"length": 6.57,
"width": 1.63,
"height": 2.04,
"weight": 26.9,
"record": 1
} }
],
"current": 1,
"success": true,
"pageSize": 2
},
"errorMessage": ""
} }
``` ```
![alt text](image-6.png) ![alt text](image-6.png)

Loading…
Cancel
Save