From f1fe397df175a7ee809ea28530419116af84af28 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期二, 31 十二月 2024 17:32:45 +0800
Subject: [PATCH] t_mm_item_result 索引优化

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java
index b5abf3a..2234502 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java
@@ -21,6 +21,7 @@
 import com.iailab.module.model.mcs.sche.entity.StScheduleSuggestEntity;
 import com.iailab.module.model.mcs.sche.service.StScheduleSchemeService;
 import com.iailab.module.model.mcs.sche.service.StScheduleSuggestService;
+import com.iailab.module.model.mcs.sche.vo.StScheduleSuggestSaveReqVO;
 import com.iailab.module.model.mdk.vo.ItemVO;
 import com.iailab.module.model.mpk.service.ChartService;
 import lombok.extern.slf4j.Slf4j;
@@ -335,7 +336,11 @@
         dataView.setRangeL(rangeL);
         dataView.setLimitH(limitH);
         dataView.setLimitL(limitL);
-        dataView.setRealData(getHisData(outPut.getPointid(), startTime, endTime, timeFormat));
+        if (StringUtils.isNotBlank(outPut.getPointid())) {
+            dataView.setRealData(getHisData(outPut.getPointid(), startTime, endTime, timeFormat));
+        } else {
+            dataView.setRealData(new ArrayList<>());
+        }
         dataView.setCurData(mmItemResultJsonService.getData(outPut.getId(), predictTime, timeFormat));
         switch (lineType) {
             case TN:
@@ -519,6 +524,7 @@
 
     @Override
     public Boolean createScheduleSuggest(ScheduleSuggestRespDTO dto) {
+        stScheduleSuggestService.create(ConvertUtils.sourceToTarget(dto, StScheduleSuggestSaveReqVO.class));
         return true;
     }
 
@@ -544,7 +550,10 @@
     }
 
     @Override
-    public List<StScheduleSchemeDTO> listScheduleScheme(Map<String, Object> params) {
+    public List<StScheduleSchemeDTO> listScheduleScheme(String triggerMethod, String triggerCondition) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("triggerMethod", triggerMethod);
+        params.put("triggerCondition", triggerCondition);
         return stScheduleSchemeService.list(params);
     }
 

--
Gitblit v1.9.3