From 0b608b65c83deed59096d844b900f4872f26aacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Thu, 10 Sep 2026 16:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Workbench/WorkbenchController.cs | 14 ++++++++++++-- YD_Event.Application/applicationsettings.json | 1 - YD_Event.Core/InitData/sysmenu.txt | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/YD_Event.Application/Workbench/WorkbenchController.cs b/YD_Event.Application/Workbench/WorkbenchController.cs index 7ffb3d3..79805cf 100644 --- a/YD_Event.Application/Workbench/WorkbenchController.cs +++ b/YD_Event.Application/Workbench/WorkbenchController.cs @@ -679,7 +679,7 @@ public class WorkbenchController : IDynamicApiController ?? throw Oops.Bah("所选组别不属于当前赛事项目"); var groupName = eventProjectGroup.GroupName; - var results = await _resultRepository.AsQueryable() + var rankingQuery = _resultRepository.AsQueryable() .InnerJoin((r, e) => r.SessionEntryId == e.Id) .InnerJoin((r, e, s) => e.SessionId == s.Id) .Where((r, e, s) => !r.DeleteMark && !e.DeleteMark && !s.DeleteMark && @@ -689,7 +689,17 @@ public class WorkbenchController : IDynamicApiController e.GroupName == groupName) && // 只投屏有效成绩(已确认20/已投屏30/已更正40),排除DQ成绩 (r.ResultStatus == 20 || r.ResultStatus == 30 || r.ResultStatus == 40) && - !r.IsDisqualified) + !r.IsDisqualified); + + // 排名按大屏对应场地隔离,避免同项目同组别在多个场地比赛时串榜。 + // 使用显式分支和值类型局部变量,避免 nullable 条件被 SqlSugar 翻译成非法 SQL。 + if (input.VenueId.HasValue) + { + var venueId = input.VenueId.Value; + rankingQuery = rankingQuery.Where((r, e, s) => s.VenueId == venueId); + } + + var results = await rankingQuery .OrderBy((r, e, s) => r.Rank) .Select((r, e, s) => new { diff --git a/YD_Event.Application/applicationsettings.json b/YD_Event.Application/applicationsettings.json index b143542..f9a477c 100644 --- a/YD_Event.Application/applicationsettings.json +++ b/YD_Event.Application/applicationsettings.json @@ -54,7 +54,6 @@ "dbconfig": { "ConnectionStrings": [ "8.153.108.90,Password=yd708090,SyncTimeout=15000,ConnectTimeout=15000,ResponseTimeout=15000,defaultDatabase=7,poolsize=100,ssl=false,writeBuffer=10240,idleTimeout=30000,connectRetry=3,asyncPipeline=false" - //"8.153.108.90,Password=yd708090,SyncTimeout=15000,ConnectTimeout=15000,ResponseTimeout=15000,defaultDatabase=8,poolsize=100,ssl=false,writeBuffer=10240,idleTimeout=30000,connectRetry=3,asyncPipeline=false" ], //"Sentinels": [ // "192.169.1.10:26379", diff --git a/YD_Event.Core/InitData/sysmenu.txt b/YD_Event.Core/InitData/sysmenu.txt index 8818eb8..a7a7fa3 100644 --- a/YD_Event.Core/InitData/sysmenu.txt +++ b/YD_Event.Core/InitData/sysmenu.txt @@ -2128,7 +2128,7 @@ "ParentId": 1086, "RouteName": "scoringCast", "Path": "/scoring/cast", - "Component": "scoring/workbench/index", + "Component": "scoring/screen/index", "Redirect": "", "Icon": "ele-DataLine", "IsIframe": "0", @@ -2138,7 +2138,7 @@ "IsFixed": "0", "Status": 0, "Sort": 4, - "Remark": "成绩投屏操作台", + "Remark": "成绩投屏大屏", "DeleteMark": false, "CreatedUserId": 1000, "CreatedTime": "2023-06-01T00:00:00"