Commit 754f20d3 by lcx

Merge branch 'hotfix/提取SQL优先于公式'

parents 527ea30b dc211ac8
......@@ -209,7 +209,7 @@ public int InsertExecute(IEnumerable<TEntity> data)
}
catch
{
return 0;
throw;
}
}
}
......
......@@ -434,7 +434,7 @@ public static void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType
var value = deptData.FirstOrDefault(t => t.TypeName.NoBlank() == column)?.CellValue;
//数据为空,且单元格值不为空,不写入数据(保留原始值)
var notWrite = string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(cell.ToString());
if (cell.CellType != CellType.Formula && !notWrite)
if (!notWrite)
{
cell.SetCellValue<decimal>(value);
if (headers != null && headers.Contains(column))
......@@ -531,7 +531,7 @@ public static void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType
var cell = row.GetOrCreate(cellIndex);
var value = deptData.FirstOrDefault(t => t.TypeName.NoBlank() == column)?.CellValue;
if (cell.CellType != CellType.Formula)
if (!string.IsNullOrEmpty(value) && cell.CellType != CellType.Formula)
{
cell.SetCellValue<decimal>(value);
cell.CellStyle = cellStyle;
......
......@@ -201,12 +201,12 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
{
var cell = row.GetOrCreate(quantityIndex);
if (cell.CellType != CellType.Formula)
{
//if (cell.CellType != CellType.Formula)
//{
cell.SetCellType(CellType.Numeric);
cell.SetCellValue<double>(special.Quantity);
cell.CellStyle = cellStyle;
}
//}
specials.Remove(special);
}
dataFirstRowNum = rowIndex + 1;
......@@ -310,7 +310,7 @@ private void WriteSpecialData(IRow row, ICellStyle style, SpecialDto special, Li
var index = columns.IndexOf(item.Key);
var cell = row.GetOrCreate(index);
if (cell != null && cell.CellType != CellType.Formula)
if (cell != null /*&& cell.CellType != CellType.Formula*/)
{
if (new string[] { SpecialUnitColumns.Department, SpecialUnitColumns.Target }.Contains(item.Key))
cell.SetCellValue(item.Value.Invoke(special)?.ToString());
......
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