Commit dae75b31 by lizefeng

清理没有采购建议的

parent 198d72e4
...@@ -94,11 +94,13 @@ select ...@@ -94,11 +94,13 @@ select
_connection.Execute(@" update dc_auto_purchase_advise_detailed as t1, _connection.Execute(@" update dc_auto_purchase_advise_detailed as t1,
dc_base_sku as t2, dc_base_sku as t2,
dc_auto_turnover as t3 dc_auto_turnover as t3
set t1.quantity_final_advise=t3.quantity_out_stock set t1.quantity_final_advise=IFNULL(t3.quantity_out_stock,0)
where t1.bailun_sku= t2.bailun_sku where t1.bailun_sku= t2.bailun_sku
and t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code and t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
and t2.buyer_name='赵美聪' and main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0); and t2.buyer_name='赵美聪' and main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
_connection.Execute(@" delete from dc_auto_purchase_advise_detailed where quantity_final_advise<=0 and main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
// 凑单sku(初始建议数没有) 如果下单数只有一个,改为2 // 凑单sku(初始建议数没有) 如果下单数只有一个,改为2
_connection.Execute(" update dc_auto_purchase_advise_detailed set quantity_final_advise=2 where quantity_final_advise=1 and quantity_init_advise<=0 and main_id=@main_id ", new { main_id = mainID }); _connection.Execute(" update dc_auto_purchase_advise_detailed set quantity_final_advise=2 where quantity_final_advise=1 and quantity_init_advise<=0 and main_id=@main_id ", new { main_id = mainID });
......
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