From 3932c63fad1a39ead12839bcf838988cb6ecbb5b Mon Sep 17 00:00:00 2001 From: ltx <1006158920@qq.com> Date: Mon, 13 Jul 2026 14:58:18 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E5=AD=A6=E6=A0=A1=E4=BD=93?= =?UTF-8?q?=E6=B5=8B=E6=8A=A5=E5=91=8A=E4=B8=8A=E4=BC=A0=E6=97=B6=E5=A4=9A?= =?UTF-8?q?=E7=A7=8D=E9=A1=B9=E7=9B=AE=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/SportsHall/SportsHallService.cs | 112 ++++++++++++++++++ .../SportsHallImportStudentsTestDataParam.cs | 30 +++++ 2 files changed, 142 insertions(+) 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; } + /// /// 测试时间 ///