Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -63,7 +63,7 @@ public class CostReturnPayFeeBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 业主id
|
* 业主id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -233,7 +233,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
|
|||||||
ls.add(bigImg);
|
ls.add(bigImg);
|
||||||
// 生成告警记录
|
// 生成告警记录
|
||||||
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, ls);
|
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) {
|
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);
|
||||||
@@ -277,6 +277,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
|
|||||||
bo.setSolveDeptId(userInfo.getDeptId());
|
bo.setSolveDeptId(userInfo.getDeptId());
|
||||||
bo.setSolvePhone(userInfo.getPhonenumber());
|
bo.setSolvePhone(userInfo.getPhonenumber());
|
||||||
bo.setSolveEmail(userInfo.getEmail());
|
bo.setSolveEmail(userInfo.getEmail());
|
||||||
|
bo.setSmallType(smallType);
|
||||||
bo.setRemark("系统自动指派");
|
bo.setRemark("系统自动指派");
|
||||||
alarmEventsService.taskAssignment(bo);
|
alarmEventsService.taskAssignment(bo);
|
||||||
});
|
});
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user