From 31540985536259cfc1f9c9762b2ae19f4a225db0 Mon Sep 17 00:00:00 2001 From: Zheng Date: Fri, 27 Dec 2024 14:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E7=A7=BB=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=20=E5=92=8C=20=E5=BA=93=E7=A7=BB=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=A2=84=E8=AE=A1=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssembleIssueJobAppService.cs | 2 +- .../TransferNotes/TransferNoteAppService.cs | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index b5086a7d1..e10234455 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -490,7 +490,7 @@ public class AssembleIssueJobAppService var jobDto=ObjectMapper.Map(job); - var isDoingAgv=await DoingAgvAsync(jobDto, transferLibNoteDetail.HandledFromLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + var isDoingAgv=await DoingAgvAsync(jobDto, transferLibNoteDetail.HandledToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); if (isDoingAgv) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index c972c9179..eb5a808b2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -129,7 +129,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase CheckLocation(toLocationDto, detail); CheckFromLocation(fromLocationDto, detail); - await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); + await CheckPackingCodeAsync(detail.FromPackingCode).ConfigureAwait(false); if (toLocationDto.Type != fromLocationDto.Type) { throw new UserFriendlyException($"来源库位与目标库位类型不一致"); @@ -403,7 +403,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { if (!string.IsNullOrEmpty(detail.FromPackingCode)) { - await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); + await CheckPackingCodeAsync(detail.FromPackingCode).ConfigureAwait(false); } } entity =await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false); @@ -431,7 +431,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { if (!string.IsNullOrEmpty(detail.FromPackingCode)) { - await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); + await CheckPackingCodeAsync(detail.FromPackingCode).ConfigureAwait(false); } } resultEntity.Add(await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false)); @@ -447,12 +447,15 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase /// /// /// - private async Task CheckPackingCode(string packingCode) + private async Task CheckPackingCodeAsync(string packingCode) { - var packingcode = await _expectOutAppService.GetListByPackingCodeAsync(packingCode).ConfigureAwait(false); - if (packingcode != null && packingCode.Length>0) + if (!string.IsNullOrEmpty(packingCode)) { - throw new UserFriendlyException($"箱码{packingCode}在预计出中已存在!"); + var packingcode = await _expectOutAppService.GetListByPackingCodeAsync(packingCode).ConfigureAwait(false); + if (packingcode != null && packingCode.Length > 0) + { + throw new UserFriendlyException($"箱码{packingCode}在预计出中已存在!"); + } } }