update_wproduct_by_test 修改

This commit is contained in:
caoqianming 2021-12-14 13:32:26 +08:00
parent 1bb89ee1d9
commit 24d2f864af
2 changed files with 2 additions and 1 deletions

View File

@ -62,4 +62,5 @@ class WpmServies(object):
wproduct.act_state = WProduct.WPR_ACT_STATE_NOTOK wproduct.act_state = WProduct.WPR_ACT_STATE_NOTOK
# 需要走不合格品审理的工单 # 需要走不合格品审理的工单
wproduct.update_by = user wproduct.update_by = user
wproduct.test = None
wproduct.save() wproduct.save()

View File

@ -258,7 +258,7 @@ class WProductViewSet(ListModelMixin, GenericViewSet):
tris.append(TestRecordItem(**m)) tris.append(TestRecordItem(**m))
TestRecordItem.objects.bulk_create(tris) TestRecordItem.objects.bulk_create(tris)
# 如果检测合格, 变更动态产品进行状态 # 如果提交检验
if obj.is_submited: if obj.is_submited:
WpmServies.update_wproduct_by_test(obj, request.user) WpmServies.update_wproduct_by_test(obj, request.user)
else: else: