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(); +