Commit 1e701386 by wyc

其他收入(1.0.1 额外收入) -如果不填就赋空

parent d5087a73
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.XWPF.UserModel;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.Infrastructure; using Performance.Infrastructure;
...@@ -70,6 +71,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -70,6 +71,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var cellValue = ConvertHelper.ToDecimalOrNull(row.GetCell(athead.PointCell).GetValue()); var cellValue = ConvertHelper.ToDecimalOrNull(row.GetCell(athead.PointCell).GetValue());
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
continue; continue;
var cell = sheet.GetRow(unit.FactorRow.Value)?.GetCell(athead.PointCell);
PerData data = new PerData PerData data = new PerData
{ {
RowNumber = r, RowNumber = r,
...@@ -80,7 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -80,7 +82,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
CellValue = cellValue, CellValue = cellValue,
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String, //Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType = unit.UnitType, //手动匹配 UnitType = unit.UnitType, //手动匹配
FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue), //FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
FactorValue = !string.IsNullOrEmpty(cell.GetValue()) ? ConvertHelper.ToDecimalOrNull(cell?.NumericCellValue) : null,
IsFactor = true, IsFactor = true,
}; };
if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department)) if (string.IsNullOrEmpty(data.AccountingUnit) && string.IsNullOrEmpty(data.Department))
......
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