|
@ -64,6 +64,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
|
|
|
|
|
private readonly IPostionLocationAppService _postionLocationAppService; |
|
|
private readonly IPostionLocationAppService _postionLocationAppService; |
|
|
|
|
|
|
|
|
|
|
|
private readonly IProductionLineAppService _productionLineAppService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly UnitOfWorkManager _unitOfWorkManager; |
|
|
private readonly UnitOfWorkManager _unitOfWorkManager; |
|
|
|
|
|
|
|
@ -84,6 +86,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
IPostionLocationAppService postionLocationAppService, |
|
|
IPostionLocationAppService postionLocationAppService, |
|
|
IItemBasicAppService itemBasicAppService, |
|
|
IItemBasicAppService itemBasicAppService, |
|
|
UnitOfWorkManager unitOfWorkManager, |
|
|
UnitOfWorkManager unitOfWorkManager, |
|
|
|
|
|
IProductionLineAppService _productionLineAppService, |
|
|
IExpectOutAppService expectOutAppService) : base(repository) |
|
|
IExpectOutAppService expectOutAppService) : base(repository) |
|
|
{ |
|
|
{ |
|
|
_unitOfWorkManager = unitOfWorkManager; |
|
|
_unitOfWorkManager = unitOfWorkManager; |
|
@ -718,27 +721,39 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
if (tolocation == null) |
|
|
if (tolocation == null) |
|
|
{ |
|
|
{ |
|
|
errors.Add($"结束点{detail.EndPosition}库位没查到"); |
|
|
errors.Add($"结束点{detail.EndPosition}库位没查到"); |
|
|
} |
|
|
} |
|
|
switch (tolocation.WarehouseCode) |
|
|
var productionline=await _productionLineAppService.GetByCodeAsync(tolocation.Code).ConfigureAwait(false); |
|
|
|
|
|
if (productionline == null) |
|
|
{ |
|
|
{ |
|
|
case "APA-KWZ":// 装配线边库位组
|
|
|
errors.Add($"结束点{detail.EndPosition}库位不在生产线中!"); |
|
|
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("结束库位、不是喷涂、注塑、涂装等线边类型!"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false); |
|
|
if (item == null) |
|
|
if (item == null) |
|
|
{ |
|
|
{ |
|
|