From 7d29b9c4eb4893b37d316b46db539d70a76bee8d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 9 Jun 2025 15:37:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=8F=AF=E5=A4=8D=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/wpm/models.py b/apps/wpm/models.py index 8f0c2609..33b44d1c 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -673,8 +673,7 @@ class BatchSt(BaseModel): cls_qs = cls.objects.filter(batch=batch) if cls_qs.exists(): if reuse_node: - node:BatchSt = (cls_qs.filter(mio__isnull=False)|cls_qs.filter( - material_start__isnull=True)).order_by('-version').first() + node:BatchSt = (cls_qs.filter(mio__isnull=False)|cls_qs.filter(hanover=None, mio=None, mlog=None)).order_by('-version').first() if node is None: raise ParseError(f"{batch}-该批次号因物料不同不可引用") elif node.material_start is None: