Browse Source

修改质检

集成Redis
郑勃旭 2 years ago
parent
commit
2d0bd520f7
  1. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs
  2. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs
  3. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs
  4. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs

@ -218,6 +218,7 @@ public class InspectJobManager : SfsJobManagerBase<InspectJob, InspectJobDetail>
summaryDetailEntity.FailedQty = input.FailedQty;
summaryDetailEntity.FailedReason = input.FailedReason;
summaryDetailEntity.NotPassedQty = input.NotPassedQty;
summaryDetailEntity.InspectReport = input.InspectReport;
return summaryDetailEntity;
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/IInspectNoteManager.cs

@ -14,4 +14,6 @@ public interface IInspectNoteManager : ISfsStoreManager<InspectNote, InspectNote
/// <param name="details"></param>
/// <returns></returns>
Task<InspectNote> CreateSummaryDetailAndDetailByIdAsync(Guid id, InspectNoteSummaryDetail summaryDetail, List<InspectNoteDetail> details);
Task<InspectNote> GetByJobNumberAsync(string jobNumber);
}

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/InspectNotes/InspectNoteManager.cs

@ -61,4 +61,9 @@ public class InspectNoteManager : SfsStoreManagerBase<InspectNote, InspectNoteDe
return entity;
}
public virtual async Task<InspectNote> GetByJobNumberAsync(string jobNumber)
{
return await Repository.FindAsync(p => p.JobNumber == jobNumber).ConfigureAwait(false);
}
}

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InspectJobEventHandler.cs

@ -18,12 +18,13 @@ public class InspectJobEventHandler :
, ILocalEventHandler<SfsUpdateEntitySummaryDetailEventData<InspectJob>>
{
private readonly IInspectNoteAppService _inspectNoteAppService;
private readonly InspectNoteManager _inspectNoteManager;
public InspectJobEventHandler(
IInspectNoteAppService inspectNoteAppService
)
IInspectNoteAppService inspectNoteAppService, InspectNoteManager inspectNoteManager)
{
_inspectNoteAppService = inspectNoteAppService;
_inspectNoteManager = inspectNoteManager;
}
/// <summary>
@ -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();

Loading…
Cancel
Save