fix:修复运输时效预警明细的状态排序
This commit is contained in:
parent
027b06b9d9
commit
9cfa88f037
@ -262,9 +262,9 @@ public class TransportWarningService : ApplicationService
|
|||||||
// 计算后的状态过滤
|
// 计算后的状态过滤
|
||||||
var filtered = map.WhereIf(input.Status > 0, x => x.Status == input.Status);
|
var filtered = map.WhereIf(input.Status > 0, x => x.Status == input.Status);
|
||||||
|
|
||||||
// 按状态组+组内时间降序,分割状态组 g1:(即将超时/已超时) g2:(已完成/超时完成/已关闭) 确保g1总是在g2之前
|
// 按状态组+组内时间降序,分割状态组 g1:(即将超时,已超时) g2:(已完成/超时完成/已关闭) 确保g1总是在g2之前
|
||||||
var sorted = filtered
|
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) //同状态组按时间降序
|
.ThenByDescending(x => x.CreateTime) //同状态组按时间降序
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user