修复bug

This commit is contained in:
18942506660
2024-11-15 14:21:10 +08:00
parent dee0ef5f34
commit 29f16e6ba2
4 changed files with 13 additions and 1 deletions

View File

@@ -184,6 +184,7 @@ namespace WMS.Web.Repositories
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskBox) => new { p.detail, p.order, p.box, p.taskDet, taskBox })
.Where(x => x.detail.TaskId == entity.Id).Select(x => new InStockTaskBoxInfoDto()
{
DetailId = "instock_" + x.detail.Id,
BoxId = x.box.Id,
BoxBillNo = x.box.BoxBillNo,
SaleBillNo = x.taskDet.SaleBillNo,
@@ -202,6 +203,8 @@ namespace WMS.Web.Repositories
SerialNumbers = (string.Join(",", x.detail.SerialNumbers).TrimEnd(','))
}).ToListAsync();
//这里不知道为什么左连接会查出重复多余数据 需要去重
boxList = boxList.GroupBy(g => g.DetailId).Select(s => s.First()).ToList();
var boxIds = boxList.GroupBy(x => x.BoxId).Select(x => x.Key).ToList();
@@ -214,6 +217,7 @@ namespace WMS.Web.Repositories
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, taskDet) => new { p.detail, p.box, taskDet })
.Where(x => x.box.TaskId == entity.Id && !boxIds.Contains(x.box.BoxId)).Select(x => new InStockTaskBoxInfoDto()
{
DetailId = "instocktask_" + x.detail.Id,
BoxId = x.box.BoxId,
BoxBillNo = x.box.BoxBillNo,
SaleBillNo = x.taskDet.SaleBillNo,