Commit c9fe6e11 by 泽锋 李

李志民1 参与 缺货改0

parent 796d16a5
......@@ -486,10 +486,10 @@ left join dc_base_stock as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_
where
t1.warehouse_code in ('GZBLWH', 'QYBLZZ')
and t1.bailun_sku not in ('942904501')
and ( t2.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1') or t2.`status`=1 )
and ( t2.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣') or t2.`status`=1 )
and ( t1.quantity_purchase<=0 and (ifnull(t4.sum_unshipped_quantity,0) - ifnull(t3.sum_usable_stock,0))>0 ) -- 有缺货
and (ifnull(t4.sum_unshipped_quantity,0) - ifnull(t3.sum_usable_stock,0))>0 -- 有缺货
and ( ifnull(t4.sum_quantity_purchase,0)<=0 or t2.buyer_name in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1') ) -- 无在途 或者 自产 (自产的有在途也要推)
and ( ifnull(t4.sum_quantity_purchase,0)<=0 or t2.buyer_name in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣') ) -- 无在途 或者 自产 (自产的有在途也要推)
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)
......@@ -525,9 +525,9 @@ left join (
where t1.usable_stock<=0 and t1.bailun_sku!=''
and t1.warehouse_code in ('GZBLWH', 'QYBLZZ')
and t1.bailun_sku not in ('942904501')
and ( t3.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1') or t3.`status`=1 )
and ( t3.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣') or t3.`status`=1 )
and IFNULL(t4.sum_usable_stock,0)<=0 -- 无库存
and ( ifnull(t5.sum_quantity_purchase,0)<=0 or t3.buyer_name in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1')
and ( ifnull(t5.sum_quantity_purchase,0)<=0 or t3.buyer_name in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣')
) -- 无在途 或者 自产 (自产的有在途也要推)
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 )
";
......@@ -648,7 +648,7 @@ and ( t_db.hq_type!='国内仓' or
(
t1.bailun_sku not in ('942904501')
and
t2.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1')
t2.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣')
)
)
and t_db.hq_type!='fba仓'
......@@ -683,7 +683,7 @@ and ( t_db.hq_type!='国内仓' or
(
t1.bailun_sku not in ('942904501')
and
t3.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣','李志民1')
t3.buyer_name not in ('张莹霞','张莹霞1','赵美聪','黄镜洁','赵美聪','赵美聪1','秦振荣')
)
)
and (
......
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