From 6c5c5faa5aa9e5ee1b17ef92deeb30c65b799a66 Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Tue, 26 Mar 2024 17:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SubscribeNotificationController.cs | 2 +- .../Services/OutStockTaskService.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/WMS.Web.Api/Controllers/SubscribeNotificationController.cs b/src/WMS.Web.Api/Controllers/SubscribeNotificationController.cs index 7e7296d5..526de4e2 100644 --- a/src/WMS.Web.Api/Controllers/SubscribeNotificationController.cs +++ b/src/WMS.Web.Api/Controllers/SubscribeNotificationController.cs @@ -143,7 +143,7 @@ namespace WMS.Web.Api.Controllers return Result.ReFailure(ResultCodes.Token_Invalid_Error); var entity = await _repositories.Get(id); - if (entity == null) Result.ReFailure(ResultCodes.SubscribeNotificationNoData); + if (entity == null || entity.IsDelete == true) Result.ReFailure(ResultCodes.SubscribeNotificationNoData); return Result.ReSuccess(_mapper.Map(entity)); } } diff --git a/src/WMS.Web.Domain/Services/OutStockTaskService.cs b/src/WMS.Web.Domain/Services/OutStockTaskService.cs index e6185404..ca97181c 100644 --- a/src/WMS.Web.Domain/Services/OutStockTaskService.cs +++ b/src/WMS.Web.Domain/Services/OutStockTaskService.cs @@ -479,6 +479,21 @@ namespace WMS.Web.Domain.Services ? _erpBasicDataExtendService.GetCustomerName(customers, entity.ReceiptCustomerId) : _erpBasicDataExtendService.GetOrgName(orgs, entity.DeliveryOrgId), }; + var details = outStockList.SelectMany(s => s.Details).ToList(); + var boxDetails = outStockList.SelectMany(s => s.Details).SelectMany(s => s.BoxsDetails).ToList(); + foreach (var b in boxDetails) + { + var detail = details.FirstOrDefault(f => f.Id == b.DetailId); + var outStock = outStockList.FirstOrDefault(f => f.Id == detail.Fid); + OutStockTaskInfoDetailsResponse infoDetail = new OutStockTaskInfoDetailsResponse() + { + BoxBillNo = b.BoxId.ToString(), + Qty = b.Qty, + SerialNumbers = string.Join(",", b.SerialNumbers), + Method = outStock.Method.GetRemark() + + }; + } return Result.ReSuccess(response); }