Commit a04be26c by 泽锋 李

fix

parent f63bcecb
......@@ -539,6 +539,16 @@ and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0
)
and `status`=0 and bailun_sku_warehouse_code not in @bailun_sku_warehouse_codes
", new { bailun_sku_warehouse_codes = datas1.Select(s => $"{s.bailun_sku}{s.warehouse_code}") });
// 清理历史数据
if(datas1.Any(s => s.is_mother_map_sku == 1))
{
_connection.Execute(@"update dc_auto_purchase_advise_detailed set `status`=-1 where main_id in (
select id from dc_auto_purchase_advise where buy_sys_plan_no in ('Generate')
)
and `status`=0 and mother_sku_warehouse_code not in @bailun_sku_warehouse_codes
", new { bailun_sku_warehouse_codes = datas1.Where(s => s.is_mother_map_sku == 1).Select(s => $"{s.bailun_sku}{s.warehouse_code}") });
}
}
if (datas1 != null && datas1.Count >= 1)
......
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