From c5ae1174362dbf38904a7b673ee2f1a91a052013 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 2 Apr 2024 17:11:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mioitem=E5=A2=9E=E5=8A=A0=E5=88=92?= =?UTF-8?q?=E4=BC=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/migrations/0017_mioitem_count_n_hs.py | 18 ++++++++++++++++++ apps/inm/models.py | 1 + apps/inm/serializers.py | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 apps/inm/migrations/0017_mioitem_count_n_hs.py diff --git a/apps/inm/migrations/0017_mioitem_count_n_hs.py b/apps/inm/migrations/0017_mioitem_count_n_hs.py new file mode 100644 index 00000000..fd394d78 --- /dev/null +++ b/apps/inm/migrations/0017_mioitem_count_n_hs.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2024-04-02 09:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('inm', '0016_auto_20240402_1226'), + ] + + operations = [ + migrations.AddField( + model_name='mioitem', + name='count_n_hs', + field=models.PositiveIntegerField(default=0, verbose_name='划伤'), + ), + ] diff --git a/apps/inm/models.py b/apps/inm/models.py index 2b421edf..f1bf3dee 100644 --- a/apps/inm/models.py +++ b/apps/inm/models.py @@ -130,6 +130,7 @@ class MIOItem(BaseModel): count_n_qx = models.PositiveIntegerField('气线', default=0) count_n_zz = models.PositiveIntegerField('杂质', default=0) count_n_ysq = models.PositiveIntegerField('颜色青', default=0) + count_n_hs = models.PositiveIntegerField('划伤', default=0) count_n_jsqx = models.PositiveIntegerField('结石气线', default=0) # 废弃字段 count_n_qt = models.PositiveIntegerField('其他', default=0) diff --git a/apps/inm/serializers.py b/apps/inm/serializers.py index a03156fd..edd26e00 100644 --- a/apps/inm/serializers.py +++ b/apps/inm/serializers.py @@ -249,7 +249,7 @@ class MIOItemTestSerializer(CustomModelSerializer): class Meta: model = MIOItem fields = ['id', 'test_date', 'test_user', 'count_notok', 'count_n_zw', 'count_n_tw', - 'count_n_qp', 'count_n_wq', 'count_n_dl', 'count_n_pb', 'count_n_dxt', 'count_n_js', 'count_n_qx', 'count_n_zz', 'count_n_ysq', 'count_n_qt', 'test_note'] + 'count_n_qp', 'count_n_wq', 'count_n_dl', 'count_n_pb', 'count_n_dxt', 'count_n_js', 'count_n_qx', 'count_n_zz', 'count_n_ysq', 'count_n_qt', 'count_n_hs', 'test_note'] extra_kwargs = { 'test_date': {'required': True}, 'test_user': {'required': True}