Commit 9bf85042 by 1391696987

手工录入通过和失败搜索

parent c91e04e9
...@@ -1406,7 +1406,6 @@ public GatherInfo GetGather(Gather gather) ...@@ -1406,7 +1406,6 @@ public GatherInfo GetGather(Gather gather)
if (gather != null && !string.IsNullOrEmpty(gather.SearchQuery)) if (gather != null && !string.IsNullOrEmpty(gather.SearchQuery))
exp = exp.And(t => t.DoctorName.Contains(gather.SearchQuery) || t.PersonnelNumber.Contains(gather.SearchQuery)); exp = exp.And(t => t.DoctorName.Contains(gather.SearchQuery) || t.PersonnelNumber.Contains(gather.SearchQuery));
var datas = exresultgatherRepository.GetEntities(exp).OrderByDescending(t=>t.CreateTime); var datas = exresultgatherRepository.GetEntities(exp).OrderByDescending(t=>t.CreateTime);
var result = datas.Select(t => new GatherInfoRequest var result = datas.Select(t => new GatherInfoRequest
...@@ -1457,6 +1456,8 @@ public GatherResponse GetGatherTotal(Gather gather) ...@@ -1457,6 +1456,8 @@ public GatherResponse GetGatherTotal(Gather gather)
} }
var datas = exresultgatherRepository.GetEntities(exp) var datas = exresultgatherRepository.GetEntities(exp)
.GroupBy(t => new { t.Department, t.Source, t.Category, t.Submitter }) .GroupBy(t => new { t.Department, t.Source, t.Category, t.Submitter })
.Select(s => new .Select(s => new
...@@ -1472,9 +1473,14 @@ public GatherResponse GetGatherTotal(Gather gather) ...@@ -1472,9 +1473,14 @@ public GatherResponse GetGatherTotal(Gather gather)
: s.Count() == s.Where(w => w.States == (int)AuditGather.已通过).Count() ? "已通过" : s.Count() == s.Where(w => w.States == (int)AuditGather.已通过).Count() ? "已通过"
: s.Count() == s.Where(w => w.States == (int)AuditGather.未审核).Count() ? "未审核" : "未知", : s.Count() == s.Where(w => w.States == (int)AuditGather.未审核).Count() ? "未审核" : "未知",
Remark = s.FirstOrDefault()?.Remark, Remark = s.FirstOrDefault()?.Remark,
}).OrderByDescending(t=>t.CreateTime); });
if (gather.Status == "失败")
datas = datas.Where(w => w.States == "未通过");
if (gather.Status == "通过")
datas = datas.Where(w => w.States == "已通过");
var ser = JsonConvert.SerializeObject(datas); var ser = JsonConvert.SerializeObject(datas.OrderByDescending(t => t.CreateTime));
var rows = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(ser); var rows = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(ser);
var data = new List<Dictionary<string, object>>(); var data = new List<Dictionary<string, object>>();
......
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