forked from dyf/fys-Multi-tenant
电子围栏
This commit is contained in:
@ -0,0 +1,78 @@
|
||||
package com.fuyuanshen.equipment.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 围栏进出记录对象 device_fence_access_record
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("device_fence_access_record")
|
||||
public class DeviceFenceAccessRecord extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Long fenceId;
|
||||
|
||||
/**
|
||||
* 设备标识
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 定位精度
|
||||
*/
|
||||
private Long accuracy;
|
||||
|
||||
/**
|
||||
* 事件时间
|
||||
*/
|
||||
private Date eventTime;
|
||||
|
||||
/**
|
||||
* 记录创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.fuyuanshen.equipment.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 电子围栏对象 device_geo_fence
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("device_geo_fence")
|
||||
public class DeviceGeoFence extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 围栏唯一标识
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 围栏描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 围栏区域类型, 0 POLYGON, 1 CIRCLE
|
||||
*/
|
||||
private Long areaType;
|
||||
|
||||
/**
|
||||
* 围栏坐标数据
|
||||
*/
|
||||
private String coordinates;
|
||||
|
||||
/**
|
||||
* 圆形围栏半径(米)
|
||||
*/
|
||||
private Long radius;
|
||||
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
private Long isActive;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.fuyuanshen.equipment.domain.DeviceChargeDischarge;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
@ -44,13 +45,25 @@ public class DeviceChargeDischargeBo extends BaseEntity {
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
// 添加字符串类型的setter方法来处理前端传递的字符串日期
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = DateUtil.parseDate(startTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
// 添加字符串类型的setter方法来处理前端传递的字符串日期
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = DateUtil.parseDate(endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 起始电量百分比(0-100)
|
||||
*/
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
package com.fuyuanshen.equipment.domain.bo;
|
||||
|
||||
import com.fuyuanshen.common.core.validate.AddGroup;
|
||||
import com.fuyuanshen.common.core.validate.EditGroup;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fuyuanshen.equipment.domain.DeviceFenceAccessRecord;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 围栏进出记录业务对象 device_fence_access_record
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = DeviceFenceAccessRecord.class, reverseConvertGenerate = false)
|
||||
public class DeviceFenceAccessRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@NotNull(message = "记录ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
@NotNull(message = "围栏ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long fenceId;
|
||||
|
||||
/**
|
||||
* 设备标识
|
||||
*/
|
||||
@NotBlank(message = "设备标识不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
@NotNull(message = "事件类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@NotNull(message = "纬度不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@NotNull(message = "经度不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 定位精度
|
||||
*/
|
||||
private Long accuracy;
|
||||
|
||||
/**
|
||||
* 事件时间
|
||||
*/
|
||||
@NotNull(message = "事件时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date eventTime;
|
||||
|
||||
/**
|
||||
* 记录创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.fuyuanshen.equipment.domain.bo;
|
||||
|
||||
import com.fuyuanshen.common.core.validate.AddGroup;
|
||||
import com.fuyuanshen.common.core.validate.EditGroup;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import com.fuyuanshen.equipment.domain.DeviceGeoFence;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 电子围栏业务对象 device_geo_fence
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = DeviceGeoFence.class, reverseConvertGenerate = false)
|
||||
public class DeviceGeoFenceBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 围栏唯一标识
|
||||
*/
|
||||
@NotNull(message = "围栏唯一标识不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
@NotBlank(message = "围栏名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 围栏描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 围栏区域类型, 0 POLYGON, 1 CIRCLE
|
||||
*/
|
||||
@NotNull(message = "围栏区域类型, 0 POLYGON, 1 CIRCLE不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long areaType;
|
||||
|
||||
/**
|
||||
* 围栏坐标数据
|
||||
*/
|
||||
@NotBlank(message = "围栏坐标数据不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String coordinates;
|
||||
|
||||
/**
|
||||
* 圆形围栏半径(米)
|
||||
*/
|
||||
private Long radius;
|
||||
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
private Long isActive;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.fuyuanshen.equipment.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 围栏位置检查响应结果
|
||||
*
|
||||
* @author: 默苍璃
|
||||
* @date: 2025-09-1110:11
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class FenceCheckResponse {
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 检查时间
|
||||
*/
|
||||
private Long checkTime;
|
||||
|
||||
/**
|
||||
* 进入围栏列表
|
||||
*/
|
||||
private List<FenceInfo> enteredFences;
|
||||
|
||||
/**
|
||||
* 离开围栏列表
|
||||
*/
|
||||
private List<FenceInfo> exitedFences;
|
||||
|
||||
/**
|
||||
* 当前所在围栏列表
|
||||
*/
|
||||
private List<FenceInfo> currentFences;
|
||||
|
||||
/**
|
||||
* 围栏信息
|
||||
*/
|
||||
@Data
|
||||
public static class FenceInfo {
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
private Long fenceId;
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
private String fenceName;
|
||||
|
||||
/**
|
||||
* 围栏类型
|
||||
*/
|
||||
private Integer fenceType;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.fuyuanshen.equipment.domain.query;
|
||||
|
||||
/**
|
||||
* @author: 默苍璃
|
||||
* @date: 2025-09-1110:10
|
||||
*/
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 围栏位置检查请求参数
|
||||
*/
|
||||
@Data
|
||||
public class FenceCheckRequest {
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@NotNull(message = "设备ID不能为空")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@NotNull(message = "纬度不能为空")
|
||||
private Double latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@NotNull(message = "经度不能为空")
|
||||
private Double longitude;
|
||||
|
||||
/**
|
||||
* 定位精度(米)
|
||||
*/
|
||||
private Double accuracy;
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class AlarmInformationVo {
|
||||
private Integer alarmManual = 0;
|
||||
|
||||
/**
|
||||
* 电子围栏
|
||||
*
|
||||
*/
|
||||
private Integer fenceElectronic = 0;
|
||||
|
||||
|
||||
@ -26,13 +26,11 @@ public class DataOverviewVo {
|
||||
*/
|
||||
private Integer bindingNew = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
* 已绑定设备
|
||||
*/
|
||||
private Integer binding = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 异常设备
|
||||
*/
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
|
||||
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
|
||||
import com.fuyuanshen.equipment.domain.DeviceFenceAccessRecord;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 围栏进出记录视图对象 device_fence_access_record
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = DeviceFenceAccessRecord.class)
|
||||
public class DeviceFenceAccessRecordVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "记录ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏ID
|
||||
*/
|
||||
@ExcelProperty(value = "围栏ID")
|
||||
private Long fenceId;
|
||||
|
||||
/**
|
||||
* 设备标识
|
||||
*/
|
||||
@ExcelProperty(value = "设备标识")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
@ExcelProperty(value = "事件类型")
|
||||
private Long eventType;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@ExcelProperty(value = "纬度")
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@ExcelProperty(value = "经度")
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 定位精度
|
||||
*/
|
||||
@ExcelProperty(value = "定位精度")
|
||||
private Long accuracy;
|
||||
|
||||
/**
|
||||
* 事件时间
|
||||
*/
|
||||
@ExcelProperty(value = "事件时间")
|
||||
private Date eventTime;
|
||||
|
||||
/**
|
||||
* 记录创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "记录创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
|
||||
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
|
||||
import com.fuyuanshen.equipment.domain.DeviceGeoFence;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 电子围栏视图对象 device_geo_fence
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-09-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = DeviceGeoFence.class)
|
||||
public class DeviceGeoFenceVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 围栏唯一标识
|
||||
*/
|
||||
@ExcelProperty(value = "围栏唯一标识")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 围栏名称
|
||||
*/
|
||||
@ExcelProperty(value = "围栏名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 围栏描述
|
||||
*/
|
||||
@ExcelProperty(value = "围栏描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 围栏区域类型, 0 POLYGON, 1 CIRCLE
|
||||
*/
|
||||
@ExcelProperty(value = "围栏区域类型, 0 POLYGON, 1 CIRCLE")
|
||||
private Integer areaType;
|
||||
|
||||
/**
|
||||
* 围栏坐标数据
|
||||
*/
|
||||
@ExcelProperty(value = "围栏坐标数据")
|
||||
private String coordinates;
|
||||
|
||||
/**
|
||||
* 圆形围栏半径(米)
|
||||
*/
|
||||
@ExcelProperty(value = "圆形围栏半径(米)")
|
||||
private Long radius;
|
||||
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
@ExcelProperty(value = "是否激活")
|
||||
private Long isActive;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ExcelProperty(value = "创建人")
|
||||
private Long createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user