From cd2f6eb77aeaf074ab201ce7b00cfd06c4219b93 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 27 Dec 2024 17:16:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=9F=E6=96=99=E7=A3=A8=E7=94=A8cod?= =?UTF-8?q?e=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enm/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index b303717f..6fea8194 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -634,7 +634,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, enstat.equip_elec_data = res enstat.save() # 开始计算互相影响的数据 - if mgroup.name == "原料磨": + if mgroup.code == "ylm": if enstat.type in ["hour_s", "day_s", "year_s", "month_s"]: hzy_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__name="回转窑").first() if hzy_enstat: @@ -646,7 +646,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, if enstat.mgroup.name == "回转窑": # 算单位产品(综合电耗/标煤耗/综合能耗) # 综合电耗 if enstat.type in ["hour_s", "day_s", "year_s", "month_s"]: - ylm_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__name="原料磨").first() + ylm_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__code="ylm)").first() if ylm_enstat: try: enstat.celec_consume_unit = (enstat.elec_consume + ylm_enstat.elec_consume)/enstat.total_production @@ -977,7 +977,7 @@ def cal_enstat_pcoal_change(enstat: EnStat, new_pcoal_heat): enm_alarms_list = [ ["电石渣", "elec_consume_unit", "单位产品分布电耗"], - ["原料磨", "elec_consume_unit", "单位产品分布电耗"], + ["生料工序(二次配料)", "elec_consume_unit", "单位产品分布电耗"], ["回转窑", "celec_consume_unit", "单位产品综合电耗"], ["回转窑", "coal_consume_unit", "单位产品标煤耗"], ["煤磨", "elec_consume_unit", "单位产品分布电耗"],