public PaginationData <GetTaskOutput> Get(int pageIndex, int pageSize, string keyword, DateTime?createTimeL, DateTime?createTimeR, string processDefinitionName = null, bool include = true) { var authInfo = _authInfoProvider.GetCurrent(); var userId = authInfo?.User?.Id; Expression <Func <Wf_Ru_Task, bool> > expr = u => true; if (createTimeL != null) { expr = expr.AndAlso(u => u.CreateTime >= createTimeL); } if (createTimeR != null) { expr = expr.AndAlso(u => u.CreateTime <= createTimeR); } if (!string.IsNullOrEmpty(processDefinitionName)) { if (include) { expr = expr.AndAlso(u => u.ProcessInstance.ProcessDefinition.Name == processDefinitionName); } else { expr = expr.AndAlso(u => u.ProcessInstance.ProcessDefinition.Name != processDefinitionName); } } return(_taskProvider.GetTasks(pageIndex, pageSize, keyword, userId == null ? "-1" : userId.Value.ToString(), expr)); }
private IEnumerable <CloudTask> GetTasksToSubmit(Guid jobId) { try { var existingTaskIds = GetExistingTaskIds(jobId); return(_taskProvider.GetTasks(jobId).ToList().Where(t => !existingTaskIds.Contains(t.Id))); } finally { summary += _taskProvider.Output; } }
private IEnumerable <CloudTask> GetTasksToSubmit(Guid jobId) { var existingTaskIds = GetExistingTaskIds(jobId); return(_taskProvider.GetTasks(jobId).Where(t => !existingTaskIds.Contains(t.Id))); }