读取“5.2业务中层行政中高层医院奖罚”BUG修复

parent f4ed88dc
...@@ -387,7 +387,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel) ...@@ -387,7 +387,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
// 夜班绩效 从医院奖罚的明细项中获取 // 夜班绩效 从医院奖罚的明细项中获取
var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == resAccount?.UnitType && w.AccountingUnit == dept.AccountingUnit && w.TypeName?.Trim() == "夜班绩效")?.CellValue ?? 0; var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == resAccount?.UnitType && w.AccountingUnit == dept.AccountingUnit && w.TypeName?.Trim() == "夜班绩效")?.CellValue ?? 0;
dept.NightShiftWorkPerforFee = 0; dept.NightShiftWorkPerforFee = nightShift;
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage; dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1; dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
dept.Extra = resAccount?.Extra ?? 0; dept.Extra = resAccount?.Extra ?? 0;
......
...@@ -71,7 +71,7 @@ public static string GetValue(this ICell cell) ...@@ -71,7 +71,7 @@ public static string GetValue(this ICell cell)
case CellType.Numeric: case CellType.Numeric:
return cell?.NumericCellValue.ToString(); return cell?.NumericCellValue.ToString();
case CellType.String: case CellType.String:
return cell?.StringCellValue.ToString(); return cell?.StringCellValue?.ToString() ?? "";
case CellType.Formula: case CellType.Formula:
cell?.SetCellType(CellType.String); cell?.SetCellType(CellType.String);
return cell?.StringCellValue?.ToString(); return cell?.StringCellValue?.ToString();
......
...@@ -39,14 +39,15 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -39,14 +39,15 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var unit = Point.AccountingUnit.First(); var unit = Point.AccountingUnit.First();
//查询除了 核算单元 科室名称 有效数据列头位置 //查询除了 核算单元 科室名称 有效数据列头位置
var vhead = perHeader.Where(t => t.PointCell != unit.UnitTypeNum && t.PointCell != unit.AccountingUnitCellNum && t.PointCell != unit.DeptCellNum).OrderBy(t => t.PointCell); var vhead = perHeader.Where(t => t.PointCell != unit.UnitTypeNum && t.PointCell != unit.AccountingUnitCellNum && t.PointCell != unit.JobCellNum && t.PointCell != unit.EmpNameCellNum).OrderBy(t => t.PointCell);
//var vhead = perHeader.OrderBy(t => t.PointCell);
for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++) for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{ {
var row = sheet.GetRow(r); var row = sheet.GetRow(r);
if (row == null) continue; if (row == null) continue;
for (int c = Point.DataFirstCellNum.Value; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); //var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
......
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