This commit is contained in:
2025-03-24 17:11:05 +08:00
parent 28e899ed46
commit c12d428650
7 changed files with 32 additions and 26 deletions

View File

@@ -294,7 +294,7 @@ namespace ZR.Service.mes.wms
//.Where(it => it.Code == "自动")
.Where(it => it.ActionTime >= minDateTime)
.ToList();
foreach (WmOneTimeInventoryDto item in list)
foreach (WmOneTimeInventoryDto item in list)
{
int? runum = wmOneTimeRecords
.Where(o =>
@@ -314,10 +314,10 @@ namespace ZR.Service.mes.wms
.Sum();
item.RealQuantity = item.Quantity.Value + (runum.Value - chunum.Value);
}
list = list.Where(it => it.RealQuantity != 0 || it.Quantity != 0)
.Where(it => !string.IsNullOrEmpty(it.Partnumber))
.DistinctBy(it => it.Partnumber)
.OrderBy(it => it.RealQuantity)
.ToList();
int total = list.Count;
@@ -335,7 +335,8 @@ namespace ZR.Service.mes.wms
StocktakingTotal = StocktakingTotal,
QuantitySum = QuantitySum,
RealQuantitySum = RealQuantitySum,
Result = list.Skip((parm.PageNum - 1) * parm.PageSize)
MinStocktakingTime = minDateTime,
Result = list.Skip((parm.PageNum - 1) * parm.PageSize)
.Take(parm.PageSize)
.ToList(),
};