Commit cc61ed4a074dbf4ef2218618b05270514f045e4a

Authored by 648540858
1 parent 1947edb6

去除lombok框架

... ... @@ -156,12 +156,6 @@
156 156 <artifactId>okhttp</artifactId>
157 157 <version>4.9.0</version>
158 158 </dependency>
159   - <dependency>
160   - <groupId>org.projectlombok</groupId>
161   - <artifactId>lombok</artifactId>
162   - <version>1.18.12</version>
163   - </dependency>
164   -
165 159  
166 160 </dependencies>
167 161  
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import lombok.Data;
4 3  
5 4 import java.util.List;
6 5 import java.util.Map;
7 6  
8   -@Data
9 7 public class Device {
10 8  
11 9 /**
... ... @@ -40,6 +38,14 @@ public class Device {
40 38 private String transport;
41 39  
42 40 /**
  41 + * 数据流传输模式
  42 + * UDP:udp传输
  43 + * TCP-ACTIVE:tcp主动模式
  44 + * TCP-PASSIVE:tcp被动模式
  45 + */
  46 + private String streamMode;
  47 +
  48 + /**
43 49 * wan地址
44 50 */
45 51 private Host host;
... ... @@ -58,4 +64,91 @@ public class Device {
58 64  
59 65 private List<String> channelList;
60 66  
  67 + public String getDeviceId() {
  68 + return deviceId;
  69 + }
  70 +
  71 + public void setDeviceId(String deviceId) {
  72 + this.deviceId = deviceId;
  73 + }
  74 +
  75 + public String getName() {
  76 + return name;
  77 + }
  78 +
  79 + public void setName(String name) {
  80 + this.name = name;
  81 + }
  82 +
  83 + public String getManufacturer() {
  84 + return manufacturer;
  85 + }
  86 +
  87 + public void setManufacturer(String manufacturer) {
  88 + this.manufacturer = manufacturer;
  89 + }
  90 +
  91 + public String getModel() {
  92 + return model;
  93 + }
  94 +
  95 + public void setModel(String model) {
  96 + this.model = model;
  97 + }
  98 +
  99 + public String getFirmware() {
  100 + return firmware;
  101 + }
  102 +
  103 + public void setFirmware(String firmware) {
  104 + this.firmware = firmware;
  105 + }
  106 +
  107 + public String getTransport() {
  108 + return transport;
  109 + }
  110 +
  111 + public void setTransport(String transport) {
  112 + this.transport = transport;
  113 + }
  114 +
  115 + public String getStreamMode() {
  116 + return streamMode;
  117 + }
  118 +
  119 + public void setStreamMode(String streamMode) {
  120 + this.streamMode = streamMode;
  121 + }
  122 +
  123 + public Host getHost() {
  124 + return host;
  125 + }
  126 +
  127 + public void setHost(Host host) {
  128 + this.host = host;
  129 + }
  130 +
  131 + public int getOnline() {
  132 + return online;
  133 + }
  134 +
  135 + public void setOnline(int online) {
  136 + this.online = online;
  137 + }
  138 +
  139 + public int getChannelCount() {
  140 + return channelCount;
  141 + }
  142 +
  143 + public void setChannelCount(int channelCount) {
  144 + this.channelCount = channelCount;
  145 + }
  146 +
  147 + public List<String> getChannelList() {
  148 + return channelList;
  149 + }
  150 +
  151 + public void setChannelList(List<String> channelList) {
  152 + this.channelList = channelList;
  153 + }
61 154 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import lombok.Data;
4 3  
5   -@Data
6 4 public class DeviceAlarm {
7 5  
8 6 /**
... ... @@ -47,4 +45,67 @@ public class DeviceAlarm {
47 45 private String alarmType;
48 46  
49 47  
  48 + public String getDeviceId() {
  49 + return deviceId;
  50 + }
  51 +
  52 + public void setDeviceId(String deviceId) {
  53 + this.deviceId = deviceId;
  54 + }
  55 +
  56 + public String getAlarmPriorit() {
  57 + return alarmPriorit;
  58 + }
  59 +
  60 + public void setAlarmPriorit(String alarmPriorit) {
  61 + this.alarmPriorit = alarmPriorit;
  62 + }
  63 +
  64 + public String getAlarmMethod() {
  65 + return alarmMethod;
  66 + }
  67 +
  68 + public void setAlarmMethod(String alarmMethod) {
  69 + this.alarmMethod = alarmMethod;
  70 + }
  71 +
  72 + public String getAlarmTime() {
  73 + return alarmTime;
  74 + }
  75 +
  76 + public void setAlarmTime(String alarmTime) {
  77 + this.alarmTime = alarmTime;
  78 + }
  79 +
  80 + public String getAlarmDescription() {
  81 + return alarmDescription;
  82 + }
  83 +
  84 + public void setAlarmDescription(String alarmDescription) {
  85 + this.alarmDescription = alarmDescription;
  86 + }
  87 +
  88 + public double getLongitude() {
  89 + return longitude;
  90 + }
  91 +
  92 + public void setLongitude(double longitude) {
  93 + this.longitude = longitude;
  94 + }
  95 +
  96 + public double getLatitude() {
  97 + return latitude;
  98 + }
  99 +
  100 + public void setLatitude(double latitude) {
  101 + this.latitude = latitude;
  102 + }
  103 +
  104 + public String getAlarmType() {
  105 + return alarmType;
  106 + }
  107 +
  108 + public void setAlarmType(String alarmType) {
  109 + this.alarmType = alarmType;
  110 + }
50 111 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import lombok.Data;
4   -
5   -@Data
6 3 public class DeviceChannel {
7 4  
8 5 /**
... ... @@ -177,4 +174,232 @@ public class DeviceChannel {
177 174 break;
178 175 }
179 176 }
  177 +
  178 + public String getChannelId() {
  179 + return channelId;
  180 + }
  181 +
  182 + public void setChannelId(String channelId) {
  183 + this.channelId = channelId;
  184 + }
  185 +
  186 + public String getName() {
  187 + return name;
  188 + }
  189 +
  190 + public void setName(String name) {
  191 + this.name = name;
  192 + }
  193 +
  194 + public String getManufacture() {
  195 + return manufacture;
  196 + }
  197 +
  198 + public void setManufacture(String manufacture) {
  199 + this.manufacture = manufacture;
  200 + }
  201 +
  202 + public String getModel() {
  203 + return model;
  204 + }
  205 +
  206 + public void setModel(String model) {
  207 + this.model = model;
  208 + }
  209 +
  210 + public String getOwner() {
  211 + return owner;
  212 + }
  213 +
  214 + public void setOwner(String owner) {
  215 + this.owner = owner;
  216 + }
  217 +
  218 + public String getCivilCode() {
  219 + return civilCode;
  220 + }
  221 +
  222 + public void setCivilCode(String civilCode) {
  223 + this.civilCode = civilCode;
  224 + }
  225 +
  226 + public String getBlock() {
  227 + return block;
  228 + }
  229 +
  230 + public void setBlock(String block) {
  231 + this.block = block;
  232 + }
  233 +
  234 + public String getAddress() {
  235 + return address;
  236 + }
  237 +
  238 + public void setAddress(String address) {
  239 + this.address = address;
  240 + }
  241 +
  242 + public int getParental() {
  243 + return parental;
  244 + }
  245 +
  246 + public void setParental(int parental) {
  247 + this.parental = parental;
  248 + }
  249 +
  250 + public String getParentId() {
  251 + return parentId;
  252 + }
  253 +
  254 + public void setParentId(String parentId) {
  255 + this.parentId = parentId;
  256 + }
  257 +
  258 + public int getSafetyWay() {
  259 + return safetyWay;
  260 + }
  261 +
  262 + public void setSafetyWay(int safetyWay) {
  263 + this.safetyWay = safetyWay;
  264 + }
  265 +
  266 + public int getRegisterWay() {
  267 + return registerWay;
  268 + }
  269 +
  270 + public void setRegisterWay(int registerWay) {
  271 + this.registerWay = registerWay;
  272 + }
  273 +
  274 + public String getCertNum() {
  275 + return certNum;
  276 + }
  277 +
  278 + public void setCertNum(String certNum) {
  279 + this.certNum = certNum;
  280 + }
  281 +
  282 + public int getCertifiable() {
  283 + return certifiable;
  284 + }
  285 +
  286 + public void setCertifiable(int certifiable) {
  287 + this.certifiable = certifiable;
  288 + }
  289 +
  290 + public int getErrCode() {
  291 + return errCode;
  292 + }
  293 +
  294 + public void setErrCode(int errCode) {
  295 + this.errCode = errCode;
  296 + }
  297 +
  298 + public String getEndTime() {
  299 + return endTime;
  300 + }
  301 +
  302 + public void setEndTime(String endTime) {
  303 + this.endTime = endTime;
  304 + }
  305 +
  306 + public String getSecrecy() {
  307 + return secrecy;
  308 + }
  309 +
  310 + public void setSecrecy(String secrecy) {
  311 + this.secrecy = secrecy;
  312 + }
  313 +
  314 + public String getIpAddress() {
  315 + return ipAddress;
  316 + }
  317 +
  318 + public void setIpAddress(String ipAddress) {
  319 + this.ipAddress = ipAddress;
  320 + }
  321 +
  322 + public int getPort() {
  323 + return port;
  324 + }
  325 +
  326 + public void setPort(int port) {
  327 + this.port = port;
  328 + }
  329 +
  330 + public String getPassword() {
  331 + return password;
  332 + }
  333 +
  334 + public void setPassword(String password) {
  335 + this.password = password;
  336 + }
  337 +
  338 + public int getPTZType() {
  339 + return PTZType;
  340 + }
  341 +
  342 + public String getPTZTypeText() {
  343 + return PTZTypeText;
  344 + }
  345 +
  346 + public void setPTZTypeText(String PTZTypeText) {
  347 + this.PTZTypeText = PTZTypeText;
  348 + }
  349 +
  350 + public int getStatus() {
  351 + return status;
  352 + }
  353 +
  354 + public void setStatus(int status) {
  355 + this.status = status;
  356 + }
  357 +
  358 + public double getLongitude() {
  359 + return longitude;
  360 + }
  361 +
  362 + public void setLongitude(double longitude) {
  363 + this.longitude = longitude;
  364 + }
  365 +
  366 + public double getLatitude() {
  367 + return latitude;
  368 + }
  369 +
  370 + public void setLatitude(double latitude) {
  371 + this.latitude = latitude;
  372 + }
  373 +
  374 + public int getSubCount() {
  375 + return subCount;
  376 + }
  377 +
  378 + public void setSubCount(int subCount) {
  379 + this.subCount = subCount;
  380 + }
  381 +
  382 + public String getSsrc() {
  383 + return ssrc;
  384 + }
  385 +
  386 + public void setSsrc(String ssrc) {
  387 + this.ssrc = ssrc;
  388 + }
  389 +
  390 + public boolean isHasAudio() {
  391 + return hasAudio;
  392 + }
  393 +
  394 + public void setHasAudio(boolean hasAudio) {
  395 + this.hasAudio = hasAudio;
  396 + }
  397 +
  398 + public boolean isPlay() {
  399 + return play;
  400 + }
  401 +
  402 + public void setPlay(boolean play) {
  403 + this.play = play;
  404 + }
180 405 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Host.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import lombok.Data;
4 3  
5   -@Data
  4 +
6 5 public class Host {
7 6  
8 7 private String ip;
9 8 private int port;
10 9 private String address;
11   -
12 10  
13   -
14 11  
  12 + public String getIp() {
  13 + return ip;
  14 + }
  15 +
  16 + public void setIp(String ip) {
  17 + this.ip = ip;
  18 + }
  19 +
  20 + public int getPort() {
  21 + return port;
  22 + }
  23 +
  24 + public void setPort(int port) {
  25 + this.port = port;
  26 + }
  27 +
  28 + public String getAddress() {
  29 + return address;
  30 + }
  31 +
  32 + public void setAddress(String address) {
  33 + this.address = address;
  34 + }
15 35 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java
... ... @@ -9,7 +9,6 @@ import java.util.List;
9 9 * @author: swwheihei
10 10 * @date: 2020年5月8日 下午2:05:56
11 11 */
12   -@Data
13 12 public class RecordInfo {
14 13  
15 14 private String deviceId;
... ... @@ -20,4 +19,36 @@ public class RecordInfo {
20 19  
21 20 private List<RecordItem> recordList;
22 21  
  22 +
  23 + public String getDeviceId() {
  24 + return deviceId;
  25 + }
  26 +
  27 + public void setDeviceId(String deviceId) {
  28 + this.deviceId = deviceId;
  29 + }
  30 +
  31 + public String getName() {
  32 + return name;
  33 + }
  34 +
  35 + public void setName(String name) {
  36 + this.name = name;
  37 + }
  38 +
  39 + public int getSumNum() {
  40 + return sumNum;
  41 + }
  42 +
  43 + public void setSumNum(int sumNum) {
  44 + this.sumNum = sumNum;
  45 + }
  46 +
  47 + public List<RecordItem> getRecordList() {
  48 + return recordList;
  49 + }
  50 +
  51 + public void setRecordList(List<RecordItem> recordList) {
  52 + this.recordList = recordList;
  53 + }
23 54 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import lombok.Data;
4 3  
5 4 /**
6 5 * @Description:设备录像bean
7 6 * @author: swwheihei
8 7 * @date: 2020年5月8日 下午2:06:54
9 8 */
10   -
11   -@Data
12 9 public class RecordItem {
13 10  
14 11 private String deviceId;
... ... @@ -29,4 +26,75 @@ public class RecordItem {
29 26  
30 27 private String recorderId;
31 28  
  29 + public String getDeviceId() {
  30 + return deviceId;
  31 + }
  32 +
  33 + public void setDeviceId(String deviceId) {
  34 + this.deviceId = deviceId;
  35 + }
  36 +
  37 + public String getName() {
  38 + return name;
  39 + }
  40 +
  41 + public void setName(String name) {
  42 + this.name = name;
  43 + }
  44 +
  45 + public String getFilePath() {
  46 + return filePath;
  47 + }
  48 +
  49 + public void setFilePath(String filePath) {
  50 + this.filePath = filePath;
  51 + }
  52 +
  53 + public String getAddress() {
  54 + return address;
  55 + }
  56 +
  57 + public void setAddress(String address) {
  58 + this.address = address;
  59 + }
  60 +
  61 + public String getStartTime() {
  62 + return startTime;
  63 + }
  64 +
  65 + public void setStartTime(String startTime) {
  66 + this.startTime = startTime;
  67 + }
  68 +
  69 + public String getEndTime() {
  70 + return endTime;
  71 + }
  72 +
  73 + public void setEndTime(String endTime) {
  74 + this.endTime = endTime;
  75 + }
  76 +
  77 + public int getSecrecy() {
  78 + return secrecy;
  79 + }
  80 +
  81 + public void setSecrecy(int secrecy) {
  82 + this.secrecy = secrecy;
  83 + }
  84 +
  85 + public String getType() {
  86 + return type;
  87 + }
  88 +
  89 + public void setType(String type) {
  90 + this.type = type;
  91 + }
  92 +
  93 + public String getRecorderId() {
  94 + return recorderId;
  95 + }
  96 +
  97 + public void setRecorderId(String recorderId) {
  98 + this.recorderId = recorderId;
  99 + }
32 100 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java
... ... @@ -37,6 +37,7 @@ import com.genersoft.iot.vmp.gb28181.utils.DateUtil;
37 37 import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
38 38 import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
39 39 import com.genersoft.iot.vmp.utils.redis.RedisUtil;
  40 +import org.springframework.util.StringUtils;
40 41  
41 42 /**
42 43 * @Description:MESSAGE请求处理器
... ... @@ -125,6 +126,9 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
125 126 device.setManufacturer(XmlUtil.getText(rootElement,"Manufacturer"));
126 127 device.setModel(XmlUtil.getText(rootElement,"Model"));
127 128 device.setFirmware(XmlUtil.getText(rootElement,"Firmware"));
  129 + if (StringUtils.isEmpty(device.getStreamMode())){
  130 + device.setStreamMode("UDP");
  131 + }
128 132 storager.updateDevice(device);
129 133  
130 134 RequestMessage msg = new RequestMessage();
... ... @@ -202,8 +206,6 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
202 206 deviceChannel.setHasAudio(false); // 默认含有音频为false
203 207 storager.updateChannel(device.getDeviceId(), deviceChannel);
204 208 }
205   - // 更新
206   - storager.updateDevice(device);
207 209  
208 210 RequestMessage msg = new RequestMessage();
209 211 msg.setDeviceId(deviceId);
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/device/DeviceController.java
... ... @@ -66,7 +66,7 @@ public class DeviceController {
66 66 * @param count 每页条数
67 67 * @return 通道列表
68 68 */
69   - @GetMapping("devices/{deviceId}/channels")
  69 + @GetMapping("/devices/{deviceId}/channels")
70 70 public ResponseEntity<PageResult> channels(@PathVariable String deviceId,
71 71 int page, int count,
72 72 @RequestParam(required = false) String query,
... ... @@ -123,7 +123,7 @@ public class DeviceController {
123 123 * @param count 每页条数
124 124 * @return 子通道列表
125 125 */
126   - @GetMapping("subChannels/{deviceId}/{channelId}/channels")
  126 + @GetMapping("/subChannels/{deviceId}/{channelId}/channels")
127 127 public ResponseEntity<PageResult> subChannels(@PathVariable String deviceId,
128 128 @PathVariable String channelId,
129 129 int page,
... ... @@ -145,9 +145,18 @@ public class DeviceController {
145 145 return new ResponseEntity<>(pageResult,HttpStatus.OK);
146 146 }
147 147  
148   - @PostMapping("channel/update/{deviceId}")
  148 + @PostMapping("/channel/update/{deviceId}")
149 149 public ResponseEntity<PageResult> updateChannel(@PathVariable String deviceId,DeviceChannel channel){
150 150 storager.updateChannel(deviceId, channel);
151 151 return new ResponseEntity<>(null,HttpStatus.OK);
152 152 }
  153 +
  154 + @GetMapping("/devices/{deviceId}/transport/{transport}")
  155 + @PostMapping("/devices/{deviceId}/transport/{transport}")
  156 + public ResponseEntity<PageResult> updateTransport(@PathVariable String deviceId, @PathVariable String transport){
  157 + Device device = storager.queryVideoDevice(deviceId);
  158 + device.setTransport(transport);
  159 + storager.updateDevice(device);
  160 + return new ResponseEntity<>(null,HttpStatus.OK);
  161 + }
153 162 }
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/device/entity/Device.java
... ... @@ -12,14 +12,12 @@ import javax.validation.constraints.Size;
12 12  
13 13 import io.swagger.annotations.ApiModel;
14 14 import io.swagger.annotations.ApiModelProperty;
15   -import lombok.Data;
16 15  
17 16 /**
18 17 * @Description:视频设备信息
19 18 * @author: songww
20 19 * @date: 2020年5月8日 下午2:05:56
21 20 */
22   -@Data
23 21 @ApiModel(value = "视频设备信息", description = "视频设备信息")
24 22 @Table(name="VMP_VIDEODEVICES")
25 23 public class Device {
... ... @@ -224,4 +222,180 @@ public class Device {
224 222 @Transient
225 223 private List<DeviceChannel> channelList;
226 224  
  225 +
  226 + public String getDeviceId() {
  227 + return deviceId;
  228 + }
  229 +
  230 + public void setDeviceId(String deviceId) {
  231 + this.deviceId = deviceId;
  232 + }
  233 +
  234 + public String getDeviceName() {
  235 + return deviceName;
  236 + }
  237 +
  238 + public void setDeviceName(String deviceName) {
  239 + this.deviceName = deviceName;
  240 + }
  241 +
  242 + public String getManufacturer() {
  243 + return manufacturer;
  244 + }
  245 +
  246 + public void setManufacturer(String manufacturer) {
  247 + this.manufacturer = manufacturer;
  248 + }
  249 +
  250 + public String getModel() {
  251 + return model;
  252 + }
  253 +
  254 + public void setModel(String model) {
  255 + this.model = model;
  256 + }
  257 +
  258 + public String getFirmware() {
  259 + return firmware;
  260 + }
  261 +
  262 + public void setFirmware(String firmware) {
  263 + this.firmware = firmware;
  264 + }
  265 +
  266 + public String getProtocol() {
  267 + return protocol;
  268 + }
  269 +
  270 + public void setProtocol(String protocol) {
  271 + this.protocol = protocol;
  272 + }
  273 +
  274 + public String getTransport() {
  275 + return transport;
  276 + }
  277 +
  278 + public void setTransport(String transport) {
  279 + this.transport = transport;
  280 + }
  281 +
  282 + public String getStreamMode() {
  283 + return streamMode;
  284 + }
  285 +
  286 + public void setStreamMode(String streamMode) {
  287 + this.streamMode = streamMode;
  288 + }
  289 +
  290 + public String getIp() {
  291 + return ip;
  292 + }
  293 +
  294 + public void setIp(String ip) {
  295 + this.ip = ip;
  296 + }
  297 +
  298 + public Integer getPort() {
  299 + return port;
  300 + }
  301 +
  302 + public void setPort(Integer port) {
  303 + this.port = port;
  304 + }
  305 +
  306 + public String getOnline() {
  307 + return online;
  308 + }
  309 +
  310 + public void setOnline(String online) {
  311 + this.online = online;
  312 + }
  313 +
  314 + public Integer getChannelSum() {
  315 + return channelSum;
  316 + }
  317 +
  318 + public void setChannelSum(Integer channelSum) {
  319 + this.channelSum = channelSum;
  320 + }
  321 +
  322 + public String getCreateTime() {
  323 + return createTime;
  324 + }
  325 +
  326 + public void setCreateTime(String createTime) {
  327 + this.createTime = createTime;
  328 + }
  329 +
  330 + public String getRegisterTime() {
  331 + return registerTime;
  332 + }
  333 +
  334 + public void setRegisterTime(String registerTime) {
  335 + this.registerTime = registerTime;
  336 + }
  337 +
  338 + public String getHeartbeatTime() {
  339 + return heartbeatTime;
  340 + }
  341 +
  342 + public void setHeartbeatTime(String heartbeatTime) {
  343 + this.heartbeatTime = heartbeatTime;
  344 + }
  345 +
  346 + public String getUpdateTime() {
  347 + return updateTime;
  348 + }
  349 +
  350 + public void setUpdateTime(String updateTime) {
  351 + this.updateTime = updateTime;
  352 + }
  353 +
  354 + public String getUpdatePerson() {
  355 + return updatePerson;
  356 + }
  357 +
  358 + public void setUpdatePerson(String updatePerson) {
  359 + this.updatePerson = updatePerson;
  360 + }
  361 +
  362 + public String getSyncTime() {
  363 + return syncTime;
  364 + }
  365 +
  366 + public void setSyncTime(String syncTime) {
  367 + this.syncTime = syncTime;
  368 + }
  369 +
  370 + public String getSyncPerson() {
  371 + return syncPerson;
  372 + }
  373 +
  374 + public void setSyncPerson(String syncPerson) {
  375 + this.syncPerson = syncPerson;
  376 + }
  377 +
  378 + public String getUsername() {
  379 + return username;
  380 + }
  381 +
  382 + public void setUsername(String username) {
  383 + this.username = username;
  384 + }
  385 +
  386 + public String getPassword() {
  387 + return password;
  388 + }
  389 +
  390 + public void setPassword(String password) {
  391 + this.password = password;
  392 + }
  393 +
  394 + public List<DeviceChannel> getChannelList() {
  395 + return channelList;
  396 + }
  397 +
  398 + public void setChannelList(List<DeviceChannel> channelList) {
  399 + this.channelList = channelList;
  400 + }
227 401 }
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/device/entity/DeviceChannel.java
... ... @@ -6,14 +6,12 @@ import javax.persistence.Table;
6 6  
7 7 import io.swagger.annotations.ApiModel;
8 8 import io.swagger.annotations.ApiModelProperty;
9   -import lombok.Data;
10 9  
11 10 /**
12 11 * @Description:设备通道信息
13 12 * @author: songww
14 13 * @date: 2020年5月20日 下午9:00:46
15 14 */
16   -@Data
17 15 @ApiModel(value = "设备通道信息", description = "设备通道信息")
18 16 @Table(name="VMP_VIDEOCHANNELS")
19 17 public class DeviceChannel {
... ... @@ -193,4 +191,195 @@ public class DeviceChannel {
193 191 @Column(name="LATITUDE")
194 192 private double latitude;
195 193  
  194 + public String getChannelId() {
  195 + return channelId;
  196 + }
  197 +
  198 + public void setChannelId(String channelId) {
  199 + this.channelId = channelId;
  200 + }
  201 +
  202 + public String getDeviceId() {
  203 + return deviceId;
  204 + }
  205 +
  206 + public void setDeviceId(String deviceId) {
  207 + this.deviceId = deviceId;
  208 + }
  209 +
  210 + public String getChannelName() {
  211 + return channelName;
  212 + }
  213 +
  214 + public void setChannelName(String channelName) {
  215 + this.channelName = channelName;
  216 + }
  217 +
  218 + public String getManufacture() {
  219 + return manufacture;
  220 + }
  221 +
  222 + public void setManufacture(String manufacture) {
  223 + this.manufacture = manufacture;
  224 + }
  225 +
  226 + public String getModel() {
  227 + return model;
  228 + }
  229 +
  230 + public void setModel(String model) {
  231 + this.model = model;
  232 + }
  233 +
  234 + public String getOwner() {
  235 + return owner;
  236 + }
  237 +
  238 + public void setOwner(String owner) {
  239 + this.owner = owner;
  240 + }
  241 +
  242 + public String getCivilCode() {
  243 + return civilCode;
  244 + }
  245 +
  246 + public void setCivilCode(String civilCode) {
  247 + this.civilCode = civilCode;
  248 + }
  249 +
  250 + public String getBlock() {
  251 + return block;
  252 + }
  253 +
  254 + public void setBlock(String block) {
  255 + this.block = block;
  256 + }
  257 +
  258 + public String getAddress() {
  259 + return address;
  260 + }
  261 +
  262 + public void setAddress(String address) {
  263 + this.address = address;
  264 + }
  265 +
  266 + public String getParental() {
  267 + return parental;
  268 + }
  269 +
  270 + public void setParental(String parental) {
  271 + this.parental = parental;
  272 + }
  273 +
  274 + public String getParentId() {
  275 + return parentId;
  276 + }
  277 +
  278 + public void setParentId(String parentId) {
  279 + this.parentId = parentId;
  280 + }
  281 +
  282 + public String getSafetyWay() {
  283 + return safetyWay;
  284 + }
  285 +
  286 + public void setSafetyWay(String safetyWay) {
  287 + this.safetyWay = safetyWay;
  288 + }
  289 +
  290 + public String getRegisterWay() {
  291 + return registerWay;
  292 + }
  293 +
  294 + public void setRegisterWay(String registerWay) {
  295 + this.registerWay = registerWay;
  296 + }
  297 +
  298 + public String getCertNum() {
  299 + return certNum;
  300 + }
  301 +
  302 + public void setCertNum(String certNum) {
  303 + this.certNum = certNum;
  304 + }
  305 +
  306 + public String getCertValid() {
  307 + return certValid;
  308 + }
  309 +
  310 + public void setCertValid(String certValid) {
  311 + this.certValid = certValid;
  312 + }
  313 +
  314 + public String getCertErrCode() {
  315 + return certErrCode;
  316 + }
  317 +
  318 + public void setCertErrCode(String certErrCode) {
  319 + this.certErrCode = certErrCode;
  320 + }
  321 +
  322 + public String getCertEndTime() {
  323 + return certEndTime;
  324 + }
  325 +
  326 + public void setCertEndTime(String certEndTime) {
  327 + this.certEndTime = certEndTime;
  328 + }
  329 +
  330 + public String getSecrecy() {
  331 + return secrecy;
  332 + }
  333 +
  334 + public void setSecrecy(String secrecy) {
  335 + this.secrecy = secrecy;
  336 + }
  337 +
  338 + public String getIp() {
  339 + return ip;
  340 + }
  341 +
  342 + public void setIp(String ip) {
  343 + this.ip = ip;
  344 + }
  345 +
  346 + public Integer getPort() {
  347 + return port;
  348 + }
  349 +
  350 + public void setPort(Integer port) {
  351 + this.port = port;
  352 + }
  353 +
  354 + public String getPassword() {
  355 + return password;
  356 + }
  357 +
  358 + public void setPassword(String password) {
  359 + this.password = password;
  360 + }
  361 +
  362 + public String getOnline() {
  363 + return online;
  364 + }
  365 +
  366 + public void setOnline(String online) {
  367 + this.online = online;
  368 + }
  369 +
  370 + public double getLongitude() {
  371 + return longitude;
  372 + }
  373 +
  374 + public void setLongitude(double longitude) {
  375 + this.longitude = longitude;
  376 + }
  377 +
  378 + public double getLatitude() {
  379 + return latitude;
  380 + }
  381 +
  382 + public void setLatitude(double latitude) {
  383 + this.latitude = latitude;
  384 + }
196 385 }
... ...
web_src/src/components/videoList.vue
... ... @@ -29,7 +29,14 @@
29 29 </el-table-column>
30 30 <el-table-column prop="model" label="固件版本" align="center">
31 31 </el-table-column>
32   - <el-table-column prop="transport" label="通讯方式" align="center">
  32 + <el-table-column label="通讯方式" align="center">
  33 + <template slot-scope="scope">
  34 + <el-select @change="transportChange(scope.row)" v-model="scope.row.streamMode" placeholder="请选择">
  35 + <el-option key="UDP" label="UDP" value="UDP"></el-option>
  36 + <el-option key="TCP-ACTIVE" label="TCP主动模式" value="TCP-ACTIVE"></el-option>
  37 + <el-option key="TCP-PASSIVE" label="TCP被动模式" :disabled="true" value="TCP-PASSIVE"></el-option>
  38 + </el-select>
  39 + </template>
33 40 </el-table-column>
34 41 <el-table-column prop="channelCount" label="通道数" align="center">
35 42 </el-table-column>
... ... @@ -180,7 +187,19 @@
180 187 that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
181 188 }).catch(function(e) {
182 189 });
183   - }
  190 + },
  191 + transportChange: function (row) {
  192 + console.log(`修改传输方式为 ${row.transport}:${row.deviceId} `);
  193 + let that = this;
  194 + this.$axios({
  195 + method: 'get',
  196 + url: '/api/devices/' + row.deviceId + '/transport/' + row.transport
  197 + }).then(function(res) {
  198 + let ssrc = res.data.ssrc;
  199 + that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
  200 + }).catch(function(e) {
  201 + });
  202 + }
184 203  
185 204 }
186 205 };
... ...