Commit c3c7703f authored by lcn's avatar lcn

bug修复

parent 747aba6e
......@@ -20,7 +20,7 @@ async def power_use_count(company_ids):
async def load_cmpy_power(cids):
sql = "SELECT COUNT(kwh) kwh FROM `company_1day_power` where cid in %s"
sql = "SELECT sum(kwh) kwh FROM `company_1day_power` where cid in %s"
async with MysqlUtil() as conn:
data = await conn.fetchone(sql, args=(cids,))
total_power = round(data.get("kwh") or 0, 2)
......
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