diff --git a/New_College.Api/Controllers/Front/PcVolunteerController.cs b/New_College.Api/Controllers/Front/PcVolunteerController.cs index 3007b08..4c86c54 100644 --- a/New_College.Api/Controllers/Front/PcVolunteerController.cs +++ b/New_College.Api/Controllers/Front/PcVolunteerController.cs @@ -284,18 +284,16 @@ namespace New_College.Api.Controllers.Front var data = new MessageModel(); if (request.VId > 0) { + var model = await _VolunteerTableServices.QueryById(request.VId); _unitOfWork.BeginTran(); - data.success = await _VolunteerTableServices.Update(new U_VolunteerTable() - { - BatchName = request.BatchName, - ModifyTime = DateTime.Now, - CustomerId = request.CustomerId, - Id = request.VId, - Score = request.Score, - SubjectClaim = request.SubjectClaim, - Type = request.Type, - //VolunteerTableName = request.VolunteerTableName - }); + if (!string.IsNullOrWhiteSpace(request.BatchName)) { model.BatchName = request.BatchName; } + if (!string.IsNullOrWhiteSpace(request.SubjectClaim)) { model.SubjectClaim = request.SubjectClaim; } + if (!string.IsNullOrWhiteSpace(request.Type)) { model.Type = request.Type; } + if (!string.IsNullOrWhiteSpace(request.VolunteerTableName)) { model.VolunteerTableName = request.VolunteerTableName; } + if (request.CustomerId > 0) { model.CustomerId = request.CustomerId; } + if (request.Score > 0) { model.Score = request.Score; } + model.ModifyTime = DateTime.Now; + data.success = await _VolunteerTableServices.Update(model); //删掉之前的志愿表,更新新的匹配进来 var itemids = (await _VolunteerTableDetailServices.Query(c => c.VolunteerTableId == request.VId)).Select(c => (object)c.Id).ToArray(); var status = await _VolunteerTableDetailServices.DeleteByIds(itemids); diff --git a/New_College.Api/Controllers/HealthCheckController.cs b/New_College.Api/Controllers/HealthCheckController.cs index f527c7d..63ad05c 100644 --- a/New_College.Api/Controllers/HealthCheckController.cs +++ b/New_College.Api/Controllers/HealthCheckController.cs @@ -16,6 +16,7 @@ namespace New_College.Controllers private readonly IT_EnrollmentPlaneServices t_EnrollmentPlane; private readonly ID_LongIdMapServices d_LongIdMapServices; + public HealthCheckController(IT_EnrollmentPlaneServices t_EnrollmentPlaneServices, ID_LongIdMapServices d_LongIdMapServices) { t_EnrollmentPlane = t_EnrollmentPlaneServices; @@ -66,7 +67,7 @@ namespace New_College.Controllers return d_LongIdMapServices.Import(); - + // return d_LongIdMapServices.UpdateUniveristyInf(); } } diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml index 23337a6..02216c5 100644 --- a/New_College.Api/New_College.Model.xml +++ b/New_College.Api/New_College.Model.xml @@ -1236,6 +1236,11 @@ 院校图片列表地址 + + + VR地址 + + 院校名称 @@ -2642,6 +2647,241 @@ 满分 + + + + + + + + 招生类型 + + + + + 全国统一招生代码 + + + + + 院校名称 + + + + + 专业代码 + + + + + 专业名称 + + + + + 办学性质 + + + + + 注意事项 + + + + + 专业大类 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 学制 + + + + + + + + + + + + + + + + + + + + 主管部门 + + + + + 院校水平 + + + + + 专业评估 + + + + + 硕士点 + + + + + 硕士专业 + + + + + 博士点 + + + + + 博士专业 + + + + + 专业水平 + + + + + 本/专 + + + + + 院校排名 + + + + + 专业排名 + + + + + 专业占比 + + + + + 专业数量 + + + + + + + + + + 就业质量 + + 用户跟角色关联表 diff --git a/New_College.IServices/ID_LongIdMapServices.cs b/New_College.IServices/ID_LongIdMapServices.cs index 0898345..4639c80 100644 --- a/New_College.IServices/ID_LongIdMapServices.cs +++ b/New_College.IServices/ID_LongIdMapServices.cs @@ -15,6 +15,7 @@ namespace New_College.IServices { Task Import(); + Task UpdateUniveristyInf(); Task> GetUniversitys(UniversityQuery query); Task> uniGetMajorInfo(MajorcategoryQuery query); diff --git a/New_College.IServices/IT_TbSNeedDataInfoServices.cs b/New_College.IServices/IT_TbSNeedDataInfoServices.cs new file mode 100644 index 0000000..4eaee01 --- /dev/null +++ b/New_College.IServices/IT_TbSNeedDataInfoServices.cs @@ -0,0 +1,12 @@ +using New_College.IServices.BASE; +using New_College.Model.Models; + +namespace New_College.IServices +{ + /// + /// IT_TbSNeedDataInfoServices + /// + public interface IT_TbSNeedDataInfoServices :IBaseServices + { + } +} \ No newline at end of file diff --git a/New_College.Model/Models/D_Universityimg.cs b/New_College.Model/Models/D_Universityimg.cs index 1c41ed8..cc00f31 100644 --- a/New_College.Model/Models/D_Universityimg.cs +++ b/New_College.Model/Models/D_Universityimg.cs @@ -17,5 +17,11 @@ namespace New_College.Model.Models /// [SugarColumn(ColumnDataType = "longtext", Length = int.MaxValue, IsNullable = true)] public string ImgList { get; set; } + + /// + /// VR地址 + /// + [SugarColumn(ColumnDataType = "nvarchar", Length = 300, IsNullable = true)] + public string VRUrl { get; set; } } } diff --git a/New_College.Model/Models/T_TbSNeedDataInfo.cs b/New_College.Model/Models/T_TbSNeedDataInfo.cs new file mode 100644 index 0000000..c356b5d --- /dev/null +++ b/New_College.Model/Models/T_TbSNeedDataInfo.cs @@ -0,0 +1,242 @@ +using SqlSugar; + +namespace New_College.Model.Models +{ + /// + /// + /// + //[SugarTable("T_TbSNeedDataInfo")] + public class T_TbSNeedDataInfo + { + /// + /// 招生类型 + /// + [SugarColumn(ColumnName="EnrollmentType" )] + public string EnrollmentType { get; set; } + /// + /// 全国统一招生代码 + /// + [SugarColumn(ColumnName="EnrollmentCode" )] + public string EnrollmentCode { get; set; } + /// + /// 院校名称 + /// + [SugarColumn(ColumnName="UniversityName" )] + public string UniversityName { get; set; } + /// + /// 专业代码 + /// + [SugarColumn(ColumnName="MajorCode" )] + public string MajorCode { get; set; } + /// + /// 专业名称 + /// + [SugarColumn(ColumnName="MajorName" )] + public string MajorName { get; set; } + /// + /// 办学性质 + /// + [SugarColumn(ColumnName="Nature" )] + public string Nature { get; set; } + /// + /// 注意事项 + /// + [SugarColumn(ColumnName="Remark" )] + public string Remark { get; set; } + /// + /// 专业大类 + /// + [SugarColumn(ColumnName="FirstType" )] + public string FirstType { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23subject" )] + public string _23subject { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_24subject" )] + public string _24subject { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23Count" )] + public string _23Count { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_Score" )] + public string _Score { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23Score" )] + public string _23Score { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23ScoreLine" )] + public string _23ScoreLine { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23SchoolScore" )] + public string _23SchoolScore { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23SchoolScoreLine" )] + public string _23SchoolScoreLine { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23SchoolAvgScore" )] + public string _23SchoolAvgScore { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_23SchoolAvgLine" )] + public string _23SchoolAvgLine { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_22Count" )] + public string _22Count { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_22Score" )] + public string _22Score { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_22ScoreLine" )] + public string _22ScoreLine { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_21Count" )] + public string _21Count { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_21Score" )] + public string _21Score { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_21ScoreLine" )] + public string _21ScoreLine { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_20Count" )] + public string _20Count { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_20Score" )] + public string _20Score { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="_20ScoreLine" )] + public string _20ScoreLine { get; set; } + /// + /// 学制 + /// + [SugarColumn(ColumnName="AcademicYear" )] + public string AcademicYear { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="Fee" )] + public string Fee { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="Province" )] + public string Province { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="City" )] + public string City { get; set; } + /// + /// 主管部门 + /// + [SugarColumn(ColumnName="Ownership" )] + public string Ownership { get; set; } + /// + /// 院校水平 + /// + [SugarColumn(ColumnName="LnstitutionalLevel" )] + public string LnstitutionalLevel { get; set; } + /// + /// 专业评估 + /// + [SugarColumn(ColumnName="ProfessionalAssessment" )] + public string ProfessionalAssessment { get; set; } + /// + /// 硕士点 + /// + [SugarColumn(ColumnName="MastersDegree" )] + public string MastersDegree { get; set; } + /// + /// 硕士专业 + /// + [SugarColumn(ColumnName="MastersMajor" )] + public string MastersMajor { get; set; } + /// + /// 博士点 + /// + [SugarColumn(ColumnName="PhDPoint" )] + public string PhDPoint { get; set; } + /// + /// 博士专业 + /// + [SugarColumn(ColumnName="PhDMajor" )] + public string PhDMajor { get; set; } + /// + /// 专业水平 + /// + [SugarColumn(ColumnName="MjaorLevel" )] + public string MjaorLevel { get; set; } + /// + /// 本/专 + /// + [SugarColumn(ColumnName="EducationCategory" )] + public string EducationCategory { get; set; } + /// + /// 院校排名 + /// + [SugarColumn(ColumnName="UniversityRank" )] + public string UniversityRank { get; set; } + /// + /// 专业排名 + /// + [SugarColumn(ColumnName="MajorRank" )] + public string MajorRank { get; set; } + /// + /// 专业占比 + /// + [SugarColumn(ColumnName="MajorRankPercentage" )] + public string MajorRankPercentage { get; set; } + /// + /// 专业数量 + /// + [SugarColumn(ColumnName="MajorCount" )] + public string MajorCount { get; set; } + /// + /// + /// + [SugarColumn(ColumnName="VRUrl" )] + public string VRUrl { get; set; } + /// + /// 就业质量 + /// + [SugarColumn(ColumnName="EmploymentQuality" )] + public string EmploymentQuality { get; set; } + } +} diff --git a/New_College.Repository/BASE/IT_TbSNeedDataInfoRepository.cs b/New_College.Repository/BASE/IT_TbSNeedDataInfoRepository.cs new file mode 100644 index 0000000..e51b9f4 --- /dev/null +++ b/New_College.Repository/BASE/IT_TbSNeedDataInfoRepository.cs @@ -0,0 +1,12 @@ +using New_College.IRepository.Base; +using New_College.Model.Models; + +namespace New_College.IRepository +{ + /// + /// IT_TbSNeedDataInfoRepository + /// + public interface IT_TbSNeedDataInfoRepository : IBaseRepository + { + } +} \ No newline at end of file diff --git a/New_College.Repository/BASE/T_TbSNeedDataInfoRepository.cs b/New_College.Repository/BASE/T_TbSNeedDataInfoRepository.cs new file mode 100644 index 0000000..9f73630 --- /dev/null +++ b/New_College.Repository/BASE/T_TbSNeedDataInfoRepository.cs @@ -0,0 +1,17 @@ +using New_College.IRepository; +using New_College.IRepository.UnitOfWork; +using New_College.Model.Models; +using New_College.Repository.Base; + +namespace New_College.Repository +{ + /// + /// T_TbSNeedDataInfoRepository + /// + public class T_TbSNeedDataInfoRepository : BaseRepository, IT_TbSNeedDataInfoRepository + { + public T_TbSNeedDataInfoRepository(IUnitOfWork unitOfWork) : base(unitOfWork) + { + } + } +} \ No newline at end of file diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index b503fef..03ae5cd 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -24,6 +24,7 @@ using StackExchange.Redis; using New_College.Repository; using NPOI.Util.ArrayExtensions; using System.Threading; +using Org.BouncyCastle.Asn1.Tsp; namespace New_College.Services { @@ -55,6 +56,7 @@ namespace New_College.Services private readonly ID_QualificationLineRepository d_QualificationLineRepository; private readonly ID_PlanMajorDescRepository d_PlanMajorDescRepository; private readonly ID_PlanMajorDescProRepository d_PlanMajorDescProRepository; + private readonly IT_TbSNeedDataInfoRepository t_TbSNeedDataInfoRepository; public D_LongIdMapServices(IBaseRepository dal , ID_MajorCategoryRepository ID_MajorCategoryRepository , ID_MajorClassRepository ID_MajorClassRepository @@ -80,7 +82,8 @@ namespace New_College.Services ID_PlanMajorScoreLineRepository d_PlanMajorScoreLineRepository, ID_QualificationLineRepository d_QualificationLineRepository, ID_PlanMajorDescRepository d_PlanMajorDescRepository, - ID_PlanMajorDescProRepository d_PlanMajorDescProRepository) + ID_PlanMajorDescProRepository d_PlanMajorDescProRepository, + IT_TbSNeedDataInfoRepository tbSNeedDataInfoRepository) { this._dal = dal; d_MajorCategoryRepository = ID_MajorCategoryRepository; @@ -109,6 +112,7 @@ namespace New_College.Services this.d_QualificationLineRepository = d_QualificationLineRepository; this.d_PlanMajorDescRepository = d_PlanMajorDescRepository; this.d_PlanMajorDescProRepository = d_PlanMajorDescProRepository; + t_TbSNeedDataInfoRepository = tbSNeedDataInfoRepository; } /// @@ -337,7 +341,7 @@ namespace New_College.Services list.Add(new pcMajorInfoResult() { Name = item.Name, - children = scond.Where(e=>e.children.Any()).ToList() + children = scond.Where(e => e.children.Any()).ToList() }); } } @@ -1854,9 +1858,9 @@ namespace New_College.Services { var updatemodel = universitymodel.FirstOrDefault(); var category = undetail.result.categories.ToList(); - if (category.Contains("医药")) - { - updatemodel.Type = UniversityTypeRelsove.GetTypeName("医药"); + //if (category.Contains("医药")) + //{ + // updatemodel.Type = UniversityTypeRelsove.GetTypeName("医药"); //updatemodel.Web = undetail.result.webSite; //updatemodel.Address = undetail.result.address[0].address; @@ -1866,11 +1870,11 @@ namespace New_College.Services //updatemodel.Rank = a.ranking; //updatemodel.Build_Date = undetail.result.createdYear; //updatemodel.Description = undetail.result.introduction; - //updatemodel.Master_Count = undetail.result.pointsOfShuo.Any() ? undetail.result.pointsOfShuo[0].number : 0; - //updatemodel.Doctorate_Count = undetail.result.pointsOfBo.Any() ? undetail.result.pointsOfBo[0].number : 0; + updatemodel.Master_Count = undetail.result.pointsOfShuo.Any() ? undetail.result.pointsOfShuo[0].number : 0; + updatemodel.Doctorate_Count = undetail.result.pointsOfBo.Any() ? undetail.result.pointsOfBo[0].number : 0; //updatemodel.Type = UniversityTypeRelsove.GetTypeName((undetail.result.categories.Any() ? undetail.result.categories[0] : "")); await d_UniversityRepository.Update(updatemodel); - } + // } } }); @@ -1909,6 +1913,47 @@ namespace New_College.Services + /// + /// 更新学校基础信息 + /// + /// + public async Task UpdateUniveristyInf() + { + var tbinfo = await t_TbSNeedDataInfoRepository.Query(); + // var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023); + + var info = await d_UniversityRepository.Query(); + var infoimg = await d_UniversityimgRepository.Query(); + info.ForEach(async a => + { + if (tbinfo.Where(e => e.UniversityName == a.Name).Any()) + { + var baseinfo = tbinfo.Where(e => e.UniversityName == a.Name).FirstOrDefault(); + var imginfo = infoimg.FirstOrDefault(o => o.UniversityId == a.Id); + if (!string.IsNullOrWhiteSpace(baseinfo.VRUrl)&& imginfo!=null) + { + imginfo.VRUrl = baseinfo.VRUrl; + await d_UniversityimgRepository.Update(imginfo); + } + if (baseinfo.LnstitutionalLevel != null) + { + a.Sff = baseinfo.LnstitutionalLevel.Contains("211") ? 0 : 1; + a.Syl = baseinfo.LnstitutionalLevel.Contains("双一流") ? 0 : 1; + a.QJJH = baseinfo.LnstitutionalLevel.Contains("强基") ? 0 : 1; + a.Nhef = baseinfo.LnstitutionalLevel.Contains("985") ? 0 : 1; + } + //a.Doctorate_Count = int.Parse(baseinfo.PhDPoint); + //a.Master_Count = int.Parse(baseinfo.MastersDegree); + a.Nature = baseinfo.Nature.Contains("公办") ? 0 : baseinfo.Nature.Contains("民办") ? 1 : baseinfo.Nature.Contains("中外合作") ? 2 : baseinfo.Nature.Contains("港澳台") ? 3 : -1; + a.Subject_Level = baseinfo.EducationCategory == "本科" ? 0 : 1; + await d_UniversityRepository.Update(a); + } + }); + + + + return true; + } diff --git a/New_College.Services/T_TbSNeedDataInfoServices.cs b/New_College.Services/T_TbSNeedDataInfoServices.cs new file mode 100644 index 0000000..093c53c --- /dev/null +++ b/New_College.Services/T_TbSNeedDataInfoServices.cs @@ -0,0 +1,18 @@ + +using New_College.IServices; +using New_College.Model.Models; +using New_College.Services.BASE; +using New_College.IRepository.Base; + +namespace New_College.Services +{ + public class T_TbSNeedDataInfoServices : BaseServices, IT_TbSNeedDataInfoServices + { + private readonly IBaseRepository _dal; + public T_TbSNeedDataInfoServices(IBaseRepository dal) + { + this._dal = dal; + base.BaseDal = dal; + } + } +} \ No newline at end of file