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}在预计出中已存在!"); + } } }