refector: get_analyse_data_mgroups_duration 增加run_hour返回

This commit is contained in:
caoqianming 2024-05-22 17:11:46 +08:00
parent 8627d5f9dc
commit 2ac4f5b04f
1 changed files with 1 additions and 0 deletions

View File

@ -434,6 +434,7 @@ def get_analyse_data_mgroups_duration(start_date: datetime, end_date: datetime)
item["mgroup_name"] = item["mgroup__name"]
item["production_hour"] = round(item["total_production"] * 3600 / item["run_sec"], 2) if item["run_sec"] > 0 else 0
item["elec_consume_unit"] = round(item["elec_consume"] / item["total_production"], 2) if item["total_production"] > 0 else 0
item["run_hour"] = round(item["run_sec"] / 3600, 2) if item["run_sec"] > 0 else 0
item["run_rate"] = round(item["run_sec"] * 100 / total_sec, 4) if total_sec > 0 else 0
item["coal_consume_unit"] = round(item["pcoal_coal_consume"] * 1000 / item["total_production"], 2) if item["total_production"] > 0 else 0
if item["mgroup_name"] == "回转窑":