修改orderby位置,解决排序错误问题

main
潘建东 11 months ago
parent 871a8a235a
commit 65d1052b32

@ -313,9 +313,10 @@ namespace ZhongLianService
.WhereIF(pageSearch.Mode != null && !string.IsNullOrEmpty(pageSearch.Mode.PatrolUid), x =>
x.PatrolUid == pageSearch.Mode!.PatrolUid
)
.OrderByDescending(x => x.Id)
.SplitTable((DateTime)pageSearch.StartDate!, (DateTime)pageSearch.EndDate!)
.OrderByDescending(x => x.Id)
.ToPageListAsync(pageSearch.Index, pageSearch.Size, _Total);
return new PageData<InstallDO>()
{
Index = pageSearch.Index,

@ -146,9 +146,9 @@ namespace ZhongLianService
.WhereIF(pageSearch.Mode != null && !string.IsNullOrEmpty(pageSearch.Mode.MaintenanceUid), x =>
x.MaintenanceUid == pageSearch.Mode!.MaintenanceUid
)
.SplitTable((DateTime)pageSearch.StartDate!, (DateTime)pageSearch.EndDate!)
.OrderBy("(CASE State WHEN 2 THEN 0 ELSE State END) ASC")
.OrderByDescending(x => x.Id)
.SplitTable((DateTime)pageSearch.StartDate!, (DateTime)pageSearch.EndDate!)
.ToPageListAsync(pageSearch.Index, pageSearch.Size, _Total);
return new PageData<MaintenanceDO>()
{

Loading…
Cancel
Save