From 0066b7166bd1904726b69b2d14fbec4a108e0c58 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 13 Sep 2024 15:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=AD=BE=E6=94=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/PrdMaterialReceiptService.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index cedcd0e0..05be114d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -526,7 +526,16 @@ namespace Tnb.ProductionMgr Log.Information($"签收载具信息{JsonConvert.SerializeObject(carryCodes)}"); foreach (var item in carryCodes) { - + PrdMaterialReceiptD existD = await db.Queryable() + .LeftJoin((x, y) => x.material_receipt_id == y.id) + .Where((x, y) => x.carry_id == carry.id && y.mo_task_id == moTask.id && x.is_all_feeding == 0) + .Select((x,y)=>x) + .FirstAsync(); + if (existD != null) + { + throw new Exception($"{moTask.mo_task_code}任务单存在未投完的签收物料,物料签收子表id{existD.id}"); + } + insertDList.Add(new PrdMaterialReceiptD { material_receipt_id = prdMaterialReceiptH.id,