Browse Source

#告警修改

zhongwei
yang_shj 1 year ago
parent
commit
f685f0c8a6
  1. 81
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigDetailServiceImpl.java
  2. 9
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java
  3. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java
  4. 9
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/AlarmMessageSendService.java
  5. 17
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmMessageSendServiceImpl.java

81
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigDetailServiceImpl.java

@ -93,14 +93,37 @@ public class AlarmConfigDetailServiceImpl extends BaseServiceImpl<AlarmConfigDet
*/
private AlarmHandleMarkVo hz3000Marik(Integer type) {
AlarmHandleMarkVo mark = new AlarmHandleMarkVo();
mark.setIsRightTabulation(1);
mark.setIsShowAlert(1);
mark.setIsSmallBell(1);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsPlatformMessage(1);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
mark.setIsRightTabulation(0);
mark.setIsSmallBell(0);
switch (type){
case 2:
mark.setIsShowAlert(0);
mark.setIsMask(1);
mark.setIsBroadcast(0);
mark.setIsPlatformMessage(0);
mark.setIsShortMessage(0);
mark.setIsWxMessage(0);
break;
case 3:
case 5:
mark.setIsShowAlert(1);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsPlatformMessage(1);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
break;
case 13:
case 14:
mark.setIsShowAlert(0);
mark.setIsMask(0);
mark.setIsBroadcast(1);
mark.setIsPlatformMessage(0);
mark.setIsShortMessage(0);
mark.setIsWxMessage(0);
mark.setIsSmallBell(1);
break;
}
return mark;
}
@ -111,14 +134,34 @@ public class AlarmConfigDetailServiceImpl extends BaseServiceImpl<AlarmConfigDet
*/
private AlarmHandleMarkVo levelMark(Integer type) {
AlarmHandleMarkVo mark = new AlarmHandleMarkVo();
mark.setIsRightTabulation(1);
mark.setIsShowAlert(1);
mark.setIsSmallBell(1);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsPlatformMessage(1);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
mark.setIsRightTabulation(0);
mark.setIsPlatformMessage(0);
switch (type){
case 21:
mark.setIsShowAlert(0);
mark.setIsSmallBell(0);
mark.setIsMask(1);
mark.setIsBroadcast(0);
mark.setIsShortMessage(0);
mark.setIsWxMessage(0);
break;
case 22:
mark.setIsShowAlert(1);
mark.setIsSmallBell(0);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
break;
case 23:
mark.setIsShowAlert(1);
mark.setIsSmallBell(1);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
break;
}
return mark;
}
@ -148,14 +191,14 @@ public class AlarmConfigDetailServiceImpl extends BaseServiceImpl<AlarmConfigDet
*/
private AlarmHandleMarkVo earlyMark(Integer type) {
AlarmHandleMarkVo mark = new AlarmHandleMarkVo();
mark.setIsRightTabulation(1);
mark.setIsRightTabulation(0);
mark.setIsShowAlert(1);
mark.setIsSmallBell(1);
mark.setIsMask(1);
mark.setIsBroadcast(1);
mark.setIsPlatformMessage(1);
mark.setIsPlatformMessage(0);
mark.setIsShortMessage(1);
mark.setIsWxMessage(1);
mark.setIsWxMessage(0);
return mark;
}

9
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java

@ -129,15 +129,6 @@ public class AlarmConfigServiceImpl extends BaseServiceImpl<AlarmConfigMapper, A
}
/**
* 获取默认告警配置
* @return
*/
private AlarmHandleMarkVo defaultMark() {
return new AlarmHandleMarkVo();
}
/**
* 是否支持操作
* @param code : 站点编码
* @param source : 告警来源

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java

@ -1,5 +1,6 @@
package com.hnac.hzims.alarm.monitor.listener;
import com.hnac.hzims.alarm.monitor.service.AlarmMessageSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
@ -16,6 +17,9 @@ import org.springframework.stereotype.Component;
public class AlarmListener implements MessageListener {
@Autowired
private AlarmMessageSendService alarmMessageSendService;
@Autowired
private RedisTemplate<Object, Object> redisTemplate;
@Override

9
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/AlarmMessageSendService.java

@ -0,0 +1,9 @@
package com.hnac.hzims.alarm.monitor.service;
/**
* @author ysj
*/
public interface AlarmMessageSendService {
}

17
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmMessageSendServiceImpl.java

@ -0,0 +1,17 @@
package com.hnac.hzims.alarm.monitor.service.impl;
import com.hnac.hzims.alarm.monitor.service.AlarmMessageSendService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class AlarmMessageSendServiceImpl implements AlarmMessageSendService {
}
Loading…
Cancel
Save