|
|
@ -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 东阳使用
|
|
|
@ -701,7 +702,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
var transferNoteDetailInputs = new List<TransferNoteDetailInput>(); |
|
|
|
var detailInput = new TransferNoteDetailInput(); |
|
|
|
|
|
|
|
|
|
|
|
var fromlocation = |
|
|
|
await _locationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false); |
|
|
|
|
|
|
@ -710,22 +710,25 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
errors.Add($"来源起始点{detail.BeginPosition}库位没查到"); |
|
|
|
} |
|
|
|
|
|
|
|
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
|
if (tolocation == null) |
|
|
|
if (detail.OrderType != "90" && detail.OrderType != "1") |
|
|
|
{ |
|
|
|
errors.Add($"结束点{detail.EndPosition}库位没查到"); |
|
|
|
throw new UserFriendlyException("类型不是MES冻结解冻或完工转储类型(50、51)"); |
|
|
|
} |
|
|
|
var productionline=await _productionLineAppService.GetByLocationCodeAsync(tolocation.Code).ConfigureAwait(false); |
|
|
|
|
|
|
|
if(detail.OrderType=="1") |
|
|
|
{ |
|
|
|
var productionline = await _productionLineAppService.GetByLocationCodeAsync(fromlocation.Code).ConfigureAwait(false); |
|
|
|
if (productionline == null) |
|
|
|
{ |
|
|
|
errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); |
|
|
|
errors.Add($"结束点{detail.BeginPosition}库位不在生产线中!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transfer.Type = productionline.ProductionLineType.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
|
if (tolocation == null) |
|
|
|
{ |
|
|
|
errors.Add($"结束点{detail.EndPosition}库位没查到"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//switch (tolocation.WarehouseCode)
|
|
|
|