Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-09-15 22:38:43 +08:00
4 changed files with 10 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ public class CostReturnPayFeeBo extends BaseEntity {
/**
* 业主id
*/
@NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
// @NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
private Long userId;
/**

View File

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

View File

@@ -233,7 +233,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
ls.add(bigImg);
// 生成告警记录
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, ls);
autoAssign(alarmRecord.getId(), deviceIp);
autoAssign(alarmRecord.getId(), deviceIp, smallType);
}
/**
@@ -246,11 +246,11 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
private void handleAlarm(String deviceIp, byte[] img, Integer level, EventSmallTypeEnum smallType, String desc) {
// 生成告警记录
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(() -> {
// 如果当前设备区域存在排班人员,那么惊醒自动指派操作
List<RemoteAttendanceUserGroupVo> userGroupVos = remoteAttendanceService.queryAttendByCurrDateAndDeviceIp(new Date(), deviceIp);
@@ -277,6 +277,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
bo.setSolveDeptId(userInfo.getDeptId());
bo.setSolvePhone(userInfo.getPhonenumber());
bo.setSolveEmail(userInfo.getEmail());
bo.setSmallType(smallType);
bo.setRemark("系统自动指派");
alarmEventsService.taskAssignment(bo);
});

View File

@@ -330,7 +330,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
log.info("事件处理信息写入完成,result= {}", insert);
// 进行消息推送
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));
return true;
}