/// <summary> /// 重置单据 /// (发出单据时)当废弃审批流时需要做的事情 /// </summary> /// <param name="id">主键</param> /// <param name="auditIdea">批示</param> /// <returns>影响行数</returns> public virtual int Reset(string id, string auditIdea) { int returnValeu = 0; // 只有还在审核中的才可以废弃 string auditStatus = this.GetProperty(id, BaseBusinessLogic.FieldAuditStatus); if (!string.IsNullOrEmpty(auditStatus)) { if (!(auditStatus.Equals(AuditStatus.StartAudit.ToString()) || auditStatus.Equals(AuditStatus.WaitForAudit.ToString()))) { return(returnValeu); } } // 若能撤销流程中的单据,才可以撤销本地的单据 BaseWorkFlowCurrentManager workFlowCurrentManager = new BaseWorkFlowCurrentManager(this.UserInfo); BaseWorkFlowCurrentEntity workFlowCurrentEntity = workFlowCurrentManager.GetEntity(id); // 工作流里会进行撤销的工作 return(workFlowCurrentManager.Reset(workFlowCurrentEntity)); }