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,