修复bug

This commit is contained in:
18942506660
2023-12-19 10:12:46 +08:00
parent a95a759b77
commit 84be9f33c8
2 changed files with 5 additions and 2 deletions

View File

@@ -325,15 +325,16 @@ namespace WMS.Web.Repositories
.Include(s => s.Details).ThenInclude(s => s.BoxsDetails.Where(w => w.BoxId == boxId))
.Where(f => f.Details.SelectMany(s => s.BoxsDetails).Where(w => w.BoxId == boxId).Any())
.OrderByDescending(o => o.Id)
.FirstAsync();
.ToListAsync();
List<BoxDetailResponse> details = new List<BoxDetailResponse>();
if (res.Count() == 0) return details;
var materials_result = await _erpService.BillQueryForMaterial();
if (!materials_result.IsSuccess)
return new List<BoxDetailResponse>();
var materials = materials_result.Data.ToList();
foreach (var d in res.Details)
foreach (var d in res.First().Details)
{
var boxDetail = d.BoxsDetails.FirstOrDefault(f => f.BoxId == boxId);
if (boxDetail == null) continue;