diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 7da15c62..66f416f7 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -511,11 +511,11 @@ def handover_submit(handover: Handover, user: User, now: Union[datetime.datetime wm_from.save() if need_add: if handover.recive_mgroup: - # 处理返工交接 if handover.type == Handover.H_NORMAL: - wm_to, _ = WMaterial.objects.get_or_create(batch=batch, material=material, mgroup=handover.recive_mgroup, defaults={ + wm_to, _ = WMaterial.objects.get_or_create(batch=batch, material=material, mgroup=handover.recive_mgroup, material_origin=None, defaults={ 'batch': batch, 'material': material, 'mgroup': handover.recive_mgroup, 'belong_dept': handover.recive_dept }) + # 处理返工交接 elif handover.type == Handover.H_REPAIR: wm_to, _ = WMaterial.objects.get_or_create( batch=batch,