Commit 3fdd62b3 by lcx

补充数据

parent 7e963c28
...@@ -1426,6 +1426,31 @@ private void SupplySpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<e ...@@ -1426,6 +1426,31 @@ private void SupplySpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<e
} }
} }
private void WriteSpecialCellValue(Dictionary<string, Func<ex_special, List<im_specialunit>, object>> dictionary, IRow row, List<ICell> cellList, ex_special special, List<im_specialunit> allotDataList, List<NewExtractDto> extractdata)
{
foreach (var cell in cellList)
{
object value = null;
if (dictionary.ContainsKey(cell.StringCellValue))
{
var item = dictionary.First(t => t.Key == cell.StringCellValue);
value = item.Value.Invoke(special, allotDataList) ?? "";
}
if (cell.StringCellValue == "数量" && special?.TypeId > 0)
{
value = extractdata?.FirstOrDefault(t => t.Category == special.Target)?.Value;
}
var newCell = row.CreateCell(cellList.IndexOf(cell));
//newCell.SetCellValue(Verify(value));
OutToExcelCell(newCell, value);
if (dictionary.ContainsKey(cell.StringCellValue) || (cell.StringCellValue == "数量" && !string.IsNullOrEmpty(value?.ToString())))
newCell.CellStyle = style;
}
}
private readonly Func<ISheet, int?, List<CellRangeAddressAndValue>> mergefunc = (sheet, beginrow) => private readonly Func<ISheet, int?, List<CellRangeAddressAndValue>> mergefunc = (sheet, beginrow) =>
{ {
var merges = new List<CellRangeAddressAndValue>(); var merges = new List<CellRangeAddressAndValue>();
......
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