不属于任务单的物料也可签收
This commit is contained in:
@@ -60,5 +60,10 @@ namespace Tnb.ProductionMgr.Entities.Dto
|
||||
public string? mbom_process_id { get; set; }
|
||||
|
||||
public List<Dictionary<string, object>>? details { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存在不属于该任务单的原材料也要签收
|
||||
/// </summary>
|
||||
public bool sure { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -170,9 +170,9 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
foreach (Dictionary<string, object> 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
|
||||
|
||||
Reference in New Issue
Block a user