diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs index f37e3a111..b7c51fa86 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs @@ -51,15 +51,23 @@ public class PutawayNoteAppService : { foreach (var detail in input.Details) { - var purchasereDetail =await _purchaseReceiptNoteAppService.GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false); - if (purchasereDetail != null) + try { - var inspectJobDto =await _inspectJobAppService.GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false); - if (inspectJobDto.JobStatus != EnumJobStatus.Done) + var purchasereDetail = await _purchaseReceiptNoteAppService + .GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false); + if (purchasereDetail != null) { - throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检"); + var inspectJobDto = await _inspectJobAppService + .GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false); + if (inspectJobDto.JobStatus != EnumJobStatus.Done) + { + throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检"); + } } } + catch (Exception ex) + { + } } var entity = ObjectMapper.Map(input);