From f3de04db06bae67537d093017e28863ee685f8a3 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 03 一月 2025 13:36:38 +0800
Subject: [PATCH] 修改dynamicSettings为空异常

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartServiceImpl.java |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartServiceImpl.java
index 4c68120..ac0b631 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ChartServiceImpl.java
@@ -5,20 +5,18 @@
 import com.iailab.framework.common.page.PageData;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
 import com.iailab.module.model.mpk.dao.ChartDao;
-import com.iailab.module.model.mpk.dao.ChartParamDao;
 import com.iailab.module.model.mpk.dto.ChartDTO;
-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 com.iailab.module.model.mpk.service.ChartService;
 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:
@@ -28,6 +26,9 @@
 @Slf4j
 @Service
 public class ChartServiceImpl extends BaseServiceImpl<ChartDao, ChartEntity> implements ChartService {
+
+    @Autowired
+    private ChartParamService chartParamService;
 
     @Override
     public PageData<ChartDTO> page(Map<String, Object> params) {
@@ -71,4 +72,16 @@
                 .like(StringUtils.isNotBlank(chartCode), "chart_code", chartCode);
         return wrapper;
     }
+
+    @Override
+    public Map<String, String> getByChartCode(String chartCode) {
+        Map<String, String> result = new HashMap<>();
+        QueryWrapper<ChartEntity> wrapper = new QueryWrapper<>();
+        wrapper.eq("chart_code", chartCode);
+        ChartEntity entity = baseDao.selectOne(wrapper);
+        if (entity == null) {
+            return result;
+        }
+        return chartParamService.getByChartId(entity.getId());
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3