工单关闭bug
This commit is contained in:
parent
660ef8ec11
commit
9d2f2bea6c
|
|
@ -1,5 +1,5 @@
|
|||
from rest_framework.views import APIView
|
||||
from apps.mtm.models import InputMaterial
|
||||
from apps.mtm.models import InputMaterial, Step, UsedStep
|
||||
from apps.system.mixins import CreateUpdateModelAMixin
|
||||
from apps.pm.serializers import ProductionPlanCreateFromOrderSerializer, ProductionPlanSerializer, ResourceCalListSerializer, ResourceCalSerializer
|
||||
from rest_framework.mixins import CreateModelMixin, ListModelMixin
|
||||
|
|
@ -82,3 +82,17 @@ class ResourceViewSet(GenericViewSet):
|
|||
'type':m['material__type'], 'number':m['material__number'],
|
||||
'count':m['count']*i['count'], 'inv_count':m['material__count']})
|
||||
return Response(res)
|
||||
|
||||
@action(methods=['post'], detail=False, perms_map={'get':'*'}, serializer_class=ResourceCalListSerializer)
|
||||
def cal_equip(self, request, pk=None):
|
||||
"""
|
||||
设备状态查看
|
||||
"""
|
||||
rdata = request.data
|
||||
serializer = self.get_serializer(data=rdata)
|
||||
serializer.is_valid(raise_exception=True)
|
||||
res_d_list = []
|
||||
res = []
|
||||
return Response(res)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class WfService(object):
|
|||
"""
|
||||
到达结束状态
|
||||
"""
|
||||
return dict(destination_participant_type=State.PARTICIPANT_TYPE_PERSONAL,
|
||||
return dict(destination_participant_type=0,
|
||||
destination_participant=0,
|
||||
multi_all_person={})
|
||||
multi_all_person_dict = {}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ class TicketViewSet(OptimizationMixin, CreateUpdateCustomMixin, CreateModelMixin
|
|||
加签
|
||||
"""
|
||||
ticket = self.get_object()
|
||||
# data = request.data
|
||||
data = request.data
|
||||
# add_user = User.objects.get(pk=data[])
|
||||
# ticket.participant_type = State.PARTICIPANT_TYPE_PERSONAL
|
||||
# ticket.participant = None
|
||||
|
|
@ -338,7 +338,7 @@ class TicketViewSet(OptimizationMixin, CreateUpdateCustomMixin, CreateModelMixin
|
|||
end_state = WfService.get_workflow_end_state(ticket.workflow)
|
||||
ticket.state = end_state
|
||||
ticket.participant_type = 0
|
||||
ticket.participant = None
|
||||
ticket.participant = 0
|
||||
ticket.act_state = Ticket.TICKET_ACT_STATE_CLOSED
|
||||
ticket.save()
|
||||
# 更新流转记录
|
||||
|
|
|
|||
Loading…
Reference in New Issue