1
This commit is contained in:
parent
87b641138d
commit
67b3ae8d17
@ -30,7 +30,7 @@ public class AttendanceArea extends TenantEntity {
|
||||
/**
|
||||
* 摄像机id
|
||||
*/
|
||||
private Long deviceManageId;
|
||||
private String deviceManageId;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
|
@ -9,6 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域区域管理业务对象 attendance_area
|
||||
*
|
||||
@ -29,7 +31,7 @@ public class AttendanceAreaBo extends BaseEntity {
|
||||
/**
|
||||
* 摄像机id
|
||||
*/
|
||||
private Long deviceManageId;
|
||||
private List<Long> deviceManageId;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -89,6 +90,12 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
|
||||
@Override
|
||||
public Boolean insertByBo(AttendanceAreaBo bo) {
|
||||
AttendanceArea add = MapstructUtils.convert(bo, AttendanceArea.class);
|
||||
if (ObjectUtil.isNotEmpty(bo.getDeviceManageId())) {
|
||||
assert add != null;
|
||||
// 将 deviceManageId 集合转换为以逗号分隔的字符串
|
||||
String deviceManageIdsStr = StringUtils.join(bo.getDeviceManageId(), ",");
|
||||
add.setDeviceManageId(deviceManageIdsStr);
|
||||
}
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@ -130,7 +130,7 @@ public class AlarmPushController {
|
||||
sisAlarmEvents.setId(recordId);
|
||||
|
||||
// 转换类型和级别
|
||||
sisAlarmEvents.setType(convertToLong(recordMap.get("Type")));
|
||||
// sisAlarmEvents.setType(convertToLong(recordMap.get("Type")));
|
||||
sisAlarmEvents.setLevel(convertToLong(recordMap.get("Level")));
|
||||
|
||||
// 设备信息
|
||||
|
Loading…
Reference in New Issue
Block a user