Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_server
This commit is contained in:
commit
c293dd068f
|
|
@ -365,7 +365,7 @@ def mlog_revert(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
|
||||||
list_m = Mlogb.objects.filter(mlog=mlog).values_list('mtask__id', flat=True).distinct()
|
list_m = Mlogb.objects.filter(mlog=mlog).values_list('mtask__id', flat=True).distinct()
|
||||||
update_mtaskIds += list(list_m)
|
update_mtaskIds += list(list_m)
|
||||||
if update_mtaskIds:
|
if update_mtaskIds:
|
||||||
Mtask.objects.filter(id__in=update_mtaskIds, state=Mtask.MTASK_SUBMIT).update(status=Mtask.MTASK_ASSGINED)
|
Mtask.objects.filter(id__in=update_mtaskIds, state=Mtask.MTASK_SUBMIT).update(state=Mtask.MTASK_ASSGINED)
|
||||||
|
|
||||||
|
|
||||||
def cal_mlog_count_from_mlogb(mlog: Mlog):
|
def cal_mlog_count_from_mlogb(mlog: Mlog):
|
||||||
|
|
@ -511,11 +511,11 @@ def handover_submit(handover: Handover, user: User, now: Union[datetime.datetime
|
||||||
wm_from.save()
|
wm_from.save()
|
||||||
if need_add:
|
if need_add:
|
||||||
if handover.recive_mgroup:
|
if handover.recive_mgroup:
|
||||||
# 处理返工交接
|
|
||||||
if handover.type == Handover.H_NORMAL:
|
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
|
'batch': batch, 'material': material, 'mgroup': handover.recive_mgroup, 'belong_dept': handover.recive_dept
|
||||||
})
|
})
|
||||||
|
# 处理返工交接
|
||||||
elif handover.type == Handover.H_REPAIR:
|
elif handover.type == Handover.H_REPAIR:
|
||||||
wm_to, _ = WMaterial.objects.get_or_create(
|
wm_to, _ = WMaterial.objects.get_or_create(
|
||||||
batch=batch,
|
batch=batch,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue