xinwei
This commit is contained in:
parent
7bdd3b25d3
commit
3feec35b44
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_XinWei.Commons")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+35ad95bd6885f10ef9d0d18bc76609fc1773a39d")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7bdd3b25d3197213802b19b367c9c9e6ecba10ba")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_XinWei.Commons")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_XinWei.Commons")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@ -1 +1 @@
|
||||
b0094d31d93d158b8a715e64c9aa2a1dc33706a1b2d46d99732ddf981a165f5d
|
||||
2cc8d2f686463f07a5c8fe465cc6425ba843827a96c0faadb12d0611a515735a
|
||||
|
||||
@ -10,7 +10,7 @@ build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = YD_XinWei.Commons
|
||||
build_property.ProjectDir = D:\Git\YD\YD_XinWei.Api\Server\YD_XinWei.Commons\
|
||||
build_property.ProjectDir = C:\Users\tangl\Desktop\Git\YD_XinWei\Server\YD_XinWei.Commons\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 6.0
|
||||
|
||||
Binary file not shown.
@ -83,29 +83,56 @@ namespace YD_XinWei.Api.Services.Impl
|
||||
var sportsTestDataKey = $"SportsTestData_{schoolCode}";
|
||||
var studentListKey = $"StudentList_{schoolCode}";
|
||||
|
||||
//var studentList = _caching.Get<List<StudentListDto>>(studentListKey);
|
||||
var studentList = _caching.Get<List<StudentListDto>>(studentListKey);
|
||||
|
||||
//if (studentList == null || studentList.Count == 0)
|
||||
//{
|
||||
// studentList = await _sportsContext.Student.Where(x => x.SchoolCode == schoolCode).Select(x => new StudentListDto
|
||||
// {
|
||||
// StudentNo = x.StudentNo,
|
||||
// Sex = x.Sex,
|
||||
// Photo = x.Photo ?? ""
|
||||
// }).ToListAsync();
|
||||
// //_caching.AddObject(studentListKey, studentList, 3600);
|
||||
//}
|
||||
|
||||
var studentList = await _sportsContext.Student.Where(x => x.SchoolCode == schoolCode).Select(x => new StudentListDto
|
||||
if (studentList == null || studentList.Count == 0)
|
||||
{
|
||||
studentList = await _sportsContext.Student.Where(x => x.SchoolCode == schoolCode).Select(x => new StudentListDto
|
||||
{
|
||||
StudentNo = x.StudentNo,
|
||||
Sex = x.Sex,
|
||||
Photo = x.Photo ?? ""
|
||||
}).ToListAsync();
|
||||
_caching.AddObject(studentListKey, studentList, 3600);
|
||||
}
|
||||
|
||||
//var studentList = await _sportsContext.Student.Where(x => x.SchoolCode == schoolCode).Select(x => new StudentListDto
|
||||
//{
|
||||
// StudentNo = x.StudentNo,
|
||||
// Sex = x.Sex,
|
||||
// Photo = x.Photo ?? ""
|
||||
//}).ToListAsync();
|
||||
|
||||
res.BasicInfo.FemaleCount = studentList.Count(x => x.Sex == 2);
|
||||
res.BasicInfo.MaleCount = studentList.Count(x => x.Sex == 1);
|
||||
|
||||
var sportsTestData = _caching.Get<List<SportsTestDataDto>>(sportsTestDataKey);
|
||||
|
||||
if (sportsTestData == null || sportsTestData.Count == 0)
|
||||
{
|
||||
sportsTestData = await _sportsContext.SportsTestValue.Where(x => x.SchoolCode == schoolCode && x.DataSource == DataSource.XW)
|
||||
.Select(x => new SportsTestDataDto()
|
||||
{
|
||||
SchoolCode = x.SchoolCode,
|
||||
CategoryValue = x.CategoryValue,
|
||||
ClassId = x.ClassId,
|
||||
ClassName = x.ClassName,
|
||||
GradeId = x.GradeId,
|
||||
GradeName = x.GradeName,
|
||||
TeacherId = x.TeacherId,
|
||||
StudentNo = x.StudentNo,
|
||||
StudentName = x.StudentName,
|
||||
Sex = x.Sex,
|
||||
ScoreTime = x.ScoreTime,
|
||||
Height = x.Height,
|
||||
Weight = x.Weight,
|
||||
Value = x.Value,
|
||||
Score = x.Score,
|
||||
Rank = x.Rank
|
||||
}).ToListAsync();
|
||||
_caching.AddObject(sportsTestDataKey, sportsTestData, 60);
|
||||
}
|
||||
|
||||
//var sportsTestData = _caching.Get<List<SportsTestDataDto>>(sportsTestDataKey);
|
||||
|
||||
//if (sportsTestData == null || sportsTestData.Count == 0)
|
||||
@ -133,33 +160,6 @@ namespace YD_XinWei.Api.Services.Impl
|
||||
// //_caching.AddObject(sportsTestDataKey, sportsTestData, 60);
|
||||
//}
|
||||
|
||||
var sportsTestData = _caching.Get<List<SportsTestDataDto>>(sportsTestDataKey);
|
||||
|
||||
if (sportsTestData == null || sportsTestData.Count == 0)
|
||||
{
|
||||
sportsTestData = await _sportsContext.SportsTestValue.Where(x => x.SchoolCode == schoolCode && x.DataSource == DataSource.XW)
|
||||
.Select(x => new SportsTestDataDto()
|
||||
{
|
||||
SchoolCode = x.SchoolCode,
|
||||
CategoryValue = x.CategoryValue,
|
||||
ClassId = x.ClassId,
|
||||
ClassName = x.ClassName,
|
||||
GradeId = x.GradeId,
|
||||
GradeName = x.GradeName,
|
||||
TeacherId = x.TeacherId,
|
||||
StudentNo = x.StudentNo,
|
||||
StudentName = x.StudentName,
|
||||
Sex = x.Sex,
|
||||
ScoreTime = x.ScoreTime,
|
||||
Height = x.Height,
|
||||
Weight = x.Weight,
|
||||
Value = x.Value,
|
||||
Score = x.Score,
|
||||
Rank = x.Rank
|
||||
}).ToListAsync();
|
||||
//_caching.AddObject(sportsTestDataKey, sportsTestData, 60);
|
||||
}
|
||||
|
||||
var bestScoreData = sportsTestData
|
||||
.GroupBy(x => x.StudentNo)
|
||||
.Select(g => g.OrderByDescending(x => x.Score).First())
|
||||
|
||||
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+35ad95bd6885f10ef9d0d18bc76609fc1773a39d")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7bdd3b25d3197213802b19b367c9c9e6ecba10ba")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@ -1 +1 @@
|
||||
8fcb698e781269d044bd4e8633786876937f11fe32cf7dcaeb9e1a6cad1302da
|
||||
34384d21dca01e788acaeaa1d2e1fe004164bf6f5d12e402f2069e4a31083347
|
||||
|
||||
@ -11,13 +11,13 @@ build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = YD_XinWei.Api
|
||||
build_property.RootNamespace = YD_XinWei.Api
|
||||
build_property.ProjectDir = D:\Git\YD\YD_XinWei.Api\Server\YD_XinWei\
|
||||
build_property.ProjectDir = C:\Users\tangl\Desktop\Git\YD_XinWei\Server\YD_XinWei\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.RazorLangVersion = 6.0
|
||||
build_property.SupportLocalizedComponentNames =
|
||||
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
||||
build_property.MSBuildProjectDirectory = D:\Git\YD\YD_XinWei.Api\Server\YD_XinWei
|
||||
build_property.MSBuildProjectDirectory = C:\Users\tangl\Desktop\Git\YD_XinWei\Server\YD_XinWei
|
||||
build_property._RazorSourceGeneratorDebug =
|
||||
build_property.EffectiveAnalysisLevelStyle = 6.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user