From ec006caa4a6526558a9767f24abe988baf23babf Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 12 Aug 2024 11:38:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=A1=E7=AE=97=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/chart/manage/ChartViewManege.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java index 0a6b7bcb7d..b5768b8cf6 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java @@ -10,6 +10,7 @@ import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper; import io.dataease.chart.dao.ext.mapper.ExtChartViewMapper; import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField; import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper; +import io.dataease.dataset.manage.DatasetTableFieldManage; import io.dataease.dataset.manage.PermissionManage; import io.dataease.dataset.utils.TableUtils; import io.dataease.engine.constant.ExtFieldConstant; @@ -57,6 +58,9 @@ public class ChartViewManege { @Resource private ExtChartViewMapper extChartViewMapper; + @Resource + private DatasetTableFieldManage datasetTableFieldManage; + private ObjectMapper objectMapper = new ObjectMapper(); @Transactional @@ -111,7 +115,14 @@ public class ChartViewManege { public List listBySceneId(Long sceneId) { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("scene_id", sceneId); - return transChart(coreChartViewMapper.selectList(wrapper)); + List chartViewDTOS = transChart(coreChartViewMapper.selectList(wrapper)); + for (ChartViewDTO dto : chartViewDTOS) { + QueryWrapper wp = new QueryWrapper<>(); + wp.eq("dataset_group_id", dto.getTableId()); + List coreDatasetTableFields = coreDatasetTableFieldMapper.selectList(wp); + dto.setCalParams(Utils.getParams(datasetTableFieldManage.transDTO(coreDatasetTableFields))); + } + return chartViewDTOS; } public List transChart(List list) {