From 10993a8e044e358c428f4a25218bef22c862cb55 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Fri, 24 Apr 2026 16:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E7=BA=A7id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/SportsHall/SportsHallService.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/VOL.Business/Services/SportsHall/SportsHallService.cs b/VOL.Business/Services/SportsHall/SportsHallService.cs index 2a32a19..1fd104a 100644 --- a/VOL.Business/Services/SportsHall/SportsHallService.cs +++ b/VOL.Business/Services/SportsHall/SportsHallService.cs @@ -274,22 +274,22 @@ namespace VOL.Business.Services.SportsHall // 为每个学生添加多条体测数据 if (data.BMIValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.BMI, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.BMI, student, data.GradeId, timeNow)); if (data.Sit_And_ReachValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.Sit_And_Reach, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.Sit_And_Reach, student, data.GradeId, timeNow)); if (data.VitalCapacityValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.VitalCapacity, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.VitalCapacity, student, data.GradeId, timeNow)); if (data.OneMinuteJumpRopeValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.OneMinuteJumpRope, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.OneMinuteJumpRope, student, data.GradeId, timeNow)); if (data.One_Minute_Sit_UpValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.One_Minute_Sit_Up, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.One_Minute_Sit_Up, student, data.GradeId, timeNow)); if (data.StandingLongJumpValue > 0) - entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.StandingLongJump, student, timeNow)); + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.StandingLongJump, student, data.GradeId, timeNow)); } // 批量添加数据 @@ -299,7 +299,7 @@ namespace VOL.Business.Services.SportsHall await _sportsTestResultRepository.SaveChangesAsync(); } - public async Task AddSportsHallEnumStudentsTestData(SportsHallImportStudentsTestDataParam data, SportsTestItemType type, dynamic student, DateTime timeNow) + public async Task AddSportsHallEnumStudentsTestData(SportsHallImportStudentsTestDataParam data, SportsTestItemType type, dynamic student, int gradeId, DateTime timeNow) { var entity = new N_SportsTestValue { @@ -320,7 +320,6 @@ namespace VOL.Business.Services.SportsHall IsDisplay = false }; - int gradeId = student.GradeId; SexType sexType = student.Sex; string sex = sexType == SexType.Male ? "男" : "女"; @@ -505,7 +504,7 @@ namespace VOL.Business.Services.SportsHall StudentName = g.Key.StudentName, SexName = g.Key.Sex.GetDescription(), - GradeAndClass = g.Key.GradeName + "_" + g.Key.ClassName, + GradeAndClass = g.Key.GradeName + " " + g.Key.ClassName, ScoreTime = g.Key.ScoreTime, IsDisplay = g.Key.IsDisplay,