From 9cfa88f037d6f4f8aaa198cdfc354087caaf76b3 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Mon, 31 Mar 2025 14:52:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=BE=93?= =?UTF-8?q?=E6=97=B6=E6=95=88=E9=A2=84=E8=AD=A6=E6=98=8E=E7=BB=86=E7=9A=84?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Warning/TransportWarningService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs b/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs index a099b53d..684c13cc 100644 --- a/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs +++ b/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs @@ -262,9 +262,9 @@ public class TransportWarningService : ApplicationService // 计算后的状态过滤 var filtered = map.WhereIf(input.Status > 0, x => x.Status == input.Status); - // 按状态组+组内时间降序,分割状态组 g1:(即将超时/已超时) g2:(已完成/超时完成/已关闭) 确保g1总是在g2之前 + // 按状态组+组内时间降序,分割状态组 g1:(即将超时,已超时) g2:(已完成/超时完成/已关闭) 确保g1总是在g2之前 var sorted = filtered - .OrderBy(x => x.Status is (int) TransportWarningStatus.即将超时 or (int) TransportWarningStatus.已超时 ? 1 : 2) + .OrderBy(x => x.Status is (int) TransportWarningStatus.即将超时 or (int) TransportWarningStatus.已超时 ? x.Status : 3) .ThenByDescending(x => x.CreateTime) //同状态组按时间降序 .ToList();