Commit 505217c5 by 1391696987

修复手工录入下拉列表类型空值

parent 9aea21de
...@@ -1257,6 +1257,8 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather) ...@@ -1257,6 +1257,8 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
var username = userRepository.GetEntity(t => t.ID == gather.UserId); var username = userRepository.GetEntity(t => t.ID == gather.UserId);
var takeOut = new[] { "核算单元(医技组)", "核算单元(医生组)", "核算单元(护理组)", " ", "" };
if (username.Login == "admin") if (username.Login == "admin")
{ {
var types = new[] { (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.SpecialUnit }; var types = new[] { (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.SpecialUnit };
...@@ -1265,9 +1267,8 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather) ...@@ -1265,9 +1267,8 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
var specials = exspecialRepository.GetEntities(); var specials = exspecialRepository.GetEntities();
var takeOut = new[] { "核算单元(医技组)", "核算单元(医生组)", "核算单元(护理组)" };
var headers = exitemRepository.GetEntities(w => sheets.Select(m => m.Id).Contains(w.ModuleId ?? 0) && !takeOut.Contains(w.ItemName)) ?? new List<ex_item>(); var headers = exitemRepository.GetEntities(w => sheets.Select(m => m.Id).Contains(w.ModuleId ?? 0)) ?? new List<ex_item>();
if (specials != null && specials.Any()) if (specials != null && specials.Any())
{ {
...@@ -1285,7 +1286,7 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather) ...@@ -1285,7 +1286,7 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
var sheetHeads = from sheet in sheets var sheetHeads = from sheet in sheets
join head in headers on sheet.Id equals head.ModuleId join head in headers on sheet.Id equals head.ModuleId
select new { sheet.ModuleName, sheet.SheetType, HeadName = head.ItemName }; select new { sheet.ModuleName, sheet.SheetType, HeadName = head.ItemName };
sheetHeads = sheetHeads.Where(w => !takeOut.Contains(w.HeadName));
result = sheetHeads.GroupBy(t => t.ModuleName).Select(s => new GatherDropResponse result = sheetHeads.GroupBy(t => t.ModuleName).Select(s => new GatherDropResponse
{ {
Value = Regex.Replace(s.Key.Replace(" ", "").Replace(".", ""), "[0-9]", ""), Value = Regex.Replace(s.Key.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
...@@ -1298,7 +1299,7 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather) ...@@ -1298,7 +1299,7 @@ public List<GatherDropResponse> GetGatherDrop(Gather gather)
else else
{ {
var permissions = perforcollectpermissionRepository.GetEntities(w => w.UserId == gather.UserId); var permissions = perforcollectpermissionRepository.GetEntities(w => w.UserId == gather.UserId && !takeOut.Contains(w.HeadName));
result = permissions.GroupBy(t => t.SheetName).Select(s => new GatherDropResponse result = permissions.GroupBy(t => t.SheetName).Select(s => new GatherDropResponse
{ {
......
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