修复bug
This commit is contained in:
@@ -196,7 +196,7 @@ namespace WMS.Web.Repositories
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
var entity = await _context.SerialNumbers
|
var entity = await _context.SerialNumbers
|
||||||
.GroupJoin(_context.BoxInventory, serial => serial.BoxId, boxInventory => boxInventory.BoxId, (serial, boxInventory) => new { serial, boxInventory })
|
.GroupJoin(_context.BoxInventory.Include(x=>x.Details), serial => serial.BoxId, boxInventory => boxInventory.BoxId, (serial, boxInventory) => new { serial, boxInventory })
|
||||||
.SelectMany(x => x.boxInventory.DefaultIfEmpty(), (p, boxInventory) => new { p.serial, boxInventory })
|
.SelectMany(x => x.boxInventory.DefaultIfEmpty(), (p, boxInventory) => new { p.serial, boxInventory })
|
||||||
.GroupJoin(_context.Box, s => s.serial.BoxId, box => box.Id, (s, box) => new { s.serial, s.boxInventory, box })
|
.GroupJoin(_context.Box, s => s.serial.BoxId, box => box.Id, (s, box) => new { s.serial, s.boxInventory, box })
|
||||||
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, p.boxInventory, box })
|
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, p.boxInventory, box })
|
||||||
@@ -211,7 +211,7 @@ namespace WMS.Web.Repositories
|
|||||||
response.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, entity.serial.MaterialId);
|
response.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, entity.serial.MaterialId);
|
||||||
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, entity.serial.MaterialId);
|
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, entity.serial.MaterialId);
|
||||||
if (entity.boxInventory != null)
|
if (entity.boxInventory != null)
|
||||||
response.IsBoxInventory = entity.boxInventory.Details.SelectMany(s => s.SerialNumbers).Any(w => serialNumber.Contains(w));
|
response.IsBoxInventory = entity.boxInventory.Details.SelectMany(s => s.SerialNumbers).Where(w => serialNumber.Contains(w)).Count() >= 1 ? true : false;
|
||||||
|
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
Reference in New Issue
Block a user