From d3f93d78e3a9b56190c3f5c31904dbd11f7e48db Mon Sep 17 00:00:00 2001 From: blackholll Date: Tue, 19 Mar 2019 23:35:26 +0800 Subject: [PATCH] bugfix: for PARTICIPANT_TYPE_MULTI again --- service/ticket/ticket_base_service.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/service/ticket/ticket_base_service.py b/service/ticket/ticket_base_service.py index c68337a4..76569285 100644 --- a/service/ticket/ticket_base_service.py +++ b/service/ticket/ticket_base_service.py @@ -238,10 +238,6 @@ def new_ticket(cls, request_data_dict, app_name=''): destination_participant_type_id = participant_info.get('destination_participant_type_id', 0) destination_participant = participant_info.get('destination_participant', '') multi_all_person = participant_info.get('multi_all_person', '{}') - if destination_participant_type_id == CONSTANT_SERVICE.PARTICIPANT_TYPE_MULTI_ALL: - multi_all_person_dict = json.loads(multi_all_person) - multi_all_person_dict[username] = dict(transition_id=transition_id, transition_name=req_transition_obj.name) - multi_all_person = json.dumps(multi_all_person_dict) # 生成流水号 ticket_sn, msg = cls.gen_ticket_sn(app_name) @@ -781,7 +777,8 @@ def get_ticket_format_participant_info(cls, ticket_id): return False, 'role is not existedor has been deleted' participant_name = role_obj.name participant_alias = participant_name - if ticket_obj.multi_all_person: + + if json.loads(ticket_obj.multi_all_person): participant_type_name = '多人且全部处理' # 从multi_all_person中获取处理人信息 multi_all_person_dict = json.loads(ticket_obj.multi_all_person) @@ -976,8 +973,8 @@ def handle_ticket(cls, ticket_id, request_data_dict, by_timer=False): destination_state, msg = WorkflowStateService.get_workflow_state_by_id(destination_state_id) - # 判断当前处理人类似是否为全部处理,如果处理类型为全部处理,且有人未处理,则工单状态不变,只记录处理过程 - if ticket_obj.multi_all_person: + # 判断当前处理人类似是否为全部处理,如果处理类型为全部处理(根据json.loads(ticket_obj.multi_all_person)来判断),且有人未处理,则工单状态不变,只记录处理过程 + if json.loads(ticket_obj.multi_all_person): multi_all_person = ticket_obj.multi_all_person multi_all_person_dict = json.loads(multi_all_person) blank_or_false_value_key_list, msg = CommonService.get_dict_blank_or_false_value_key_list(multi_all_person_dict)