wf增加参数bug
This commit is contained in:
parent
145bf1d6b7
commit
927f25ae05
|
@ -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])
|
queryset = queryset.filter(participant__contains=user.id).exclude(act_state__in=[Ticket.TICKET_ACT_STATE_FINISH, Ticket.TICKET_ACT_STATE_CLOSED])
|
||||||
elif value == 'worked':
|
elif value == 'worked':
|
||||||
queryset = queryset.filter(ticketflow_ticket__participant=user).exclude(create_by=user).order_by('-update_time').distinct()
|
queryset = queryset.filter(ticketflow_ticket__participant=user).exclude(create_by=user).order_by('-update_time').distinct()
|
||||||
|
elif value == 'cc':
|
||||||
|
pass
|
||||||
elif value == 'all':
|
elif value == 'all':
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -188,9 +188,9 @@ class Ticket(CommonBModel):
|
||||||
category_choices =(
|
category_choices =(
|
||||||
('all', '全部'),
|
('all', '全部'),
|
||||||
('owner', '我创建的'),
|
('owner', '我创建的'),
|
||||||
('duty', '代办'),
|
('duty', '待办'),
|
||||||
('worked', '我处理的'),
|
('worked', '我处理的'),
|
||||||
('relation', '抄送我的')
|
('cc', '抄送我的')
|
||||||
)
|
)
|
||||||
title = models.CharField('标题', max_length=500, blank=True, default='', help_text="工单标题")
|
title = models.CharField('标题', max_length=500, blank=True, default='', help_text="工单标题")
|
||||||
workflow = models.ForeignKey(Workflow, on_delete=models.CASCADE, verbose_name='关联工作流')
|
workflow = models.ForeignKey(Workflow, on_delete=models.CASCADE, verbose_name='关联工作流')
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from .models import State
|
|
||||||
class GetParticipants:
|
class GetParticipants:
|
||||||
|
|
||||||
all_funcs = [
|
all_funcs = [
|
||||||
|
|
|
@ -105,7 +105,7 @@ class WfService(object):
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@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:
|
if destination_participant_type == State.PARTICIPANT_TYPE_FIELD:
|
||||||
destination_participant = ticket_data.get(destination_participant, 0) if destination_participant in ticket_data \
|
destination_participant = ticket_data.get(destination_participant, 0) if destination_participant in ticket_data \
|
||||||
else Ticket.ticket_data.get(destination_participant, 0)
|
else Ticket.ticket_data.get(destination_participant, 0)
|
||||||
|
|
||||||
elif destination_participant_type == State.PARTICIPANT_TYPE_FORMCODE:#代码获取
|
elif destination_participant_type == State.PARTICIPANT_TYPE_FORMCODE:#代码获取
|
||||||
destination_participant = getattr(GetParticipants, destination_participant)(state=state, ticket=ticket, ticket_data=ticket_data, request=request)
|
destination_participant = getattr(GetParticipants, destination_participant)(state=state, ticket=ticket, ticket_data=ticket_data, request=request)
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,4 @@ drf-yasg==1.20.0
|
||||||
psutil==5.8.0
|
psutil==5.8.0
|
||||||
pillow==8.3.1
|
pillow==8.3.1
|
||||||
opencv-python==4.5.3.56
|
opencv-python==4.5.3.56
|
||||||
|
django-celery-results==2.2.0
|
||||||
|
|
Loading…
Reference in New Issue