Commit 18253a0a by 纪旭 韦

手工录入汇总功能增加了如果搜索的是费用则会查询所有数据

parent 1614427e
......@@ -1329,12 +1329,26 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
TotalPages = data.TotalPages
};*/
#endregion
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != "");
if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
{
exp = exp.And(t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != "") && t.Department.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
try
{
Convert.ToDecimal(request.SearchQuery);
exp = t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != "");
}
catch
{
}
}
var datas = exresultgatherRepository.GetEntities(exp);
var result = datas.GroupBy(a => new { a.AllotId,a.Department,a.Source}).Select(t => new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment