From 1c04f0449fd09226d5c8967dc27317f2d00502e3 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Sat, 21 Sep 2024 09:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs | 5 +++++ WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyInstockService.cs | 4 ++++ WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs | 4 ++++ WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs index 76be5300..6cbd517a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDACarryBindService.cs @@ -342,6 +342,11 @@ namespace Tnb.WarehouseMgr } } + else + { + throw new AppFriendlyException($"【OutsourcedPartsInstock】点位不存在", 500); + } + // 更新成品调拨入库单子表已下发数量 await _db.Updateable().SetColumns(r => r.xf_qty == r.xf_qty + input.qty).Where(r => r.id == input.source_id).ExecuteCommandAsync(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyInstockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyInstockService.cs index 1b46ef5e..ef47bc69 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyInstockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyInstockService.cs @@ -171,6 +171,10 @@ namespace Tnb.WarehouseMgr } } + else + { + throw new AppFriendlyException($"【PDAWmsEmptyIn】点位不存在", 500); + } await _db.Ado.CommitTranAsync(); } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs index 357befb9..3a48fbd1 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAEmptyOutstockService .cs @@ -221,6 +221,10 @@ namespace Tnb.WarehouseMgr it => new BasLocation { is_lock = 1 }, _db); } } + else + { + throw new AppFriendlyException($"【PDAWmsEmptyOut】点位不存在", 500); + } await _db.Ado.CommitTranAsync(); } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs index 053c9a5c..c25f8335 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsSaleReleaseService.cs @@ -372,6 +372,10 @@ namespace Tnb.WarehouseMgr } } + else + { + throw new AppFriendlyException($"【WmsSaleReleaseService Distribute】点位不存在", 500); + } } Logger.LogInformation($"【Distribute】 预计生成{items_sorttask.Count}条分拣任务");