Commit e57796df authored by lcn's avatar lcn

bug修复

parent 1602e4f3
...@@ -126,13 +126,17 @@ async def load_forecast_srv(cids, s_time, e_time, interval, slots): ...@@ -126,13 +126,17 @@ async def load_forecast_srv(cids, s_time, e_time, interval, slots):
for num, slot in enumerate(slots): for num, slot in enumerate(slots):
slot = pendulum.parse(slot).format("HH:mm") slot = pendulum.parse(slot).format("HH:mm")
slots[num] = slot slots[num] = slot
elif interval == 86400:
for num, slot in enumerate(slots):
slot = pendulum.parse(slot).format("MM-DD")
slots[num] = slot
return ForecastResp( return ForecastResp(
pred_data=LoadValue(slots=slots, value=forecast_list), pred_data=LoadValue(slots=slots, value=forecast_list),
real_data=LoadValue(slots=slots, value=real_list), real_data=LoadValue(slots=slots, value=real_list),
deviation_list=deviation_list, deviation_list=deviation_list,
max_deviation=[max_deviation,max_time], max_deviation=[max_deviation, max_time],
min_deviation=[min_deviation,min_time], min_deviation=[min_deviation, min_time],
avg_deviation=avg_deviation, avg_deviation=avg_deviation,
total_deviation=total_deviation, total_deviation=total_deviation,
real_power_list=LoadValue(slots=slots, value=real_power_list), real_power_list=LoadValue(slots=slots, value=real_power_list),
......
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