feat: enm 增加氨水消耗量

This commit is contained in:
zty 2024-12-10 14:12:16 +08:00
parent e0915676e3
commit e6cad72807
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2024-12-09 06:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enm', '0048_auto_20241129_1649'),
]
operations = [
migrations.AddField(
model_name='enstat',
name='ammonia_consume',
field=models.FloatField(default=0, help_text='t', verbose_name='氨水消耗'),
),
]

View File

@ -154,6 +154,7 @@ class EnStat(BaseModel):
run_sec = models.PositiveIntegerField("运转时长", default=0, help_text="s")
shut_sec = models.PositiveIntegerField("停机时长", default=0, help_text="s")
run_rate = models.FloatField("运转率", default=0, help_text="%")
ammonia_consume = models.FloatField("氨水消耗", default=0, help_text="t")
class EnStat2(BaseModel):

View File

@ -506,6 +506,8 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
elif material.code == "steam":
enstat.out_steam = amount_consume
enstat.out_steam_coal = enstat.out_steam * 128.6 / 1000
elif material.code == "ammonia":
enstat.ammonia_consume = amount_consume
elif material.code == "ccr":
enstat.ccr_consume = amount_consume
enstat.kiln_end_heat = enstat.total_production - enstat.ccr_consume