# 功能详情
根据设备号获取当前设备的病害风险等级。
# 请求地址和方法
- 请求地址
https://www.sdzhiot.top/api/v3/disease/get-riskLevel
- 请求方法
GET
# 请求参数
| 字段名 | 字段类型 | 字段说明 | 是否必须 |
|---|---|---|---|
| sno | String | 设备号 | Y |
# 样例输入
/api/v3/disease/get-riskLevel?sno=063948483917
# 返回data字段说明
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| sno | String | 设备号 |
| diseaseCount | int | 监测病害数量 |
| diseases | List | 监测病害 |
其中diseases的数据结构说明如下
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| diseaseName | String | 病害名称 |
| diseaseRiskLevel | String | 病害风险等级 (等级0-5,等级越高,风险越大) |
| totalScore | String | 病害总分 |
| reportTime | long | 病害报告时间 |
# 样例输出
{
"code": 0,
"data": {
"sno": "33F7FDE34FC4",
"diseaseCount": 2,
"diseases": [
{
"diseaseName": "小麦条锈病",
"diseaseRiskLevel": 0,
"totalScore": 4.2,
"reportTime": 1750842435000
},
{
"diseaseName": "赤霉病",
"diseaseRiskLevel": 0,
"totalScore": 0.0,
"reportTime": 1764672589000
}
]
},
"msg": ""
}
# 返回码
| 返回码 | 返回消息 | 说明 |
|---|---|---|
| 0 | 操作成功 | 请求成功 |
| 500 | 服务器错误 | 服务端异常 |
| 10001 | 参数为空或格式不正确 | 参数错误 |
| 10002 | appKey不存在 | 确认appKey是否正确 |