Beispiel #1
0
        public async Task <OperateStatus> UpdateProcessTaskStatus(WorkflowEngineProcessTaskStatusInput input)
        {
            var operateStatus = new OperateStatus();

            if ((await _workflowProcessTaskRepository.UpdateProcessTaskStatus(input)) > 0)
            {
                operateStatus.ResultSign = ResultSign.Successful;
            }
            return(operateStatus);
        }
        /// <summary>
        ///     更新任务状态
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public Task <int> UpdateProcessTaskStatus(WorkflowEngineProcessTaskStatusInput input)
        {
            const string sql =
                "UPDATE Workflow_ProcessInstance_Task SET Status=@status,DoUserId=@doUserId,DoUserName=@doUserName,DoTime=@doTime,Comment=@comment WHERE TaskId=@taskId";

            return(SqlMapperUtil.InsertUpdateOrDeleteSql <WorkflowProcessInstanceTask>(sql, new
            {
                status = (byte)input.Status,
                doUserId = input.PrincipalUser.UserId,
                doUserName = input.PrincipalUser.Name,
                doTime = DateTime.Now,
                comment = input.Comment,
                taskId = input.TaskId
            }));
        }