feat: 煤粉热值系数修改

This commit is contained in:
caoqianming 2023-10-09 16:52:16 +08:00
parent 4ca344a86a
commit 7f1f3df956
1 changed files with 2 additions and 2 deletions

View File

@ -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']