去除lombok依赖-后续考虑引入

This commit is contained in:
gaofw189 2023-02-09 09:20:46 +08:00
parent c2e26291ce
commit 5462b1f6c6
6 changed files with 178 additions and 25 deletions

View File

@ -57,11 +57,6 @@
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>

View File

@ -1,21 +1,14 @@
package com.genersoft.iot.vmp.common.enums;
import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.dom4j.Element;
import org.springframework.util.ObjectUtils;
import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
/**
* @author gaofuwang
* @date 2023/01/18/ 10:09:00
* @since 1.0
*/
@Getter
@AllArgsConstructor
public enum DeviceControlType {
/**
@ -60,6 +53,19 @@ public enum DeviceControlType {
private final String desc;
DeviceControlType(String val, String desc) {
this.val = val;
this.desc = desc;
}
public String getVal() {
return val;
}
public String getDesc() {
return desc;
}
public static DeviceControlType typeOf(Element rootElement) {
for (DeviceControlType item : DeviceControlType.values()) {
if (!ObjectUtils.isEmpty(rootElement.element(item.val)) || !ObjectUtils.isEmpty(rootElement.elements(item.val))) {

View File

@ -1,11 +1,9 @@
package com.genersoft.iot.vmp.gb28181.bean;
import lombok.Data;
/**
* 通过redis分发报警消息
*/
@Data
public class AlarmChannelMessage {
/**
* 国标编号
@ -25,4 +23,35 @@ public class AlarmChannelMessage {
*/
private String alarmDescription;
public String getGbId() {
return gbId;
}
public void setGbId(String gbId) {
this.gbId = gbId;
}
public int getAlarmSn() {
return alarmSn;
}
public void setAlarmSn(int alarmSn) {
this.alarmSn = alarmSn;
}
public int getAlarmType() {
return alarmType;
}
public void setAlarmType(int alarmType) {
this.alarmType = alarmType;
}
public String getAlarmDescription() {
return alarmDescription;
}
public void setAlarmDescription(String alarmDescription) {
this.alarmDescription = alarmDescription;
}
}

View File

@ -1,10 +1,6 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.gb28181.utils.MessageElement;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 设备信息查询响应
@ -13,7 +9,6 @@ import java.util.List;
* @version 1.0
* @date 2022/6/28 14:55
*/
@Data
public class DragZoomRequest {
/**
* 序列号
@ -33,7 +28,6 @@ public class DragZoomRequest {
/**
* 基本参数
*/
@Data
public static class DragZoom {
/**
* 播放窗口长度像素值
@ -66,5 +60,84 @@ public class DragZoomRequest {
@MessageElement("LengthY")
protected Integer lengthY;
public Integer getLength() {
return length;
}
public void setLength(Integer length) {
this.length = length;
}
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public Integer getMidPointX() {
return midPointX;
}
public void setMidPointX(Integer midPointX) {
this.midPointX = midPointX;
}
public Integer getMidPointY() {
return midPointY;
}
public void setMidPointY(Integer midPointY) {
this.midPointY = midPointY;
}
public Integer getLengthX() {
return lengthX;
}
public void setLengthX(Integer lengthX) {
this.lengthX = lengthX;
}
public Integer getLengthY() {
return lengthY;
}
public void setLengthY(Integer lengthY) {
this.lengthY = lengthY;
}
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public DragZoom getDragZoomIn() {
return dragZoomIn;
}
public void setDragZoomIn(DragZoom dragZoomIn) {
this.dragZoomIn = dragZoomIn;
}
public DragZoom getDragZoomOut() {
return dragZoomOut;
}
public void setDragZoomOut(DragZoom dragZoomOut) {
this.dragZoomOut = dragZoomOut;
}
}

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.gb28181.utils.MessageElement;
import lombok.Data;
/**
* 设备信息查询响应
@ -10,7 +9,6 @@ import lombok.Data;
* @version 1.0
* @date 2022/6/28 14:55
*/
@Data
public class HomePositionRequest {
/**
* 序列号
@ -28,7 +26,6 @@ public class HomePositionRequest {
/**
* 基本参数
*/
@Data
public static class HomePosition {
/**
* 播放窗口长度像素值
@ -46,5 +43,52 @@ public class HomePositionRequest {
@MessageElement("PresetIndex")
protected String presetIndex;
public String getEnabled() {
return enabled;
}
public void setEnabled(String enabled) {
this.enabled = enabled;
}
public String getResetTime() {
return resetTime;
}
public void setResetTime(String resetTime) {
this.resetTime = resetTime;
}
public String getPresetIndex() {
return presetIndex;
}
public void setPresetIndex(String presetIndex) {
this.presetIndex = presetIndex;
}
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public HomePosition getHomePosition() {
return homePosition;
}
public void setHomePosition(HomePosition homePosition) {
this.homePosition = homePosition;
}
}

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.gb28181.bean;
import lombok.Data;
import java.time.Instant;
import java.util.List;
@ -10,7 +9,6 @@ import java.util.List;
* @author: swwheihei
* @date: 2020年5月8日 下午2:05:56
*/
@Data
public class RecordInfo {
private String deviceId;
@ -84,4 +82,12 @@ public class RecordInfo {
public void setLastTime(Instant lastTime) {
this.lastTime = lastTime;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}