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();