mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix: [Bug]pgsql 数据集的数值字段超过5万行后,导出的数据超5w的所有数值格式都成了文本类型了。 #16128
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user