From 68b6c1c10e4bec064261bdb70fdadd4dd98b0e3d Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Jul 2024 11:06:38 +0800 Subject: [PATCH] =?UTF-8?q?add=20workflow=20=E5=A4=A9=E6=B6=A6Smart-ccc?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=95=B0=E6=8D=AE,dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../获取工单记录列表/tickets_list_feign.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py b/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py index 196815b..69cafcb 100644 --- a/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py +++ b/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py @@ -192,16 +192,17 @@ if __name__ == "__main__": id = data['id'] resD = request_data_signature_get(id) print(f"请求工单详情结果{resD}") - if 'error' in resD: - error = resD['error'] - print(f"请求工单详情(id:{id})失败,错误信息:{error}") - load_detail_exp_to_db(id) - else: + if 'ticketDetail' in resD: ids.append(id) dataList = resL['ticketDetail'] detailDataList.append(dataList) + else: + error = resD['error'] + print(f"请求工单详情(id:{id})失败,错误信息:{error}") + load_detail_exp_to_db(id) except Exception as e: print(f'请求工单详情(id:{id})异常, )异常信息:{e}') load_detail_exp_to_db(data['id']) - load_detail_data_to_db(ids,detailDataList) + if len(ids) > 0: + load_detail_data_to_db(ids,detailDataList) print(f'{formatted2_previous_hour(0)}请求工单信息结束') \ No newline at end of file