/// <summary> /// 分页获取符合查询条件的数据 /// </summary> /// <param name="flowAuthAuthorQuery">FlowAuthAuthorQuery查询实体对象</param> /// <returns>Pager<FlowAuthAuthorEntity></returns> public List<FlowAuthAuthorEntity> GetFlowAuthAuthorList(FlowAuthAuthorQuery flowAuthAuthorQuery) { return FlowAuthAuthorBusProvider.GetFlowAuthAuthorList(flowAuthAuthorQuery); }
/// <summary> /// 获取审稿环节作者权限列表 /// </summary> /// <param name="queryFlowAuthAuthor"></param> /// <returns></returns> public List<FlowAuthAuthorEntity> GetFlowAuthAuthorList(FlowAuthAuthorQuery queryFlowAuthAuthor) { HttpClientHelper clientHelper = new HttpClientHelper(); List<FlowAuthAuthorEntity> flowAuthAuthorList = clientHelper.PostAuth<List<FlowAuthAuthorEntity>, FlowAuthAuthorQuery>(GetAPIUrl(APIConstant.FLOW_GETFLOWAUTHAUTHORLIST), queryFlowAuthAuthor); if (flowAuthAuthorList != null) { foreach (FlowAuthAuthorEntity item in flowAuthAuthorList) { item.AuthorName = GetMemberName(item.AuthorID); } } return flowAuthAuthorList; }
public ActionResult GetFlowAuthAuthorListAjax(FlowAuthAuthorQuery query) { IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>(); query.JournalID = CurAuthor.JournalID; List<FlowAuthAuthorEntity> listResult = service.GetFlowAuthAuthorList(query); return Json(new { Rows = listResult }); }
public List<FlowAuthAuthorEntity> GetFlowAuthAuthorList(FlowAuthAuthorQuery queryFlowAuthAuthor) { try { IFlowAuthAuthorService flowAuthAuthorService = ServiceContainer.Instance.Container.Resolve<IFlowAuthAuthorService>(); List<FlowAuthAuthorEntity> listFlowAuthAuthor = flowAuthAuthorService.GetFlowAuthAuthorList(queryFlowAuthAuthor); return listFlowAuthAuthor; } catch (Exception ex) { LogProvider.Instance.Error("获取审稿流程作者权限出现异常:" + ex.Message); throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message)); } }
/// <summary> /// 分页获取符合查询条件的数据 /// </summary> /// <param name="flowAuthAuthorQuery">FlowAuthAuthorQuery查询实体对象</param> /// <returns>Pager<FlowAuthAuthorEntity></returns> public List<FlowAuthAuthorEntity> GetFlowAuthAuthorList(FlowAuthAuthorQuery flowAuthAuthorQuery) { return FlowAuthAuthorDataAccess.Instance.GetFlowAuthAuthorList(flowAuthAuthorQuery); }
public List<FlowAuthAuthorEntity> GetFlowAuthAuthorList(FlowAuthAuthorQuery query) { List<FlowAuthAuthorEntity> list = new List<FlowAuthAuthorEntity>(); StringBuilder sqlCommandText = new StringBuilder(); sqlCommandText.Append("SELECT AuthorAuthID,JournalID,ActionID,AuthorID,AddDate FROM dbo.FlowAuthAuthor WITH(NOLOCK)"); string whereSQL = FlowAuthAuthorQueryToSQLWhere(query); string orderBy = FlowAuthAuthorQueryToSQLOrder(query); if (!string.IsNullOrEmpty(whereSQL)) sqlCommandText.Append(" WHERE " + whereSQL); if (!string.IsNullOrEmpty(orderBy)) sqlCommandText.Append(" ORDER BY " + orderBy); DbCommand cmd = db.GetSqlStringCommand(sqlCommandText.ToString()); using (IDataReader dr = db.ExecuteReader(cmd)) { list = MakeFlowAuthAuthorList(dr); } return list; }
/// <summary> /// 将查询实体转换为Where语句 /// <param name="query">查询实体</param> /// <returns>获取Where语句,不包含Where</returns> /// </summary> public string FlowAuthAuthorQueryToSQLWhere(FlowAuthAuthorQuery query) { StringBuilder sbWhere = new StringBuilder(" JournalID = " + query.JournalID + " AND ActionID = " + query.ActionID); return sbWhere.ToString(); }
/// <summary> /// 将查询实体转换为Order语句 /// <param name="query">查询实体</param> /// <returns>获取Order语句,不包含Order</returns> /// </summary> public string FlowAuthAuthorQueryToSQLOrder(FlowAuthAuthorQuery query) { return " AuthorAuthID DESC"; }