Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -1106,6 +1106,57 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
foreach (var item in prdTaskList)
|
||||||
|
{
|
||||||
|
switch (behavior)
|
||||||
|
{
|
||||||
|
// case PrdTaskBehavior.Release:
|
||||||
|
// if (item.mo_task_status == status)
|
||||||
|
// {
|
||||||
|
// throw Oops.Bah("已下发的不能再下发");
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case PrdTaskBehavior.Start:
|
||||||
|
if (item.mo_task_status == status)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("已开始的不能再开始");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.mo_task_status!=DictConst.ToBeStartedEnCode || item.mo_task_status!=DictConst.MoStatusPauseCode)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("状态错误无法开始");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PrdTaskBehavior.Pause:
|
||||||
|
if (item.mo_task_status == status)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("已暂停的不能再暂停");
|
||||||
|
}
|
||||||
|
if (item.mo_task_status!=DictConst.InProgressEnCode)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("状态错误无法暂停");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PrdTaskBehavior.Compled:
|
||||||
|
if (item.mo_task_status == status)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("已完成的不能再完成");
|
||||||
|
}
|
||||||
|
if (item.mo_task_status!=DictConst.InProgressEnCode || item.mo_task_status!=DictConst.MoStatusPauseCode)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("状态错误无法完成");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PrdTaskBehavior.Closed:
|
||||||
|
if (item.mo_task_status == status)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("已关闭的不能再关闭");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
prdTaskList.ForEach(x => x.mo_task_status = status);
|
prdTaskList.ForEach(x => x.mo_task_status = status);
|
||||||
if (behavior == PrdTaskBehavior.Start)
|
if (behavior == PrdTaskBehavior.Start)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user