Commit 1bd3267e authored by 吴春's avatar 吴春

提交代码

parent af745662
...@@ -64,5 +64,18 @@ namespace Property.Model.Extend.Mall ...@@ -64,5 +64,18 @@ namespace Property.Model.Extend.Mall
/// </summary> /// </summary>
public int WarehouseId { get; set; } public int WarehouseId { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string OrderNo { get; set; }
} }
} }
...@@ -27,6 +27,7 @@ namespace Property.Repository.Mall ...@@ -27,6 +27,7 @@ namespace Property.Repository.Mall
builder.Append(@$" select a.*,b.NotOutStock,c.Delivered from {TableName} as a builder.Append(@$" select a.*,b.NotOutStock,c.Delivered from {TableName} as a
LEFT JOIN (SELECT ApplyId,COUNT(*) as NotOutStock from rb_warehouseout_goods where `IsOut`=0 and Status=0 GROUP BY ApplyId) as b on a.ID=b.ApplyId LEFT JOIN (SELECT ApplyId,COUNT(*) as NotOutStock from rb_warehouseout_goods where `IsOut`=0 and Status=0 GROUP BY ApplyId) as b on a.ID=b.ApplyId
LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where `IsOut`=1 and Status=0 GROUP BY ApplyId) as c on a.ID=c.ApplyId LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where `IsOut`=1 and Status=0 GROUP BY ApplyId) as c on a.ID=c.ApplyId
LEFT JOIN rb_warehouseout_goods as d on a.ID=d.ApplyId
where a.Status=0 "); where a.Status=0 ");
if (query != null) if (query != null)
{ {
...@@ -58,7 +59,14 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where ...@@ -58,7 +59,14 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
{ {
builder.Append($" AND a.{nameof(RB_WarehouseOut_Apply_Extend.OutStatus)}={query.OutStatus}"); builder.Append($" AND a.{nameof(RB_WarehouseOut_Apply_Extend.OutStatus)}={query.OutStatus}");
} }
if (!string.IsNullOrWhiteSpace(query.GoodsName))
{
builder.Append($" AND d.{nameof(RB_WarehouseOut_Goods.GoodsName)} like '%{query.GoodsName}%'");
}
if (!string.IsNullOrWhiteSpace(query.OrderNo))
{
builder.Append($" AND d.{nameof(RB_WarehouseOut_Goods.OrderNo)} like '%{query.OrderNo}%'");
}
} }
builder.Append($" order by a.{nameof(RB_WarehouseOut_Apply_Extend.ID)} desc"); builder.Append($" order by a.{nameof(RB_WarehouseOut_Apply_Extend.ID)} desc");
......
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