@@ -750,19 +750,16 @@ left join china_warehouse_unshipped as t4 on t1.bailun_sku = t4.bailun_sku and t
where ( t_db.hq_type!='国内仓' or t2.buyer_name not in ('张莹霞','张莹霞1') ) and t_db.hq_type!='fba仓' and (case when t_db.hq_type='国内仓' then (ifnull(t4.sum_unshipped_quantity,0) - ifnull(t3.sum_usable_stock,0)) else t1.quantity_out_stock end )>0
) ");
_connection.Execute(@" -- 刷新在途
set session transaction isolation level read uncommitted;
start transaction;
-- 清空视图表的数据
Truncate table dc_auto_purchase_ontheway_temp;
INSERT into dc_auto_purchase_ontheway_temp(`bailun_sku`,`warehouse_code`,`purchase_id`,`estimated_arrival_time`,`count`) (
INSERT into dc_auto_purchase_ontheway_temp(`bailun_sku`,`warehouse_code`,`purchase_id`,`estimated_arrival_time`,`deliver_name`,`count`) (
SELECT
tb1.bailun_sku AS bailun_sku,
tb1.warehouse_code AS warehouse_code,
tb1.purchase_id AS purchase_id,
tb1.estimated_arrival_time AS estimated_arrival_time,