修改了查询

This commit is contained in:
2025-07-03 16:04:23 +08:00
parent 8e9d14e55a
commit b93988c894

View File

@@ -347,7 +347,7 @@ namespace WMS.Web.Repositories
{
t = InstockType.ProduceSotck;
}
else
else if (type == "1")
{
t = InstockType.Purchase;
}
@@ -360,12 +360,18 @@ namespace WMS.Web.Repositories
.GroupJoin(_context.InStockTask, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
.Where(w => EF.Functions.Like(w.order.SourceBillNo, "%" + sourceBillNo + "%")
&& w.order.Type == t
// && w.order.Type == t
&& (w.order.Status == InstockStatus.Part || w.order.Status == InstockStatus.Wait || w.order.Status == InstockStatus.WaitInStock)
&& w.detail.AccruedQty > 0
&& w.detail.IsRepeal != true);
if (type == "")
{
}
else
{
query = query.Where(x => x.order.Type == t);
}
//仓库
if (!string.IsNullOrEmpty(dto.StockCode))