diff --git a/New_College.Api/Controllers/Front/LibraryController.cs b/New_College.Api/Controllers/Front/LibraryController.cs index a61ef92..d30b782 100644 --- a/New_College.Api/Controllers/Front/LibraryController.cs +++ b/New_College.Api/Controllers/Front/LibraryController.cs @@ -174,12 +174,12 @@ namespace New_College.Api.Controllers.Front }; } - //var result = await iD_LongIdMapServices.GetSyncUniversityInfo(); + var result = await iD_LongIdMapServices.GetSyncUniversityInfo(); return new MessageModel>() { - // response = result, + response = result, }; } diff --git a/New_College.Common/Enum/EnumHelper.cs b/New_College.Common/Enum/EnumHelper.cs index b07e645..27eda6d 100644 --- a/New_College.Common/Enum/EnumHelper.cs +++ b/New_College.Common/Enum/EnumHelper.cs @@ -34,17 +34,17 @@ namespace New_College.Common /// 志愿填报卡 /// [Description("志愿填报卡")] - volunteerCard=0, + volunteerCard = 0, /// /// 选科指导卡 /// [Description("选科指导卡")] - selectSubjectGuideCard=1, + selectSubjectGuideCard = 1, /// /// 生涯发展卡 /// [Description("生涯发展卡")] - development=2 + development = 2 } @@ -63,7 +63,7 @@ namespace New_College.Common Specialist = 2 } /// - /// 办学类别 + /// 办学类别0综合,1理工类,2医学类|3军事类|4语言类|5师范类|6财经类|7政法类|8民族类|9农林类|10艺术类|11体育类|12其他 /// public enum EnumUniversityType { @@ -78,65 +78,61 @@ namespace New_College.Common [Description("理工")] Engineering = 1, /// - /// 财经 - /// - [Description("财经")] - Finance = 2, - /// - /// 农林 - /// - [Description("农林")] - Farming = 3, - /// /// 医药 /// - [Description("医药")] - Medical = 4, + [Description("医学")] + Medical = 2, + /// + /// 军事 + /// + [Description("军事")] + Military = 3, + /// + /// 语言 + /// + [Description("语言")] + Language = 4, + /// /// 师范 /// [Description("师范")] Normal = 5, /// - /// 体育 + /// 财经 /// - [Description("体育")] - Sports = 6, - /// - /// 省属 - /// - [Description("省属")] - Provincial = 7, + [Description("财经")] + Finance = 6, /// /// 政法 /// [Description("政法")] - Politics = 8, - /// - /// 艺术 - /// - [Description("艺术")] - Art = 9, + Politics = 7, /// /// 民族 /// [Description("民族")] - Nation = 10, + Nation = 8, /// - /// 军事 + /// 农林 /// - [Description("军事")] - Military = 11, + [Description("农林")] + Farming = 9, /// - /// 语言 + /// 艺术 /// - [Description("语言")] - Language = 12, + [Description("艺术")] + Art = 10, + /// + /// 体育 + /// + [Description("体育")] + Sports = 11, /// /// 其它 /// [Description("其它")] - Other = 13, + Other = 12, } /// diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index 55f61b5..9faac44 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -27,6 +27,7 @@ using System.Threading; using Org.BouncyCastle.Asn1.Tsp; using Newtonsoft.Json; using MySqlX.XDevAPI.Common; +using NPOI.SS.Formula.Functions; namespace New_College.Services { @@ -977,7 +978,7 @@ namespace New_College.Services } /// - /// 获取学校类型 + /// 获取学校类型0综合,1理工类,2医学类|3军事类|4语言类|5师范类|6财经类|7政法类|8民族类|9农林类|10艺术类|11体育类|12其他 /// /// /// @@ -2044,7 +2045,7 @@ namespace New_College.Services { if (_redisCache.Get("sync_university")) { - return JsonConvert.DeserializeObject>((Encoding.UTF8.GetString(_redisCache.Get("sync_university")))); + return JsonConvert.DeserializeObject>((Encoding.UTF8.GetString(_redisCache.Get("sync_university")))); } var list = new List(); @@ -2079,7 +2080,7 @@ namespace New_College.Services AcademicianCount = university.Academician_Count, collegeCode = university.UniversityCode, Web = string.IsNullOrEmpty(university.Web) ? "暂无" : university.Web, - // Description = ClearHtmlHelper.SHTML(university.Description), + // Description = ClearHtmlHelper.SHTML(university.Description), }; models.Imglist = universityimglist.Where(e => e.UniversityId == university.Id).Select(c => c.ImgList).FirstOrDefault(); models.VrUrl = universityimglist.Where(e => e.UniversityId == university.Id).Select(c => c.VRUrl).FirstOrDefault(); @@ -2095,24 +2096,39 @@ namespace New_College.Services { models.CityName = baseinfo.City; } - if (baseinfo != null && !string.IsNullOrWhiteSpace(baseinfo.Nature)) + + + if ((baseinfo != null && !string.IsNullOrWhiteSpace(baseinfo.Nature))) { models.Nature = baseinfo.Nature; } + else + { + models.Nature = university.Nature == 0 ? "公办" : university.Nature == 1 ? "民办" : university.Nature == 2 ? "中外合作" : "港澳台"; + } + - if (baseinfo != null && !string.IsNullOrWhiteSpace(baseinfo.Nature)) - { - models.Nature = baseinfo.Nature; - } if (baseinfo != null && !string.IsNullOrWhiteSpace(baseinfo.Ownership)) { models.Belong = baseinfo.Ownership; } + else + { + models.Belong = university.AscriptionName; + } + var undetail = HttpHelper.GetApi("http://192.168.104.104:3000/", "youzy.dms.basiclib.api.college.bycode.get?code=" + university.UniversityCode + "", ""); if (undetail != null && undetail.isSuccess) { models.UniversityType = undetail.result.categories.ToList(); + } + else + { + models.UniversityType = new List() { + + GetUniversityTypeName(university.Type) + }; } list.Add(models);