|
|
@@ -298,23 +298,6 @@ def device_polyline_data(request):
|
|
|
"""
|
|
|
虫情测报灯/性诱测报/孢子仪/杀虫灯
|
|
|
数据详情-折线图接口
|
|
|
- 参数:
|
|
|
- device_type_id 必传(string) 设备类型 3虫情测报灯 7孢子仪 4智能性诱 2杀虫灯 9糖醋测报灯 10测报灯rtu
|
|
|
- d_id 必传 设备id
|
|
|
- start_time 非必传(string 时间戳) 开始时间 (用于时间搜索)
|
|
|
- end_time 非必传(string 时间戳) 结束时间 (用于时间搜索)
|
|
|
-
|
|
|
- 返回值:
|
|
|
- "data": {
|
|
|
- "device_id": "28586565004320786510437", 设备id
|
|
|
- "ath": [
|
|
|
- {
|
|
|
- "addtime": 1590230470, 时间
|
|
|
- "temperature": 34.1, 温度
|
|
|
- "humidity": 27.6, 湿度
|
|
|
- "others": 33, 设备类型是3为加热仓温度 当设备类型为7为保温仓温度 为4的时候是cpu温度 为2时是电击次数
|
|
|
- "set_temp": 50, 设备类型是7时为孢子仪保温仓设定温度,其他类型时该值为空
|
|
|
- }......
|
|
|
"""
|
|
|
post_info = request.POST
|
|
|
device_type_id = post_info.get("device_type_id")
|
|
|
@@ -394,6 +377,9 @@ def device_polyline_data(request):
|
|
|
except:
|
|
|
new_tem = ""
|
|
|
new_hum = ""
|
|
|
+ if device_type_id == "4":
|
|
|
+ new_tem = d_t["at"]
|
|
|
+ new_hum = d_t["ah"]
|
|
|
others = ''
|
|
|
set_temp = ''
|
|
|
if device_type_id == '3':
|