master #12

Merged
lsm merged 7 commits from master into prod 2025-09-15 22:40:47 +08:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit 2b5557c28d - Show all commits

View File

@@ -2,6 +2,7 @@ package org.dromara.sis.domain.bo.alarm;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import org.dromara.sis.domain.enums.EventSmallTypeEnum;
/** /**
* 任务指派参数 * 任务指派参数
@@ -62,4 +63,7 @@ public class AlarmAssignmentBo {
* 任务指派操作人员部门id * 任务指派操作人员部门id
*/ */
private Long modifyDeptId; private Long modifyDeptId;
private EventSmallTypeEnum smallType;
} }

View File

@@ -246,11 +246,11 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
private void handleAlarm(String deviceIp, byte[] img, Integer level, EventSmallTypeEnum smallType, String desc) { private void handleAlarm(String deviceIp, byte[] img, Integer level, EventSmallTypeEnum smallType, String desc) {
// 生成告警记录 // 生成告警记录
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, List.of(img)); SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, List.of(img));
autoAssign(alarmRecord.getId(), deviceIp); autoAssign(alarmRecord.getId(), deviceIp, smallType);
} }
private void autoAssign(Long alarmId, String deviceIp) { private void autoAssign(Long alarmId, String deviceIp, EventSmallTypeEnum smallType) {
SaTokenContextMockUtil.setMockContext(() -> { SaTokenContextMockUtil.setMockContext(() -> {
// 如果当前设备区域存在排班人员,那么惊醒自动指派操作 // 如果当前设备区域存在排班人员,那么惊醒自动指派操作
List<RemoteAttendanceUserGroupVo> userGroupVos = remoteAttendanceService.queryAttendByCurrDateAndDeviceIp(new Date(), deviceIp); List<RemoteAttendanceUserGroupVo> userGroupVos = remoteAttendanceService.queryAttendByCurrDateAndDeviceIp(new Date(), deviceIp);

View File

@@ -330,7 +330,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
log.info("事件处理信息写入完成,result= {}", insert); log.info("事件处理信息写入完成,result= {}", insert);
// 进行消息推送 // 进行消息推送
String title = "视频预警"; String title = "视频预警";
String content = "您有一条" + sisAlarmEvents.getSolveName() + "预警数据"; String content = "您有一条" + bo.getSmallType().getDesc() + "预警数据";
webSocketMessageService.pushMobileMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, title, content, JSONObject.toJSONString(sisAlarmEvents)); webSocketMessageService.pushMobileMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, title, content, JSONObject.toJSONString(sisAlarmEvents));
return true; return true;
} }