From 730d1944e3a13c517c77df2b0712df05645a38dd Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 06 一月 2025 16:00:58 +0800
Subject: [PATCH] chartParamList api

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartParamServiceImpl.java |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

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 95fef7c..d03826c 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
@@ -4,19 +4,17 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.iailab.framework.common.page.PageData;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
+import com.iailab.framework.common.util.object.ConvertUtils;
+import com.iailab.module.model.api.mcs.dto.ChartParamDTO;
 import com.iailab.module.model.mpk.dao.ChartParamDao;
-import com.iailab.module.model.mpk.dto.ChartParamDTO;
-import com.iailab.module.model.mpk.entity.ChartEntity;
 import com.iailab.module.model.mpk.entity.ChartParamEntity;
 import com.iailab.module.model.mpk.service.ChartParamService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 
-import java.util.Date;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 /**
  * @description:
@@ -56,6 +54,27 @@
     }
 
     @Override
+    public Map<String, String> getByChartId(String chartId) {
+        Map<String, String> result = new HashMap<>();
+        Map<String, Object> params = new HashMap<String, Object>(1);
+        params.put("chartId", chartId);
+        List<ChartParamEntity> list = baseDao.selectList(getWrapper(params));
+        if (CollectionUtils.isEmpty(list)) {
+            return result;
+        }
+        list.forEach(item -> {
+            result.put(item.getParamCode(), item.getParamValue());
+        });
+        return result;
+    }
+
+    @Override
+    public List<ChartParamDTO> list(String chartCode) {
+        List<ChartParamEntity> list = baseDao.selectList(new QueryWrapper<ChartParamEntity>().eq("chart_code", chartCode));
+        return ConvertUtils.sourceToTarget(list,ChartParamDTO.class);
+    }
+
+    @Override
     public void delete(String id) {
         baseDao.deleteById(id);
     }

--
Gitblit v1.9.3