Commit a7fe29b8 authored by wang.wenrong's avatar wang.wenrong

Merge branch 'wwr' into 'develop'

设备管理复用cid逻辑

See merge request !49
parents c5092265 d76600b3
......@@ -231,7 +231,7 @@ async def hardware_statistics(company_id):
async with MysqlUtil() as conn:
inline_sql = "select count(*) as inline_count from inline where " \
"cid_belongedto = %s"
"cid = %s"
inline_count_map = await conn.fetchone(sql=inline_sql,
args=(company_id,))
inline_count = inline_count_map["inline_count"]
......@@ -245,7 +245,7 @@ async def hardware_statistics(company_id):
datetime.fromtimestamp(create_time_timestamp), "%Y-%m-%d %H:%M")
# power_capacity供电容量字段计算错误,改为inline表的tc_runtime字段相加
async with MysqlUtil() as conn:
capacity_sql = "select tc_runtime from inline where cid_belongedto = %s"
capacity_sql = "select tc_runtime from inline where cid = %s"
capacity_list = await conn.fetchall(sql=capacity_sql,
args=(company_id,))
power_capacity = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment