Commit b996bdae by 泽锋 李

海外仓库存为0才推送(原本是库存为1就要推了)

parent 5a229a5b
...@@ -630,7 +630,7 @@ left join ( ...@@ -630,7 +630,7 @@ left join (
) as t6 on t1.bailun_sku = t6.bailun_sku and t_db.area_id = t6.area_id ) as t6 on t1.bailun_sku = t6.bailun_sku and t_db.area_id = t6.area_id
where t1.warehouse_code in @warehouse_codes where t1.warehouse_code in @warehouse_codes
-- and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore ) -- and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
and ifnull(t6.usable_stock,0)<2 -- (case when t2.buyer_name in ('张莹霞','张莹霞1') and @platform='ebay' then 2 else 0 end ) and ifnull(t6.usable_stock,0)<=0 -- (case when t2.buyer_name in ('张莹霞','张莹霞1') and @platform='ebay' then 2 else 0 end )
and not exists ( select * from dc_auto_shortage_push_not_config where dc_auto_shortage_push_not_config.warehouse_code=t1.warehouse_code and dc_auto_shortage_push_not_config.bailun_sku=t1.bailun_sku ) and not exists ( select * from dc_auto_shortage_push_not_config where dc_auto_shortage_push_not_config.warehouse_code=t1.warehouse_code and dc_auto_shortage_push_not_config.bailun_sku=t1.bailun_sku )
"; ";
if (!is_all) if (!is_all)
...@@ -982,7 +982,7 @@ and t1.platform=@platform and t1.has_return_goods=0 ...@@ -982,7 +982,7 @@ and t1.platform=@platform and t1.has_return_goods=0
and and
( (
case case
when t_db.hq_type not in ( '国内仓' ) then ifnull(tnc1.usable_stock,0) - ifnull(tnc2.quantity_unshipped,0) >= 2 when t_db.hq_type not in ( '国内仓' ) then ifnull(tnc1.usable_stock,0) - ifnull(tnc2.quantity_unshipped,0) > 0
else ifnull(tc2.sum_unshipped_quantity,0) < ifnull(tc1.sum_usable_stock,0) else ifnull(tc2.sum_unshipped_quantity,0) < ifnull(tc1.sum_usable_stock,0)
end end
) )
......
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