Browse Source

提交

Agv分支2024-11-19
赵新宇 4 months ago
parent
commit
7811cd3342
  1. 29
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

29
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

@ -702,7 +702,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
var transferNoteDetailInputs = new List<TransferNoteDetailInput>(); var transferNoteDetailInputs = new List<TransferNoteDetailInput>();
var detailInput = new TransferNoteDetailInput(); var detailInput = new TransferNoteDetailInput();
var fromlocation = var fromlocation =
await _locationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false); await _locationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false);
@ -710,17 +709,21 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
{ {
errors.Add($"来源起始点{detail.BeginPosition}库位没查到"); errors.Add($"来源起始点{detail.BeginPosition}库位没查到");
} }
var productionline = await _productionLineAppService.GetByLocationCodeAsync(fromlocation.Code).ConfigureAwait(false);
if (productionline == null) if (detail.OrderType != "50" && detail.OrderType != "51")
{ {
errors.Add($"结束点{detail.BeginPosition}库位不在生产线中!"); throw new UserFriendlyException("类型不是MES冻结解冻或完工转储类型(50、51)");
} }
if(detail.OrderType=="51")
{
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); LocationDTO tolocation = await _locationAppService.GetByCodeAsync(detail.EndPosition).ConfigureAwait(false);
if (tolocation == null) if (tolocation == null)
{ {
@ -728,16 +731,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
} }
//switch (tolocation.WarehouseCode) //switch (tolocation.WarehouseCode)
//{ //{
// case "APA-KWZ":// 装配线边库位组 // case "APA-KWZ":// 装配线边库位组

Loading…
Cancel
Save