diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs index f785c718e..cf5f21635 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CountNotes/Inputs/CountNoteImportInput.cs @@ -37,7 +37,6 @@ public class CountNoteImportInput : SfsStoreImportInputBase /// 箱码 /// [Display(Name = "箱码")] - [Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)] public string PackingCode { get; set; } /// @@ -57,7 +56,6 @@ public class CountNoteImportInput : SfsStoreImportInputBase /// 批次 /// [Display(Name = "批次")] - [Required(ErrorMessage = "{0}是必填项", AllowEmptyStrings = true)] public string Lot { get; set; } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs index 828b6c6ee..042e52d93 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs @@ -115,7 +115,7 @@ public class CountNoteAppService : { if (itemcBasicDto == null) { - throw new UserFriendlyException($"物品代码为【{detail.LocationCode}】不存在"); + throw new UserFriendlyException($"物品代码为【{detail.ItemCode}】不存在"); } } 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);