Commit 450d5420 by larosa

tmp sql

parent 0ccc9f5f
Showing with 24 additions and 0 deletions
--先使用 lie_scm_order 这个来源
--下面的步骤是在获取 kingdee_sales_order_no
select purchase_item_id from lie_scm_order; --获取 purchase_item_id 这一步获取的purchase_item_id 假定为 purchase_item_id_from_scm_order ;
select purchase_item_id, frq_id from lie_purchase_items where purchase_item_id = 'purchase_item_id_from_scm_order'; --这一步获取 frq_id, 假定为frq_id_from_purchase_items ;
select erp_sn from lie_frq where frq_id = 'frq_id_from_purchase_items'; --获取到erp_sn作为 kingdee_sales_order_no;
------------------
--下面的步骤是为了获取purchase_sn
select purchase_id from lie_scm_order; --获取到 purchase_id_from_scm_order;
select purchase_sn from lie_purchase_order where purchase_id = 'purchase_id_from_scm_order' ;
-----------------
insert into lie_shipping_intermediate_data
(
source_type, --lie_stock_in_items == 1 / lie_scm_order == 2
source_id, -- ???? 来源id是什么
kingdee_sales_order_no,
purchase_sn,
kingdee_purchase_order_no,
)
values
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment