feat: 检验撤回test_date在count_notok时直接置空

This commit is contained in:
caoqianming 2024-05-30 10:55:13 +08:00
parent 458385c0f6
commit 0473be4d30
1 changed files with 4 additions and 2 deletions

View File

@ -268,6 +268,8 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin
raise ParseError('该明细还未检验') raise ParseError('该明细还未检验')
if ins.count_notok > 0: if ins.count_notok > 0:
InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept) InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept)
elif ins.count_notok == 0:
pass
ins.test_date = None ins.test_date = None
ins.save() ins.save()
return Response() return Response()