From 5a7fe156d526bbdbfcb8810c729ce86bd73555bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Thu, 19 Oct 2023 09:28:21 +0800 Subject: [PATCH] feat:bug fixed --- .../T_EnrollmentPlanedescServices.cs | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/New_College.Services/T_EnrollmentPlanedescServices.cs b/New_College.Services/T_EnrollmentPlanedescServices.cs index 62e172d..fec3c27 100644 --- a/New_College.Services/T_EnrollmentPlanedescServices.cs +++ b/New_College.Services/T_EnrollmentPlanedescServices.cs @@ -544,7 +544,7 @@ namespace New_College.Services //Nhef = item.Nhef, //Sff = item.Sff, //Syl = item.Syl, - AreaName = plansinfo.FirstOrDefault().AreaName, + AreaName = plansinfo.FirstOrDefault().AreaName, Year = query.Year.ToString(), UniversityName = plansinfo.FirstOrDefault().UniversityName, Infos = plansinfo.Select(x => new PlanInfo() @@ -1195,16 +1195,19 @@ namespace New_College.Services id = item.PlanMagorIds.First(); } } - string yearName = string.Empty; - var plandescmodels = await this.t_EnrollmentPlanedesc.QueryById(id); - if (plandescmodels != null) - { - var planinfo = await this.t_EnrollmentPlaneRepository.QueryById(plandescmodels.PlanId); - if (planinfo != null) - yearName = planinfo.Years.ToString(); - } - var descinfo = await _dal.Query(x => x.IsDelete == false && PlanIds.Contains(x.Id)); + //string yearName = string.Empty; + //var plandescmodels = await this._PlanMajorDescRepository.QueryById(id); + //if (plandescmodels != null) + //{ + // var planinfo = await this.t_EnrollmentPlaneRepository.QueryById(plandescmodels.PlanId); + // if (planinfo != null) + // yearName = planinfo.Years.ToString(); + //} + + var descinfo = await _PlanMajorDescRepository.Query(x => x.IsDelete == false && PlanIds.Contains(x.Id)); + string yearName = (descinfo.FirstOrDefault().Years-1).ToString(); var universityids = query.details.Select(x => x.UniversityId).ToList(); + var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc"); foreach (var item in query.details) { @@ -1224,11 +1227,11 @@ namespace New_College.Services var newinfos = nowdesc.Select(x => new PlanInfo() { MajorId = x.Id, - Money = x.Tuitionfee, - Year = x.Studyyears, - PlanName = x.MajorName, - PlanNum = x.Plancount, - Scoreline = x.Scoreline + Money = x.Free, + Year = x.AcademicYear, + PlanName = x.Major, + PlanNum = x.PlanCount, + Scoreline = x.LowScore }).ToList(); count.FirstOrDefault().Infos.AddRange(newinfos); } @@ -1248,11 +1251,11 @@ namespace New_College.Services Infos = nowdesc.Select(x => new PlanInfo() { MajorId = x.Id, - Money = x.Tuitionfee, - Year = x.Studyyears, - PlanName = x.MajorName, - PlanNum = x.Plancount, - Scoreline = x.Scoreline, + Money = x.Free, + Year = x.AcademicYear, + PlanName = x.Major, + PlanNum = x.PlanCount, + Scoreline = x.LowScore, YearName = yearName }).ToList() });