修复bug

This commit is contained in:
18942506660
2024-11-15 15:21:03 +08:00
parent 7016d76556
commit cbc55ac889

View File

@@ -211,10 +211,10 @@ namespace WMS.Web.Repositories
var instockTaskBoxList = await _context.InstockTaskBox.Where(w => w.TaskId == entity.Id && boxIds.Contains(w.BoxId)).ToListAsync();
foreach (var bid in boxIds)
{
var resList = boxList.Where(w => w.BoxId == bid).OrderByDescending(x => x.ShelfTime).ToList();
var resList = boxList.Where(w => w.BoxId == bid).OrderBy(x => x.ShelfTime).ToList();
for (int i = 0; i < resList.Count(); i++)
{
var bList = instockTaskBoxList.Where(w => w.BoxId == bid).OrderByDescending(x => x.CreateTime).ToList();
var bList = instockTaskBoxList.Where(w => w.BoxId == bid).OrderBy(x => x.CreateTime).ToList();
resList[i].Receiver = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, bList[i].ReceiverId ?? 0);
resList[i].ReceiveTime = bList[i].CreateTime.HasValue ? bList[i].CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
}