From 2d0bd520f74bc2e13540ad1229f7e214c7fdcda1 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Tue, 22 Aug 2023 14:46:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Jobs/InspectJobs/InspectJobManager.cs | 1 + .../Notes/InspectNotes/IInspectNoteManager.cs | 2 ++ .../Notes/InspectNotes/InspectNoteManager.cs | 5 +++++ .../Jobs/InspectJobEventHandler.cs | 8 +++++--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs index dd44a42dc..e9c4dab04 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs @@ -218,6 +218,7 @@ public class InspectJobManager : SfsJobManagerBase summaryDetailEntity.FailedQty = input.FailedQty; summaryDetailEntity.FailedReason = input.FailedReason; summaryDetailEntity.NotPassedQty = input.NotPassedQty; + summaryDetailEntity.InspectReport = input.InspectReport; return summaryDetailEntity; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs index be8792480..a4df56072 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs @@ -14,4 +14,6 @@ public interface IInspectNoteManager : ISfsStoreManager /// Task CreateSummaryDetailAndDetailByIdAsync(Guid id, InspectNoteSummaryDetail summaryDetail, List details); + + Task GetByJobNumberAsync(string jobNumber); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs index 3b75b3c16..f07aeebe2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs @@ -61,4 +61,9 @@ public class InspectNoteManager : SfsStoreManagerBase GetByJobNumberAsync(string jobNumber) + { + return await Repository.FindAsync(p => p.JobNumber == jobNumber).ConfigureAwait(false); + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs index 3c1c4d7dd..86300de44 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs @@ -18,12 +18,13 @@ public class InspectJobEventHandler : , ILocalEventHandler> { private readonly IInspectNoteAppService _inspectNoteAppService; + private readonly InspectNoteManager _inspectNoteManager; public InspectJobEventHandler( - IInspectNoteAppService inspectNoteAppService - ) + IInspectNoteAppService inspectNoteAppService, InspectNoteManager inspectNoteManager) { _inspectNoteAppService = inspectNoteAppService; + _inspectNoteManager = inspectNoteManager; } /// @@ -90,7 +91,8 @@ public class InspectJobEventHandler : { var entity = eventData.Entity; - var inspectNote = await _inspectNoteAppService.GetByJobNumberAsync(entity.Number).ConfigureAwait(false); + var inspectNote = await _inspectNoteManager.GetByJobNumberAsync(entity.Number); + //var inspectNote = await _inspectNoteAppService.GetByJobNumberAsync(entity.Number).ConfigureAwait(false); var jobSummaryDetail = entity.SummaryDetails.FirstOrDefault();