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): """ 检验记录创建及初始化