fix: 更新所监测设备测点的total_production忽略必须指定设备

This commit is contained in:
caoqianming 2024-06-24 10:02:54 +08:00
parent ac7e0a84ea
commit 499e5732aa
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
elec_consume_unit = F("val") / total_production
MpointStat.objects.filter(
mgroup=enstat.mgroup, mpoint__material__code="elec", type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour
).exclude(mpoint__ep_monitored=None).update(total_production=total_production, elec_consume_unit=elec_consume_unit)
).update(total_production=total_production, elec_consume_unit=elec_consume_unit)
# 更新余热发电的production_elec_unit
if mgroup.name == "回转窑":
if enstat.total_production == 0: