fix: MlogbInUpdateSerializer 联动count_use 和 count_real
This commit is contained in:
parent
67f7afd3fc
commit
81561b5238
|
@ -824,10 +824,9 @@ class MlogbInUpdateSerializer(CustomModelSerializer):
|
|||
MlogbDefect.objects.bulk_create(mlogb_defect_objects)
|
||||
ins.cal_count_pn_jgqbl(cal_mlog=False)
|
||||
# 只有普通工序的才可联动
|
||||
material_out:Material = ins.mlog.material_out
|
||||
route:Route = mlog.route
|
||||
if material_out.tracking == Material.MA_TRACKING_BATCH:
|
||||
if route and route.process and route.process.mtype == Process.PRO_NORMAL:
|
||||
route:Route = ins.route if ins.route else ins.mlog.route
|
||||
if route and route.process and route.process.mtype == Process.PRO_NORMAL:
|
||||
if route.material_out.tracking == Material.MA_TRACKING_BATCH:
|
||||
mlogbout_qs = Mlogb.objects.filter(mlog=ins.mlog, mlogb_from=ins)
|
||||
if mlogbout_qs.count() == 1:
|
||||
mlogbout = mlogbout_qs.first()
|
||||
|
|
Loading…
Reference in New Issue