refresh api

main
chunquansang 2 months ago
parent bb0b06533a
commit 48d42f9409

166
api.md

@ -60,14 +60,14 @@
## 1. 接口基本信息
- **接口名称**:获取检测总量汇总数据
- **请求方法**`GET`
- **接口路径**`/api/detection/summary`
- **接口路径**`/api/v1/system/get_record_stats/`
- **功能描述**:根据传入的时间类型(月/周),获取检测时间、车体检测数量、撑杆检测数量的汇总数据,用于展示柱状图。
## 2. 请求参数
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|-----------|--------|----------|--------------------------|--------|
| dateType | string | 是 | 时间类型,取值`月`或`周` | 月 |
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|-----------|--------|----------|-----------------------|-------|
| dateType | string | 是 | 时间类型,取值`month`或`week` | month |
## 3. 响应参数
@ -83,13 +83,38 @@
## 4. 响应示例
```json
{
"code": 200,
"message": "获取检测总量汇总数据成功",
"data": {
"dateArr": ["1月", "2月", "3月", "4月", "5月", "6月"],
"vehicleDetection": [220, 220, 170, 190, 160, 250],
"poleDetection": [80, 150, 80, 100, 200, 80]
}
"code": 200,
"success": true,
"data": {
"dateArr": [
1,
2,
3,
4,
5,
6,
7
],
"pole": [
0,
8,
0,
0,
0,
0,
0
],
"appearance": [
0,
5,
0,
0,
0,
0,
0
]
},
"errorMessage": ""
}
```
![alt text](1741680039157.png)
@ -98,7 +123,7 @@
## 1. 接口基本信息
- **接口名称**:获取设备信息数据
- **请求方法**`GET`
- **接口路径**`/api/device/info`
- **接口路径**`/api/v1/system/get_device_stats/`
- **功能描述**:获取设备总数,以及车体检测、撑杆检测、钩机检测设备的总量,同时包含各类设备的在线、离线、故障数量状态。
## 2. 请求参数
@ -129,30 +154,31 @@
## 4. 响应示例
```json
{
"code": 200,
"message": "获取设备信息成功",
"data": {
"deviceTotal": 37,
"vehicleDetectionDevice": 12,
"vehicleStatus": {
"code": 200,
"success": true,
"data": {
"deviceTotal": 36,
"pole": {
"total": 12,
"onlineCount": 8,
"outlineCount": 2,
"errorCount": 2
},"appearance": {
"total": 12,
"onlineCount": 8,
"outlineCount": 2,
"errorCount": 2
},
"poleDetectionDevice": 10,
"poleStatus": {
"onlineCount": 9,
"outlineCount": 1,
"errorCount": 0
},
"machineDetectionDevice": 15,
"machineStatus": {
"excavator": {
"total": 12,
"onlineCount": 8,
"outlineCount": 2,
"errorCount": 2
}
}
},
"errorMessage": ""
}
```
![alt text](1741680066982.png)
@ -161,14 +187,16 @@
## 1. 接口基本信息
- **接口名称**:获取车体检测问题分布数据
- **请求方法**`GET`
- **接口路径**`/api/vehicle/detection/problem/distribution`
- **接口路径**`/api/v1/system/get_record_fault_stats/`
- **功能描述**:根据传入的时间类型,获取车体检测的问题类型及对应占比数据,用于展示饼图。
## 2. 请求参数
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|-----------|--------|----------|----------------------|--------|
| dateType | string | 是 | 时间类型(如月份) | 1月 |
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|----------|--------|----------|-------------------|----|
| dateType | string | 是 | 时间类型如week或month | week |
| value | int | 是 | 时间值 | 1 |
| type | string | 是 | 固定为appearance | appearance |
## 3. 响应参数
@ -183,16 +211,31 @@
## 4. 响应示例
```json
{
"code": 200,
"message": "获取车体检测问题分布数据成功",
"data": [
{ "name": "搭扣未搭", "value": 25 },
{ "name": "下侧门板缺失", "value": 35 },
{ "name": "小门搭扣丢失", "value": 15 },
{ "name": "门折页座脱落", "value": 15 },
{ "name": "小门外胀", "value": 10 },
{ "name": "小窗裂纹", "value": 5 }
]
"code": 200,
"success": true,
"data": [
{
"name": "rise",
"value": 1
},
{
"name": "material",
"value": 1
},
{
"name": "indeed",
"value": 1
},
{
"name": "economy",
"value": 1
},
{
"name": "daughter",
"value": 1
}
],
"errorMessage": ""
}
```
# 撑杆检测问题分布接口文档
@ -200,14 +243,16 @@
## 1. 接口基本信息
- **接口名称**:获取撑杆检测问题分布数据
- **请求方法**`GET`
- **接口路径**`/api/pole/detection/problem/distribution`
- **接口路径**`/api/v1/system/get_record_fault_stats/`
- **功能描述**:根据传入的时间类型,获取撑杆检测的问题类型及对应占比数据,用于展示饼图。
## 2. 请求参数
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|-----------|--------|----------|----------------------|--------|
| dateType | string | 是 | 时间类型(如月份) | 1月 |
| 参数名 | 类型 | 是否必填 | 描述 | 示例值 |
|----------|--------|----------|-------------------|------|
| dateType | string | 是 | 时间类型如week或month | week |
| value | int | 是 | 时间值 | 1 |
| type | string | 是 | 固定为pole | pole |
## 3. 响应参数
@ -222,12 +267,31 @@
## 4. 响应示例
```json
{
"code": 200,
"message": "获取撑杆检测问题分布数据成功",
"data": [
{ "name": "撑杆断折", "value": 65 },
{ "name": "撑杆弯曲", "value": 35 }
]
"code": 200,
"success": true,
"data": [
{
"name": "rise",
"value": 1
},
{
"name": "material",
"value": 1
},
{
"name": "indeed",
"value": 1
},
{
"name": "economy",
"value": 1
},
{
"name": "daughter",
"value": 1
}
],
"errorMessage": ""
}
```
![alt text](1741680094060.png)

Loading…
Cancel
Save