From d95fd8663f813149e271f702237d6c97e8214b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Tue, 14 May 2024 21:16:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- New_College.Api/Controllers/HealthCheckController.cs | 2 +- .../ViewModels/Query/RecommendUniversityQuery.cs | 2 +- .../BASE/T_EnrollmentPlanedescRepository.cs | 2 +- New_College.Services/D_LongIdMapServices.cs | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/New_College.Api/Controllers/HealthCheckController.cs b/New_College.Api/Controllers/HealthCheckController.cs index 374176c..d2d2694 100644 --- a/New_College.Api/Controllers/HealthCheckController.cs +++ b/New_College.Api/Controllers/HealthCheckController.cs @@ -71,7 +71,7 @@ namespace New_College.Controllers //更新院校分数线 // await d_LongIdMapServices.UpdateSchoolScoreLine23(); - await d_LongIdMapServices.PlanNeedProSync("浙江省", 2023, "综合", "普通类一段"); + // await d_LongIdMapServices.PlanNeedProSync("浙江省", 2023, "综合", "普通类二段"); // await v_CustomerInfoServices.CustomeBillExport(); return true; } diff --git a/New_College.Model/ViewModels/Query/RecommendUniversityQuery.cs b/New_College.Model/ViewModels/Query/RecommendUniversityQuery.cs index 92c19da..b7c5722 100644 --- a/New_College.Model/ViewModels/Query/RecommendUniversityQuery.cs +++ b/New_College.Model/ViewModels/Query/RecommendUniversityQuery.cs @@ -21,7 +21,7 @@ namespace New_College.Model.ViewModels /// /// 学科层次 /// - public int SubjectLevel { get; set; } + public int? SubjectLevel { get; set; } /// /// 省市区名称 /// diff --git a/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs b/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs index 7acef08..b741f07 100644 --- a/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs +++ b/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs @@ -354,7 +354,7 @@ namespace New_College.Repository .Where((plans, universitys) => plans.Location == query.Location) .Where((plans, universitys) => plans.SubjectType == subjecttype) .Where((plans, universitys) => plans.Years == query.Year) - .WhereIF(query.SubjectLevel > 0, (plans, universitys) => universitys.Subject_Level == query.SubjectLevel) + .WhereIF(query.SubjectLevel.HasValue, (plans, universitys) => universitys.Subject_Level == query.SubjectLevel) .WhereIF(query.Type >= 0, (plans, universitys) => universitys.Type == query.Type) .WhereIF(query.Nhef >= 0, (plans, universitys) => universitys.Nhef == query.Nhef) .WhereIF(query.Sff >= 0, (plans, universitys) => universitys.Sff == query.Sff) diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index 6119d59..60affc3 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -2278,11 +2278,14 @@ namespace New_College.Services var universitylist = await d_UniversityRepository.Query(); var majorlist = await d_PlanMajorScoreLineRepository.Query(e => e.Location == location); var plist = await this.d_PlanMajorDescProRepository.Query(c => c.Location == location && c.Years == years && c.BatchName == batchname && c.IsDelete == false); + var countid = (await this.t_TbSNeedDataInfoRepository.Query()).OrderByDescending(c => c.ID).FirstOrDefault().ID; plist.ForEach(a => { + countid++; var u = universitylist.Where(e => e.Name == a.UniversityName).FirstOrDefault(); needlist.Add(new T_TbSNeedDataInfo() { + ID = countid, AcademicYear = a.AcademicYear, // City = universitylist.Where(e => e.Name == a.UniversityName).FirstOrDefault().Area_Name Province = u.Area_Name, @@ -2315,7 +2318,7 @@ namespace New_College.Services }); var tt = needlist; - await t_TbSNeedDataInfoRepository.BatchAdd(tt); + await t_TbSNeedDataInfoRepository.BatchAdd(tt); return true; } ///