/// <summary> /// 获取 根据指定任务的下一步骤信息dto /// </summary> /// <param name="stepDto">流转步骤信息dto</param> /// <returns>下一步骤信息dto</returns> public FlowExecuteFormDto GetFlowNextStep(FlowExecuteFormDto stepDto) { var current = FlowTaskRepository.Entities.Where(c => c.Id == stepDto.TaskId). Select(c => new { FlowId = c.FlowItem.FlowDesignId, StepId = c.StepId, PrevID = c.PrevId, c.IsComment, c.IsSeal, c.IsArchive }).Single(); var currentLines = FlowLineRepository.Entities.Where(c => c.FlowDesignId == current.FlowId && c.FromStepId == current.StepId).Select(c => new { c.ToStepId, c.ToStepName, c.HandlerIds, c.HandlerNames }).ToList(); foreach (var item in currentLines) { StepToUser stepUser = new StepToUser(); stepUser.HandlerIds = item.HandlerIds; stepUser.HandlerNames = item.HandlerNames; stepUser.StepId = item.ToStepId; stepUser.StepName = item.ToStepName; stepDto.StepToUsers.Add(stepUser); } stepDto.IsComment = current.IsComment; stepDto.IsSeal = current.IsSeal; stepDto.IsArchive = current.IsArchive; return(stepDto); }
public ActionResult ExecuteForm(FlowExecuteFormDto dto) { dto = FlowContract.GetFlowNextStep(dto); return(View(dto)); }