根据产品日志更新生产进度

This commit is contained in:
caoqianming 2021-12-28 15:56:50 +08:00
parent d62a09a00c
commit 0b989f79b1
2 changed files with 2 additions and 1 deletions

View File

@ -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,

View File

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