From 5054d5cfcfd614c9ea757e617076622efd842a63 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 16 Dec 2025 14:44:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=A0=86=E5=8F=A0=E6=9D=A1=E5=BD=A2=E5=9B=BE=EF=BC=8C=E5=BD=93?= =?UTF-8?q?=E5=A0=86=E5=8F=A0=E9=A1=B9/=E7=BB=B4=E5=BA=A6=E6=98=AF?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E6=97=B6=EF=BC=8C=E4=B8=8B=E9=92=BB=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/chart/utils/ChartDataBuild.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java b/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java index c533be1934..195ed085e5 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java +++ b/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java @@ -1311,7 +1311,8 @@ public class ChartDataBuild { if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5 || chartViewFieldDTO.getDeType() == 7) { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]); } else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3 || chartViewFieldDTO.getDeType() == 4) { - if (view.getIsExcelExport()) { + // 如果是在维度中展示,导出excel时展示为字符串,其它情况展示为数值类型 + if (view.getIsExcelExport() || StringUtils.equalsIgnoreCase(chartViewFieldDTO.getGroupType(), "d")) { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]); } else { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP));