wf增加参数bug

This commit is contained in:
caoqianming 2021-10-22 15:35:48 +08:00
parent 145bf1d6b7
commit 927f25ae05
5 changed files with 7 additions and 5 deletions

View File

@ -17,6 +17,8 @@ class TicketFilterSet(filters.FilterSet):
queryset = queryset.filter(participant__contains=user.id).exclude(act_state__in=[Ticket.TICKET_ACT_STATE_FINISH, Ticket.TICKET_ACT_STATE_CLOSED])
elif value == 'worked':
queryset = queryset.filter(ticketflow_ticket__participant=user).exclude(create_by=user).order_by('-update_time').distinct()
elif value == 'cc':
pass
elif value == 'all':
pass
else:

View File

@ -188,9 +188,9 @@ class Ticket(CommonBModel):
category_choices =(
('all', '全部'),
('owner', '我创建的'),
('duty', ''),
('duty', ''),
('worked', '我处理的'),
('relation', '抄送我的')
('cc', '抄送我的')
)
title = models.CharField('标题', max_length=500, blank=True, default='', help_text="工单标题")
workflow = models.ForeignKey(Workflow, on_delete=models.CASCADE, verbose_name='关联工作流')

View File

@ -1,4 +1,3 @@
from .models import State
class GetParticipants:
all_funcs = [

View File

@ -105,7 +105,7 @@ class WfService(object):
@classmethod
def get_next_state_by_transition_and_ticket_info(cls, ticket:Ticket, transition: Transition, ticket_data:dict={})->object:
def get_next_state_by_transition_and_ticket_info(cls, ticket:Ticket, transition: Transition, ticket_data:dict={}, request:dict={})->object:
"""
获取下个节点状态
"""
@ -148,7 +148,7 @@ class WfService(object):
if destination_participant_type == State.PARTICIPANT_TYPE_FIELD:
destination_participant = ticket_data.get(destination_participant, 0) if destination_participant in ticket_data \
else Ticket.ticket_data.get(destination_participant, 0)
elif destination_participant_type == State.PARTICIPANT_TYPE_FORMCODE:#代码获取
destination_participant = getattr(GetParticipants, destination_participant)(state=state, ticket=ticket, ticket_data=ticket_data, request=request)

View File

@ -10,3 +10,4 @@ drf-yasg==1.20.0
psutil==5.8.0
pillow==8.3.1
opencv-python==4.5.3.56
django-celery-results==2.2.0