diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 9eecf7c2..720c2ba1 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -609,9 +609,10 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust elif mlogbin.mlogb_to != mlogbout: raise ParseError("生成产出出错1") elif mtype == Process.PRO_DIV: + div_number = route.div_number for mlogbwin in Mlogbw.objects.filter(mlogb=mlogbin).order_by("number"): mlogbout, _ = Mlogb.objects.get_or_create(**m_dict, defaults= - {"batch_ofrom": wm_in.batch_ofrom, "material_ofrom": wm_in.material_ofrom, "count_real": d_count_real, "count_ok": d_count_ok, "qct": qct}) + {"batch_ofrom": wm_in.batch_ofrom, "material_ofrom": wm_in.material_ofrom, "count_real": div_number, "count_ok": div_number, "qct": qct}) if mlogbwin.mlogb_to is None: mlogbwin.mlogb_to = mlogbout mlogbwin.save(update_fields = ["mlogb_to"])