iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java
@@ -52,6 +52,10 @@ @Operation(summary = "获取预警信息列表") List<AlarmMessageRespDTO> listAlarmMessage(@RequestParam Map<String, Object> params); @PostMapping(PREFIX + "/alarm-config/list") @Operation(summary = "获取预警配置列表") List<AlarmConfigRespDTO> listAlarmConfig(@RequestParam Map<String, Object> params); @PostMapping(PREFIX + "/schedule-suggest/create") @Operation(summary = "添加调度建议") Boolean createScheduleSuggest(@RequestBody ScheduleSuggestRespDTO dto); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java
@@ -16,6 +16,7 @@ import com.iailab.module.model.mcs.pre.entity.DmModuleEntity; import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; import com.iailab.module.model.mcs.pre.service.*; import com.iailab.module.model.mcs.pre.service.impl.MmPredictAlarmConfigServiceImpl; import com.iailab.module.model.mdk.vo.ItemVO; import com.iailab.module.model.mpk.service.ChartService; import lombok.extern.slf4j.Slf4j; @@ -65,6 +66,9 @@ @Autowired private PlanItemApi planItemApi; @Autowired private MmPredictAlarmConfigService mmPredictAlarmConfigService; private int HOUR_MINS = 60; @@ -463,6 +467,11 @@ } @Override public List<AlarmConfigRespDTO> listAlarmConfig(Map<String, Object> params) { return mmPredictAlarmConfigService.list(params); } @Override public Boolean createScheduleSuggest(ScheduleSuggestRespDTO dto) { return true; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmConfigService.java
@@ -3,10 +3,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.BaseService; import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigPageReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; import java.util.List; import java.util.Map; /** * @author PanZhibao @@ -24,4 +28,6 @@ void update(MmPredictAlarmConfigSaveReqVO reqVO); void delete(String id); List<AlarmConfigRespDTO> list(Map<String, Object> params); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java
@@ -1,20 +1,24 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; 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.security.core.util.SecurityFrameworkUtils; import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; import com.iailab.module.model.mcs.pre.dao.MmPredictAlarmConfigDao; import com.iailab.module.model.mcs.pre.entity.DmModuleEntity; import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity; import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmMessageEntity; import com.iailab.module.model.mcs.pre.service.MmPredictAlarmConfigService; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigPageReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import java.util.Date; import java.util.UUID; import java.util.*; /** * @author PanZhibao @@ -57,4 +61,11 @@ public void delete(String id) { baseDao.deleteById(id); } @Override public List<AlarmConfigRespDTO> list(Map<String, Object> params) { QueryWrapper<MmPredictAlarmConfigEntity> wrapper = new QueryWrapper<>(); wrapper.eq("is_enable", 1); return BeanUtils.toBean(baseDao.selectList(wrapper), AlarmConfigRespDTO.class); } } iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictAlarmConfigDao.xml
对比新文件 @@ -0,0 +1,19 @@ <?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.mcs.pre.dao.MmPredictAlarmConfigDao"> <select id="getPageList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO"> select t1.*,t2.itemname itemName,t3.tagname outName from t_mm_predict_alarm_config t1 left join t_mm_predict_item t2 on t2.id = t1.item_id left join t_mm_item_output t3 on t3.id = t1.out_id <where> <if test="params.title != null and params.title != ''"> AND t.title LIKE CONCAT('%', #{params.title},'%') </if> <if test="params.alarmObj != null and params.alarmObj != ''"> AND t.alarmObj LIKE CONCAT('%', #{params.alarmObj},'%') </if> </where> </select> </mapper>