From c9219ea495272265bcf14c3970b4eeb1f0ca84d8 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Dec 2021 15:52:05 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/wpm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 8cfb65c..a3b840c 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -544,7 +544,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd # 更新子计划生产进度 # 如果产品有返工标记不做计算 if wp.ng_sign not in [WProduct.NG_BACK_FIX, WProduct.NG_BACK_WORK]: - ins = SubProductionProgress.objects.filter(subproduction_plan=wsp, + ins = SubProductionProgress.objects.get(subproduction_plan=wsp, is_main=True, type=SubprodctionMaterial.SUB_MA_TYPE_OUT) ins.count_real = ins.count_real + 1 ins.save()