工位只能有一个进行中的任务单
This commit is contained in:
@@ -1114,6 +1114,11 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah("已开始的不能再开始");
|
||||
}
|
||||
|
||||
if (await db.Queryable<PrdMoTask>().AnyAsync(x => x.workstation_id == item.workstation_id && x.mo_task_status == DictConst.InProgressEnCode && x.id != item.id))
|
||||
{
|
||||
throw Oops.Bah("该工位已有生产中的任务单");
|
||||
}
|
||||
|
||||
if (item.mo_task_status is not DictConst.ToBeStartedEnCode and not DictConst.MoStatusPauseCode)
|
||||
{
|
||||
throw Oops.Bah("状态错误无法开始");
|
||||
|
||||
Reference in New Issue
Block a user