From 6b7088997f945fd0b6e41d54b0611236f9ded9c9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 22 May 2025 15:22:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20batchst=E5=A4=8D=E7=94=A8=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E4=BB=85=E9=99=90mio=E5=88=9B=E5=BB=BA=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/models.py b/apps/wpm/models.py index cc344e1a..d7cba635 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -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