feat: 煤粉热值系数修改
This commit is contained in:
parent
4ca344a86a
commit
7f1f3df956
|
@ -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']:
|
if type in ['hour_s', 'sflog', 'day_s']:
|
||||||
enstat.pcoal_heat = get_pcoal_heat(
|
enstat.pcoal_heat = get_pcoal_heat(
|
||||||
enstat.year_s, enstat.month_s, enstat.day_s)
|
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':
|
elif type == 'month_st':
|
||||||
enstat.pcoal_coal_consume = EnStat.objects.filter(
|
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']
|
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
|
type = enstat.type
|
||||||
if type in ['hour_s', 'sflog', 'day_s']:
|
if type in ['hour_s', 'sflog', 'day_s']:
|
||||||
enstat.pcoal_heat = new_pcoal_heat
|
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':
|
elif type == 'month_st':
|
||||||
enstat.pcoal_coal_consume = EnStat.objects.filter(type='sflog', mgroup=enstat.mgroup, year_s=enstat.year_s,
|
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']
|
month_s=enstat.month_s, sflog__team=enstat.team).aggregate(sum=Sum('pcoal_coal_consume'))['sum']
|
||||||
|
|
Loading…
Reference in New Issue