流程卡1

This commit is contained in:
caoqianming 2022-01-11 16:17:34 +08:00
parent 2b0bd78686
commit 63ddab4942
8 changed files with 32 additions and 1 deletions

View File

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,7 @@
from django.apps import AppConfig
class MnsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.mns'
verbose_name = '消息通知系统'

View File

@ -0,0 +1,6 @@
from django.db import models
from utils.model import BaseModel
# Create your models here.
class Notify(BaseModel)
pass

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -460,7 +460,16 @@ class WProductViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet):
流程卡 流程卡
""" """
obj = self.get_object() obj = self.get_object()
return Response(WProductCardSerializer(instance=obj).data) card_data = WProductCardSerializer(instance=obj).data
ret = []
if card_data['parents']:
pass
else:
ret.append(['序号', '工序', card_data['number']])
step_list_full = card_data['step_list_full']
for index, item in enumerate(step_list_full):
ret.append([str(index+1), item['step_name'], item['actions']])
return Response(ret)
class WproductTicketViewSet(ListModelMixin, GenericViewSet): class WproductTicketViewSet(ListModelMixin, GenericViewSet):
""" """