fixed
This commit is contained in:
parent
4e7500b8db
commit
b91cf9b80f
|
@ -167,6 +167,9 @@ def get_has_clientId_sql(clientid):
|
|||
return send_json
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 获取空气设备历史7天的报警数据sql
|
||||
def air_device_past_seven_days_sql(deviceId):
|
||||
current_date = datetime.now().date()
|
||||
|
@ -178,6 +181,7 @@ def air_device_past_seven_days_sql(deviceId):
|
|||
}
|
||||
return send_json
|
||||
|
||||
|
||||
# 获取普通设备历史7天的报警数据sql
|
||||
def common_device_past_seven_days_sql(deviceId):
|
||||
current_date = datetime.now().date()
|
||||
|
|
6
xumu.py
6
xumu.py
|
@ -161,12 +161,12 @@ async def register(request: Request):
|
|||
send_json = create_register_sql(iccid, deviceId, type)
|
||||
r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json)
|
||||
res.append(r.json())
|
||||
else:
|
||||
return BaseResponse(code=500, msg="500 Internal error")
|
||||
# 插入设备状态表
|
||||
# 插入设备状态表,只有新注册的才会插入设备表
|
||||
send_json = insert_device_status_sql(iccid, clientid, deviceId)
|
||||
r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json)
|
||||
res.append(r.json())
|
||||
else:
|
||||
return BaseResponse(code=500, msg="500 Internal error")
|
||||
# 创建相应的数据库和字段
|
||||
sql_list = farm_sql(deviceId, type)
|
||||
for sql in sql_list:
|
||||
|
|
Loading…
Reference in New Issue