From ad49b0e15acdfea2a701cab248432cf8bb84a5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 14 Nov 2024 17:32:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E9=80=80=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerProductionReturnNoteDetailDTO.cs | 3 ++- .../CustomerProductionReturnNoteAppService.cs | 22 +++++++++++++++++++ ...erProductionReturnNoteAutoMapperProfile.cs | 2 +- ...ustomerProductionReturnNoteEventHandler.cs | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDetailDTO.cs index 83beb7578..d2c337ae2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDetailDTO.cs @@ -5,5 +5,6 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; /// public class CustomerProductionReturnNoteDetailDTO : SfsStoreRecommendToDetailWithFromToDTOBase { - + public string CustomerCode { set; get; } + public string CustomerName { set; get; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs index a7f472f05..2af06fcc7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -52,6 +53,27 @@ public class CustomerProductionReturnNoteAppService : _customerAppService = customerAppService; } + [HttpGet("{id}")] + public override async Task GetAsync(Guid id) + { + + + var entity=await base.GetAsync(id).ConfigureAwait(false); + + foreach (var itm in entity.Details) + { + itm.CustomerCode=entity.CustomerCode; + itm.CustomerName=entity.CustomerName; + } + + + + + return entity; + + } + + /// /// 新增实体 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs index 6649e3e53..bf44a5c2a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs @@ -12,7 +12,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .ReverseMap(); - CreateMap(); + CreateMap().Ignore(x=>x.CustomerCode).Ignore(x=>x.CustomerName); CreateMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs index 263c55e80..ad2aa5cd4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs @@ -95,6 +95,7 @@ public class CustomerProductionReturnNoteEventHandler transaction.Worker = CustomerProductionReturnNote.Worker; transaction.DocNumber = CustomerProductionReturnNote.Number; transaction.JobNumber = CustomerProductionReturnNote.JobNumber; + transaction.PackingCode = detail.HandledPackingCode; transaction.Status = EnumInventoryStatus.OK; transactions.Add(transaction);