Commit 7c471021 by lcx

绩效抽取特殊科室清除非公式数据、查询数据时共用同一条sql时,循环模块保存

parent 5bdbb163
...@@ -250,7 +250,6 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool ...@@ -250,7 +250,6 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool
foreach (var typeId in typeIds) foreach (var typeId in typeIds)
{ {
var thisItems = items.Where(t => t.TypeId == typeId).ToList(); var thisItems = items.Where(t => t.TypeId == typeId).ToList();
var modulename = modules.FirstOrDefault(t => t.Id == thisItems.First().ModuleId)?.ModuleName;
ratio += 30m / typeIds.Count(); ratio += 30m / typeIds.Count();
logService.ReturnTheLog(allot.ID, groupName, 3, "", ratio > 50 ? 50 : ratio, 1, isSingle); logService.ReturnTheLog(allot.ID, groupName, 3, "", ratio > 50 ? 50 : ratio, 1, isSingle);
...@@ -266,6 +265,7 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool ...@@ -266,6 +265,7 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool
{ {
thisItems.ForEach(f => thisItems.ForEach(f =>
{ {
var modulename = modules.FirstOrDefault(t => t.Id == f.ModuleId)?.ModuleName;
var result = querydata.Select(t => new ex_result var result = querydata.Select(t => new ex_result
{ {
Department = t.Department, Department = t.Department,
......
...@@ -87,7 +87,7 @@ private void ClearSheetPartialData(ISheet sheet, List<string> columns, int dataF ...@@ -87,7 +87,7 @@ private void ClearSheetPartialData(ISheet sheet, List<string> columns, int dataF
foreach (var cellIndex in dict) foreach (var cellIndex in dict)
{ {
var cell = row.GetCell(cellIndex); var cell = row.GetCell(cellIndex);
if (cell != null) row.RemoveCell(cell); if (cell != null && cell.CellType != CellType.Formula) row.RemoveCell(cell);
} }
} }
} }
......
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