From 2647992b422dcd65dd53a5f58b0f339b909425c9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sat, 11 May 2024 15:40:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20envdata=E5=A2=9E=E5=8A=A0=E6=B0=A8?= =?UTF-8?q?=E9=80=83=E9=80=B8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enp/migrations/0002_auto_20240119_1053.py | 1 + apps/enp/models.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/enp/migrations/0002_auto_20240119_1053.py b/apps/enp/migrations/0002_auto_20240119_1053.py index 36f5ebfa..1c9039d1 100644 --- a/apps/enp/migrations/0002_auto_20240119_1053.py +++ b/apps/enp/migrations/0002_auto_20240119_1053.py @@ -35,6 +35,7 @@ CREATE TABLE public.enp_envdata ( "nox_rtd" float, "nox_zs" float, "o2" float, + "ammonia_e" float, CONSTRAINT enp_envdata_pkey PRIMARY KEY (timex, equipment_id) ); SELECT create_hypertable('enp_envdata', 'timex'); diff --git a/apps/enp/models.py b/apps/enp/models.py index 1ddc8fa3..7239e85c 100644 --- a/apps/enp/models.py +++ b/apps/enp/models.py @@ -72,6 +72,7 @@ class EnvData(models.Model): "nox_rtd", "nox_zs", "o2", + "ammonia_e" ] RUNING_STATE_CHOICES = ((10, "运行"), (20, "待机"), (30, "停机"), (40, "故障"), (50, "未知")) @@ -94,6 +95,7 @@ class EnvData(models.Model): so2_zs = models.FloatField("二氧化硫折算(mg/m3)", null=True, blank=True) nox_rtd = models.FloatField("氮氧化物实测(mg/m3)", null=True, blank=True) nox_zs = models.FloatField("氮氧化物折算(mg/m3)", null=True, blank=True) + ammonia_e = models.FloatField("氨逃逸(mg/m3)", null=True, blank=True) o2 = models.FloatField("含氧量(%)", null=True, blank=True) class Meta: