From e801ba6a6758829d3f14fe1ff701ee3e5c4070d1 Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Mon, 18 Dec 2023 09:58:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2-?= =?UTF-8?q?=E5=B8=A6=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml | 15 +++++++++++++++ .../Dto/Inventory/BoxInventoryDetailsResponse.cs | 13 +++++++++++++ .../Services/BoxInventoryService.cs | 5 ++++- .../BoxInventoryRepositories.cs | 13 +++++++++++-- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml index b04d5435..66e25ad2 100644 --- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml +++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml @@ -2611,6 +2611,21 @@ 物料ID + + + 物料名称 + + + + + 物料编码 + + + + + 物料规格型号 + + 序列号集 diff --git a/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs index f1592dc7..962313c6 100644 --- a/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs +++ b/src/WMS.Web.Core/Dto/Inventory/BoxInventoryDetailsResponse.cs @@ -67,6 +67,19 @@ namespace WMS.Web.Core.Dto.Inventory /// public int MaterialId { get; set; } + /// + /// 物料名称 + /// + public string MaterialName { get; set; } + /// + /// 物料编码 + /// + public string MaterialNumber { get; set; } + /// + /// 物料规格型号 + /// + public string Specifications { get; set; } + /// /// 序列号集 /// diff --git a/src/WMS.Web.Domain/Services/BoxInventoryService.cs b/src/WMS.Web.Domain/Services/BoxInventoryService.cs index 36fa049f..b9ec0f33 100644 --- a/src/WMS.Web.Domain/Services/BoxInventoryService.cs +++ b/src/WMS.Web.Domain/Services/BoxInventoryService.cs @@ -1276,7 +1276,10 @@ namespace WMS.Web.Domain.Services return Result.ReSuccess(); } - //private async Task ExeTaskBox(List serNubs,bool isTransaction) { } + //private async Task ExeTaskBox(List serNubs,bool isTransaction) + //{ + + //} /// /// 入库单-箱库存变更 diff --git a/src/WMS.Web.Repositories/BoxInventoryRepositories.cs b/src/WMS.Web.Repositories/BoxInventoryRepositories.cs index 4c0d3787..80551dda 100644 --- a/src/WMS.Web.Repositories/BoxInventoryRepositories.cs +++ b/src/WMS.Web.Repositories/BoxInventoryRepositories.cs @@ -122,7 +122,11 @@ namespace WMS.Web.Repositories /// public async Task GetInfoBy(string boxBillNo) { - + //1.获取物料集合和组织集合 + var materials_result = await _erpService.BillQueryForMaterial(); + if (!materials_result.IsSuccess) + return null; + var materials = materials_result.Data.ToList(); var entity=await _context.BoxInventory.Include(x=>x.Details) .GroupJoin(_context.Box, t => t.BoxId, box => box.Id, (boxinvent, ts) => new { boxinvent, ts }) @@ -137,7 +141,12 @@ namespace WMS.Web.Repositories response.Details = _mapper.Map>(entity.Details); response.TotalQty = response.Details.Sum(x=>x.Qty); } - + response.Details.ForEach(x => + { + x.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, x.MaterialId); + x.MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, x.MaterialId); + x.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, x.MaterialId); + }); return response; }