/// <summary> /// 作者SCI发文量TOP100/作者CSCD发文量TOP100 /// </summary> /// <returns></returns> public List <YearAndCountOutPut> GetStatisticalByZuoZheSCIOrCSCDTop100(string staryear, string endyear, string sciorcscd) { using (var db = new OperationManagerDbContext()) { string sql = @" select top 100 us.SurnameChinese+us.NameChinese as year,count(*)as count from Relation_UserClaimWorks u left join StaticProductions sp on u.ProductionID=sp.ProductionID left join [User] us on us.uuid=u.SysUserID where UserClaimWorksStatus=2 and year(sp.issued) between '" + staryear + "' and '" + endyear + "' and sp.dataset like '%" + sciorcscd + "%' group by us.SurnameChinese+us.NameChinese order by count desc"; List <YearAndCount> list = db.Database.SqlQuery <YearAndCount>(sql).ToList(); List <YearAndCountOutPut> output = new List <YearAndCountOutPut>(); for (int i = 0; i < list.Count; i++) { YearAndCountOutPut op = new YearAndCountOutPut(); op.Year = list[i].Year; YearAndCount ya = list[i]; op.CollegeResult = new List <YearAndCount>(); op.CollegeResult.Add(ya); output.Add(op); } return(output); } }
/// <summary> /// 收录类别 /// </summary> /// <returns></returns> public List <YearAndCount> GetIndexedList() { using (var db = new OperationManagerDbContext()) { string sql = @"SELECT DefaultText FROM dbo.SYS_TemplateField WHERE MetaDataID='E134A22A-4187-4318-BB70-BCC66711ED1D'"; string list = db.Database.SqlQuery <string>(sql).FirstOrDefault(); string[] str = list.Split(';'); List <YearAndCount> liststr = new List <YearAndCount>(); for (int i = 0; i < str.Length; i++) { YearAndCount ya = new YearAndCount(); ya.ResultType = "indexed"; ya.Year = str[i]; liststr.Add(ya); } return(liststr); } }