From 069e6d285b9bb846f3226b8fc8caa6ddaab3d1ba Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Tue, 20 Jun 2023 17:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PutawayNotes/PutawayNoteAppService.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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);