Commit 18253a0a by 纪旭 韦

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

parent 1614427e
...@@ -1330,10 +1330,24 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) ...@@ -1330,10 +1330,24 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
};*/ };*/
#endregion #endregion
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && (t.DoctorName != "" || t.PersonnelNumber != ""); 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)); 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 datas = exresultgatherRepository.GetEntities(exp);
......
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