diff --git a/dev/workflow/TK_Cust/smart_ccc_chat/ccc-chat记录/cust_chat_ccc_record_agi.sql b/dev/workflow/TK_Cust/smart_ccc_chat/ccc-chat记录/cust_chat_ccc_record_agi.sql index 8f2ece5..33c6c5c 100644 --- a/dev/workflow/TK_Cust/smart_ccc_chat/ccc-chat记录/cust_chat_ccc_record_agi.sql +++ b/dev/workflow/TK_Cust/smart_ccc_chat/ccc-chat记录/cust_chat_ccc_record_agi.sql @@ -4,7 +4,7 @@ /*Brilliance stems from wisdoms. */ /*************Head Section**************************************************************************/ /*Script Use: Periodically load data to :cust_chat_ccc_record(ccc-chat记录) */ -/*Create Date:2024-08-20 18:53:40 */ +/*Create Date:2024-08-20 18:56:04 */ /*SDM Developed By: dev */ /*SDM Developed Date: 2024-08-14 */ /*SDM Checked By: dev */ @@ -155,7 +155,7 @@ SELECT ,'t01_ccc_chat_record' /*Src_Table*/ FROM :PDMDB.t01_ccc_chat_record p0 -where p0 .app_namecontact_ in ('CN官网','TW官网','Susan Jiang','泰克科技 Joe Liu','Lily Cao','Kuang Chunyu','Tina Zhang') +where p0 .app_namecontact_ in ('CN官网','TW官网','Susan Jiang','泰克科技 Joe Liu','Lily Cao','Kuang Chunyu','Tina Zhang') and chat_duration_type <> '9' ; diff --git a/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql b/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql index 3c07fa7..91b4c46 100644 --- a/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql +++ b/dev/workflow/TK_Cust/smart_ccc_chat/ccc客户会话记录信息/cust_chat_record_info_agi.sql @@ -4,7 +4,7 @@ /*Brilliance stems from wisdoms. */ /*************Head Section**************************************************************************/ /*Script Use: Periodically load data to :cust_chat_record_info(ccc客户会话记录信息) */ -/*Create Date:2024-08-20 17:51:48 */ +/*Create Date:2024-08-20 18:56:42 */ /*SDM Developed By: dev */ /*SDM Developed Date: 2024-08-14 */ /*SDM Checked By: dev */ @@ -46,6 +46,7 @@ ON COMMIT PRESERVE ROWS; /*****************************************************************************************************/ /* GROUP 1:Source Table:cust_chat_ccc_record**********************************************************/ /*****************************************************************************************************/ + INSERT INTO cust_chat_record_info_agi_CUR_I ( chat_unique_id /*在线客服会话ID*/ ,platform_name /*平台*/ @@ -84,7 +85,7 @@ SELECT ,COALESCE(TRIM(p0.contact_app_id),'') /*contact_app_id*/ ,COALESCE(TRIM(p0.app_name),'') /*app_name*/ ,case when app_name ='TW官网' then 'TW' when app_name='CN官网' then 'CN' else '企微客服' end /*group_name*/ - ,COALESCE(TRIM(p0.queue_name),'') /*queue_name*/ + ,COALESCE(TRIM(CAST(p0.queue_name AS VARCHAR(100))),'') /*queue_name*/ ,case when p0.queue_name in ('选型报价','选型报价统计') then '产品报价' when p0.queue_name in ('售前技术','售后技术','技术支持统计') then '技术支持' when p0.queue_name in ('保内维修','保外维修与计理','维修计量统计') then '维修与校准' @@ -122,6 +123,8 @@ and p1.rn=1 LEFT JOIN :PDMDB.t99_ccc_code p2 ON p2.code_type ='chat_contact_channel' and p0.contact_channel =p2.data_code +where p0 .chat_duration_type <>'9' + ;