列表-仓库搜索优化

This commit is contained in:
tongfei
2023-12-07 15:56:45 +08:00
parent 4db3c144ce
commit 92b4e3f794
5 changed files with 20 additions and 5 deletions

View File

@@ -120,7 +120,10 @@ namespace WMS.Web.Repositories
query = query.Where(w => w.detail.OrgId == dto.OrgId.Value);
if (!string.IsNullOrEmpty(dto.StockCode))
query = query.Where(w => w.detail.StockCode == dto.StockCode);
{
var splitStrs = dto.StockCode.Split("_$");
query = query.Where(w => w.detail.StockCode == splitStrs[0] && w.detail.OrgCode == splitStrs[1]);
}
if (dto.Type.HasValue)
query = query.Where(w => (int)w.order.Type == dto.Type.Value);