Commit a0715198 by lcx

核算单元取值(num,string混乱)生成错误

parent 5c9af07b
...@@ -286,6 +286,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -286,6 +286,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医生组 }, new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医生组 },
new { AccountUnitType = AccountUnitType.护士长, UnitType = UnitType.护理组 }, new { AccountUnitType = AccountUnitType.护士长, UnitType = UnitType.护理组 },
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医技组 }, new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医技组 },
new { AccountUnitType = AccountUnitType.Null, UnitType = UnitType.其他 },
}; };
//取出科室 //取出科室
List<res_account> dataList = new List<res_account>(); List<res_account> dataList = new List<res_account>();
......
...@@ -19,11 +19,11 @@ public static string GetCellStringValue(ICell cell) ...@@ -19,11 +19,11 @@ public static string GetCellStringValue(ICell cell)
switch (cell.CellType) switch (cell.CellType)
{ {
case CellType.Numeric: case CellType.Numeric:
return cell.NumericCellValue.ToString(); return cell.NumericCellValue.ToString().Replace("0", "");
case CellType.String: case CellType.String:
return cell.StringCellValue.ToString(); return cell.StringCellValue.ToString().Replace("0", "");
case CellType.Formula: case CellType.Formula:
return cell.NumericCellValue.ToString(); return cell.NumericCellValue.ToString().Replace("0", "");
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -75,8 +75,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -75,8 +75,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)),
Department = row.GetCell(unit.DeptCellNum.Value)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
......
...@@ -54,9 +54,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -54,9 +54,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元分类").PointCell)?.StringCellValue, UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元分类").PointCell)?.StringCellValue,
AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)),
Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)),
PersonnelNumber = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员工号").PointCell)?.StringCellValue, PersonnelNumber = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员工号").PointCell)),
DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue, DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue,
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue, JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue,
Basics = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础绩效系数").PointCell)?.NumericCellValue), Basics = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础绩效系数").PointCell)?.NumericCellValue),
......
...@@ -56,8 +56,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -56,8 +56,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc(); PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc();
unifyUnit.RowNumber = r; unifyUnit.RowNumber = r;
unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.StringCellValue; unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.StringCellValue;
unifyUnit.AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue; unifyUnit.AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell));
unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell)?.StringCellValue; unifyUnit.Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell));
unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue); unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue);
unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.NumericCellValue); unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.NumericCellValue);
unifyUnit.Number = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元人员数量").PointCell)?.NumericCellValue); unifyUnit.Number = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元人员数量").PointCell)?.NumericCellValue);
......
...@@ -53,20 +53,22 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -53,20 +53,22 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)),
Department = row.GetCell(unit.DeptCellNum.Value)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType = row.GetCell(0).ToString(), UnitType = row.GetCell(0)?.ToString(),
FactorValue = 0, FactorValue = 0,
IsFactor = false, IsFactor = false,
}; };
if (sheet.SheetName.Contains("医生组")) if (sheet.SheetName.Contains("医生组"))
data.UnitType = "医生组"; data.UnitType = "医生组";
else if (sheet.SheetName.Contains("护理组")) else if (sheet.SheetName.Contains("护理组"))
data.UnitType = "护理组"; data.UnitType = "护理组";
if (!string.IsNullOrEmpty(data.UnitType))
dataList.Add(data); dataList.Add(data);
} }
} }
......
...@@ -55,9 +55,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -55,9 +55,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
PerDataEmployee employee = new PerDataEmployee PerDataEmployee employee = new PerDataEmployee
{ {
RowNumber = r, RowNumber = r,
AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)),
Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)),
PersonnelNumber = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员工号").PointCell)?.StringCellValue, PersonnelNumber = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员工号").PointCell)),
DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue, DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue,
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue, JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue,
FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.StringCellValue, FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.StringCellValue,
......
...@@ -78,8 +78,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -78,8 +78,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)),
Department = row.GetCell(unit.DeptCellNum.Value)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
...@@ -90,6 +90,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -90,6 +90,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var lastcell = vhead.OrderByDescending(t => t.PointCell).First(); var lastcell = vhead.OrderByDescending(t => t.PointCell).First();
if (lastcell.CellValue.Contains("备注")) if (lastcell.CellValue.Contains("备注"))
data.Remark = row.GetCell(lastcell.PointCell)?.StringCellValue; data.Remark = row.GetCell(lastcell.PointCell)?.StringCellValue;
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
continue;
dataList.Add(data); dataList.Add(data);
} }
} }
......
...@@ -82,6 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -82,6 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue), FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
IsFactor = true, IsFactor = true,
}; };
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
continue;
dataList.Add(data); dataList.Add(data);
} }
} }
......
...@@ -73,8 +73,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -73,8 +73,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)),
Department = row.GetCell(unit.DeptCellNum.Value)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
...@@ -82,6 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -82,6 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue), FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
IsFactor = true, IsFactor = true,
}; };
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
continue;
dataList.Add(data); dataList.Add(data);
} }
} }
......
...@@ -57,7 +57,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -57,7 +57,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell)?.NumericCellValue), QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell)?.NumericCellValue),
}; };
var cell = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell);//?.ToString(); var cell = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell);//?.ToString();
var accountingUnit = cell?.StringCellValue; var accountingUnit = NopiSevice.GetCellStringValue(cell);
if (cell != null && IsMergeCell(cell, out Point start, out Point end) && r != start.X) if (cell != null && IsMergeCell(cell, out Point start, out Point end) && r != start.X)
{ {
row = sheet.GetRow(start.X); row = sheet.GetRow(start.X);
......
...@@ -54,8 +54,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -54,8 +54,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.StringCellValue, AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(unit.AccountingUnitCellNum.Value)),
Department = row.GetCell(unit.DeptCellNum.Value)?.StringCellValue, Department = NopiSevice.GetCellStringValue(row.GetCell(unit.DeptCellNum.Value)),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
...@@ -68,6 +68,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -68,6 +68,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
else if (sheet.SheetName.Contains("护理组")) else if (sheet.SheetName.Contains("护理组"))
data.UnitType = "护理组"; data.UnitType = "护理组";
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
continue;
dataList.Add(data); dataList.Add(data);
} }
} }
......
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