Commit d1bc5afb by 泽锋 李

fix

parent 61c6f5f5
...@@ -548,10 +548,10 @@ and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0 ...@@ -548,10 +548,10 @@ and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0
var datas4 = AreaRedundancyClear(datas3); var datas4 = AreaRedundancyClear(datas3);
// 如果广州01,最近7天订单数量小于3 则只补缺货 // 如果广州01,最近7天订单数量小于3 则只补缺货
var datas21 = ClearOrders7(datas4); var datas2 = ClearOrders7(datas4);
//独立站的海外仓要先考虑国内仓是否有冗余 //独立站的海外仓要先考虑国内仓是否有冗余
var datas2 = lm_dao.GenerateTransferPlan(datas21); //var datas2 = lm_dao.GenerateTransferPlan(datas21);
if (datas2 != null && datas2.Count >= 1) if (datas2 != null && datas2.Count >= 1)
{ {
...@@ -1057,7 +1057,7 @@ t9.quantity_transfer_temporary_storage as 'quantity_transfer_temporary_storage' ...@@ -1057,7 +1057,7 @@ t9.quantity_transfer_temporary_storage as 'quantity_transfer_temporary_storage'
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join dc_mid_transit as t9 on t1.bailun_sku = t9.bailun_sku and t1.warehouse_code = t9.warehouse_code left join dc_mid_transit as t9 on t1.bailun_sku = t9.bailun_sku and t1.warehouse_code = t9.warehouse_code
where t6.`status`=2 and ( t6.buyer_name in ('张莹霞1') and t1.warehouse_code in ('GZBLWH','GZBLYS') ) where t6.`status`=2 and ( t6.buyer_name in ('张莹霞') and t1.warehouse_code in ('GZBLWH','GZBLYS') )
and ( t5.`status`=0 or t5.`status` is null ) and ( t5.`status`=0 or t5.`status` is null )
GROUP BY t1.bailun_sku GROUP BY t1.bailun_sku
HAVING ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t7.quantity_transfer) + sum(t7.quantity_purchase) < sum(t7.quantity_out_stock) ) HAVING ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t7.quantity_transfer) + sum(t7.quantity_purchase) < sum(t7.quantity_out_stock) )
......
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