1
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 12m20s
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 12m20s
This commit is contained in:
@@ -37,7 +37,7 @@ public enum EventSmallTypeEnum {
|
||||
EQP_REPORT_SBSB(1025, "报警设备上报"),
|
||||
BLACK_PERSON(1026, "黑名单人员"),
|
||||
AUTHORIZATION_EXPIRED(1027, "门禁授权已过期"),
|
||||
ILLEGAL_PARKING(1028,"非法停车"),
|
||||
ILLEGAL_PARKING(1028, "非法停车"),
|
||||
/* -----------------------系统报警相关-------------------------------------*/
|
||||
SYS_REPORT_WLGZ(2001, "网络连接故障"),
|
||||
SYS_REPORT_DLYC(2002, "用户登录异常"),
|
||||
@@ -56,7 +56,7 @@ public enum EventSmallTypeEnum {
|
||||
|
||||
OUTHER_REPORT_FKWFJR(5001, "访客无法进入"),
|
||||
|
||||
|
||||
UNKNOWN_TYPE(-1000, "未知事件类型")
|
||||
;
|
||||
|
||||
/**
|
||||
@@ -73,4 +73,15 @@ public enum EventSmallTypeEnum {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static EventSmallTypeEnum getEventType(Integer code) {
|
||||
EventSmallTypeEnum[] values = EventSmallTypeEnum.values();
|
||||
for (EventSmallTypeEnum value : values) {
|
||||
if(code.equals(value.code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return UNKNOWN_TYPE;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -330,7 +330,9 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
log.info("事件处理信息写入完成,result= {}", insert);
|
||||
// 进行消息推送
|
||||
String title = "视频预警";
|
||||
String content = "您有一条" + bo.getSmallType().getDesc() + "预警数据";
|
||||
// 获取时间小类
|
||||
EventSmallTypeEnum eventSmallTypeEnum = EventSmallTypeEnum.getEventType(sisAlarmEvents.getSmallType());
|
||||
String content = "您有一条" + eventSmallTypeEnum.getDesc() + "预警数据";
|
||||
webSocketMessageService.pushMobileMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, title, content, JSONObject.toJSONString(sisAlarmEvents));
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user