update:学校体测报告上传时多种项目识别
This commit is contained in:
parent
ec71427e13
commit
3932c63fad
@ -299,14 +299,29 @@ namespace VOL.Business.Services.SportsHall
|
|||||||
if (data.VitalCapacityValue > 0)
|
if (data.VitalCapacityValue > 0)
|
||||||
entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.VitalCapacity, student, data.GradeId, timeNow, isDisplay));
|
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)
|
if (data.OneMinuteJumpRopeValue > 0)
|
||||||
entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.OneMinuteJumpRope, student, data.GradeId, timeNow, isDisplay));
|
entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.OneMinuteJumpRope, student, data.GradeId, timeNow, isDisplay));
|
||||||
|
|
||||||
if (data.One_Minute_Sit_UpValue > 0)
|
if (data.One_Minute_Sit_UpValue > 0)
|
||||||
entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.One_Minute_Sit_Up, student, data.GradeId, timeNow, isDisplay));
|
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)
|
if (data.StandingLongJumpValue > 0)
|
||||||
entityList.Add(await AddSportsHallEnumStudentsTestData(data, SportsTestItemType.StandingLongJump, student, data.GradeId, timeNow, isDisplay));
|
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)
|
else if (type == SportsTestItemType.OneMinuteJumpRope)
|
||||||
{
|
{
|
||||||
entity.Value = data.OneMinuteJumpRopeValue;
|
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)
|
else if (type == SportsTestItemType.StandingLongJump)
|
||||||
{
|
{
|
||||||
entity.Value = data.StandingLongJumpValue;
|
entity.Value = data.StandingLongJumpValue;
|
||||||
@ -461,6 +516,63 @@ namespace VOL.Business.Services.SportsHall
|
|||||||
entity.Rank = standard.Rank;
|
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.CategoryEnum = type.ToString();
|
||||||
entity.CategoryValue = (int)type;
|
entity.CategoryValue = (int)type;
|
||||||
|
|||||||
@ -48,6 +48,12 @@ namespace VOL.Model.School.Request
|
|||||||
[Display(Name = "肺活量")]
|
[Display(Name = "肺活量")]
|
||||||
public float VitalCapacityValue { get; set; }
|
public float VitalCapacityValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 50米跑
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "50米跑")]
|
||||||
|
public float MeterRun_50Value { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 坐位体前屈
|
/// 坐位体前屈
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -66,12 +72,36 @@ namespace VOL.Model.School.Request
|
|||||||
[Display(Name = "一分钟仰卧起坐")]
|
[Display(Name = "一分钟仰卧起坐")]
|
||||||
public int One_Minute_Sit_UpValue { get; set; }
|
public int One_Minute_Sit_UpValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 50米*8往返跑
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "50米x8往返跑")]
|
||||||
|
public float ShuttleRun_50x8Value { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 立定跳远
|
/// 立定跳远
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "立定跳远")]
|
[Display(Name = "立定跳远")]
|
||||||
public float StandingLongJumpValue { get; set; }
|
public float StandingLongJumpValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 800米跑(女)
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "800米跑")]
|
||||||
|
public float MeterRun_800Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1000米跑(男)
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "1000米跑")]
|
||||||
|
public float MeterRun_1000Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 引体向上(男)
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "引体向上")]
|
||||||
|
public int Pull_UpValue { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 测试时间
|
/// 测试时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user