From 7587c74159ce4026baa811f25f306510569ee54a Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期四, 20 三月 2025 17:32:02 +0800
Subject: [PATCH] 数据分析 预警,建议

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSuggestServiceImpl.java |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSuggestServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSuggestServiceImpl.java
index e23aa21..32a5dbb 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSuggestServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSuggestServiceImpl.java
@@ -4,15 +4,21 @@
 import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
 import com.iailab.framework.common.util.object.BeanUtils;
+import com.iailab.framework.common.util.object.ConvertUtils;
+import com.iailab.module.model.api.mcs.dto.ScheduleSuggestReqDTO;
+import com.iailab.module.model.api.mcs.dto.ScheduleSuggestRespDTO;
 import com.iailab.module.model.common.enums.ScheduleSuggestStatusEnum;
 import com.iailab.module.model.mcs.sche.dao.StScheduleSuggestDao;
 import com.iailab.module.model.mcs.sche.entity.StScheduleSuggestEntity;
 import com.iailab.module.model.mcs.sche.service.StScheduleSuggestService;
 import com.iailab.module.model.mcs.sche.vo.StScheduleSuggestPageReqVO;
 import com.iailab.module.model.mcs.sche.vo.StScheduleSuggestSaveReqVO;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 /**
@@ -62,4 +68,26 @@
                 .last("limit " + limit);
         return baseDao.selectList(queryWrapper);
     }
+
+    @Override
+    public void cleanScheduleSuggest(Map<String, Date> tMap) {
+        baseDao.cleanScheduleSuggest(tMap);
+    }
+
+    @Override
+    public List<ScheduleSuggestRespDTO> list(ScheduleSuggestReqDTO vo) {
+        QueryWrapper<StScheduleSuggestEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq(StringUtils.isNotBlank(vo.getScheduleObj()),"schedule_obj", vo.getScheduleObj())
+                .ge(null != vo.getStartTime(),"schedule_time",vo.getStartTime())
+                .le(null != vo.getEndTime(),"schedule_time",vo.getEndTime());
+        return ConvertUtils.sourceToTarget(baseDao.selectList(queryWrapper),ScheduleSuggestRespDTO.class);
+    }
+
+    @Override
+    public List<StScheduleSuggestEntity> getList(List<String> scheduleObjList, Date predictTime) {
+        QueryWrapper<StScheduleSuggestEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("schedule_obj", scheduleObjList);
+        queryWrapper.eq("schedule_time", predictTime);
+        return baseDao.selectList(queryWrapper);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3