From 4029614a878bcbac5c56096d520a94fbfcd780a2 Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Tue, 7 Nov 2023 10:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=B1=9E=E4=BA=8E=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E7=89=A9=E6=96=99=E4=B9=9F=E5=8F=AF=E7=AD=BE?= =?UTF-8?q?=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dto/PrdManage/MaterialReceiptInput.cs | 5 +++++ ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/MaterialReceiptInput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/MaterialReceiptInput.cs index a89af914..ab7c44cd 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/MaterialReceiptInput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/MaterialReceiptInput.cs @@ -60,5 +60,10 @@ namespace Tnb.ProductionMgr.Entities.Dto public string? mbom_process_id { get; set; } public List>? details { get; set; } + + /// + /// 存在不属于该任务单的原材料也要签收 + /// + public bool sure { get; set; } = false; } } \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index 5516ea48..5cb24f52 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -170,9 +170,9 @@ namespace Tnb.ProductionMgr { foreach (Dictionary item in input.details) { - if (!inputMaterials.Contains(item["material_id"])) + if (!inputMaterials.Contains(item["material_id"]) && !input.sure) { - throw new Exception("该物料不是生产bom投入物料,不能签收"); + throw new Exception("存在不属于生产bom的投入物料,确认签收吗"); } list.Add(new PrdMaterialReceiptD