Merge pull request #12311 from dataease/pr@dev2@fixds

fix: 下载视图原始数据时,不计算聚合字段
This commit is contained in:
taojinlong 2024-09-19 20:04:53 +08:00 committed by GitHub
commit 248aedef2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,11 +89,12 @@ public class TableInfoHandler extends DefaultChartHandler {
if(view.getIsExcelExport()){ if(view.getIsExcelExport()){
for (int i = 0; i < xAxis.size(); i++) { for (int i = 0; i < xAxis.size(); i++) {
ChartViewFieldDTO fieldDTO = null; ChartViewFieldDTO fieldDTO = null;
for (int i1 = 0; i1 < allFields.size(); i1++) { for (ChartViewFieldDTO allField : allFields) {
if (allFields.get(i1).getId().equals(xAxis.get(i).getId())) { if (allField.getId().equals(xAxis.get(i).getId())) {
fieldDTO = allFields.get(i1); fieldDTO = allField;
} }
} }
assert fieldDTO != null;
if (fieldDTO.isAgg()) { if (fieldDTO.isAgg()) {
sqlMeta.getXFields().get(i).setFieldName("'-'"); sqlMeta.getXFields().get(i).setFieldName("'-'");
} }