diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index 7b5ec294..0c3f2a9f 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -361,7 +361,6 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, mps = MpointStat.objects.filter(type="year_s", mgroup=mgroup, year_s=year_s, mpoint__material=material) if mps.filter(mpoint__is_rep_mgroup=True).exists(): mps = mps.filter(mpoint__is_rep_mgroup=True) - myLogger.info(f'{mgroup.name}-{material.name}-{year_s}-{month_s}-{day_s}-{hour}') amount_consume = mps.aggregate(sum=Sum("val"))["sum"] if amount_consume is None: amount_consume = 0 @@ -389,7 +388,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, except Exception: pass elif material.code == "water": - enstat.water = amount_consume + enstat.water_consume = amount_consume elif material.code == "pcoal": enstat.pcoal_consume = amount_consume elif material.code == "cair": @@ -750,5 +749,4 @@ def check_mpoint_offline(seconds=300): if is_offline: mpoint_data['gather_state'] = -2 # 掉线了 cache.set(cache_key, mpoint_data, timeout=None) - \ No newline at end of file