Commit 953f9b1d by lcx

提取规则“列头”修改

parent fae1b083
...@@ -49,6 +49,20 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp ...@@ -49,6 +49,20 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
if (exdict.ContainsKey(ExDataDict.IncomeFactor) && exdict[ExDataDict.IncomeFactor] is List<cof_drugtype_factor> factors && factors.Any(t => t.ExModuleId == module.Id)) if (exdict.ContainsKey(ExDataDict.IncomeFactor) && exdict[ExDataDict.IncomeFactor] is List<cof_drugtype_factor> factors && factors.Any(t => t.ExModuleId == module.Id))
{ {
factors = factors.Where(t => t.ExModuleId == module.Id).ToList(); factors = factors.Where(t => t.ExModuleId == module.Id).ToList();
var columnHeader = sheet.GetOrCreate(point.HeaderFirstRowNum.Value);
var excelcolumns = new List<string>();
if (columnHeader != null)
{
excelcolumns = columnHeader.GetCellValues();
if (excelcolumns != null && excelcolumns.Any())
{
excelcolumns.RemoveAll(w => w.Contains("核算单元"));
excelcolumns.Remove("科室名称");
categories = categories.Union(excelcolumns).Distinct();
}
}
// categories = categories.Union(factors.Select(t => t.Charge)).Distinct(); // categories = categories.Union(factors.Select(t => t.Charge)).Distinct();
headers = categories.GroupJoin(factors, inner => new { category = inner.NoBlank() }, outer => new { category = outer.Charge.NoBlank() }, (inner, outer) => new { inner, outer }) headers = categories.GroupJoin(factors, inner => new { category = inner.NoBlank() }, outer => new { category = outer.Charge.NoBlank() }, (inner, outer) => new { inner, outer })
.Select(t => new ExcelHeader .Select(t => new ExcelHeader
......
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