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)
|
MlogbDefect.objects.bulk_create(mlogb_defect_objects)
|
||||||
ins.cal_count_pn_jgqbl(cal_mlog=False)
|
ins.cal_count_pn_jgqbl(cal_mlog=False)
|
||||||
# 只有普通工序的才可联动
|
# 只有普通工序的才可联动
|
||||||
material_out:Material = ins.mlog.material_out
|
route:Route = ins.route if ins.route else ins.mlog.route
|
||||||
route:Route = mlog.route
|
if route and route.process and route.process.mtype == Process.PRO_NORMAL:
|
||||||
if material_out.tracking == Material.MA_TRACKING_BATCH:
|
if route.material_out.tracking == Material.MA_TRACKING_BATCH:
|
||||||
if route and route.process and route.process.mtype == Process.PRO_NORMAL:
|
|
||||||
mlogbout_qs = Mlogb.objects.filter(mlog=ins.mlog, mlogb_from=ins)
|
mlogbout_qs = Mlogb.objects.filter(mlog=ins.mlog, mlogb_from=ins)
|
||||||
if mlogbout_qs.count() == 1:
|
if mlogbout_qs.count() == 1:
|
||||||
mlogbout = mlogbout_qs.first()
|
mlogbout = mlogbout_qs.first()
|
||||||
|
|
Loading…
Reference in New Issue