From 984cecaa40100ee69e9038082a477e6af5d56aca Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 21 三月 2025 11:27:24 +0800 Subject: [PATCH] ALARM_TITLE --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmMessageService.java | 2 ++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmMessageServiceImpl.java | 11 +++++++++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java | 3 ++- 3 files changed, 15 insertions(+), 1 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 c7ef32f..4c97c0a 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 @@ -439,7 +439,8 @@ String alarmObj = chartParams.get(CommonConstant.ALARM_OBJ); if (StringUtils.isNotBlank(alarmObj)) { - List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime), AlarmMessageRespDTO.class); + String alarmTitle = chartParams.get(CommonConstant.ALARM_TITLE); + List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime, alarmTitle), AlarmMessageRespDTO.class); dataView.setAlarmList(alarmList); if (CollectionUtils.isEmpty(alarmList)) { dataView.setAlarmMessage("暂无预警信息"); diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmMessageService.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmMessageService.java index 5d0e46e..fcf1076 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmMessageService.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/MmPredictAlarmMessageService.java @@ -25,6 +25,8 @@ List<MmPredictAlarmMessageEntity> getList(String alarmObj, Date alarmTime); + List<MmPredictAlarmMessageEntity> getList(String alarmObj, Date alarmTime, String title); + void create(MmPredictAlarmMessageSaveReqVO reqVO); void update(MmPredictAlarmMessageSaveReqVO reqVO); diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmMessageServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmMessageServiceImpl.java index 057965d..486379d 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmMessageServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmMessageServiceImpl.java @@ -9,6 +9,7 @@ import com.iailab.module.model.mcs.pre.service.MmPredictAlarmMessageService; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessagePageReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessageSaveReqVO; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -63,6 +64,16 @@ } @Override + public List<MmPredictAlarmMessageEntity> getList(String alarmObj, Date alarmTime, String title) { + QueryWrapper<MmPredictAlarmMessageEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("alarm_obj", alarmObj) + .eq("alarm_time", alarmTime) + .eq(StringUtils.isNotBlank(title),"title", title); + + return baseDao.selectList(queryWrapper); + } + + @Override public void create(MmPredictAlarmMessageSaveReqVO reqVO) { MmPredictAlarmMessageEntity entity = BeanUtils.toBean(reqVO, MmPredictAlarmMessageEntity.class); entity.setId(UUID.randomUUID().toString()); -- Gitblit v1.9.3