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,