From c3b62f1831df95e51fcdc093b2f349bc1c587c9e Mon Sep 17 00:00:00 2001 From: zty Date: Fri, 16 Aug 2024 18:45:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20equip=5Felec=5Fdata=20=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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index f2a25d14..cb820e3e 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -546,7 +546,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, enstat.save() # 计算一些其他数据 if type == "month_st" and "material" in this_cal_attrs: # 如果计算的是班月,把主要设备电耗数据拉过来, 方便查询 - res = MpointStat.objects.filter(type='sflog', year_s=year_s, month_s=month_s, sflog__team=enstat.team, mpoint__ep_monitored__power_kw__gte=100).values( + res = MpointStat.objects.filter(type='sflog', year_s=year_s, month_s=month_s, sflog__team=enstat.team, mpoint__material__code='elec', mpoint__ep_monitored__isnull=False).values( equipment=F('mpoint__ep_monitored__id'), equipment_name=F('mpoint__ep_monitored__name')).annotate(consume=Sum('val')) res = list(res) for item in res: