From 8b92acf67bbed712635618707fd15ccb9eca7408 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Mar 2025 14:26:02 +0800 Subject: [PATCH] =?UTF-8?q?add=20workflow=20=E5=A4=A9=E6=B6=A6dynamic?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=90=8C=E6=AD=A5,dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../smartccc工单信息集成/f_ccc_work_ticket_integ_agi.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/workflow/TK_Cust/smart_ccc_dynamic_email/smartccc工单信息集成/f_ccc_work_ticket_integ_agi.sql b/dev/workflow/TK_Cust/smart_ccc_dynamic_email/smartccc工单信息集成/f_ccc_work_ticket_integ_agi.sql index e6a46b0..bde7032 100644 --- a/dev/workflow/TK_Cust/smart_ccc_dynamic_email/smartccc工单信息集成/f_ccc_work_ticket_integ_agi.sql +++ b/dev/workflow/TK_Cust/smart_ccc_dynamic_email/smartccc工单信息集成/f_ccc_work_ticket_integ_agi.sql @@ -121,7 +121,7 @@ SELECT WHERE jsonb_extract_path_text(j, 'name') = '职位'),'') /*JOB_TITLE*/ ,coalesce(p3.city_name,(SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j - WHERE jsonb_extract_path_text(j, 'id') = '317832'),(SELECT jsonb_extract_path_text(j, 'value') + WHERE jsonb_extract_path_text(j, 'id') = '317779'),(SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j WHERE jsonb_extract_path_text(j, 'id') = '297755'),'') /*CITY*/ ,coalesce(p3.prov_name,p2.prov_name,'') /*STATE_COUNTY_LOCATION*/ @@ -230,11 +230,11 @@ LEFT JOIN :PDMDB.t00_china_city_info p2 LEFT JOIN :PDMDB.t00_china_city_pnum p3 ON p3.full_name = case when length(coalesce((SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j - WHERE jsonb_extract_path_text(j, 'id') = '317832'),(SELECT jsonb_extract_path_text(j, 'value') + WHERE jsonb_extract_path_text(j, 'id') = '317779'),(SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j WHERE jsonb_extract_path_text(j, 'id') = '297755'),'')::text)>0 then coalesce((SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j - WHERE jsonb_extract_path_text(j, 'id') = '317832'),(SELECT jsonb_extract_path_text(j, 'value') + WHERE jsonb_extract_path_text(j, 'id') = '317779'),(SELECT jsonb_extract_path_text(j, 'value') FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j WHERE jsonb_extract_path_text(j, 'id') = '297755'),'')::text else '' end where p0.state_selected in ('Leads') and p0.update_time >= current_date - interval '7 days'