From b8fd5fd13b7a5990908fefe69c25edf774a18dc3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 10 Jan 2025 10:34:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=BD=E8=B8=AA=E5=88=B0=E4=B8=AA?= =?UTF-8?q?=E7=9A=84=E6=89=8D=E9=9C=80=E8=A6=81=E8=B5=8B=E4=BA=88=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index be8b92c5..6f40d7ff 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -544,11 +544,9 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust d_count_real = xcount d_count_ok = xcount # 找寻质检表 - qctmat = QctMat.objects.filter(material=material_out, qct__is_deleted=False).order_by("-create_time").first() - qct = None - if qctmat: - qct = qctmat.qct - mlogbout.qct = qct + if material_out.tracking == Material.MA_TRACKING_SINGLE: + qctmat = QctMat.objects.filter(material=material_out, qct__is_deleted=False).order_by("-create_time").first() + mlogbout.qct = qctmat.qct mlogbout.count_real = d_count_real mlogbout.count_ok = d_count_ok mlogbout.save()