Merge pull request '修改orderby位置,解决排序错误问题' (#4) from 修改安装和维保单排序问题 into main

Reviewed-on: http://118.195.165.218:3000/panda/fycore/pulls/4
main
panda 11 months ago
commit b2ce7590ce

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

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

Loading…
Cancel
Save