From 6e7246dd71d7dd9c0a16b5fdc361ffa34b59549f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 29 Dec 2021 15:25:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/pm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/pm/services.py b/hb_server/apps/pm/services.py index c5e420b..b5eef7e 100644 --- a/hb_server/apps/pm/services.py +++ b/hb_server/apps/pm/services.py @@ -10,8 +10,8 @@ class PmService: """ ret = {} subplans = SubProductionPlan.objects.filter(production_plan=plan, is_deleted=False) - qs = subplans.values('process', 'process__name', 'process__number').annotate(count=Sum('main_count'), - count_real=Sum('main_count_real'), count_ok=Sum('main_count_ok'), count_notok=Sum('main_count_notok')) + qs = subplans.values('process', 'process__name', 'process__number').annotate(count=Sum('count'), + count_real=Sum('count_real'), count_ok=Sum('count_ok'), count_notok=Sum('count_notok')) qs_list = list(qs) for i in qs_list: ret[i['process__number']] = {