From 8ec5f8c6dd4b58921b4e37ed40a4abfcd2bea890 Mon Sep 17 00:00:00 2001 From: zty Date: Wed, 6 Nov 2024 10:43:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20enm=20=E5=9B=9E=E8=BD=AC=E7=AA=91?= =?UTF-8?q?=E7=BB=BC=E5=90=88=E7=94=B5=E8=80=97=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enm/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index d085b7f1..2269a649 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -577,11 +577,11 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, enstat.celec_consume_unit = enstat.elec_consume_unit + get_sysconfig('enm.enm_lhxs') * pre_enstat.elec_consume_unit if pre_enstat2: try: - pre_enstat2.production_elec_consume_unit = enstat.elec_consume / enstat.total_production + pre_enstat2.production_elec_consume_unit = pre_enstat2.elec_consume / enstat.total_production except ZeroDivisionError: pre_enstat2.production_elec_consume_unit = 0 pre_enstat2.save(update_fields=["production_elec_consume_unit"]) - enstat.celec_consume_unit += enstat.production_elec_consume_unit + enstat.celec_consume_unit += pre_enstat2.production_elec_consume_unit enstat.save() # 算总煤耗 if "pcoal" in this_cal_attrs: