|
|
@ -78,7 +78,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
IPostionLocationAppService postionLocationAppService, |
|
|
|
IItemBasicAppService itemBasicAppService, |
|
|
|
UnitOfWorkManager unitOfWorkManager, |
|
|
|
IExpectOutAppService expectOutAppService, IProductionLineAppService productionLineAppService) : base(repository) |
|
|
|
IProductionLineAppService _productionLineAppService, |
|
|
|
IExpectOutAppService expectOutAppService) : base(repository) |
|
|
|
{ |
|
|
|
_unitOfWorkManager = unitOfWorkManager; |
|
|
|
_transferNoteManager = transferNoteManager; |
|
|
@ -91,7 +92,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
_issueJobAppService = issueJobAppService; |
|
|
|
_inventoryLabelAppService = inventoryLabelAppService; |
|
|
|
_expectOutAppService = expectOutAppService; |
|
|
|
_productionLineAppService = productionLineAppService; |
|
|
|
_logger = logger; |
|
|
|
_agvOptions = agvOptions; |
|
|
|
_postionLocationAppService = postionLocationAppService; |
|
|
@ -172,7 +172,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 拆箱
|
|
|
|
/// 拆箱
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="transferNoteEditInput"></param>
|
|
|
|
/// <returns></returns>
|
|
|
@ -187,7 +187,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
} |
|
|
|
|
|
|
|
#region 校验
|
|
|
|
|
|
|
|
private void CheckLocation(LocationDTO locationDto, TransferNoteDetail detail) |
|
|
|
{ |
|
|
|
if (locationDto == null) |
|
|
@ -195,7 +194,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
throw new UserFriendlyException($"库位代码为【{detail.ToLocationCode}】不存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void CheckFromLocation(LocationDTO locationDto, TransferNoteDetail detail) |
|
|
|
{ |
|
|
|
if (locationDto == null) |
|
|
@ -203,7 +201,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
throw new UserFriendlyException($"库位代码为【{detail.FromLocationCode}】不存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -713,34 +710,40 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
errors.Add($"来源起始点{detail.BeginPosition}库位没查到"); |
|
|
|
} |
|
|
|
|
|
|
|
var tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
|
|
|
|
|
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
|
if (tolocation == null) |
|
|
|
{ |
|
|
|
errors.Add($"结束点{detail.EndPosition}库位没查到"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//fromlocation.Type == EnumLocationType.WIP;
|
|
|
|
//tolocation.Type==EnumLocationType.SEMI||EnumLocationType.DimensionalStorehouse
|
|
|
|
//var productionLineDto=await _productionLineAppService.GetByLocationCodeAsync(tolocation.Code);
|
|
|
|
//productionLineDto.ProductionLineType==EnumProductionLineType.Assemble
|
|
|
|
|
|
|
|
switch (tolocation.WarehouseCode) |
|
|
|
var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false); |
|
|
|
if (productionline == null) |
|
|
|
{ |
|
|
|
case "APA-KWZ": // 装配线边库位组
|
|
|
|
transfer.Type = EnumTransSubType.Transfer_Assemble.ToString(); |
|
|
|
break; |
|
|
|
case "PPA-KWZ": //涂装线边库位组
|
|
|
|
transfer.Type = EnumTransSubType.Transfer_Coating.ToString(); |
|
|
|
break; |
|
|
|
case "IPA-KWZ": //注塑线边库位组
|
|
|
|
transfer.Type = EnumTransSubType.Transfer_Injection.ToString(); |
|
|
|
break; |
|
|
|
default: |
|
|
|
throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!"); |
|
|
|
errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transfer.Type = productionline.ProductionLineType.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//switch (tolocation.WarehouseCode)
|
|
|
|
//{
|
|
|
|
// case "APA-KWZ":// 装配线边库位组
|
|
|
|
// transfer.Type = EnumTransSubType.Transfer_Assemble.ToString();
|
|
|
|
// break;
|
|
|
|
// case "PPA-KWZ"://涂装线边库位组
|
|
|
|
// transfer.Type = EnumTransSubType.Transfer_Coating.ToString();
|
|
|
|
// break;
|
|
|
|
// case "IPA-KWZ"://注塑线边库位组
|
|
|
|
// transfer.Type = EnumTransSubType.Transfer_Injection.ToString();
|
|
|
|
// break;
|
|
|
|
// default:
|
|
|
|
// throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!");
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false); |
|
|
|
if (item == null) |
|
|
|
{ |
|
|
|