From 65874b3b86c74cf9c8c4144a43c838a150539b8a Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Mon, 28 Jul 2025 14:11:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Impl/HeartRateReportService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs index 8815e09..ceeb559 100644 --- a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs +++ b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs @@ -60,7 +60,7 @@ namespace YD_AllHeartRates.Api.Services.Impl var studentList = await ( from s in _sportsContext.Student join c in _sportsContext.Class on s.ClassId equals c.Id - where s.SchoolCode == schoolCode + where s.SchoolCode == schoolCode && s.StudentStatus == 1 select new { s.StudentNo, s.Sex, c.GradeId }).ToListAsync(); res.GradeCount = gradeList.Count; @@ -149,7 +149,7 @@ namespace YD_AllHeartRates.Api.Services.Impl var studentList = await ( from s in _sportsContext.Student join c in _sportsContext.Class on s.ClassId equals c.Id - where c.SchoolCode == schoolCode && c.GradeId == gradeId + where c.SchoolCode == schoolCode && c.GradeId == gradeId && s.StudentStatus == 1 select new { s.StudentNo, s.Sex, ClassId = c.Id }).ToListAsync(); res.GradeName = classList.FirstOrDefault()?.GradeName ?? ""; @@ -231,7 +231,7 @@ namespace YD_AllHeartRates.Api.Services.Impl select new { c.GradeName, c.ClassName, t.TeacherName }).FirstOrDefaultAsync(); var studentList = await _sportsContext.Student - .Where(s => s.SchoolCode == schoolCode && s.ClassId == classId) + .Where(s => s.SchoolCode == schoolCode && s.ClassId == classId && s.StudentStatus == 1) .Select(s => new { s.StudentNo, s.StudentName, s.Age, s.Sex, s.Photo }).ToListAsync(); res.GradeName = classInfo?.GradeName ?? "";