fix: mlogbw create cal_count_notok bug

This commit is contained in:
caoqianming 2025-08-25 08:58:47 +08:00
parent 8b6d6fd668
commit 4823acb004
1 changed files with 2 additions and 2 deletions

View File

@ -892,14 +892,14 @@ class MlogbwViewSet(CustomModelViewSet):
else:
if mlog != ins.mlogb.mlog:
raise ParseError("所有记录必须属于同一张日志")
route:Route = ins.mlogb.route
mlogb:Mlogb = ins.mlogb
route:Route = mlogb.route
Mlogbw.cal_count_notok(mlogb)
# 如果是输入且输出追踪到个,需同步创建
material_in:Material = mlogb.material_in
if material_in is not None:
mlogb_qs = Mlogb.objects.filter(mlogb_from=mlogb)
material_out:Material = mlogb.mlog.material_out
material_out:Material = route.material_out if route else material_in if mlog.is_fix is False else mlog.material_out
mtype = route.process.mtype if route.process else None
if mtype == Process.PRO_DIV:
mlogbin = ins.mlogb