@@ -472,7 +472,10 @@ and not exists ( select * from dc_auto_shortage_push where dc_auto_shortage_push
stringno_library_sql=@"select t1.bailun_sku,
t1.warehouse_code,
now() as 'push_date',
2 as 'type' from dc_base_stock as t1 where t1.usable_stock<=0 and t1.bailun_sku!=''
2 as 'type' from dc_base_stock as t1
left join dc_mid_transit as t2 on t1.warehouse_code =t2.warehouse_code and t1.bailun_sku =t2.bailun_sku
where t1.usable_stock<=0 and t1.bailun_sku!=''
and t2.quantity_purchase<=0 and t2.quantity_transfer<=0
and not exists ( select * from dc_auto_shortage_push where dc_auto_shortage_push.warehouse_code = t1.warehouse_code and dc_auto_shortage_push.bailun_sku = t1.bailun_sku )";