From b34d1c9a38a29a97e36ebcbc6e034cab4bf77023 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 31 May 2024 10:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 0d1ecbf2..48a508ae 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -3059,6 +3059,10 @@ namespace Tnb.ProductionMgr foreach (var prdMoTask in list) { BasMaterial basMaterial = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.material_id); + if (basMaterial == null) + { + throw Oops.Bah($"找不到物料{prdMoTask.material_id}"); + } prdMoTask.material_name = basMaterial.name; } }