diff --git a/hb_server/apps/wf/services.py b/hb_server/apps/wf/services.py index 28e7a08..2f91c58 100644 --- a/hb_server/apps/wf/services.py +++ b/hb_server/apps/wf/services.py @@ -164,21 +164,21 @@ class WfService(object): state = ticket.state if participant_type == State.PARTICIPANT_TYPE_PERSONAL: if user.id != participant: - return dict(permission=False, msg="非当前处理人") + return dict(permission=False, msg="非当前处理人", need_accept=False) elif participant_type in [State.PARTICIPANT_TYPE_MULTI, State.PARTICIPANT_TYPE_DEPT, State.PARTICIPANT_TYPE_ROLE]: if user.id not in participant: - return dict(permission=False, msg="非当前处理人") + return dict(permission=False, msg="非当前处理人", need_accept=False) current_participant_count = len(participant) if current_participant_count == 1: - if [user.id] != participant: + if [user.id] != participant or user.id != participant: return dict(permission=False, msg="非当前处理人") elif current_participant_count >1 and state.distribute_type == State.STATE_DISTRIBUTE_TYPE_ACTIVE: if user.id not in participant: - return dict(permission=False, msg="非当前处理人") + return dict(permission=False, msg="非当前处理人", need_accept=False) return dict(permission=False, msg="需要先接单再处理", need_accept=True) if ticket.in_add_node: - return dict(permission=False, msg="工单当前处于加签中,请加签完成后操作") - return dict(permission=True, msg="") + return dict(permission=False, msg="工单当前处于加签中,请加签完成后操作", need_accept=False) + return dict(permission=True, msg="", need_accept=False) @classmethod def check_dict_has_all_same_value(cls, dict_obj: object)->tuple: