From 80730f7599bdfc45a64f2e3d41b221a477501e79 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 29 Oct 2024 15:26:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/chart/util/ChartDataBuild.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java b/core/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java index 309258a8f2..06f79a9e30 100644 --- a/core/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java +++ b/core/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java @@ -1194,7 +1194,12 @@ public class ChartDataBuild { if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5) { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]); } else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3) { - d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP)); + try { + d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP)); + } catch (NumberFormatException e) { + d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]); + } + } } tableRow.add(d);