feat: gascheck增加字段

This commit is contained in:
caoqianming 2024-08-22 15:08:45 +08:00
parent 26172b767f
commit 6205ba682c
2 changed files with 43 additions and 4 deletions

View File

@ -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),
),
]

View File

@ -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)