diff --git a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs index 270f065..c1b2ca4 100644 --- a/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs +++ b/YD_AllHeartRates.Api/Services/Impl/HeartRateReportService.cs @@ -130,16 +130,21 @@ namespace YD_AllHeartRates.Api.Services.Impl var classList = await ( from c in _sportsContext.Class - join s in _sportsContext.ClassAssocTeacher on c.Id equals s.ClassId - join t in _sportsContext.Teacher on s.TeacherId equals t.Id + join s in _sportsContext.ClassAssocTeacher on c.Id equals s.ClassId into classAssoc + from s in classAssoc.DefaultIfEmpty() + join t in _sportsContext.Teacher on s.TeacherId equals t.Id into teacherInfo + from t in teacherInfo.DefaultIfEmpty() where c.SchoolCode == schoolCode && c.GradeId == gradeId select new ClassListDto { ClassId = c.Id, ClassName = c.ClassName, GradeName = c.GradeName, - TeacherName = t.TeacherName - }).OrderBy(x => x.ClassId).ToListAsync(); + TeacherName = t != null ? t.TeacherName : null + }) + .OrderBy(x => x.ClassId) + .ToListAsync(); + var studentList = await ( from s in _sportsContext.Student diff --git a/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs b/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs index e39bcbe..77eb8c4 100644 --- a/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs +++ b/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs @@ -137,7 +137,8 @@ namespace YD_AllHeartRates.Api.Services.Impl StudentName = x.StudentName, Sex = x.Sex, Photo = x.Photo ?? "" - }).ToListAsync(); + }) + .ToListAsync(); _caching.AddObject(studentListKey, studentList, 60); // 缓存 8 小时 } diff --git a/YD_AllHeartRates.Api/Startup.cs b/YD_AllHeartRates.Api/Startup.cs index 96ede6a..1a2fac1 100644 --- a/YD_AllHeartRates.Api/Startup.cs +++ b/YD_AllHeartRates.Api/Startup.cs @@ -313,13 +313,13 @@ namespace YD_AllHeartRates.Api app.UseStaticHttpContext(); app.UseMiddleware(); - //app.UseSwagger(); - //app.UseSwaggerUI(c => - //{ - // //2个下拉框选项 选择对应的文档 - // c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api"); - // c.RoutePrefix = ""; - //}); + app.UseSwagger(); + app.UseSwaggerUI(c => + { + //2个下拉框选项 选择对应的文档 + c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api"); + c.RoutePrefix = ""; + }); app.UseRouting(); app.UseCors(); diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfo.cs b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfo.cs index cedd29a..918077b 100644 --- a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfo.cs +++ b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+49a6cb3a6dd561806da8e0157c7126774e0cfda0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+adb7a5132ba408ee1c99d16fb2ead9bed7a7ccc5")] [assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfoInputs.cache b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfoInputs.cache index db60236..7653a50 100644 --- a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfoInputs.cache +++ b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.AssemblyInfoInputs.cache @@ -1 +1 @@ -5e1ce581baeb690fbd907058052a9f7fd6d22c49d7e036c5953449b221cb4b54 +6198966bba43cd9c423a58fba5f3c39b124d08b73c11ccc008ce22ad17ebb10f diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.csproj.AssemblyReference.cache b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.csproj.AssemblyReference.cache index f77fa8b..9d5d143 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.csproj.AssemblyReference.cache and b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.csproj.AssemblyReference.cache differ diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.dll b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.dll index 8fec26e..30da94d 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.dll and b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.dll differ diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.pdb b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.pdb index 6aad3fc..b3824c3 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.pdb and b/YD_AllHeartRates.Api/obj/Debug/net6.0/YD_AllHeartRates.Api.pdb differ diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/apphost.exe b/YD_AllHeartRates.Api/obj/Debug/net6.0/apphost.exe index 1d263bd..f384e24 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/apphost.exe and b/YD_AllHeartRates.Api/obj/Debug/net6.0/apphost.exe differ diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/ref/YD_AllHeartRates.Api.dll b/YD_AllHeartRates.Api/obj/Debug/net6.0/ref/YD_AllHeartRates.Api.dll index 27fbb10..28aa0dc 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/ref/YD_AllHeartRates.Api.dll and b/YD_AllHeartRates.Api/obj/Debug/net6.0/ref/YD_AllHeartRates.Api.dll differ diff --git a/YD_AllHeartRates.Api/obj/Debug/net6.0/refint/YD_AllHeartRates.Api.dll b/YD_AllHeartRates.Api/obj/Debug/net6.0/refint/YD_AllHeartRates.Api.dll index 27fbb10..28aa0dc 100644 Binary files a/YD_AllHeartRates.Api/obj/Debug/net6.0/refint/YD_AllHeartRates.Api.dll and b/YD_AllHeartRates.Api/obj/Debug/net6.0/refint/YD_AllHeartRates.Api.dll differ diff --git a/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.dll b/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.dll index 6dfe1af..7d1e12a 100644 Binary files a/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.dll and b/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.dll differ diff --git a/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.pdb b/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.pdb index f45bb85..fc1aba9 100644 Binary files a/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.pdb and b/YD_AllHeartRates.Commons/bin/Debug/net6.0/YD_AllHeartRates.Commons.pdb differ diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfo.cs b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfo.cs index 6a01eb6..f89d74b 100644 --- a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfo.cs +++ b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Commons")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7b9f68a3083ca4505691f4f83599da73c25dca89")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+adb7a5132ba408ee1c99d16fb2ead9bed7a7ccc5")] [assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Commons")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Commons")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfoInputs.cache b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfoInputs.cache index 8864dc7..a49c922 100644 --- a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfoInputs.cache +++ b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.AssemblyInfoInputs.cache @@ -1 +1 @@ -a15d75618d9a5f604592ebd59e64d2979ec0365ce6479e8233cedcc51f5c89ef +39e19d927f4b3fa147400b1bba96cb47a1b0af113b4d9bd138d8a25b4ed27817 diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.dll b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.dll index 6dfe1af..7d1e12a 100644 Binary files a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.dll and b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.dll differ diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.pdb b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.pdb index f45bb85..fc1aba9 100644 Binary files a/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.pdb and b/YD_AllHeartRates.Commons/obj/Debug/net6.0/YD_AllHeartRates.Commons.pdb differ diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/ref/YD_AllHeartRates.Commons.dll b/YD_AllHeartRates.Commons/obj/Debug/net6.0/ref/YD_AllHeartRates.Commons.dll index 600e518..0dedd49 100644 Binary files a/YD_AllHeartRates.Commons/obj/Debug/net6.0/ref/YD_AllHeartRates.Commons.dll and b/YD_AllHeartRates.Commons/obj/Debug/net6.0/ref/YD_AllHeartRates.Commons.dll differ diff --git a/YD_AllHeartRates.Commons/obj/Debug/net6.0/refint/YD_AllHeartRates.Commons.dll b/YD_AllHeartRates.Commons/obj/Debug/net6.0/refint/YD_AllHeartRates.Commons.dll index 600e518..0dedd49 100644 Binary files a/YD_AllHeartRates.Commons/obj/Debug/net6.0/refint/YD_AllHeartRates.Commons.dll and b/YD_AllHeartRates.Commons/obj/Debug/net6.0/refint/YD_AllHeartRates.Commons.dll differ