v3.4.6
This commit is contained in:
@@ -54,6 +54,7 @@ public class FlowLaunchService : IDynamicApiController, ITransient
|
||||
var entity = _flowTaskRepository.GetTaskFirstOrDefault(id);
|
||||
if (entity == null)
|
||||
throw Oops.Oh(ErrorCode.COM1005);
|
||||
if (entity.Suspend == 1) throw Oops.Oh(ErrorCode.WF0046);
|
||||
if (!entity.ParentId.Equals("0") && entity.ParentId.IsNotEmptyOrNull())
|
||||
throw Oops.Oh(ErrorCode.WF0003, entity.FullName);
|
||||
if (entity.FlowType == 1)
|
||||
@@ -75,6 +76,8 @@ public class FlowLaunchService : IDynamicApiController, ITransient
|
||||
public async Task Revoke(string id, [FromBody] FlowHandleModel flowHandleModel)
|
||||
{
|
||||
var flowTaskParamter = await _flowTaskRepository.GetTaskParamterByTaskId(id, flowHandleModel);
|
||||
if (flowTaskParamter.flowTaskEntity.Suspend == 1) throw Oops.Oh(ErrorCode.WF0046);
|
||||
if (await _flowTaskRepository.AnyFlowTask(x => flowTaskParamter.flowTaskEntity.Id == x.ParentId && x.DeleteMark == null && x.Suspend == 1)) throw Oops.Oh(ErrorCode.WF0046);
|
||||
if (flowTaskParamter.flowTaskEntity.Status != 1)
|
||||
throw Oops.Oh(ErrorCode.WF0011);
|
||||
if (flowTaskParamter.flowTaskEntity.ParentId.IsNotEmptyOrNull()&& !flowTaskParamter.flowTaskEntity.ParentId.Equals("0"))
|
||||
@@ -91,6 +94,7 @@ public class FlowLaunchService : IDynamicApiController, ITransient
|
||||
public async Task Press(string id)
|
||||
{
|
||||
var flowTaskParamter = await _flowTaskRepository.GetTaskParamterByTaskId(id, null);
|
||||
if (flowTaskParamter.flowTaskEntity.Suspend == 1) throw Oops.Oh(ErrorCode.WF0046);
|
||||
await _flowTaskManager.Press(flowTaskParamter);
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user