/// <summary> /// 获取处理的稿件列表 /// </summary> /// <param name="cirEntity"></param> /// <returns></returns> public Pager<FlowContribution> GetFlowContributionList(CirculationEntity cirEntity) { HttpClientHelper clientHelper = new HttpClientHelper(); Pager<FlowContribution> contributionList = clientHelper.PostAuth<Pager<FlowContribution>, CirculationEntity>(GetAPIUrl(APIConstant.FLOW_GETFLOWCONTRIBUTIONLIST), cirEntity); JournalChannelQuery query = new JournalChannelQuery(); query.JournalID = cirEntity.JournalID; IssueFacadeAPIService service = new IssueFacadeAPIService(); IList<JournalChannelEntity> list = service.GetJournalChannelList(query); if (list == null) { list = new List<JournalChannelEntity>(); } if (contributionList != null) { foreach (FlowContribution item in contributionList.ItemList) { item.AuthorName = GetMemberName(item.AuthorID); if (item.RecUserID > 0) { item.RecUserName = GetMemberName(item.RecUserID); } if (item.SendUserID > 0) { item.SendUserName = GetMemberName(item.SendUserID); } if (item.JChannelID > 0) { JournalChannelEntity itemChannel = list.SingleOrDefault(p => p.JChannelID == item.JChannelID); if (itemChannel != null) { item.JChannelName = itemChannel.ChannelName; } } } } return contributionList; }
private JournalChannelEntity GetJournalChannelModel(Int64 JChannelID) { JournalChannelEntity model = null; if (JChannelID > 0) { JournalChannelQuery query = new JournalChannelQuery(); query.JournalID = CurAuthor.JournalID; query.JChannelID = JChannelID; IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); model = service.GetJournalChannelModel(query); } if (model == null) model = new JournalChannelEntity(); return model; }
public JournalChannelEntity GetJournalChannelModel(JournalChannelQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); JournalChannelEntity model = service.GetJournalChannel(query.JChannelID); return model; }
public ExecResult DelJournalChannel(JournalChannelQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); return service.DelJournalChannel(query); }
/// <summary> /// 获取期刊栏目分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager<JournalChannelEntity> GetJournalChannelPageList(JournalChannelQuery query) { string strSql = "SELECT *,ROW_NUMBER() OVER(ORDER BY " + GetJournalChannelOrder(query) + ") AS ROW_ID FROM dbo.JournalChannel with(nolock)", sumStr = "SELECT RecordCount=COUNT(1) FROM dbo.JournalChannel with(nolock)"; string whereSQL = GetJournalChannelFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; sumStr += " WHERE " + whereSQL; } return db.GetPageList<JournalChannelEntity>(string.Format(SQL_Page_Select, strSql, query.StartIndex, query.EndIndex) , sumStr , query.CurrentPage, query.PageSize , (dr, pager) => { pager.TotalRecords = TypeParse.ToLong(dr["RecordCount"]); } , MakeJournalChannelList); }
/// <summary> /// 获取期刊栏目排序 /// </summary> /// <param name="query"></param> /// <returns></returns> private string GetJournalChannelOrder(JournalChannelQuery query) { return " SortID ASC "; }
/// <summary> /// 获取期刊栏目分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager<JournalChannelEntity> GetJournalChannelPageList(JournalChannelQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); Pager<JournalChannelEntity> pager = clientHelper.Post<Pager<JournalChannelEntity>, JournalChannelQuery>(GetAPIUrl(APIConstant.JOURNALCHANNEL_GETPAGELIST), query); return pager; }
/// <summary> /// 获取期刊栏目数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<JournalChannelEntity> GetJournalChannelList(JournalChannelQuery query) { string strSql = "SELECT * FROM dbo.JournalChannel with(nolock)"; string whereSQL = GetJournalChannelFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; } strSql += " order by " + GetJournalChannelOrder(query); return db.GetList<JournalChannelEntity>(strSql, MakeJournalChannelList); }
/// <summary> /// 根据期刊数据 按照期刊栏目数据分组 获取当前期刊数据所属的期刊栏目数据列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<JournalChannelEntity> GetJournalChannelListByIssueContent(JournalChannelQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); IList<JournalChannelEntity> list = clientHelper.Post<IList<JournalChannelEntity>, JournalChannelQuery>(GetAPIUrl(APIConstant.JOURNALCHANNEL_GETLIST_BY_ISSUECONTENT), query); return list; }
/// <summary> /// 获取期刊栏目实体 /// </summary> /// <param name="query"></param> /// <returns></returns> public JournalChannelEntity GetJournalChannelModel(JournalChannelQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); JournalChannelEntity model = clientHelper.Post<JournalChannelEntity, JournalChannelQuery>(GetAPIUrl(APIConstant.JOURNALCHANNEL_GETMODEL), query); return model; }
/// <summary> /// 获取期刊栏目分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager<JournalChannelEntity> GetJournalChannelPageList(JournalChannelQuery query) { return IssueBusProvider.GetJournalChannelPageList(query); }
/// <summary> /// 根据期刊数据 按照期刊栏目数据分组 获取当前期刊数据所属的期刊栏目数据列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<JournalChannelEntity> GetJournalChannelListByIssueContent(JournalChannelQuery query) { return IssueBusProvider.GetJournalChannelListByIssueContent(query); }
/// <summary> /// 删除期刊栏目设置 /// </summary> /// <param name="setID"></param> /// <returns></returns> public ExecResult DelJournalChannel(JournalChannelQuery query) { ExecResult execResult = new ExecResult(); if (DelJournalChannelJudge(query.JChannelID, query.JournalID, 0)) { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "该栏目存在下级,不允许删除!"; return execResult; } if (DelJournalChannelJudge(query.JChannelID, query.JournalID, 1)) { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "该栏目存在期刊信息,不允许删除!"; return execResult; } if (DelJournalChannelJudge(query.JChannelID, query.JournalID, 2)) { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "该栏目存在稿件信息,不允许删除!"; return execResult; } bool result = IssueBusProvider.DelJournalChannel(query.JChannelID); if (result) { execResult.result = EnumJsonResult.success.ToString(); execResult.msg = "删除期刊栏目成功!"; } else { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "删除期刊栏目失败!"; } return execResult; }
/// <summary> /// 根据期刊数据 按照期刊栏目数据分组 获取当前期刊数据所属的期刊栏目数据列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<JournalChannelEntity> GetJournalChannelListByIssueContent(JournalChannelQuery query) { return IssueDataAccess.Instance.GetJournalChannelListByIssueContent(query); }
/// <summary> /// 获取期刊栏目数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<TreeModel> GetJournalChannelTreeList(JournalChannelQuery query) { var list = GetJournalChannelList(query); TreeModel treeNode = new TreeModel(); treeNode.Id = 0; treeNode.text = "期刊栏目"; treeNode.url = ""; treeNode.icon = ""; treeNode.isexpand = true; if (list != null && list.Count > 0) { var first = list.Where(p => p.PChannelID == 0); TreeModel node = null; foreach (var item in first) { node = new TreeModel(); node.Id = item.JChannelID; node.text = item.ChannelName; node.url = string.Empty; node.icon = ""; node.isexpand = true; GetJournalChannelTreeList(node, list); treeNode.children.Add(node); } } IList<TreeModel> resultList = new List<TreeModel>(); resultList.Add(treeNode); return resultList; }
/// <summary> /// 获取期刊栏目分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager<JournalChannelEntity> GetJournalChannelPageList(JournalChannelQuery query) { return IssueDataAccess.Instance.GetJournalChannelPageList(query); }
/// <summary> /// 删除期刊栏目 /// </summary> /// <param name="query"></param> /// <returns></returns> public ExecResult DelJournalChannel(JournalChannelQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); ExecResult result = clientHelper.Post<ExecResult, JournalChannelQuery>(GetAPIUrl(APIConstant.JOURNALCHANNEL_DEL), query); return result; }
/// <summary> /// 根据期刊数据 按照期刊栏目数据分组 获取当前期刊数据所属的期刊栏目数据列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<JournalChannelEntity> GetJournalChannelListByIssueContent(JournalChannelQuery query) { string strSql = "SELECT [JChannelID],[JournalID],[PChannelID] ,[ChannelName],[SortID],[Status],[AddDate] FROM dbo.JournalChannel with(nolock) where JChannelID in (select JChannelID from dbo.IssueContent group by JChannelID) "; string whereSQL = GetJournalChannelFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " AND " + whereSQL; } strSql += " order by " + GetJournalChannelOrder(query); return db.GetList<JournalChannelEntity>(strSql, MakeJournalChannelList); }
public ActionResult DelJournalChannel(Int64 JChannelID) { IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); JournalChannelQuery query = new JournalChannelQuery(); query.JournalID = CurAuthor.JournalID; query.JChannelID = JChannelID; ExecResult result = service.DelJournalChannel(query); return Json(new { result = result.result, msg = result.msg }); }
/// <summary> /// 获取期刊栏目条件 /// </summary> /// <param name="query"></param> /// <returns></returns> private string GetJournalChannelFilter(JournalChannelQuery query) { StringBuilder strFilter = new StringBuilder(" JournalID= " + query.JournalID); if (query.Status != null) strFilter.Append(" and Status=").Append(query.Status.Value); return strFilter.ToString(); }
public ActionResult GetJournalChannelList(JournalChannelQuery query) { IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); query.JournalID = CurAuthor.JournalID; IList<JournalChannelEntity> list = service.GetJournalChannelList(query); return Json(new { list }); }
public IList<JournalChannelEntity> GetJournalChannelListByIssueContent(JournalChannelQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); IList<JournalChannelEntity> list = service.GetJournalChannelListByIssueContent(query); return list; }
public ActionResult GetJournalChannelPageList(JournalChannelQuery query) { IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); query.JournalID = CurAuthor.JournalID; query.CurrentPage = Convert.ToInt32(Request.Params["page"]); query.PageSize = Convert.ToInt32(Request.Params["pagesize"]); Pager<JournalChannelEntity> pager = service.GetJournalChannelPageList(query); return Json(new { Rows = pager.ItemList, Total = pager.TotalRecords }); }
public Pager<JournalChannelEntity> GetJournalChannelPageList(JournalChannelQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); Pager<JournalChannelEntity> pager = service.GetJournalChannelPageList(query); return pager; }
public ActionResult GetJournalChannelTree(string defaultText) { JournalChannelQuery query = new JournalChannelQuery(); query.JournalID = JournalID; IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); var list = service.GetJournalChannelTreeList(query); if (!string.IsNullOrWhiteSpace(defaultText)) list[0].text = Server.UrlDecode(defaultText); return Content(JsonConvert.SerializeObject(list)); }
public XmlDocument GetMagazineStruct(string strMagazineID, string strUserID, string strSafetyCode) { Magazine magazineChannel = new Magazine(); magazineChannel.magzineId = SiteConfig.SiteID.ToString(); magazineChannel.magzineName = SiteConfig.SiteName; magazineChannel.magazinecolumns = new List<magazinecolumn>(); IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); JournalChannelQuery query = new JournalChannelQuery(); query.JournalID = SiteConfig.SiteID; query.CurrentPage = 1; query.PageSize = 500; Pager<JournalChannelEntity> pager = service.GetJournalChannelPageList(query); if (pager != null) { foreach (JournalChannelEntity item in pager.ItemList) { magazineChannel.magazinecolumns.Add(new magazinecolumn { name = item.ChannelName}); } } string retrun = XmlUtils.Serialize(magazineChannel); XmlDocument xd = new XmlDocument(); XmlDeclaration xmldecl; xmldecl = xd.CreateXmlDeclaration("1.0", "utf-8", null); XmlElement root = xd.DocumentElement; xd.InsertBefore(xmldecl, root); xd.LoadXml(retrun); return xd; }
/// <summary> /// 获取稿件数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList<ContributionInfoEntity> GetContributionInfoList(ContributionInfoQuery query) { IList<ContributionInfoEntity> listC = ContributionInfoBusProvider.GetContributionInfoList(query); if (query.IsAuxiliary) { JournalChannelQuery jChannelQuery = new JournalChannelQuery(); jChannelQuery.JournalID = query.JournalID; IssueService service = new IssueService(); IList<JournalChannelEntity> list = service.GetJournalChannelList(jChannelQuery); foreach (ContributionInfoEntity item in listC) { JournalChannelEntity itemChannel = list.SingleOrDefault(p => p.JChannelID == item.JChannelID); if (itemChannel != null) { item.JChannelName = itemChannel.ChannelName; } item.AuthorList = GetContributionAuthorList(new ContributionAuthorQuery() { JournalID = item.JournalID, CID = item.CID }); } } return listC; }