diff --git a/src/WMS.Web.Api/Controllers/InventoryController.cs b/src/WMS.Web.Api/Controllers/InventoryController.cs
index a5b70db7..ec7830ce 100644
--- a/src/WMS.Web.Api/Controllers/InventoryController.cs
+++ b/src/WMS.Web.Api/Controllers/InventoryController.cs
@@ -171,13 +171,13 @@ namespace WMS.Web.Api.Controllers
///
[HttpPost]
[Route("GetBoxInventoryDetails/{boxBillNo}")]
- public async Task> GetBoxInventoryDetails([FromRoute] string boxBillNo)
+ public async Task> GetBoxInventoryDetails([FromRoute] string boxBillNo)
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
- return ResultPagedList.ReFailure(ResultCodes.Token_Invalid_Error);
+ return ResultPagedList.ReFailure(ResultCodes.Token_Invalid_Error);
var result = await _boxInventoryRepositories.GetListDetailsBy(boxBillNo);
- return ResultList < BoxInventoryDetailsDto >.ReSuccess(result);
+ return ResultList .ReSuccess(result);
}
}
}
diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
index f8847c1d..354c3690 100644
--- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
+++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
@@ -2045,6 +2045,76 @@
序列号
+
+
+ 箱库存明细响应对象
+
+
+
+
+ 箱库存ID
+
+
+
+
+ 箱ID
+
+
+
+
+ 明细ID
+
+
+
+
+ 仓库编码
+
+
+
+
+ 仓库名称
+
+
+
+
+ 仓位ID
+
+
+
+
+ 仓位名称
+
+
+
+
+ 物料ID
+
+
+
+
+ 物料名称
+
+
+
+
+ 物料编码
+
+
+
+
+ 物料规格型号
+
+
+
+
+ 序列号集
+
+
+
+
+ 物料库存数量
+
+
箱库存
@@ -2060,16 +2130,6 @@
明细ID
-
-
- 箱ID
-
-
-
-
- 箱库存ID
-
-
物料ID
diff --git a/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs
new file mode 100644
index 00000000..58b55e5e
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.Inventory
+{
+ ///
+ /// 箱库存明细响应对象
+ ///
+ public class BoxInventoryDetailsResponse
+ {
+
+ ///
+ /// 箱库存ID
+ ///
+ public int BoxInventoryId { get; set; }
+
+ ///
+ /// 箱ID
+ ///
+ public int BoxId { get; set; }
+
+ ///
+ /// 明细ID
+ ///
+ public int DetailsId { get; set; }
+
+ ///
+ /// 仓库编码
+ ///
+ public string StockCode { get; set; }
+
+ ///
+ /// 仓库名称
+ ///
+ public string Stock { get; set; }
+
+ ///
+ /// 仓位ID
+ ///
+ public int SubStockId { get; set; }
+
+ ///
+ /// 仓位名称
+ ///
+ public string SubStock { get; set; }
+
+ ///
+ /// 物料ID
+ ///
+ public int MaterialId { get; set; }
+
+ ///
+ /// 物料名称
+ ///
+ public string MaterialName { get; set; }
+ ///
+ /// 物料编码
+ ///
+ public string MaterialNumber { get; set; }
+ ///
+ /// 物料规格型号
+ ///
+ public string Specifications { get; set; }
+ ///
+ /// 序列号集
+ ///
+ public List SerialNumbers { get; set; } = new List();
+ ///
+ /// 物料库存数量
+ ///
+ public decimal Qty { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDto.cs b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDto.cs
index 8c7c78f6..fc21a8a3 100644
--- a/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDto.cs
+++ b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDto.cs
@@ -22,16 +22,6 @@ namespace WMS.Web.Core.Dto.Inventory
///
public int DetailsId { get; set; }
- ///
- /// 箱ID
- ///
- public int BoxId { get; set; }
-
- ///
- /// 箱库存ID
- ///
- public int BoxInventoryId { get; set; }
-
///
/// 物料ID
///
diff --git a/src/WMS.Web.Domain/Infrastructure/IBoxInventoryRepositories.cs b/src/WMS.Web.Domain/Infrastructure/IBoxInventoryRepositories.cs
index adcbc80f..c4c62fb2 100644
--- a/src/WMS.Web.Domain/Infrastructure/IBoxInventoryRepositories.cs
+++ b/src/WMS.Web.Domain/Infrastructure/IBoxInventoryRepositories.cs
@@ -25,7 +25,7 @@ namespace WMS.Web.Domain.Infrastructure
///
///
///
- Task> GetListDetailsBy(string boxBillNo);
+ Task> GetListDetailsBy(string boxBillNo);
///
/// 列表-根据箱ids
diff --git a/src/WMS.Web.Repositories/BoxInventoryRepositories.cs b/src/WMS.Web.Repositories/BoxInventoryRepositories.cs
index 8b5e882e..9e6c79cd 100644
--- a/src/WMS.Web.Repositories/BoxInventoryRepositories.cs
+++ b/src/WMS.Web.Repositories/BoxInventoryRepositories.cs
@@ -101,8 +101,14 @@ namespace WMS.Web.Repositories
///
///
///
- public async Task> GetListDetailsBy(string boxBillNo)
+ public async Task> GetListDetailsBy(string boxBillNo)
{
+ //1.获取物料集合和组织集合
+ var materials_result = await _erpService.BillQueryForMaterial();
+ if (!materials_result.IsSuccess)
+ return new List();
+ var materials = materials_result.Data.ToList();
+
var query=_context.BoxInventoryDetails
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
@@ -110,9 +116,16 @@ namespace WMS.Web.Repositories
.SelectMany(x => x.ts.DefaultIfEmpty(), (p, box) => new { p.detail, p.order, box })
.Where(x => 1 == 1 && x.box.BoxBillNo==boxBillNo);
- var list = await query.Select(x => new BoxInventoryDetailsDto()
+ var list = await query.Select(x => new BoxInventoryDetailsResponse()
{
- DetailsId=x.detail.Id,
+ MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, x.detail.MaterialId),
+ MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, x.detail.MaterialId),
+ Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.detail.MaterialId),
+ StockCode =x.order.StockCode,
+ Stock = _singleDataService.GetSingleData(SingleAction.Stocks, _loginRepositories.CompanyId, x.order.StockCode),
+ SubStockId=x.order.SubStockId,
+ SubStock= _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, x.order.SubStockId),
+ DetailsId =x.detail.Id,
BoxId=x.box.Id,
BoxInventoryId=x.order.Id,
MaterialId=x.detail.MaterialId,