refector: 检验撤回根据count_notok进行update_mb
This commit is contained in:
parent
e33b4e5902
commit
7b83cd1095
|
@ -266,6 +266,7 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin
|
||||||
mio: MIO = ins.mio
|
mio: MIO = ins.mio
|
||||||
if ins.test_date is None:
|
if ins.test_date is None:
|
||||||
raise ParseError('该明细还未检验')
|
raise ParseError('该明细还未检验')
|
||||||
|
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)
|
||||||
ins.test_date = None
|
ins.test_date = None
|
||||||
ins.save()
|
ins.save()
|
||||||
|
|
Loading…
Reference in New Issue