From 50d130f34f15b53f345efc2fadee51db06f510ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Wed, 3 Jan 2024 17:14:43 +0800 Subject: [PATCH] bug fixd --- .../BASE/D_QualificationLineRepository.cs | 4 ++++ New_College.Services/D_PlanMajorDescServices.cs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/New_College.Repository/BASE/D_QualificationLineRepository.cs b/New_College.Repository/BASE/D_QualificationLineRepository.cs index 0a502f7..c11493c 100644 --- a/New_College.Repository/BASE/D_QualificationLineRepository.cs +++ b/New_College.Repository/BASE/D_QualificationLineRepository.cs @@ -13,5 +13,9 @@ namespace New_College.Repository public D_QualificationLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork) { } + + + + } } \ No newline at end of file diff --git a/New_College.Services/D_PlanMajorDescServices.cs b/New_College.Services/D_PlanMajorDescServices.cs index fd70c64..03eed12 100644 --- a/New_College.Services/D_PlanMajorDescServices.cs +++ b/New_College.Services/D_PlanMajorDescServices.cs @@ -115,8 +115,8 @@ namespace New_College.Services // SubjectClam = c.SelectSubject, Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校 Percentage = MajorPlanScoreTool.GetPlanPercentage(c.LowScore, request.Score), - planCount = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Sum(c => c.PlanCount), - iGoPlanMajorItems = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Select(t => new AIGoPlanMajorItem() + //planCount = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Sum(c => c.PlanCount), + iGoPlanMajorItems = list.Where(w => w.Years == (DateTime.Now.Year-1) && w.UId == c.UId).Select(t => new AIGoPlanMajorItem() { PlanId = t.Id, MajorCode = t.MajorCode, @@ -141,7 +141,7 @@ namespace New_College.Services var _qualifcationlist = await _qualificationLineRepository.Query(c => SqlFunc.ContainsArray(universityarry, c.UId)); - responselist = responselist.Where(e => e.planCount > 0).ToList(); + // responselist = responselist.Where(e => e.iGoPlanMajorItems.Select(s=>s.planCount).Sum() > 0).ToList(); responselist.ToList().ForEach(c => { c._fcount = c.iGoPlanMajorItems.Select(s => s.planCount).Sum();