add workflow 简道云销售拜访数据同步,dev
This commit is contained in:
parent
6c706a605b
commit
b982dfa375
|
@ -4,7 +4,7 @@
|
|||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_jdy_ae_plan(简道云AE排期表) */
|
||||
/*Create Date:2025-09-26 16:23:41 */
|
||||
/*Create Date:2025-09-26 17:08:43 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2025-09-26 */
|
||||
/*SDM Checked By: dev */
|
||||
|
@ -65,14 +65,14 @@ INSERT INTO t01_jdy_ae_plan_agi_CUR_I (
|
|||
SELECT
|
||||
COALESCE(TRIM(CAST(p0.id AS varchar(50))),'') /*id*/
|
||||
,p0.ae::json ->> 'username' /*ae_id*/
|
||||
,(p0.task_flowup_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*task_follow_up_time*/
|
||||
,(p0.task_flowup_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*task_follow_up_time*/
|
||||
,COALESCE(TRIM(CAST(p0.status AS varchar(20))),'') /*ae_status*/
|
||||
,p0.creator::json ->> 'username' /*creator_id*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*create_time*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*create_time*/
|
||||
,p0.updater::json ->> 'username' /*updater_id*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*update_time*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*update_time*/
|
||||
,p0.deleter::json ->> 'username' /*deleter_id*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*delete_time*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*delete_time*/
|
||||
,COALESCE(TRIM(CAST(p0.app_id AS varchar(50))),'') /*app_id*/
|
||||
,COALESCE(TRIM(CAST(p0.entry_id AS varchar(50))),'') /*entry_id*/
|
||||
,0 /*Etl_Batch_No*/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_jdy_account(简道云Account) */
|
||||
/*Create Date:2025-09-26 14:59:56 */
|
||||
/*Create Date:2025-09-26 17:10:26 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2025-09-26 */
|
||||
/*SDM Checked By: dev */
|
||||
|
@ -106,15 +106,15 @@ SELECT
|
|||
,COALESCE(TRIM(CAST(p0.custom_class AS varchar(100))),'') /*custom_class*/
|
||||
,COALESCE(TRIM(CAST(p0.custom_type AS varchar(100))),'') /*custom_type*/
|
||||
,p0.create_by::json ->> 'username' /*create_by*/
|
||||
,(p0.create_tm::timestamptz AT TIME ZONE '+08')::timestamp(0) /*create_tm*/
|
||||
,(p0.addition_tm::timestamptz AT TIME ZONE '+08')::timestamp(0) /*addition_tm*/
|
||||
,(p0.create_tm::timestamptz AT TIME ZONE '-08')::timestamp(0) /*create_tm*/
|
||||
,(p0.addition_tm::timestamptz AT TIME ZONE '-08')::timestamp(0) /*addition_tm*/
|
||||
,COALESCE(TRIM(CAST(p0.wx_open_id AS varchar(100))),'') /*wx_open_id*/
|
||||
,p0.creator::json ->> 'username' /*create_id*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*create_time*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*create_time*/
|
||||
,p0.updater::json ->> 'username' /*updater*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*update_time*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*update_time*/
|
||||
,p0.deleter::json ->> 'username' /*deleter*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*delete_time*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*delete_time*/
|
||||
,COALESCE(TRIM(CAST(p0.app_id AS varchar(100))),'') /*app_id*/
|
||||
,COALESCE(TRIM(CAST(p0.entry_id AS varchar(100))),'') /*entry_id*/
|
||||
,0 /*Etl_Batch_No*/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_jdy_contact(简道云Contact) */
|
||||
/*Create Date:2025-09-26 15:03:38 */
|
||||
/*Create Date:2025-09-26 17:09:17 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2025-09-26 */
|
||||
/*SDM Checked By: dev */
|
||||
|
@ -88,10 +88,10 @@ SELECT
|
|||
,COALESCE(TRIM(CAST(p0.title AS varchar(200))),'') /*title*/
|
||||
,COALESCE(TRIM(p0.phone2),'') /*phone2*/
|
||||
,p0.creator::json ->> 'username' /*create_id*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*create_time*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*create_time*/
|
||||
,p0.updater::json ->> 'username' /*update_id*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*update_time*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*delete_time*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*update_time*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*delete_time*/
|
||||
,p0.deleter::json ->> 'username' /*delete_id*/
|
||||
,COALESCE(TRIM(CAST(p0.app_id AS varchar(100))),'') /*app_id*/
|
||||
,COALESCE(TRIM(CAST(p0.entry_id AS varchar(100))),'') /*entry_id*/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_jdy_daily_visit(简道云Visit) */
|
||||
/*Create Date:2025-09-26 16:24:19 */
|
||||
/*Create Date:2025-09-26 17:11:24 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2025-09-26 */
|
||||
/*SDM Checked By: dev */
|
||||
|
@ -108,8 +108,8 @@ SELECT
|
|||
,COALESCE(TRIM(CAST(p0.account AS varchar(50))),'') /*account*/
|
||||
,p0.assign_to::json ->> 'username' /*assign_id*/
|
||||
,COALESCE(TRIM(CAST(p0.task_name AS varchar(100))),'') /*task_name*/
|
||||
,(p0.visit_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*visit_time*/
|
||||
,(p0.task_follow_up_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*task_follow_up_time*/
|
||||
,(p0.visit_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*visit_time*/
|
||||
,(p0.task_follow_up_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*task_follow_up_time*/
|
||||
,COALESCE(TRIM(CAST(p0.irtnc_state AS varchar(20))),'') /*irtnc_state*/
|
||||
,COALESCE(TRIM(CAST(p0.segments AS varchar(20))),'') /*segments*/
|
||||
,COALESCE(TRIM(CAST(p0.application AS varchar(20))),'') /*application*/
|
||||
|
@ -139,7 +139,7 @@ SELECT
|
|||
,COALESCE(TRIM(CAST(p0.contact_phone_flag AS varchar(50))),'') /*contact_phone_flag*/
|
||||
,COALESCE(TRIM(CAST(p0.repeat_flag AS varchar(20))),'') /*repeat_flag*/
|
||||
,COALESCE(TRIM(CAST(p0.am AS varchar(20))),'') /*am*/
|
||||
,(p0.visit_tm::timestamptz AT TIME ZONE '+08')::timestamp(0) /*visit_tm*/
|
||||
,(p0.visit_tm::timestamptz AT TIME ZONE '-08')::timestamp(0) /*visit_tm*/
|
||||
,COALESCE(TRIM(CAST(p0.replan_flag AS varchar(20))),'') /*replan_flag*/
|
||||
,COALESCE(TRIM(CAST(p0.status2 AS varchar(20))),'') /*status2*/
|
||||
,COALESCE(TRIM(CAST(p0.ap_week AS varchar(20))),'') /*ap_week*/
|
||||
|
@ -149,12 +149,12 @@ SELECT
|
|||
,COALESCE(TRIM(CAST(p0.assigned_to_text AS varchar(20))),'') /*assigned_to_text*/
|
||||
,COALESCE(TRIM(CAST(p0.time_no AS varchar(50))),'') /*time_no*/
|
||||
,p0.creator::json ->> 'username' /*creator_id*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*create_time*/
|
||||
,(p0.create_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*create_time*/
|
||||
,p0.updater::json ->> 'username' /*updater_id*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*update_time*/
|
||||
,(p0.update_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*update_time*/
|
||||
,COALESCE(TRIM(CAST(p0.flow_state AS varchar(10))),'') /*flow_state*/
|
||||
,p0.deleter::json ->> 'username' /*deleter_id*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '+08')::timestamp(0) /*delete_time*/
|
||||
,(p0.delete_time::timestamptz AT TIME ZONE '-08')::timestamp(0) /*delete_time*/
|
||||
,COALESCE(TRIM(CAST(p0.app_id AS varchar(50))),'') /*app_id*/
|
||||
,COALESCE(TRIM(CAST(p0.entry_id AS varchar(50))),'') /*entry_id*/
|
||||
,0 /*Etl_Batch_No*/
|
||||
|
|
|
@ -217,7 +217,7 @@ def main():
|
|||
all_data = client.fetch_all_data(
|
||||
entry_id=ENTRY_ID,
|
||||
limit=100, # 可根据需要调整(最大100)
|
||||
filter_condition=filter_condition
|
||||
filter_condition=None
|
||||
)
|
||||
|
||||
print(f"获取到的总记录数: {len(all_data)}")
|
||||
|
|
|
@ -216,7 +216,7 @@ def main():
|
|||
all_data = client.fetch_all_data(
|
||||
entry_id=ENTRY_ID,
|
||||
limit=100, # 可根据需要调整(最大100)
|
||||
filter_condition=filter_condition
|
||||
filter_condition=None
|
||||
)
|
||||
|
||||
print(f"获取到的总记录数: {len(all_data)}")
|
||||
|
|
|
@ -217,7 +217,7 @@ def main():
|
|||
all_data = client.fetch_all_data(
|
||||
entry_id=ENTRY_ID,
|
||||
limit=100, # 可根据需要调整(最大100)
|
||||
filter_condition=filter_condition
|
||||
filter_condition=None
|
||||
)
|
||||
|
||||
print(f"获取到的总记录数: {len(all_data)}")
|
||||
|
|
|
@ -217,7 +217,7 @@ def main():
|
|||
all_data = client.fetch_all_data(
|
||||
entry_id=ENTRY_ID,
|
||||
limit=100, # 可根据需要调整(最大100)
|
||||
filter_condition=filter_condition
|
||||
filter_condition=None
|
||||
)
|
||||
|
||||
print(f"获取到的总记录数: {len(all_data)}")
|
||||
|
|
Loading…
Reference in New Issue