diff --git a/apps/enm/migrations/0049_enstat_ammonia_consume.py b/apps/enm/migrations/0049_enstat_ammonia_consume.py new file mode 100644 index 00000000..7d28a629 --- /dev/null +++ b/apps/enm/migrations/0049_enstat_ammonia_consume.py @@ -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='氨水消耗'), + ), + ] diff --git a/apps/enm/models.py b/apps/enm/models.py index 2b06f3fd..e9d1e14c 100644 --- a/apps/enm/models.py +++ b/apps/enm/models.py @@ -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): diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index 17c534eb..98dc6618 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -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