接口优化

This commit is contained in:
tongfei
2023-12-20 11:59:18 +08:00
parent 26f9e47f4f
commit d1c9cae1cd
13 changed files with 257 additions and 226 deletions

View File

@@ -470,10 +470,15 @@ namespace WMS.Web.Repositories
query = query.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + dto.SourceBillNo + "%"));
//物料ID在模糊后的物料
if (materials != null && materials.Count != 0 && !string.IsNullOrEmpty(dto.MaterialNumber))
if (!string.IsNullOrEmpty(dto.MaterialNumber))
{
var mids = materials.Select(x => x.MaterialId).ToList();
query = query.Where(w => mids.Contains(w.detail.MaterialId));
if (materials != null && materials.Count != 0)
{
var mids = materials.Select(x => x.MaterialId).ToList();
query = query.Where(w => mids.Contains(w.detail.MaterialId));
}
else
query = query.Where(w => w.detail.MaterialId == 0);
}
if (ids_Receiver.Count() > 0)