feat: batchst复用节点仅限mio创建的
This commit is contained in:
parent
8a7c3830c9
commit
6b7088997f
|
@ -641,7 +641,7 @@ class BatchSt(BaseModel):
|
|||
# 带有来源的批次获取,需检查批次号是否可用
|
||||
if cls.objects.filter(batch=batch).exists():
|
||||
if reuse_node:
|
||||
node = cls.objects.filter(batch=batch).order_by('-version').first()
|
||||
node = cls.objects.filter(batch=batch, mio__isnull=False).order_by('-version').first()
|
||||
if node.material_start is not None and node.material_start != material_start:
|
||||
raise ParseError(f"{batch}-该批次号因物料不同不可引用")
|
||||
return node, False
|
||||
|
|
Loading…
Reference in New Issue