This commit is contained in:
parent
d3b22ecf48
commit
d43d151e75
2 changed files with 6 additions and 4 deletions
|
|
@ -274,7 +274,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
if (retire.TypeReport == null)
|
||||
{
|
||||
profile_retire = profile_retire.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
profile_retire = profile_retire
|
||||
.OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.ThenBy(x => child1Order.ToObject<List<string>>().IndexOf(x.child1 ?? ""))
|
||||
.ThenBy(x => child2Order.ToObject<List<string>>().IndexOf(x.child2 ?? ""))
|
||||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
|
|
|
|||
|
|
@ -331,7 +331,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
}
|
||||
var order = 1;
|
||||
foreach (var profile in profiles.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
foreach (var profile in profiles
|
||||
.OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.ThenBy(x => child1Order.ToObject<List<string>>().IndexOf(x.child1 ?? ""))
|
||||
.ThenBy(x => child2Order.ToObject<List<string>>().IndexOf(x.child2 ?? ""))
|
||||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
|
|
@ -1346,7 +1347,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
var order = 1;
|
||||
foreach (var profile in retire.RetirementProfiles
|
||||
.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.ThenBy(x => child1Order.ToObject<List<string>>().IndexOf(x.child1 ?? ""))
|
||||
.ThenBy(x => child2Order.ToObject<List<string>>().IndexOf(x.child2 ?? ""))
|
||||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
|
|
@ -1361,7 +1362,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
order = 1;
|
||||
foreach (var profile in retire.RetirementRawProfiles
|
||||
.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.OrderBy(x => string.IsNullOrEmpty(x.root) ? int.MaxValue : rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||
.ThenBy(x => child1Order.ToObject<List<string>>().IndexOf(x.child1 ?? ""))
|
||||
.ThenBy(x => child2Order.ToObject<List<string>>().IndexOf(x.child2 ?? ""))
|
||||
.ThenBy(x => child3Order.ToObject<List<string>>().IndexOf(x.child3 ?? ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue