工单处理增加岗位选中
This commit is contained in:
parent
65d2a740fb
commit
52ad96f177
|
@ -174,6 +174,19 @@ class WfService(object):
|
|||
destination_participant = list(User.objects.filter(
|
||||
dept__in=destination_participant).values_list('id', flat=True))
|
||||
|
||||
elif destination_participant_type == State.PARTICIPANT_TYPE_POST: # 岗位
|
||||
user_queryset = User.objects.filter(posts__in=destination_participant)
|
||||
# 如果选择了岗位, 需要走过滤策略
|
||||
if state.filter_policy == 1:
|
||||
depts = get_parent_queryset(ticket.belong_dept)
|
||||
user_queryset = user_queryset.filter(dept__in=depts)
|
||||
elif state.filter_policy == 2:
|
||||
depts = get_parent_queryset(ticket.create_by.belong_dept)
|
||||
user_queryset = user_queryset.filter(dept__in=depts)
|
||||
elif state.filter_policy == 3:
|
||||
depts = get_parent_queryset(handler.belong_dept)
|
||||
user_queryset = user_queryset.filter(dept__in=depts)
|
||||
destination_participant = list(user_queryset.values_list('id', flat=True))
|
||||
elif destination_participant_type == State.PARTICIPANT_TYPE_ROLE: # 角色
|
||||
user_queryset = User.objects.filter(roles__in=destination_participant)
|
||||
# 如果选择了角色, 需要走过滤策略
|
||||
|
|
Loading…
Reference in New Issue