Browse Source

#新版告警修改

zhongwei
yang_shj 4 months ago
parent
commit
4aff400b38
  1. 2
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java
  2. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java
  3. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java
  4. 13
      hzims-service/hzims-alarm/src/main/resources/dict/dict.sql
  5. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

2
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java

@ -69,4 +69,6 @@ public interface AlarmConstants {
String FDP_INVALID_STATUS = "1.0";
String FDP_INVALID_ZOME_STATUS = "1";
List<Integer> WHOLE_ALARM_TYPE = Arrays.asList(AlarmConstants.WARNING,AlarmConstants.FAULT,AlarmConstants.OFFSIDE,AlarmConstants.INTERRUPT,AlarmConstants.ABNORMAL,AlarmConstants.EARLY,AlarmConstants.START,AlarmConstants.STOP);
}

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

@ -245,7 +245,7 @@ public class AlarmServiceImpl extends ServiceImpl<AlarmMapper, AlarmEntity> impl
// 条件过滤
QueryWrapper<AlarmEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(AlarmEntity::getStationId,stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
queryWrapper.lambda().in(AlarmEntity::getAlarmType, Arrays.asList(AlarmConstants.WARNING,AlarmConstants.FAULT,AlarmConstants.OFFSIDE,AlarmConstants.INTERRUPT,AlarmConstants.ABNORMAL,AlarmConstants.EARLY,AlarmConstants.START,AlarmConstants.STOP));
queryWrapper.lambda().in(AlarmEntity::getAlarmType, AlarmConstants.WHOLE_ALARM_TYPE);
queryWrapper.lambda().eq(AlarmEntity::getIsRightTabulation,0);
queryWrapper.lambda().ge(AlarmEntity::getAlarmTime, DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 00:00:00");
queryWrapper.lambda().le(AlarmEntity::getAlarmTime,DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME));

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.alarm.source.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.alarm.source.service.MessageService;
import com.hnac.hzims.alarm.ws.alart.AlarmSessionManager;
@ -70,6 +71,9 @@ public class MessageServiceImpl implements MessageService {
*/
@Override
public void webRightMessage(AlarmEntity alarm) {
if(!AlarmConstants.WHOLE_ALARM_TYPE.contains(alarm.getAlarmType())){
return;
}
if(CollectionUtil.isEmpty(AlarmSessionManager.SESSION_POOL)){
return;
}

13
hzims-service/hzims-alarm/src/main/resources/dict/dict.sql

@ -55,4 +55,15 @@ insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_
insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) values (1651150112910594050, 1651149948657455106, 'alarm_handle_type', '3', '缺陷', 3, '', 0, 0, 0, -1, 'hzims-alarm');
insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) values (1651150146049789954, 1651149948657455106, 'alarm_handle_type', '4', '检修', 4, '', 0, 0, 0, -1, 'hzims-alarm');
insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) values (1651150182032723969, 1651149948657455106, 'alarm_handle_type', '5', '处理', 5, '', 0, 0, 0, -1, 'hzims-alarm');
insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) values (1651150182032756242, 1651149948657455106, 'alarm_handle_type', '6', '处理完成', 5, '', 0, 0, 0, -1, 'hzims-alarm');
insert into `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) values (1651150182032756242, 1651149948657455106, 'alarm_handle_type', '6', '处理完成', 5, '', 0, 0, 0, -1, 'hzims-alarm');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106981, 1658763247160922117, 'WHOLE_ALARM_TYPE', '2', '告警', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106982, 1658763247160922117, 'WHOLE_ALARM_TYPE', '3', '故障', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106983, 1658763247160922117, 'WHOLE_ALARM_TYPE', '5', '遥测越限', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106984, 1658763247160922117, 'WHOLE_ALARM_TYPE', '13', '通讯中断', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106985, 1658763247160922117, 'WHOLE_ALARM_TYPE', '14', '数据异常', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106986, 1658763247160922117, 'WHOLE_ALARM_TYPE', '60', '开机告警', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106987, 1658763247160922117, 'WHOLE_ALARM_TYPE', '61', '关机告警', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');
INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1658763247160106988, 1658763247160922117, 'WHOLE_ALARM_TYPE', '30', '智能预警', 0, '', 0, 0, 1, -1, 'HZIMS-ALARM');

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -819,6 +819,9 @@ public class StationServiceImpl extends ServiceImpl<StationMapper, StationEntity
if (StringUtil.isNotBlank(entity.getName())) {
like(StationEntity::getName, "%".concat(entity.getName()).concat("%"));
}
if (ObjectUtil.isNotEmpty(entity.getServeType())) {
eq(StationEntity::getServeType, entity.getServeType());
}
if (ObjectUtil.isNotEmpty(entity.getType())) {
eq(StationEntity::getType, entity.getType());
}

Loading…
Cancel
Save