增加仓位
This commit is contained in:
@@ -3291,6 +3291,11 @@
|
|||||||
箱Id
|
箱Id
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.MaterialResponse.SubStockId">
|
||||||
|
<summary>
|
||||||
|
仓位Id(序列号不存在库存的话仓位是0)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.MaterialResponse.SerialNumber">
|
<member name="P:WMS.Web.Core.Dto.MaterialResponse.SerialNumber">
|
||||||
<summary>
|
<summary>
|
||||||
序列号
|
序列号
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ namespace WMS.Web.Core.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 箱Id
|
/// 箱Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int BoxId { get; set; }
|
public int BoxId { get; set; } = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位Id(序列号不存在库存的话仓位是0)
|
||||||
|
/// </summary>
|
||||||
|
public int SubStockId { get; set; } = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 序列号
|
/// 序列号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -149,14 +149,18 @@ namespace WMS.Web.Repositories
|
|||||||
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, material.MaterialId);
|
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, material.MaterialId);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
var entity = await _context.SerialNumbers.FirstOrDefaultAsync(w => serialNumber.Equals(w.SerialNumber));
|
var entity = await _context.SerialNumbers
|
||||||
if (entity == null) return null;
|
.GroupJoin(_context.BoxInventory, serial => serial.BoxId, box => box.BoxId, (serial, box) => new { serial, box })
|
||||||
response.BoxId = entity.BoxId;
|
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, box })
|
||||||
response.SerialNumber = entity.SerialNumber;
|
.FirstOrDefaultAsync(w => serialNumber.Equals(w.serial.SerialNumber));
|
||||||
response.MaterialId = entity.MaterialId;
|
if (entity.serial == null) return null;
|
||||||
response.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, entity.MaterialId);
|
response.BoxId = entity.serial.BoxId;
|
||||||
response.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, entity.MaterialId);
|
response.SubStockId = entity.box?.SubStockId ?? 0;
|
||||||
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, entity.MaterialId);
|
response.SerialNumber = entity.serial.SerialNumber;
|
||||||
|
response.MaterialId = entity.serial.MaterialId;
|
||||||
|
response.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, entity.serial.MaterialId);
|
||||||
|
response.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, entity.serial.MaterialId);
|
||||||
|
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, entity.serial.MaterialId);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user