From 7811cd334203fc2c0edf1afd79e2ca14aed50760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 8 Jan 2025 10:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransferNotes/TransferNoteAppService.cs | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) 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 ac2c9ba33..961a1302c 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 @@ -702,7 +702,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase var transferNoteDetailInputs = new List(); var detailInput = new TransferNoteDetailInput(); - var fromlocation = await _locationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false); @@ -710,17 +709,21 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { 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); if (tolocation == null) { @@ -728,16 +731,6 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase } - - - - - - - - - - //switch (tolocation.WarehouseCode) //{ // case "APA-KWZ":// 装配线边库位组