add workflow 泰克CRM,dev

This commit is contained in:
root 2024-04-29 13:52:55 +08:00
parent 4a0f0ccfca
commit 17de95be74
1 changed files with 8 additions and 6 deletions

View File

@ -4,7 +4,7 @@
/*Brilliance stems from wisdoms. */ /*Brilliance stems from wisdoms. */
/*************Head Section**************************************************************************/ /*************Head Section**************************************************************************/
/*Script Use: Periodically load data to :d_crm_contact(CRM联系信息) */ /*Script Use: Periodically load data to :d_crm_contact(CRM联系信息) */
/*Create Date:2024-04-29 13:48:36 */ /*Create Date:2024-04-29 13:51:17 */
/*SDM Developed By: dev */ /*SDM Developed By: dev */
/*SDM Developed Date: 2024-01-18 */ /*SDM Developed Date: 2024-01-18 */
/*SDM Checked By: dev */ /*SDM Checked By: dev */
@ -115,12 +115,14 @@ SELECT
,COALESCE(TRIM(p0.owner_id),'') /*owner_id*/ ,COALESCE(TRIM(p0.owner_id),'') /*owner_id*/
,0 /*full_name*/ ,0 /*full_name*/
,case when mobile_phone ~ '^1[3-9]\d{9}$' then mobile_phone ,case when mobile_phone ~ '^1[3-9]\d{9}$' then mobile_phone
when telphone ~ '^1[3-9]\d{9}$' then replace(replace(telphone1,'+86 ',''),' ','') else mobile_phone end /*mobile_phone*/ when telphone ~ '^1[3-9]\d{9}$' then replace(replace(telphone,'+86 ',''),' ','') else mobile_phone end /*mobile_phone*/
,0 /*mobile_phone_data_ind*/ ,case when length(replace(replace(mobile_phone,'+86 ',''),' ',''))>1 then '1' else 0 end /*mobile_phone_data_ind*/
,0 /*mobile_phone_availability*/ ,case when replace(replace(mobile_phone,'+86 ',''),' ','') ~ '^1[3-9]\d{9}$' then '1'
when replace(replace(telphone,'+86 ',''),' ','') ~ '^1[3-9]\d{9}$' then '1' else '0' end /*mobile_phone_availability*/
,COALESCE(TRIM(p0.email),'') /*email*/ ,COALESCE(TRIM(p0.email),'') /*email*/
,0 /*email_data_ind*/ ,case when length(email)>1 then '1' else 0 end /*email_data_ind*/
,0 /*email_availability*/ ,case when email ~ '[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$' and length(email)>10 then '1'
else '0' end /*email_availability*/
,COALESCE(TRIM(p0.cust_dept),'') /*cust_dept*/ ,COALESCE(TRIM(p0.cust_dept),'') /*cust_dept*/
,COALESCE(TRIM(p0.cust_title),'') /*cust_title*/ ,COALESCE(TRIM(p0.cust_title),'') /*cust_title*/
,COALESCE(TRIM(p0.job_function),'') /*job_function*/ ,COALESCE(TRIM(p0.job_function),'') /*job_function*/