Commit 64f42964 by lizefeng

缺货的建议单标记 类型为实际缺货

parent e027361b
......@@ -186,7 +186,7 @@ where t1.bailun_sku = t2.bailun_sku and quantity_final_advise=1 and quantity_ini
t1.transfer_delivery,
t1.sales_upper_limit,
0 as 'ispush',
1 as 'type',
2 as 'type',
t6.suppliers_id
from dc_auto_turnover as t1
left join dc_auto_sales as t2 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
......
......@@ -750,6 +750,9 @@ 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`,`deliver_name`,`count`) (
......
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 to comment