From 33b7c4165011c0a0b569ac7f2a6ed5fa85e6a6de Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 19 Sep 2024 20:04:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E8=BD=BD=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=81=9A=E5=90=88=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/chart/charts/impl/table/TableInfoHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/table/TableInfoHandler.java b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/table/TableInfoHandler.java index ec7817f577..12bd57256f 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/table/TableInfoHandler.java +++ b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/table/TableInfoHandler.java @@ -89,11 +89,12 @@ public class TableInfoHandler extends DefaultChartHandler { if(view.getIsExcelExport()){ for (int i = 0; i < xAxis.size(); i++) { ChartViewFieldDTO fieldDTO = null; - for (int i1 = 0; i1 < allFields.size(); i1++) { - if (allFields.get(i1).getId().equals(xAxis.get(i).getId())) { - fieldDTO = allFields.get(i1); + for (ChartViewFieldDTO allField : allFields) { + if (allField.getId().equals(xAxis.get(i).getId())) { + fieldDTO = allField; } } + assert fieldDTO != null; if (fieldDTO.isAgg()) { sqlMeta.getXFields().get(i).setFieldName("'-'"); }