feat: MaterialBatch 添加字段以支持追踪原料批次2
This commit is contained in:
parent
4016c421be
commit
27c646e6df
|
@ -80,7 +80,6 @@ class InmService:
|
|||
out = -1
|
||||
默认使用count字段做加减
|
||||
"""
|
||||
from apps.wpm.models import WMaterial
|
||||
if type is None or belong_dept is None:
|
||||
mio = i.mio
|
||||
type = mio.type
|
||||
|
@ -99,6 +98,7 @@ class InmService:
|
|||
defaults=ddict
|
||||
)
|
||||
if mb.batch_ofrom is None and material.type in [Material.MA_TYPE_GOOD, Material.MA_TYPE_GOOD]:
|
||||
from apps.wpm.models import WMaterial
|
||||
wm_qs = WMaterial.objects.filter(material=material, batch=i.batch)
|
||||
batchs_count = wm_qs.values_list('batch_ofrom', flat=True).distinct().count()
|
||||
if batchs_count > 1:
|
||||
|
|
Loading…
Reference in New Issue