From 7e7720293ad9a10fbbc533223109cde576893a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 8 Jan 2025 09:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransferNotes/TransferNoteAppService.cs | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) 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 4b69e0b91..ac2c9ba33 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 @@ -78,7 +78,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase IPostionLocationAppService postionLocationAppService, IItemBasicAppService itemBasicAppService, UnitOfWorkManager unitOfWorkManager, - IProductionLineAppService _productionLineAppService, + IProductionLineAppService productionLineAppService, IExpectOutAppService expectOutAppService) : base(repository) { _unitOfWorkManager = unitOfWorkManager; @@ -96,6 +96,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase _agvOptions = agvOptions; _postionLocationAppService = postionLocationAppService; _itemBasicAppService = itemBasicAppService; + _productionLineAppService = productionLineAppService; } #region 东阳使用 @@ -709,21 +710,30 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { errors.Add($"来源起始点{detail.BeginPosition}库位没查到"); } + var productionline = await _productionLineAppService.GetByLocationCodeAsync(fromlocation.Code).ConfigureAwait(false); + if (productionline == null) + { + errors.Add($"结束点{detail.BeginPosition}库位不在生产线中!"); + } + + + + + LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); if (tolocation == null) { errors.Add($"结束点{detail.EndPosition}库位没查到"); } - var productionline=await _productionLineAppService.GetByLocationCodeAsync(tolocation.Code).ConfigureAwait(false); - if (productionline == null) - { - errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); - } + + + + - transfer.Type = productionline.ProductionLineType.ToString(); +