/// <summary> /// 获取审核历史明细 /// </summary> /// <param name="userInfo">用户</param> /// <param name="categoryId">单据分类主键</param> /// <param name="objectId">单据主键</param> /// <returns>数据权限</returns> public DataTable GetAuditDetailDT(BaseUserInfo userInfo, string categoryId, string objectId) { DataTable dt = null; var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod()); ServiceUtil.ProcessWorkFlowDb(userInfo, parameter, (dbHelper) => { var workFlowCurrentManager = new BaseWorkFlowCurrentManager(dbHelper, userInfo); string[] ids = workFlowCurrentManager.GetIds(new KeyValuePair <string, object>(BaseWorkFlowCurrentEntity.FieldCategoryCode, categoryId), new KeyValuePair <string, object>(BaseWorkFlowCurrentEntity.FieldObjectId, objectId)); var workFlowHistoryManager = new BaseWorkFlowHistoryManager(dbHelper, userInfo); dt = workFlowHistoryManager.GetDataTable(BaseWorkFlowHistoryEntity.FieldCurrentFlowId, ids, BaseWorkFlowHistoryEntity.FieldCreateOn); dt.TableName = BaseWorkFlowCurrentEntity.TableName; }); return(dt); }
/// <summary> /// 获取审核历史明细 /// </summary> /// <param name="userInfo">用户</param> /// <param name="categoryId">单据分类主键</param> /// <param name="objectId">单据主键</param> /// <returns>数据权限</returns> public DataTable GetAuditDetailDT(BaseUserInfo userInfo, string categoryId, string objectId) { // 写入调试信息 #if (DEBUG) int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod()); #endif // 加强安全验证防止未授权匿名调用 #if (!DEBUG) LogOnService.UserIsLogOn(userInfo); #endif DataTable dataTable = null; using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.WorkFlowDbType)) { try { dbHelper.Open(WorkFlowDbConnection); BaseWorkFlowCurrentManager workFlowCurrentManager = new BaseWorkFlowCurrentManager(dbHelper, userInfo); string[] ids = workFlowCurrentManager.GetIds(new KeyValuePair <string, object>(BaseWorkFlowCurrentEntity.FieldCategoryCode, categoryId), new KeyValuePair <string, object>(BaseWorkFlowCurrentEntity.FieldObjectId, objectId)); BaseWorkFlowHistoryManager workFlowHistoryManager = new BaseWorkFlowHistoryManager(dbHelper, userInfo); dataTable = workFlowHistoryManager.GetDataTable(BaseWorkFlowHistoryEntity.FieldCurrentFlowId, ids, BaseWorkFlowHistoryEntity.FieldCreateOn); dataTable.TableName = BaseWorkFlowCurrentEntity.TableName; BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, MethodBase.GetCurrentMethod()); } catch (Exception ex) { BaseExceptionManager.LogException(dbHelper, userInfo, ex); throw ex; } finally { dbHelper.Close(); } } // 写入调试信息 #if (DEBUG) BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart); #endif return(dataTable); }