add workflow 天润dynamic邮件同步,dev

This commit is contained in:
root 2025-01-02 14:56:42 +08:00
parent fda9b7bc9c
commit ecbb314b19
1 changed files with 8 additions and 4 deletions

View File

@ -4,11 +4,11 @@
/*Brilliance stems from wisdoms. */
/*************Head Section**************************************************************************/
/*Script Use: Periodically load data to :f_ccc_work_ticket_integ(smartccc工单信息集成) */
/*Create Date:2024-12-31 19:14:23 */
/*Create Date:2025-01-02 14:53:55 */
/*SDM Developed By: dev */
/*SDM Developed Date: 2024-07-09 */
/*SDM Checked By: dev */
/*SDM Checked Date: 2024-12-31 */
/*SDM Checked Date: 2025-01-02 */
/*Script Developed By: dev */
/*Script Checked By: dev */
/*Source table 1: :PDMDB.t00_china_city_postnum */
@ -225,7 +225,11 @@ LEFT JOIN :PDMDB.t00_china_city_info p2
WHERE jsonb_extract_path_text(j, 'id') = '304585'),(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'
where p0.state_selected in ('Leads') and 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') = '304585'),(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'),'') not like '%-%' and p0.update_time >= current_date - interval '7 days'
;
@ -465,7 +469,7 @@ SELECT
when p0."source" ='11' then '445769X445769'
else '401890X401890' end,'') end /*PEXTENSION_CODE*/
,coalesce(p1."source",'') /*PEXTENSION*/
,'' /*LAST_NAME*/
,COALESCE(TRIM(CAST(p0.customer_name AS varchar(20))),'') /*LAST_NAME*/
,coalesce(p0.id,'') /*SUFFIX*/
,coalesce((SELECT jsonb_extract_path_text(j, 'value')
FROM jsonb_array_elements((p0.start_form::json -> 'fields')::jsonb) j