From 6205ba682cb7c269253d5d5d30f39c5f10ac331d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 22 Aug 2024 15:08:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20gascheck=E5=A2=9E=E5=8A=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opm/migrations/0015_auto_20240822_1508.py | 38 +++++++++++++++++++ apps/opm/models.py | 9 +++-- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 apps/opm/migrations/0015_auto_20240822_1508.py diff --git a/apps/opm/migrations/0015_auto_20240822_1508.py b/apps/opm/migrations/0015_auto_20240822_1508.py new file mode 100644 index 00000000..1a9bf410 --- /dev/null +++ b/apps/opm/migrations/0015_auto_20240822_1508.py @@ -0,0 +1,38 @@ +# Generated by Django 3.2.12 on 2024-08-22 07:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('opm', '0014_auto_20240804_1846'), + ] + + operations = [ + migrations.AddField( + model_name='gascheck', + name='img', + field=models.TextField(blank=True, null=True, verbose_name='图片地址'), + ), + migrations.AlterField( + model_name='gascheck', + name='co', + field=models.FloatField(blank=True, null=True), + ), + migrations.AlterField( + model_name='gascheck', + name='h2s', + field=models.FloatField(blank=True, null=True), + ), + migrations.AlterField( + model_name='gascheck', + name='lel', + field=models.FloatField(blank=True, null=True), + ), + migrations.AlterField( + model_name='gascheck', + name='o2', + field=models.FloatField(blank=True, null=True), + ), + ] diff --git a/apps/opm/models.py b/apps/opm/models.py index c5fac745..76aab111 100644 --- a/apps/opm/models.py +++ b/apps/opm/models.py @@ -163,11 +163,12 @@ class GasCheck(CommonADModel): """ check_time = models.DateTimeField('检测时间') check_place = models.CharField('检测部位', max_length=100) - o2 = models.DecimalField(decimal_places=1, max_digits=3, null=True, blank=True) - co = models.PositiveSmallIntegerField(null=True, blank=True) - h2s = models.PositiveSmallIntegerField(null=True, blank=True) - lel = models.DecimalField(decimal_places=1, max_digits=3, null=True, blank=True) + o2 = models.FloatField(null=True, blank=True) + co = models.FloatField(null=True, blank=True) + h2s = models.FloatField(null=True, blank=True) + lel = models.FloatField(null=True, blank=True) f5 = models.CharField(max_length=10, null=True, blank=True) is_ok = models.BooleanField('是否正常', default=True) + img = models.TextField('图片地址', null=True, blank=True) checker = models.ForeignKey(User, verbose_name='检测人', on_delete=models.CASCADE) opl = models.ForeignKey(Opl, verbose_name='关联作业许可', on_delete=models.CASCADE)