d
This commit is contained in:
parent
41672a56aa
commit
2278bfc8a7
@ -203,23 +203,57 @@ namespace YD_WeChatApplet.Api.Services.Impl
|
||||
if (classInfo == null)
|
||||
return res;
|
||||
|
||||
var categorys = await (
|
||||
from g in _sportsContext.GradeAssocCategory
|
||||
join s in _sportsContext.SportsTestCategory on g.CategoryValue equals s.CategoryValue
|
||||
|
||||
where g.GradeId == classInfo.GradeId
|
||||
|
||||
select new
|
||||
var categorys = new List<dynamic>
|
||||
{
|
||||
s.Id,
|
||||
s.CategoryValue,
|
||||
s.CategoryName,
|
||||
s.CategoryEnum,
|
||||
g.Weight
|
||||
}).ToListAsync();
|
||||
|
||||
if (categorys == null)
|
||||
return res;
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
CategoryValue = 1,
|
||||
CategoryName = "BMI",
|
||||
CategoryEnum = "BMI",
|
||||
Weight = 0.15f
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
CategoryValue = 2,
|
||||
CategoryName = "肺活量",
|
||||
CategoryEnum = "VitalCapacity",
|
||||
Weight = 0.2f
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 4,
|
||||
CategoryValue = 4,
|
||||
CategoryName = "坐位体前屈",
|
||||
CategoryEnum = "Sit_And_Reach",
|
||||
Weight = 0.15f
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 5,
|
||||
CategoryValue = 5,
|
||||
CategoryName = "一分钟跳绳",
|
||||
CategoryEnum = "OneMinuteJumpRope",
|
||||
Weight = 0.2f
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
CategoryValue = 6,
|
||||
CategoryName = "一分钟仰卧起坐",
|
||||
CategoryEnum = "One_Minute_Sit_Up",
|
||||
Weight = 0.15f
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 8,
|
||||
CategoryValue = 6,
|
||||
CategoryName = "立定跳远",
|
||||
CategoryEnum = "StandingLongJump",
|
||||
Weight = 0.15f
|
||||
}
|
||||
};
|
||||
|
||||
var sportsTestResults = await _sportsContext.SportsTestValue.Where(x => x.IsDisplay && x.SchoolCode == student.SchoolCode).Select(x => new SportsTestValueModel()
|
||||
{
|
||||
@ -265,7 +299,7 @@ namespace YD_WeChatApplet.Api.Services.Impl
|
||||
|
||||
var trendChart = new ScoreTrendChartDataDto
|
||||
{
|
||||
AxisX = trendList.Select(x => x.ScoreTime.ToString("MM-dd HH:mm")).ToList(),
|
||||
AxisX = trendList.Select(x => x.ScoreTime.ToString("yyyy-MM-dd")).ToList(),
|
||||
AxisY = trendList.Select(x => x.Score ?? 0f).ToList()
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user