Commit 5a55d17c authored by lcn's avatar lcn

bug修复

parent 0a5140ac
...@@ -152,7 +152,8 @@ async def compy_lst_month_pf(cid): ...@@ -152,7 +152,8 @@ async def compy_lst_month_pf(cid):
return "" return ""
now_dt = pendulum.now(tz=CST) now_dt = pendulum.now(tz=CST)
cal_month = now_dt.subtract(months=1).format("YYYY-MM-DD") cal_month = now_dt.subtract(months=1).start_of(unit="month").format(
"YYYY-MM-DD")
sql = "SELECT cos FROM algo_power_factor_result " \ sql = "SELECT cos FROM algo_power_factor_result " \
"WHERE inlid in %s and month=%s" "WHERE inlid in %s and month=%s"
cos_lst = [r["cos"] for r in cos_lst = [r["cos"] for r in
......
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