From 946c0f98411393a968aac55b1fd01f2551160d2e Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Sun, 7 Apr 2024 16:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E8=AE=A1=E5=88=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InjectioModelPlanAppService.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs index c59439aec..41754b70b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/InjectioModelPlans/InjectioModelPlanAppService.cs @@ -156,6 +156,13 @@ public class InjectioModelPlanAppService : } var bomlist = await _bomAppService.GetSubcomponentsRecursiveList(inputs, EnumBomSelectedType.Last).ConfigureAwait(false); + if(bomlist.Count==0) + { + throw new Exception("Bom中没有查到零件BOM结构"); + } + + + return ExportImportService.Export(bomlist); @@ -168,15 +175,15 @@ public class InjectioModelPlanAppService : if (string.IsNullOrEmpty(p_input.Number)) { - new UserFriendlyException("输入值单号为空!"); + throw new UserFriendlyException("输入值单号为空!"); } if (string.IsNullOrEmpty(p_input.ItemCode)) { - new UserFriendlyException("输入值零件号为空!"); + throw new UserFriendlyException("输入值零件号为空!"); } if (p_input.PlanQty>0) { - new UserFriendlyException("计划数量必须大于0!"); + throw new UserFriendlyException("计划数量必须大于0!"); } var first = _repository.WithDetails().FirstOrDefault(p =>p.Number==p_input.Number );