From 0b989f79b1276c24f530be18cb6d4b3fa81160ed Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Dec 2021 15:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=BA=A7=E5=93=81=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=9B=B4=E6=96=B0=E7=94=9F=E4=BA=A7=E8=BF=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/wpm/services.py | 2 +- hb_server/apps/wpm/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hb_server/apps/wpm/services.py b/hb_server/apps/wpm/services.py index c51e08a..096b514 100644 --- a/hb_server/apps/wpm/services.py +++ b/hb_server/apps/wpm/services.py @@ -75,7 +75,7 @@ class WpmServies(object): """ 根据产品变动日志更新生产进度 """ - objs = WproductFlow.objects.filter(subporduction_plan=sp, is_lastlog=True) + objs = WproductFlow.objects.filter(subproduction_plan=sp, is_lastlog=True) count_ok = objs.filter(act_state__in=[WProduct.WPR_ACT_STATE_INM, WProduct.WPR_ACT_STATE_OK, WProduct.WPR_ACT_STATE_SELLED]).count() count_real = objs.exclude(act_state__in=[WProduct.WPR_ACT_STATE_TORETEST, diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index a83db3c..e11db5d 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -194,6 +194,7 @@ class WProductViewSet(ListModelMixin, GenericViewSet): return queryset @action(methods=['post'], detail=False, perms_map={'post':'*'}, serializer_class=WpmTestFormInitSerializer) + @transaction.atomic def test_init(self, request, pk=None): """ 检验记录创建及初始化