Merge branch 'S07' into test

This commit is contained in:
hardstylewyl 2025-03-31 14:52:29 +08:00
commit 04ff191560

View File

@ -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();