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) diff --git a/apps/pm/filters.py b/apps/pm/filters.py index 81499356..417ae4a0 100644 --- a/apps/pm/filters.py +++ b/apps/pm/filters.py @@ -21,6 +21,7 @@ class UtaskFilter(filters.FilterSet): "belong_dept__name": ["exact"], "mgroup__belong_dept__name": ["exact"], "mtask_utask__mgroup": ["exact"], + "mtask_utask__mgroup__name": ["exact"], "mtask_utask__mgroup__belong_dept": ['exact'], "mtask_utask__mgroup__belong_dept__name": ['exact'] } @@ -49,6 +50,7 @@ class MtaskFilter(filters.FilterSet): "start_date": ["exact", "gte", "lte"], "end_date": ["exact", "gte", "lte"], "mgroup": ["exact"], + "mgroup__name": ["exact"], "mgroup__cate": ["exact"], "mgroup__process": ["exact"], "mgroup__process__cate": ["exact"],