Commit 34922b58 by 泽锋 李

采购建议新增子sku查询

parent 7ba47fe4
......@@ -1982,6 +1982,23 @@ where 1=1 ";
sql += $" and t1.bailun_sku in @bailun_skus ";
parameters.Add("bailun_skus", m.sku.Split(',').ToList());
}
if (!string.IsNullOrWhiteSpace(m.map_sku))
{
// 先查询母sku
var mother_sku_warehouse_codes = _connection.Query<string>(" select mother_sku_warehouse_code from dc_base_mother_sku_map where bailun_sku=@bailun_sku ",new {
bailun_sku = m.map_sku
}).ToList();
if(mother_sku_warehouse_codes!=null && mother_sku_warehouse_codes.Count >= 1)
{
sql += $" and t1.mother_sku_warehouse_code in @mother_sku_warehouse_codes ";
parameters.Add("mother_sku_warehouse_codes", mother_sku_warehouse_codes);
}
else
{
sql += " and 1=2 ";
}
}
if (m.warehouse_code != null)
{
sql += $" and t1.warehouse_code=@warehouse_code ";
......
......@@ -584,6 +584,9 @@ namespace AutoTurnOver.Models
[Description("建议单号")]
public string order_no { get; set; }
[Description("子sku")]
public string map_sku { get; set; }
[Description("是否缺库容")]
public int? is_storage_capacity_lack { get; set; }
......
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