Add remaining fields for query
This commit is contained in:
@@ -73,6 +73,7 @@ namespace LeafWeb.WebCms.Utility
|
||||
select li;
|
||||
}
|
||||
|
||||
|
||||
// co2s
|
||||
if (!string.IsNullOrEmpty(query.co2s))
|
||||
{
|
||||
@@ -90,6 +91,58 @@ namespace LeafWeb.WebCms.Utility
|
||||
select li;
|
||||
}
|
||||
|
||||
|
||||
// pari
|
||||
if (!string.IsNullOrEmpty(query.pari))
|
||||
{
|
||||
var p = double.Parse(query.pari);
|
||||
|
||||
resultItems =
|
||||
from li in resultItems
|
||||
where
|
||||
// maximum range inside LeafInputFiles
|
||||
li.LeafInputData.Max(lid =>
|
||||
// range of LeafInputData
|
||||
lid.Data.Max(d => d.PARi)
|
||||
- lid.Data.Min(d => d.PARi))
|
||||
>= p
|
||||
select li;
|
||||
}
|
||||
|
||||
// tleaf
|
||||
if (!string.IsNullOrEmpty(query.tleaf))
|
||||
{
|
||||
var p = double.Parse(query.tleaf);
|
||||
|
||||
resultItems =
|
||||
from li in resultItems
|
||||
where
|
||||
// maximum range inside LeafInputFiles
|
||||
li.LeafInputData.Max(lid =>
|
||||
// range of LeafInputData
|
||||
lid.Data.Max(d => d.Tleaf)
|
||||
- lid.Data.Min(d => d.Tleaf))
|
||||
>= p
|
||||
select li;
|
||||
}
|
||||
|
||||
// phips2
|
||||
if (!string.IsNullOrEmpty(query.phips2))
|
||||
{
|
||||
var p = double.Parse(query.phips2);
|
||||
|
||||
resultItems =
|
||||
from li in resultItems
|
||||
where
|
||||
// maximum range inside LeafInputFiles
|
||||
li.LeafInputData.Max(lid =>
|
||||
// range of LeafInputData
|
||||
lid.Data.Max(d => d.PhiPS2)
|
||||
- lid.Data.Min(d => d.PhiPS2))
|
||||
>= p
|
||||
select li;
|
||||
}
|
||||
|
||||
return resultItems;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user