feat: 原料磨用code处理
This commit is contained in:
parent
afc910a805
commit
cd2f6eb77a
|
@ -634,7 +634,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
|
|||
enstat.equip_elec_data = res
|
||||
enstat.save()
|
||||
# 开始计算互相影响的数据
|
||||
if mgroup.name == "原料磨":
|
||||
if mgroup.code == "ylm":
|
||||
if enstat.type in ["hour_s", "day_s", "year_s", "month_s"]:
|
||||
hzy_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__name="回转窑").first()
|
||||
if hzy_enstat:
|
||||
|
@ -646,7 +646,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
|
|||
if enstat.mgroup.name == "回转窑": # 算单位产品(综合电耗/标煤耗/综合能耗)
|
||||
# 综合电耗
|
||||
if enstat.type in ["hour_s", "day_s", "year_s", "month_s"]:
|
||||
ylm_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__name="原料磨").first()
|
||||
ylm_enstat = EnStat.objects.filter(type=enstat.type, year_s=enstat.year_s, month_s=enstat.month_s, day_s=enstat.day_s, hour=enstat.hour, mgroup__code="ylm)").first()
|
||||
if ylm_enstat:
|
||||
try:
|
||||
enstat.celec_consume_unit = (enstat.elec_consume + ylm_enstat.elec_consume)/enstat.total_production
|
||||
|
@ -977,7 +977,7 @@ def cal_enstat_pcoal_change(enstat: EnStat, new_pcoal_heat):
|
|||
enm_alarms_list = [
|
||||
|
||||
["电石渣", "elec_consume_unit", "单位产品分布电耗"],
|
||||
["原料磨", "elec_consume_unit", "单位产品分布电耗"],
|
||||
["生料工序(二次配料)", "elec_consume_unit", "单位产品分布电耗"],
|
||||
["回转窑", "celec_consume_unit", "单位产品综合电耗"],
|
||||
["回转窑", "coal_consume_unit", "单位产品标煤耗"],
|
||||
["煤磨", "elec_consume_unit", "单位产品分布电耗"],
|
||||
|
|
Loading…
Reference in New Issue