public DoiRegLogEntity GetDoiRegLog(DoiRegLogQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); DoiRegLogEntity model = service.GetDoiRegLog(query); return model; }
//获取DOI注册日志列表 public IList<DoiRegLogEntity> GetDoiRegLogList(DoiRegLogQuery query) { string strSql = "SELECT * FROM dbo.DoiRegLog with(nolock)"; string whereSQL = GetDoiRegLogFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; } strSql += " ORDER BY AddDate DESC"; return db.GetList<DoiRegLogEntity>(strSql, MakeDoiRegLogList); }
//获取DOI注册日志分页数据 public Pager<DoiRegLogEntity> GetDoiRegLogPageList(DoiRegLogQuery query) { string strSql = "SELECT *,ROW_NUMBER() OVER(ORDER BY PKID) AS ROW_ID FROM dbo.DoiRegLog with(nolock)" , sumStr = "SELECT RecordCount=COUNT(1) FROM dbo.DoiRegLog with(nolock)"; string whereSQL = GetDoiRegLogFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; sumStr += " WHERE " + whereSQL; } return db.GetPageList<DoiRegLogEntity>(string.Format(SQL_Page_Select, strSql, query.StartIndex, query.EndIndex) , sumStr , query.CurrentPage, query.PageSize , (dr, pager) => { pager.TotalRecords = TypeParse.ToLong(dr["RecordCount"]); } , MakeDoiRegLogList); }
/// <summary> /// 获取DOI注册日志查询条件 /// </summary> /// <param name="query"></param> /// <returns></returns> private string GetDoiRegLogFilter(DoiRegLogQuery query) { StringBuilder strFilter = new StringBuilder(" JournalID=" + query.JournalID); if (query.PKID != 0) strFilter.Append(" and PKID=").Append(query.PKID); if (query.Year != 0) strFilter.Append(" and Year=").Append(query.Year); if (query.Issue != 0) strFilter.Append(" and Issue=").Append(query.Issue); return strFilter.ToString(); }
//获取DOI注册日志实体 public DoiRegLogEntity GetDoiRegLog(DoiRegLogQuery query) { DoiRegLogEntity doiRegLogEntity = null; string strSql = "SELECT TOP 1 * FROM dbo.DoiRegLog WITH(NOLOCK) WHERE PKID=@PKID AND JournalID=@JournalID"; DbCommand cmd = db.GetSqlStringCommand(strSql); db.AddInParameter(cmd, "@PKID", DbType.Int64, query.PKID); db.AddInParameter(cmd, "@JournalID", DbType.Int64, query.JournalID); using (IDataReader dr = db.ExecuteReader(cmd)) { if (dr.Read()) doiRegLogEntity = MakeDoiRegLog(dr); dr.Close(); } return doiRegLogEntity; }
public IList<DoiRegLogEntity> GetDoiRegLogList(DoiRegLogQuery query) { return IssueBusProvider.GetDoiRegLogList(query); }
//获取DOI注册日志分页数据 public Pager<DoiRegLogEntity> GetDoiRegLogPageList(DoiRegLogQuery query) { return IssueDataAccess.Instance.GetDoiRegLogPageList(query); }
public ActionResult ReCheckDoiStateAjax(Int64 PKID) { //获取站点配置信息 SiteConfigQuery sitequery = new SiteConfigQuery(); sitequery.JournalID = CurAuthor.JournalID; ISiteConfigFacadeService siteservice = ServiceContainer.Instance.Container.Resolve<ISiteConfigFacadeService>(); SiteConfigEntity model = siteservice.GetSiteConfigModel(sitequery); //获取DOI注册日志实体 IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); DoiRegLogQuery query = new DoiRegLogQuery(); query.PKID = PKID; query.JournalID = CurAuthor.JournalID; string DoiFileName = service.GetDoiRegLog(query).DoiFileName.Trim(); //CreateDoiRegFilePath = Utils.GetMapPath(SiteConfig.RootPath + "/data/" + DoiFileName); string DoiRegResult = WKT.Common.Utils.DoiUtils.GetDoiRegResult(DoiFileName, model.DoiUserName, model.DoiUserPwd); if (DoiRegResult == "已完成") { DoiRegLogEntity doiRegLogEntity = new DoiRegLogEntity(); doiRegLogEntity.State = "已完成"; doiRegLogEntity.PKID = PKID; doiRegLogEntity.isUpdate = true; service.SaveDoiRegLog(doiRegLogEntity); return Json(new { flag = 1 }); } if (DoiRegResult == "不合格") { DoiRegLogEntity doiRegLogEntity = new DoiRegLogEntity(); doiRegLogEntity.State = "不合格"; doiRegLogEntity.PKID = PKID; doiRegLogEntity.isUpdate = true; service.SaveDoiRegLog(doiRegLogEntity); return Json(new { flag = 1 }); } if (DoiRegResult == "未审核") { return Json(new { flag = -1 }); } else return Json(new { flag = 0 }); }
public ActionResult UpdateLocalDataAjax(Int64 PKID) { //获取站点配置信息 SiteConfigQuery sitequery = new SiteConfigQuery(); sitequery.JournalID = CurAuthor.JournalID; ISiteConfigFacadeService siteservice = ServiceContainer.Instance.Container.Resolve<ISiteConfigFacadeService>(); SiteConfigEntity model = siteservice.GetSiteConfigModel(sitequery); //获取DOI注册日志实体 IIssueFacadeService service = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); DoiRegLogQuery query = new DoiRegLogQuery(); query.PKID = PKID; query.JournalID = CurAuthor.JournalID; string DoiFileName = service.GetDoiRegLog(query).DoiFileName.Trim(); //保存DOI注册结果 DoiRegResultFilePath = System.DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-fff") + ".xml"; WKT.Common.Utils.DoiUtils.GetDoiRegResult(DoiFileName, model.DoiUserName, model.DoiUserPwd, Utils.GetMapPath(SiteConfig.RootPath + "/data/" + DoiRegResultFilePath)); XElement root = XElement.Load(Utils.GetMapPath(SiteConfig.RootPath + "/data/" + DoiRegResultFilePath), LoadOptions.SetLineInfo); XElement journal = root.Element("body").Element("journal"); var Articles = from Article in journal.Elements("journal_article") select Article; foreach (var Article in Articles) { string doi = Article.Element("doi_data").Element("doi").Value; string resource = Article.Element("doi_data").Element("resource").Value; Int64 ContentID = Convert.ToInt64(resource.Substring(resource.LastIndexOf('=') + 1, resource.Length - resource.LastIndexOf('=') - 4)); IIssueFacadeService IssueService = ServiceContainer.Instance.Container.Resolve<IIssueFacadeService>(); IssueContentEntity issueContentEntity = new IssueContentEntity(); //获取期刊实体 IssueContentQuery IssueQuery = new IssueContentQuery(); IssueQuery.JournalID = CurAuthor.JournalID; IssueQuery.contentID = ContentID; IssueQuery.IsAuxiliary = true; issueContentEntity=IssueService.GetIssueContentModel(IssueQuery); //更新期刊DOI数据 issueContentEntity.DOI = doi; issueContentEntity.isRegDoi = true; ExecResult result = IssueService.SaveIssueContent(issueContentEntity); } //更新DOI注册日志 DoiRegLogEntity doiRegLogEntity = new DoiRegLogEntity(); doiRegLogEntity.State = "已更新"; doiRegLogEntity.PKID = PKID; doiRegLogEntity.isUpdate = true; service.SaveDoiRegLog(doiRegLogEntity); //删除临时文件 System.IO.File.Delete(Utils.GetMapPath(SiteConfig.RootPath + "/data/" + DoiRegResultFilePath)); return Json(new { flag = 1 }); }
public DoiRegLogEntity GetDoiRegLog(DoiRegLogQuery query) { HttpClientHelper clientHelper = new HttpClientHelper(); DoiRegLogEntity model = clientHelper.Post<DoiRegLogEntity, DoiRegLogQuery>(GetAPIUrl(APIConstant.DOIREGLOG_GETDOIREGLOG), query); return model; }
public ActionResult GetDoiRegLogPageList(DoiRegLogQuery 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<DoiRegLogEntity> pager = service.GetDoiRegLogPageList(query); return Json(new { Rows = pager.ItemList, Total = pager.TotalRecords }); }
public Pager<DoiRegLogEntity> GetDoiRegLogPageList(DoiRegLogQuery doiRegLogQuery) { HttpClientHelper clientHelper = new HttpClientHelper(); Pager<DoiRegLogEntity> pager = clientHelper.Post<Pager<DoiRegLogEntity>, DoiRegLogQuery>(GetAPIUrl(APIConstant.DOIREGLOG_GETPAGELIST), doiRegLogQuery); return pager; }
public IList<DoiRegLogEntity> GetDoiRegLogList(DoiRegLogQuery doiRegLogQuery) { HttpClientHelper clientHelper = new HttpClientHelper(); IList<DoiRegLogEntity> list = clientHelper.Post<IList<DoiRegLogEntity>, DoiRegLogQuery>(GetAPIUrl(APIConstant.DOIREGLOG_GETLIST), doiRegLogQuery); return list; }
public Pager<DoiRegLogEntity> GetDoiRegLogPageList(DoiRegLogQuery query) { return IssueBusProvider.GetDoiRegLogPageList(query); }
public IList<DoiRegLogEntity> GetDoiRegLogList(DoiRegLogQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); IList<DoiRegLogEntity> list = service.GetDoiRegLogList(query); return list; }
//获取DOI注册日志实体 public DoiRegLogEntity GetDoiRegLog(DoiRegLogQuery query) { return IssueDataAccess.Instance.GetDoiRegLog(query); }
public Pager<DoiRegLogEntity> GetDoiRegLogPageList(DoiRegLogQuery query) { IIssueService service = ServiceContainer.Instance.Container.Resolve<IIssueService>(); Pager<DoiRegLogEntity> pager = service.GetDoiRegLogPageList(query); return pager; }
public DoiRegLogEntity GetDoiRegLog(DoiRegLogQuery query) { return IssueBusProvider.GetDoiRegLog(query); }