diff --git a/hb_server/apps/wf/filters.py b/hb_server/apps/wf/filters.py index 742af75..677b894 100644 --- a/hb_server/apps/wf/filters.py +++ b/hb_server/apps/wf/filters.py @@ -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: diff --git a/hb_server/apps/wf/models.py b/hb_server/apps/wf/models.py index 7415534..6133090 100644 --- a/hb_server/apps/wf/models.py +++ b/hb_server/apps/wf/models.py @@ -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='关联工作流') diff --git a/hb_server/apps/wf/scripts.py b/hb_server/apps/wf/scripts.py index 5c2ccb4..5e818f7 100644 --- a/hb_server/apps/wf/scripts.py +++ b/hb_server/apps/wf/scripts.py @@ -1,4 +1,3 @@ -from .models import State class GetParticipants: all_funcs = [ diff --git a/hb_server/apps/wf/services.py b/hb_server/apps/wf/services.py index d370bdf..bb7f705 100644 --- a/hb_server/apps/wf/services.py +++ b/hb_server/apps/wf/services.py @@ -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) diff --git a/hb_server/requirements.txt b/hb_server/requirements.txt index 595fea2..a223cbc 100644 --- a/hb_server/requirements.txt +++ b/hb_server/requirements.txt @@ -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