From 9101fa466b41af832733f4304b9fc849cd9b1054 Mon Sep 17 00:00:00 2001
From: root <root@94a9702fdab3>
Date: Tue, 2 Jul 2024 16:17:04 +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

---
 .../tr_ticket_list/S98_S_tr_ticket_list.sql   | 250 +++++++++---------
 .../获取工单记录列表/tickets_list_feign.py    |   2 +
 2 files changed, 127 insertions(+), 125 deletions(-)

diff --git a/dev/workflow/TK_Cust/smart_ccc/tr_ticket_list/S98_S_tr_ticket_list.sql b/dev/workflow/TK_Cust/smart_ccc/tr_ticket_list/S98_S_tr_ticket_list.sql
index b75b477..81b76e7 100644
--- a/dev/workflow/TK_Cust/smart_ccc/tr_ticket_list/S98_S_tr_ticket_list.sql
+++ b/dev/workflow/TK_Cust/smart_ccc/tr_ticket_list/S98_S_tr_ticket_list.sql
@@ -5,141 +5,141 @@
 delete from p10_sa.S98_S_tr_ticket_list
 ;
 insert into p10_sa.S98_S_tr_ticket_list
-(	 id  
-	, workflow_id  
-	, workflow_name  
-	, type  
-	, topic  
-	, level  
-	, status  
-	, creator_name  
-	, creator_id  
-	, creator_type  
-	, modifier_id  
-	, modifier_type  
-	, source  
-	, timeout  
-	, end_time  
-	, create_time  
-	, close_time  
-	, state_selected  
-	, last_reminder_time  
-	, reminder_count  
-	, customer_id  
-	, customer_name  
-	, customer_tel  
-	, customer_email  
-	, customer_address  
-	, customer_creator_id  
-	, customer_creator_name  
-	, customer_modifier_id  
-	, customer_modifier_name  
-	, tags  
-	, system_form  
+(	 id  
+	, workflow_id  
+	, workflow_name  
+	, type  
+	, topic  
+	, level  
+	, status  
+	, creator_name  
+	, creator_id  
+	, creator_type  
+	, modifier_id  
+	, modifier_type  
+	, source  
+	, timeout  
+	, end_time  
+	, create_time  
+	, close_time  
+	, state_selected  
+	, last_reminder_time  
+	, reminder_count  
+	, customer_id  
+	, customer_name  
+	, customer_tel  
+	, customer_email  
+	, customer_address  
+	, customer_creator_id  
+	, customer_creator_name  
+	, customer_modifier_id  
+	, customer_modifier_name  
+	, tags  
+	, system_form  
 	, etl_tx_dt   )
   select 
-	 id  
-	, workflow_id  
-	, workflow_name  
-	, type  
-	, topic  
-	, level  
-	, status  
-	, creator_name  
-	, creator_id  
-	, creator_type  
-	, modifier_id  
-	, modifier_type  
-	, source  
-	, timeout  
-	, end_time  
-	, create_time  
-	, close_time  
-	, state_selected  
-	, last_reminder_time  
-	, reminder_count  
-	, customer_id  
-	, customer_name  
-	, customer_tel  
-	, customer_email  
-	, customer_address  
-	, customer_creator_id  
-	, customer_creator_name  
-	, customer_modifier_id  
-	, customer_modifier_name  
-	, tags  
-	, system_form  
+	 id  
+	, workflow_id  
+	, workflow_name  
+	, type  
+	, topic  
+	, level  
+	, status  
+	, creator_name  
+	, creator_id  
+	, creator_type  
+	, modifier_id  
+	, modifier_type  
+	, source  
+	, timeout  
+	, end_time  
+	, create_time  
+	, close_time  
+	, state_selected  
+	, last_reminder_time  
+	, reminder_count  
+	, customer_id  
+	, customer_name  
+	, customer_tel  
+	, customer_email  
+	, customer_address  
+	, customer_creator_id  
+	, customer_creator_name  
+	, customer_modifier_id  
+	, customer_modifier_name  
+	, tags  
+	, system_form  
 	, etl_tx_dt  
   from p00_tal.S98_S_tr_ticket_list
   ;
-  delete from p12_sfull.S98_S_tr_ticket_list
+  delete from p12_sfull.S98_S_tr_ticket_list where id in (select id from p10_sa.S98_S_tr_ticket_list)
 ;
 ;
 insert into p12_sfull.S98_S_tr_ticket_list
-(	 id  
-	, workflow_id  
-	, workflow_name  
-	, type  
-	, topic  
-	, level  
-	, status  
-	, creator_name  
-	, creator_id  
-	, creator_type  
-	, modifier_id  
-	, modifier_type  
-	, source  
-	, timeout  
-	, end_time  
-	, create_time  
-	, close_time  
-	, state_selected  
-	, last_reminder_time  
-	, reminder_count  
-	, customer_id  
-	, customer_name  
-	, customer_tel  
-	, customer_email  
-	, customer_address  
-	, customer_creator_id  
-	, customer_creator_name  
-	, customer_modifier_id  
-	, customer_modifier_name  
-	, tags  
-	, system_form  
+(	 id  
+	, workflow_id  
+	, workflow_name  
+	, type  
+	, topic  
+	, level  
+	, status  
+	, creator_name  
+	, creator_id  
+	, creator_type  
+	, modifier_id  
+	, modifier_type  
+	, source  
+	, timeout  
+	, end_time  
+	, create_time  
+	, close_time  
+	, state_selected  
+	, last_reminder_time  
+	, reminder_count  
+	, customer_id  
+	, customer_name  
+	, customer_tel  
+	, customer_email  
+	, customer_address  
+	, customer_creator_id  
+	, customer_creator_name  
+	, customer_modifier_id  
+	, customer_modifier_name  
+	, tags  
+	, system_form  
 	, etl_tx_dt   )
   select 
-	 id  
-	, workflow_id  
-	, workflow_name  
-	, type  
-	, topic  
-	, level  
-	, status  
-	, creator_name  
-	, creator_id  
-	, creator_type  
-	, modifier_id  
-	, modifier_type  
-	, source  
-	, timeout  
-	, end_time  
-	, create_time  
-	, close_time  
-	, state_selected  
-	, last_reminder_time  
-	, reminder_count  
-	, customer_id  
-	, customer_name  
-	, customer_tel  
-	, customer_email  
-	, customer_address  
-	, customer_creator_id  
-	, customer_creator_name  
-	, customer_modifier_id  
-	, customer_modifier_name  
-	, tags  
-	, system_form  
+	 id  
+	, workflow_id  
+	, workflow_name  
+	, type  
+	, topic  
+	, level  
+	, status  
+	, creator_name  
+	, creator_id  
+	, creator_type  
+	, modifier_id  
+	, modifier_type  
+	, source  
+	, timeout  
+	, end_time  
+	, create_time  
+	, close_time  
+	, state_selected  
+	, last_reminder_time  
+	, reminder_count  
+	, customer_id  
+	, customer_name  
+	, customer_tel  
+	, customer_email  
+	, customer_address  
+	, customer_creator_id  
+	, customer_creator_name  
+	, customer_modifier_id  
+	, customer_modifier_name  
+	, tags  
+	, system_form  
 	, etl_tx_dt  
   from p10_sa.S98_S_tr_ticket_list
 ;
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 014098a..7e5946a 100644
--- a/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py
+++ b/dev/workflow/TK_Cust/smart_ccc/获取工单记录列表/tickets_list_feign.py
@@ -90,6 +90,7 @@ def request_data_signature_post():
         print(f'请求工单列表失败,再次请求第{i+1}次')
         time.sleep(1)
         dataReqL=requests.post(url,headers=header,params=body)
+        resText = dataReqL.text
         i = i + 1
     resL=json.loads(resText)
     print(dataReqL)
@@ -138,6 +139,7 @@ def request_data_signature_get(id):
         print(f'请求工单详情失败,再次请求第{i+1}次')
         time.sleep(1)
         dataReqL=requests.get(url,headers={},params={})
+        resText = dataReqL.text
         i = i + 1
     resD=json.loads(resText)
     return resD