diff --git a/VOL.Business/Services/SportsHall/SportsHallService.cs b/VOL.Business/Services/SportsHall/SportsHallService.cs index d238dc5..2247046 100644 --- a/VOL.Business/Services/SportsHall/SportsHallService.cs +++ b/VOL.Business/Services/SportsHall/SportsHallService.cs @@ -299,14 +299,29 @@ namespace VOL.Business.Services.SportsHall if (data.VitalCapacityValue > 0) entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.VitalCapacity, student, data.GradeId, timeNow, isDisplay)); + if (data.MeterRun_50Value > 0) + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.MeterRun_50, student, data.GradeId, timeNow, isDisplay)); + if (data.OneMinuteJumpRopeValue > 0) entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.OneMinuteJumpRope, student, data.GradeId, timeNow, isDisplay)); if (data.One_Minute_Sit_UpValue > 0) entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.One_Minute_Sit_Up, student, data.GradeId, timeNow, isDisplay)); + if (data.ShuttleRun_50x8Value > 0) + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.ShuttleRun_50x8, student, data.GradeId, timeNow, isDisplay)); + if (data.StandingLongJumpValue > 0) entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.StandingLongJump, student, data.GradeId, timeNow, isDisplay)); + + if (data.MeterRun_800Value > 0) + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.MeterRun_800, student, data.GradeId, timeNow, isDisplay)); + + if (data.MeterRun_1000Value > 0) + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.MeterRun_1000, student, data.GradeId, timeNow, isDisplay)); + + if (data.Pull_UpValue > 0) + entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.Pull_Up, student, data.GradeId, timeNow, isDisplay)); } // 批量添加数据 @@ -403,6 +418,26 @@ namespace VOL.Business.Services.SportsHall } } + else if (type == SportsTestItemType.MeterRun_50) + { + entity.Value = data.MeterRun_50Value; + + // 根据测试项目查找标准 + var standard = await _healthStandardsRepository.FindFirstAsync(x => + x.CategoryEnum.Equals(typeStr) && + x.GradeId == gradeId && + x.Sex == sexType && + data.MeterRun_50Value >= x.MinValue && + data.MeterRun_50Value < x.MaxValue + ); + + if (standard != null) + { + entity.Score = standard.Score; + entity.Rank = standard.Rank; + } + } + else if (type == SportsTestItemType.OneMinuteJumpRope) { entity.Value = data.OneMinuteJumpRopeValue; @@ -442,6 +477,26 @@ namespace VOL.Business.Services.SportsHall } } + else if (type == SportsTestItemType.ShuttleRun_50x8) + { + entity.Value = data.ShuttleRun_50x8Value; + + // 根据测试项目查找标准 + var standard = await _healthStandardsRepository.FindFirstAsync(x => + x.CategoryEnum.Equals(typeStr) && + x.GradeId == gradeId && + x.Sex == sexType && + data.ShuttleRun_50x8Value >= x.MinValue && + data.ShuttleRun_50x8Value < x.MaxValue + ); + + if (standard != null) + { + entity.Score = standard.Score; + entity.Rank = standard.Rank; + } + } + else if (type == SportsTestItemType.StandingLongJump) { entity.Value = data.StandingLongJumpValue; @@ -461,6 +516,63 @@ namespace VOL.Business.Services.SportsHall entity.Rank = standard.Rank; } } + else if (type == SportsTestItemType.MeterRun_800) + { + entity.Value = data.MeterRun_800Value; + + // 根据测试项目查找标准 + var standard = await _healthStandardsRepository.FindFirstAsync(x => + x.CategoryEnum.Equals(typeStr) && + x.GradeId == gradeId && + x.Sex == sexType && + data.MeterRun_800Value >= x.MinValue && + data.MeterRun_800Value < x.MaxValue + ); + + if (standard != null) + { + entity.Score = standard.Score; + entity.Rank = standard.Rank; + } + } + else if (type == SportsTestItemType.MeterRun_1000) + { + entity.Value = data.MeterRun_1000Value; + + // 根据测试项目查找标准 + var standard = await _healthStandardsRepository.FindFirstAsync(x => + x.CategoryEnum.Equals(typeStr) && + x.GradeId == gradeId && + x.Sex == sexType && + data.MeterRun_1000Value >= x.MinValue && + data.MeterRun_1000Value < x.MaxValue + ); + + if (standard != null) + { + entity.Score = standard.Score; + entity.Rank = standard.Rank; + } + } + else if (type == SportsTestItemType.Pull_Up) + { + entity.Value = data.Pull_UpValue; + + // 根据测试项目查找标准 + var standard = await _healthStandardsRepository.FindFirstAsync(x => + x.CategoryEnum.Equals(typeStr) && + x.GradeId == gradeId && + x.Sex == sexType && + data.Pull_UpValue >= x.MinValue && + data.Pull_UpValue < x.MaxValue + ); + + if (standard != null) + { + entity.Score = standard.Score; + entity.Rank = standard.Rank; + } + } entity.CategoryEnum = type.ToString(); entity.CategoryValue = (int)type; diff --git a/VOL.Model/School/Request/SportsHallImportStudentsTestDataParam.cs b/VOL.Model/School/Request/SportsHallImportStudentsTestDataParam.cs index 103f7f1..229e88d 100644 --- a/VOL.Model/School/Request/SportsHallImportStudentsTestDataParam.cs +++ b/VOL.Model/School/Request/SportsHallImportStudentsTestDataParam.cs @@ -48,6 +48,12 @@ namespace VOL.Model.School.Request [Display(Name = "肺活量")] public float VitalCapacityValue { get; set; } + /// + /// 50米跑 + /// + [Display(Name = "50米跑")] + public float MeterRun_50Value { get; set; } + /// /// 坐位体前屈 /// @@ -66,12 +72,36 @@ namespace VOL.Model.School.Request [Display(Name = "一分钟仰卧起坐")] public int One_Minute_Sit_UpValue { get; set; } + /// + /// 50米*8往返跑 + /// + [Display(Name = "50米x8往返跑")] + public float ShuttleRun_50x8Value { get; set; } + /// /// 立定跳远 /// [Display(Name = "立定跳远")] public float StandingLongJumpValue { get; set; } + /// + /// 800米跑(女) + /// + [Display(Name = "800米跑")] + public float MeterRun_800Value { get; set; } + + /// + /// 1000米跑(男) + /// + [Display(Name = "1000米跑")] + public float MeterRun_1000Value { get; set; } + + /// + /// 引体向上(男) + /// + [Display(Name = "引体向上")] + public int Pull_UpValue { get; set; } + /// /// 测试时间 ///