diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index 1435c95d..2d18ef5e 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -471,7 +471,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s, if type in ['hour_s', 'sflog', 'day_s']: enstat.pcoal_heat = get_pcoal_heat( enstat.year_s, enstat.month_s, enstat.day_s) - enstat.pcoal_coal_consume = enstat.pcoal_consume * enstat.pcoal_heat/7000 + enstat.pcoal_coal_consume = enstat.pcoal_consume * enstat.pcoal_heat/29307 elif type == 'month_st': enstat.pcoal_coal_consume = EnStat.objects.filter( type='sflog', mgroup=enstat.mgroup, year_s=year_s, month_s=month_s, sflog__team=enstat.team).aggregate(sum=Sum('pcoal_coal_consume'))['sum'] @@ -664,7 +664,7 @@ def cal_enstat_pcoal_change(enstat, new_pcoal_heat): type = enstat.type if type in ['hour_s', 'sflog', 'day_s']: enstat.pcoal_heat = new_pcoal_heat - enstat.pcoal_coal_consume = enstat.pcoal_consume * enstat.pcoal_heat/7000 + enstat.pcoal_coal_consume = enstat.pcoal_consume * enstat.pcoal_heat/29307 elif type == 'month_st': enstat.pcoal_coal_consume = EnStat.objects.filter(type='sflog', mgroup=enstat.mgroup, year_s=enstat.year_s, month_s=enstat.month_s, sflog__team=enstat.team).aggregate(sum=Sum('pcoal_coal_consume'))['sum']