fix: [Bug]pgsql 数据集的数值字段超过5万行后,导出的数据超5w的所有数值格式都成了文本类型了。 #16128

This commit is contained in:
taojinlong
2025-06-03 10:55:35 +08:00
committed by taojinlong
parent 12829a64d0
commit dfdbf2d287

View File

@@ -377,7 +377,22 @@ public class ExportCenterDownLoadManage {
if (rowData != null) {
for (int j = 0; j < rowData.size(); j++) {
Cell cell = row.createCell(j);
cell.setCellValue(rowData.get(j));
if (i == 0) {
cell.setCellValue(rowData.get(j));
cell.setCellStyle(cellStyle);
detailsSheet.setColumnWidth(j, 255 * 20);
} else {
if ((allFields.get(j).getDeType().equals(DeTypeConstants.DE_INT) || allFields.get(j).getDeType() == DeTypeConstants.DE_FLOAT) && StringUtils.isNotEmpty(rowData.get(j))) {
try {
cell.setCellValue(Double.valueOf(rowData.get(j)));
} catch (Exception e) {
cell.setCellValue(rowData.get(j));
}
} else {
cell.setCellValue(rowData.get(j));
}
}
}
}
}