public IHttpActionResult Load(string businessId) { Guid ret = Guid.Empty; if (string.IsNullOrEmpty(businessId) || !Guid.TryParse(businessId, out ret)) { throw new BizException("参数错误"); } var queryFilter = new VTaskTodoFilter(); queryFilter.BusinessIDS = new List <string>() { businessId }; var finder = VTaskTodoOperator.Instance.GetViewList(queryFilter).FirstOrDefault(); if (finder == null) { throw new BizException("该流程已作废"); } //if (finder.EmployeeLoginName == WebHelper.GetCurrentUser().LoginName) //{ // WorkflowBuilder.ReadWorkflowProcess(finder.BusinessID, new Lib.Model.Employee() { LoginName = finder.ReceiveLoginName }); //} var todo = new Todo(); todo.ConvertEntity(finder); if (!(todo.TaskStatus < 1 && WebHelper.GetCurrentUser().LoginName != todo.EmployeeLoginName)) { //--填报文件 var attachment = AttachmentOperator.Instance.GetLastModel("UploadTaskData", businessId); todo.ConvertTaskAttachment(attachment); } //--相关附件 var attachments = AttachmentOperator.Instance.GetModel("UploadTaskAttachment", todo.TaskID).ToList(); todo.ConvertTaskAttachmentList(attachments); var taskReportAttachments = AttachmentOperator.Instance.GetModel("UploadTaskAttach", businessId).ToList(); todo.ConvertTaskReportAttachmentList(taskReportAttachments); return(BizResult(todo)); }