修复bug

This commit is contained in:
18942506660
2023-12-18 16:11:56 +08:00
parent 3fc73df1d7
commit f171eabaa5
4 changed files with 5 additions and 5 deletions

View File

@@ -139,7 +139,7 @@ namespace WMS.Web.Repositories
.OrderByDescending(o => o.changeBox.Id) .OrderByDescending(o => o.changeBox.Id)
.Where(adv => 1 == 1); .Where(adv => 1 == 1);
if (ids.Count() > 0) if (!string.IsNullOrEmpty(dto.Creator))
query = query.Where(w => ids.Contains(w.changeBox.CreatorId)); query = query.Where(w => ids.Contains(w.changeBox.CreatorId));
if (!string.IsNullOrEmpty(dto.SrcBox)) if (!string.IsNullOrEmpty(dto.SrcBox))
query = query.Where(w => EF.Functions.Like(w.srcBox.BoxBillNo, "%" + dto.SrcBox + "%")); query = query.Where(w => EF.Functions.Like(w.srcBox.BoxBillNo, "%" + dto.SrcBox + "%"));

View File

@@ -129,7 +129,7 @@ namespace WMS.Web.Repositories
query = query.Where(w => w.moveBox.SrcSubStockId == dto.SrcSubStockId); query = query.Where(w => w.moveBox.SrcSubStockId == dto.SrcSubStockId);
if (dto.DestSubStockId != null) if (dto.DestSubStockId != null)
query = query.Where(w => w.moveBox.DestSubStockId == dto.DestSubStockId); query = query.Where(w => w.moveBox.DestSubStockId == dto.DestSubStockId);
if (ids.Count() > 0) if (!string.IsNullOrEmpty(dto.Creator))
query = query.Where(w => ids.Contains(w.moveBox.CreatorId)); query = query.Where(w => ids.Contains(w.moveBox.CreatorId));
if (!string.IsNullOrEmpty(dto.Box)) if (!string.IsNullOrEmpty(dto.Box))
query = query.Where(w => EF.Functions.Like(w.box.BoxBillNo, "%" + dto.Box + "%")); query = query.Where(w => EF.Functions.Like(w.box.BoxBillNo, "%" + dto.Box + "%"));

View File

@@ -129,9 +129,9 @@ namespace WMS.Web.Repositories
else//查其他单据(组织) else//查其他单据(组织)
query = query.Where(w => rec_id == w.order.ReceiptCustomerId && w.order.Type != OutStockType.Sal); query = query.Where(w => rec_id == w.order.ReceiptCustomerId && w.order.Type != OutStockType.Sal);
} }
if (mIds.Count() != 0) if (!string.IsNullOrEmpty(dto.MaterialNumber))
query = query.Where(w => mIds.Contains(w.detail.MaterialId)); query = query.Where(w => mIds.Contains(w.detail.MaterialId));
if (ids.Count() > 0) if (!string.IsNullOrEmpty(dto.Creator))
query = query.Where(w => ids.Contains(w.order.CreatorId)); query = query.Where(w => ids.Contains(w.order.CreatorId));
if (!string.IsNullOrEmpty(dto.SourceBillNo)) if (!string.IsNullOrEmpty(dto.SourceBillNo))
query = query.Where(w => w.detail.ErpDetails.Where(wd => EF.Functions.Like(wd.SourceBillNo, "%" + dto.SourceBillNo + "%")).Select(s => s.DetailId).Contains(w.detail.Id)); query = query.Where(w => w.detail.ErpDetails.Where(wd => EF.Functions.Like(wd.SourceBillNo, "%" + dto.SourceBillNo + "%")).Select(s => s.DetailId).Contains(w.detail.Id));

View File

@@ -256,7 +256,7 @@ namespace WMS.Web.Repositories
else//查其他单据(组织) else//查其他单据(组织)
query = query.Where(w => rec_id == w.order.ReceiptCustomerId && w.order.Type != OutStockType.Sal); query = query.Where(w => rec_id == w.order.ReceiptCustomerId && w.order.Type != OutStockType.Sal);
} }
if (mIds.Count() != 0) if (!string.IsNullOrEmpty(dto.MaterialNumber))
query = query.Where(w => mIds.Contains(w.detail.MaterialId)); query = query.Where(w => mIds.Contains(w.detail.MaterialId));
if (dto.Ids.Count() > 0) if (dto.Ids.Count() > 0)
query = query.Where(w => dto.Ids.Contains(w.detail.Id)); query = query.Where(w => dto.Ids.Contains(w.detail.Id));