Commit 5462b1f6c66eeb995af8202436bbae618111dc5e
1 parent
c2e26291
去除lombok依赖-后续考虑引入
Showing
6 changed files
with
178 additions
and
25 deletions
pom.xml
| ... | ... | @@ -58,11 +58,6 @@ |
| 58 | 58 | |
| 59 | 59 | <dependencies> |
| 60 | 60 | <dependency> |
| 61 | - <groupId>org.projectlombok</groupId> | |
| 62 | - <artifactId>lombok</artifactId> | |
| 63 | - <optional>true</optional> | |
| 64 | - </dependency> | |
| 65 | - <dependency> | |
| 66 | 61 | <groupId>org.springframework.boot</groupId> |
| 67 | 62 | <artifactId>spring-boot-starter-data-redis</artifactId> |
| 68 | 63 | </dependency> | ... | ... |
src/main/java/com/genersoft/iot/vmp/common/enums/DeviceControlType.java
| 1 | 1 | package com.genersoft.iot.vmp.common.enums; |
| 2 | 2 | |
| 3 | -import com.alibaba.fastjson2.JSONObject; | |
| 4 | -import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; | |
| 5 | -import lombok.AllArgsConstructor; | |
| 6 | -import lombok.Getter; | |
| 7 | 3 | import org.dom4j.Element; |
| 8 | 4 | import org.springframework.util.ObjectUtils; |
| 9 | 5 | |
| 10 | -import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText; | |
| 11 | 6 | |
| 12 | 7 | /** |
| 13 | 8 | * @author gaofuwang |
| 14 | 9 | * @date 2023/01/18/ 10:09:00 |
| 15 | 10 | * @since 1.0 |
| 16 | 11 | */ |
| 17 | -@Getter | |
| 18 | -@AllArgsConstructor | |
| 19 | 12 | public enum DeviceControlType { |
| 20 | 13 | |
| 21 | 14 | /** |
| ... | ... | @@ -60,6 +53,19 @@ public enum DeviceControlType { |
| 60 | 53 | |
| 61 | 54 | private final String desc; |
| 62 | 55 | |
| 56 | + DeviceControlType(String val, String desc) { | |
| 57 | + this.val = val; | |
| 58 | + this.desc = desc; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public String getVal() { | |
| 62 | + return val; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public String getDesc() { | |
| 66 | + return desc; | |
| 67 | + } | |
| 68 | + | |
| 63 | 69 | public static DeviceControlType typeOf(Element rootElement) { |
| 64 | 70 | for (DeviceControlType item : DeviceControlType.values()) { |
| 65 | 71 | if (!ObjectUtils.isEmpty(rootElement.element(item.val)) || !ObjectUtils.isEmpty(rootElement.elements(item.val))) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/AlarmChannelMessage.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.bean; |
| 2 | 2 | |
| 3 | -import lombok.Data; | |
| 4 | 3 | |
| 5 | 4 | /** |
| 6 | 5 | * 通过redis分发报警消息 |
| 7 | 6 | */ |
| 8 | -@Data | |
| 9 | 7 | public class AlarmChannelMessage { |
| 10 | 8 | /** |
| 11 | 9 | * 国标编号 |
| ... | ... | @@ -25,4 +23,35 @@ public class AlarmChannelMessage { |
| 25 | 23 | */ |
| 26 | 24 | private String alarmDescription; |
| 27 | 25 | |
| 26 | + public String getGbId() { | |
| 27 | + return gbId; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setGbId(String gbId) { | |
| 31 | + this.gbId = gbId; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public int getAlarmSn() { | |
| 35 | + return alarmSn; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setAlarmSn(int alarmSn) { | |
| 39 | + this.alarmSn = alarmSn; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public int getAlarmType() { | |
| 43 | + return alarmType; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setAlarmType(int alarmType) { | |
| 47 | + this.alarmType = alarmType; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public String getAlarmDescription() { | |
| 51 | + return alarmDescription; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setAlarmDescription(String alarmDescription) { | |
| 55 | + this.alarmDescription = alarmDescription; | |
| 56 | + } | |
| 28 | 57 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DragZoomRequest.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.bean; |
| 2 | 2 | |
| 3 | 3 | import com.genersoft.iot.vmp.gb28181.utils.MessageElement; |
| 4 | -import lombok.Data; | |
| 5 | - | |
| 6 | -import javax.validation.constraints.NotNull; | |
| 7 | -import java.util.List; | |
| 8 | 4 | |
| 9 | 5 | /** |
| 10 | 6 | * 设备信息查询响应 |
| ... | ... | @@ -13,7 +9,6 @@ import java.util.List; |
| 13 | 9 | * @version 1.0 |
| 14 | 10 | * @date 2022/6/28 14:55 |
| 15 | 11 | */ |
| 16 | -@Data | |
| 17 | 12 | public class DragZoomRequest { |
| 18 | 13 | /** |
| 19 | 14 | * 序列号 |
| ... | ... | @@ -33,7 +28,6 @@ public class DragZoomRequest { |
| 33 | 28 | /** |
| 34 | 29 | * 基本参数 |
| 35 | 30 | */ |
| 36 | - @Data | |
| 37 | 31 | public static class DragZoom { |
| 38 | 32 | /** |
| 39 | 33 | * 播放窗口长度像素值 |
| ... | ... | @@ -66,5 +60,84 @@ public class DragZoomRequest { |
| 66 | 60 | @MessageElement("LengthY") |
| 67 | 61 | protected Integer lengthY; |
| 68 | 62 | |
| 63 | + public Integer getLength() { | |
| 64 | + return length; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void setLength(Integer length) { | |
| 68 | + this.length = length; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public Integer getWidth() { | |
| 72 | + return width; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setWidth(Integer width) { | |
| 76 | + this.width = width; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public Integer getMidPointX() { | |
| 80 | + return midPointX; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setMidPointX(Integer midPointX) { | |
| 84 | + this.midPointX = midPointX; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public Integer getMidPointY() { | |
| 88 | + return midPointY; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setMidPointY(Integer midPointY) { | |
| 92 | + this.midPointY = midPointY; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public Integer getLengthX() { | |
| 96 | + return lengthX; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void setLengthX(Integer lengthX) { | |
| 100 | + this.lengthX = lengthX; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public Integer getLengthY() { | |
| 104 | + return lengthY; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setLengthY(Integer lengthY) { | |
| 108 | + this.lengthY = lengthY; | |
| 109 | + } | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getSn() { | |
| 113 | + return sn; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setSn(String sn) { | |
| 117 | + this.sn = sn; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getDeviceId() { | |
| 121 | + return deviceId; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setDeviceId(String deviceId) { | |
| 125 | + this.deviceId = deviceId; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public DragZoom getDragZoomIn() { | |
| 129 | + return dragZoomIn; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setDragZoomIn(DragZoom dragZoomIn) { | |
| 133 | + this.dragZoomIn = dragZoomIn; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public DragZoom getDragZoomOut() { | |
| 137 | + return dragZoomOut; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setDragZoomOut(DragZoom dragZoomOut) { | |
| 141 | + this.dragZoomOut = dragZoomOut; | |
| 69 | 142 | } |
| 70 | 143 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/HomePositionRequest.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.bean; |
| 2 | 2 | |
| 3 | 3 | import com.genersoft.iot.vmp.gb28181.utils.MessageElement; |
| 4 | -import lombok.Data; | |
| 5 | 4 | |
| 6 | 5 | /** |
| 7 | 6 | * 设备信息查询响应 |
| ... | ... | @@ -10,7 +9,6 @@ import lombok.Data; |
| 10 | 9 | * @version 1.0 |
| 11 | 10 | * @date 2022/6/28 14:55 |
| 12 | 11 | */ |
| 13 | -@Data | |
| 14 | 12 | public class HomePositionRequest { |
| 15 | 13 | /** |
| 16 | 14 | * 序列号 |
| ... | ... | @@ -28,7 +26,6 @@ public class HomePositionRequest { |
| 28 | 26 | /** |
| 29 | 27 | * 基本参数 |
| 30 | 28 | */ |
| 31 | - @Data | |
| 32 | 29 | public static class HomePosition { |
| 33 | 30 | /** |
| 34 | 31 | * 播放窗口长度像素值 |
| ... | ... | @@ -46,5 +43,52 @@ public class HomePositionRequest { |
| 46 | 43 | @MessageElement("PresetIndex") |
| 47 | 44 | protected String presetIndex; |
| 48 | 45 | |
| 46 | + public String getEnabled() { | |
| 47 | + return enabled; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setEnabled(String enabled) { | |
| 51 | + this.enabled = enabled; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public String getResetTime() { | |
| 55 | + return resetTime; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setResetTime(String resetTime) { | |
| 59 | + this.resetTime = resetTime; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public String getPresetIndex() { | |
| 63 | + return presetIndex; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setPresetIndex(String presetIndex) { | |
| 67 | + this.presetIndex = presetIndex; | |
| 68 | + } | |
| 69 | + } | |
| 70 | + | |
| 71 | + public String getSn() { | |
| 72 | + return sn; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setSn(String sn) { | |
| 76 | + this.sn = sn; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getDeviceId() { | |
| 80 | + return deviceId; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setDeviceId(String deviceId) { | |
| 84 | + this.deviceId = deviceId; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public HomePosition getHomePosition() { | |
| 88 | + return homePosition; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setHomePosition(HomePosition homePosition) { | |
| 92 | + this.homePosition = homePosition; | |
| 49 | 93 | } |
| 50 | 94 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.bean; |
| 2 | 2 | |
| 3 | -import lombok.Data; | |
| 4 | 3 | |
| 5 | 4 | import java.time.Instant; |
| 6 | 5 | import java.util.List; |
| ... | ... | @@ -10,7 +9,6 @@ import java.util.List; |
| 10 | 9 | * @author: swwheihei |
| 11 | 10 | * @date: 2020年5月8日 下午2:05:56 |
| 12 | 11 | */ |
| 13 | -@Data | |
| 14 | 12 | public class RecordInfo { |
| 15 | 13 | |
| 16 | 14 | private String deviceId; |
| ... | ... | @@ -84,4 +82,12 @@ public class RecordInfo { |
| 84 | 82 | public void setLastTime(Instant lastTime) { |
| 85 | 83 | this.lastTime = lastTime; |
| 86 | 84 | } |
| 85 | + | |
| 86 | + public int getCount() { | |
| 87 | + return count; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setCount(int count) { | |
| 91 | + this.count = count; | |
| 92 | + } | |
| 87 | 93 | } | ... | ... |