diff --git a/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.dll b/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.dll index 5a694e9..03d9876 100644 Binary files a/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.dll and b/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.dll differ diff --git a/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.pdb b/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.pdb index bf9423f..15d3fa5 100644 Binary files a/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.pdb and b/Server/YD_XinWei.Commons/bin/Release/net6.0/YD_XinWei.Commons.pdb differ diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfo.cs b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfo.cs index 34d2c7e..ac93a45 100644 --- a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfo.cs +++ b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("YD_XinWei.Commons")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f9f4a53c41a5029c82bfb442fd4e2b9f2980218f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+922cd4beca32dd7110c41a523d23b114176a3a0b")] [assembly: System.Reflection.AssemblyProductAttribute("YD_XinWei.Commons")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_XinWei.Commons")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfoInputs.cache b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfoInputs.cache index a254bd8..0a2985c 100644 --- a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfoInputs.cache +++ b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.AssemblyInfoInputs.cache @@ -1 +1 @@ -74c4dd81c8aa3b83c88922809ca51fe25d7816fdf64b1c08a9bf0d7628572ab1 +f98fc273dcd7d743144a77bbe89c38aafb9c6660ae1cf7e7ea16bcac6dd155ec diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.dll b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.dll index 5a694e9..03d9876 100644 Binary files a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.dll and b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.dll differ diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.pdb b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.pdb index bf9423f..15d3fa5 100644 Binary files a/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.pdb and b/Server/YD_XinWei.Commons/obj/Release/net6.0/YD_XinWei.Commons.pdb differ diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/ref/YD_XinWei.Commons.dll b/Server/YD_XinWei.Commons/obj/Release/net6.0/ref/YD_XinWei.Commons.dll index 0bd1f5a..a52c35f 100644 Binary files a/Server/YD_XinWei.Commons/obj/Release/net6.0/ref/YD_XinWei.Commons.dll and b/Server/YD_XinWei.Commons/obj/Release/net6.0/ref/YD_XinWei.Commons.dll differ diff --git a/Server/YD_XinWei.Commons/obj/Release/net6.0/refint/YD_XinWei.Commons.dll b/Server/YD_XinWei.Commons/obj/Release/net6.0/refint/YD_XinWei.Commons.dll index 0bd1f5a..a52c35f 100644 Binary files a/Server/YD_XinWei.Commons/obj/Release/net6.0/refint/YD_XinWei.Commons.dll and b/Server/YD_XinWei.Commons/obj/Release/net6.0/refint/YD_XinWei.Commons.dll differ diff --git a/Server/YD_XinWei/Program.cs b/Server/YD_XinWei/Program.cs index bb107ec..b3c5f7a 100644 --- a/Server/YD_XinWei/Program.cs +++ b/Server/YD_XinWei/Program.cs @@ -19,7 +19,7 @@ namespace YD_XinWei.Api { serverOptions.Limits.MaxRequestBodySize = 10485760; }); - webBuilder.UseKestrel().UseUrls("http://*:9995"); + webBuilder.UseKestrel().UseUrls("http://*:9994"); webBuilder.UseIIS(); webBuilder.UseStartup(); }).UseServiceProviderFactory(new AutofacServiceProviderFactory()); diff --git a/Server/YD_XinWei/Services/Impl/LargeScreenService.cs b/Server/YD_XinWei/Services/Impl/LargeScreenService.cs index 8d91cb0..9cd50c1 100644 --- a/Server/YD_XinWei/Services/Impl/LargeScreenService.cs +++ b/Server/YD_XinWei/Services/Impl/LargeScreenService.cs @@ -166,39 +166,44 @@ namespace YD_XinWei.Api.Services.Impl .ToList(); var projectResults = sportsTestData - .GroupBy(x => x.CategoryValue) - .Select(g => new ItemDataDto - { - CategoryValue = g.Key, + .GroupBy(x => x.CategoryValue) + .Select(g => new ItemDataDto + { + CategoryValue = g.Key, - // 优良率计算:分数 > 80 的人数 ÷ 总人数 - ExcellentRate = (int)Math.Round(sportsTestData.Count(x => x.CategoryValue == g.Key && x.Score > 80) * 100.0 / Math.Max(sportsTestData.Count(x => x.CategoryValue == g.Key), 1), MidpointRounding.AwayFromZero), + // 优良率计算:分数 > 80 的人数 ÷ 总人数 + ExcellentRate = (int)Math.Round( + sportsTestData.Count(x => x.CategoryValue == g.Key && x.Score > 80) * 100.0 / + Math.Max(sportsTestData.Count(x => x.CategoryValue == g.Key), 1), + MidpointRounding.AwayFromZero + ), - // 男生前十名 - MaleRankList = g.Where(x => x.Sex == 1) - .OrderByDescending(x => x.Value) - .Take(10) - .Select((x, index) => new StudentScoreRankingDto - { - Rank = index + 1, - StudentNo = x.StudentNo, - StudentName = x.StudentName, - Value = x.CategoryValue == 1 ? $"{x.Height}cm/{x.Weight}kg" : $"{x.Value}{((SportsTestItemType)x.CategoryValue).GetUnit()}" - }).ToList(), + // 男生前十名 + MaleRankList = (g.Where(x => x.Sex == 1) + .OrderBy(x => g.Key == 3 ? x.Value : -x.Value) // 条件排序 + .Take(10) + .Select((x, index) => new StudentScoreRankingDto + { + Rank = index + 1, + StudentNo = x.StudentNo, + StudentName = x.StudentName, + Value = x.CategoryValue == 1 ? $"{x.Height}cm/{x.Weight}kg" : $"{x.Value}{((SportsTestItemType)x.CategoryValue).GetUnit()}" + })).ToList(), + + // 女生前十名 + FemaleRankList = (g.Where(x => x.Sex == 2) + .OrderBy(x => g.Key == 3 ? x.Value : -x.Value) // 条件排序 + .Take(10) + .Select((x, index) => new StudentScoreRankingDto + { + Rank = index + 1, + StudentNo = x.StudentNo, + StudentName = x.StudentName, + Value = x.CategoryValue == 1 ? $"{x.Height}cm/{x.Weight}kg" : $"{x.Value}{((SportsTestItemType)x.CategoryValue).GetUnit()}" + })).ToList() + }) + .ToList(); - // 女生前十名 - FemaleRankList = g.Where(x => x.Sex == 2) - .OrderByDescending(x => x.Value) - .Take(10) - .Select((x, index) => new StudentScoreRankingDto - { - Rank = index + 1, - StudentNo = x.StudentNo, - StudentName = x.StudentName, - Value = x.CategoryValue == 1 ? $"{x.Height}cm/{x.Weight}kg" : $"{x.Value}{((SportsTestItemType)x.CategoryValue).GetUnit()}" - }).ToList() - }) - .ToList(); res.ItemDatalist = projectResults; diff --git a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.dll b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.dll index 506343e..d8fe9b6 100644 Binary files a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.dll and b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.dll differ diff --git a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.exe b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.exe index a7379a2..379db85 100644 Binary files a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.exe and b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.exe differ diff --git a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.pdb b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.pdb index 6e694a7..5fd2dc3 100644 Binary files a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.pdb and b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Api.pdb differ diff --git a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.dll b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.dll index 5a694e9..03d9876 100644 Binary files a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.dll and b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.dll differ diff --git a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.pdb b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.pdb index bf9423f..15d3fa5 100644 Binary files a/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.pdb and b/Server/YD_XinWei/bin/Release/net6.0/YD_XinWei.Commons.pdb differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfo.cs b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfo.cs index a64409a..162ff2d 100644 --- a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfo.cs +++ b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("YD_XinWei.Api")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f9f4a53c41a5029c82bfb442fd4e2b9f2980218f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+922cd4beca32dd7110c41a523d23b114176a3a0b")] [assembly: System.Reflection.AssemblyProductAttribute("YD_XinWei.Api")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_XinWei.Api")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfoInputs.cache b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfoInputs.cache index dcbcc9d..9b96b2d 100644 --- a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfoInputs.cache +++ b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.AssemblyInfoInputs.cache @@ -1 +1 @@ -3ee2a4997ca5a7a114829a3edd61a9285483441b9edac8b0338989a7c9e658a8 +7e5321acb1dd2df00cdf92241817af42b08287146feb91b5a34d93b70138def9 diff --git a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.csproj.AssemblyReference.cache b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.csproj.AssemblyReference.cache index 61c944d..6d49af9 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.csproj.AssemblyReference.cache and b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.csproj.AssemblyReference.cache differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.dll b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.dll index 506343e..d8fe9b6 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.dll and b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.dll differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.pdb b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.pdb index 6e694a7..5fd2dc3 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.pdb and b/Server/YD_XinWei/obj/Release/net6.0/YD_XinWei.Api.pdb differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/apphost.exe b/Server/YD_XinWei/obj/Release/net6.0/apphost.exe index a7379a2..379db85 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/apphost.exe and b/Server/YD_XinWei/obj/Release/net6.0/apphost.exe differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/ref/YD_XinWei.Api.dll b/Server/YD_XinWei/obj/Release/net6.0/ref/YD_XinWei.Api.dll index 8347e0b..c2d9bc1 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/ref/YD_XinWei.Api.dll and b/Server/YD_XinWei/obj/Release/net6.0/ref/YD_XinWei.Api.dll differ diff --git a/Server/YD_XinWei/obj/Release/net6.0/refint/YD_XinWei.Api.dll b/Server/YD_XinWei/obj/Release/net6.0/refint/YD_XinWei.Api.dll index 8347e0b..c2d9bc1 100644 Binary files a/Server/YD_XinWei/obj/Release/net6.0/refint/YD_XinWei.Api.dll and b/Server/YD_XinWei/obj/Release/net6.0/refint/YD_XinWei.Api.dll differ