From 66782b7ba787a92b54640cbab0ebd201f0ad9e51 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期四, 09 一月 2025 10:29:25 +0800
Subject: [PATCH] chartParamList

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/ChartParamDao.java                  |    4 ++++
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java |    2 +-
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java  |    7 +++++++
 iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/ChartParamDao.xml                                   |   14 ++++++++++++++
 4 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
index 43c7002..b97d09c 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java
@@ -156,4 +156,11 @@
         PageResult<StAlarmAndSuggestRespVO> page = mcsApi.getAlarmAndSuggestPage(reqVO);
         return success(BeanUtils.toBean(page, StAlarmAndSuggestRespVO.class));
     }
+
+    @GetMapping("/chart/param/list")
+    @Operation(summary = "图表配置列表")
+    public CommonResult<List<ChartParamDTO>> getChartParamList(@RequestParam("chartCode") String chartCode) {
+        List<ChartParamDTO> chartParamList = mcsApi.getChartParamList(chartCode);
+        return CommonResult.success(chartParamList);
+    }
 }
\ No newline at end of file
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/ChartParamDao.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/ChartParamDao.java
index e9b78a7..009aadd 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/ChartParamDao.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/ChartParamDao.java
@@ -4,6 +4,9 @@
 import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
 import com.iailab.module.model.mpk.entity.ChartParamEntity;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * @description:
@@ -14,4 +17,5 @@
 @Mapper
 public interface ChartParamDao extends BaseDao<ChartParamEntity> {
 
+    List<ChartParamEntity> selectChartParamByChartCode(@Param("chartCode") String chartCode);
 }
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java
index d03826c..c0ac2de 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java
@@ -70,7 +70,7 @@
 
     @Override
     public List<ChartParamDTO> list(String chartCode) {
-        List<ChartParamEntity> list = baseDao.selectList(new QueryWrapper<ChartParamEntity>().eq("chart_code", chartCode));
+        List<ChartParamEntity> list = baseDao.selectChartParamByChartCode(chartCode);
         return ConvertUtils.sourceToTarget(list,ChartParamDTO.class);
     }
 
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/ChartParamDao.xml b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/ChartParamDao.xml
new file mode 100644
index 0000000..eb1a720
--- /dev/null
+++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/ChartParamDao.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.iailab.module.model.mpk.dao.ChartParamDao">
+    <select id="selectChartParamByChartCode" resultType="com.iailab.module.model.mpk.entity.ChartParamEntity"
+            parameterType="java.lang.String">
+        SELECT
+            t2.*
+        FROM
+            t_chart t1
+                LEFT JOIN t_chart_param t2 ON t1.id = t2.chart_id
+        WHERE
+            t1.chart_code = #{chartCode}
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3