last_test_result

This commit is contained in:
caoqianming 2022-01-13 09:37:01 +08:00
parent fcac1d1d78
commit 630edfc785
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.9 on 2022-01-13 01:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wpm', '0046_auto_20220113_0932'),
]
operations = [
migrations.AddField(
model_name='wproductflow',
name='last_test_result',
field=models.BooleanField(blank=True, null=True, verbose_name='最后一次检验结果'),
),
]

View File

@ -163,6 +163,7 @@ class WproductFlow(CommonAModel):
is_mtested = models.BooleanField('是否军检', default=False)
is_mtestok = models.BooleanField('是否军检合格', null=True, blank=True)
remark_mtest = models.TextField('军检备注', null=True, blank=True)
last_test_result = models.BooleanField('最后一次检验结果', null=True, blank=True)
is_lastlog = models.BooleanField('是否该子计划下的最后一条日志', default=True)
change_str = models.CharField('变动描述', default='', max_length=1000)

View File

@ -94,6 +94,7 @@ class WpmServies(object):
wproduct.update_by = user
wproduct.update_time = timezone.now()
wproduct.test = None
wproduct.last_test_result = is_testok
wproduct.save()
# 添加日志
cls.add_wproduct_flow_log(wproduct, 'test_ok' if is_testok else 'test_notok')