From dfdbf2d287d46e6690f082ffd013f51af3246775 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 3 Jun 2025 10:55:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[Bug]pgsql=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E5=80=BC=E5=AD=97=E6=AE=B5=E8=B6=85=E8=BF=87?= =?UTF-8?q?5=E4=B8=87=E8=A1=8C=E5=90=8E=EF=BC=8C=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E8=B6=855w=E7=9A=84=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=95=B0=E5=80=BC=E6=A0=BC=E5=BC=8F=E9=83=BD=E6=88=90?= =?UTF-8?q?=E4=BA=86=E6=96=87=E6=9C=AC=E7=B1=BB=E5=9E=8B=E4=BA=86=E3=80=82?= =?UTF-8?q?=20#16128?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ExportCenterDownLoadManage.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterDownLoadManage.java b/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterDownLoadManage.java index dbb3f7d44f..7b213cd00d 100644 --- a/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterDownLoadManage.java +++ b/core/core-backend/src/main/java/io/dataease/exportCenter/manage/ExportCenterDownLoadManage.java @@ -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)); + } + } + } } }