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