Kaynağa Gözat

去除lombok框架

648540858 5 yıl önce
ebeveyn
işleme
cc61ed4a07

+ 0 - 6
pom.xml

@@ -156,12 +156,6 @@
 			<artifactId>okhttp</artifactId>
 			<version>4.9.0</version>
 		</dependency>
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>1.18.12</version>
-        </dependency>
-
 
     </dependencies>
 	

+ 95 - 2
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java

@@ -1,11 +1,9 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import lombok.Data;
 
 import java.util.List;
 import java.util.Map;
 
-@Data
 public class Device {
 
 	/**
@@ -39,6 +37,14 @@ public class Device {
 	 */
 	private String transport;
 
+	/**
+	 * 数据流传输模式
+	 * UDP:udp传输
+	 * TCP-ACTIVE:tcp主动模式
+	 * TCP-PASSIVE:tcp被动模式
+	 */
+	private String streamMode;
+
 	/**
 	 * wan地址
 	 */
@@ -58,4 +64,91 @@ public class Device {
 
 	private List<String> channelList;
 
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	public String getModel() {
+		return model;
+	}
+
+	public void setModel(String model) {
+		this.model = model;
+	}
+
+	public String getFirmware() {
+		return firmware;
+	}
+
+	public void setFirmware(String firmware) {
+		this.firmware = firmware;
+	}
+
+	public String getTransport() {
+		return transport;
+	}
+
+	public void setTransport(String transport) {
+		this.transport = transport;
+	}
+
+	public String getStreamMode() {
+		return streamMode;
+	}
+
+	public void setStreamMode(String streamMode) {
+		this.streamMode = streamMode;
+	}
+
+	public Host getHost() {
+		return host;
+	}
+
+	public void setHost(Host host) {
+		this.host = host;
+	}
+
+	public int getOnline() {
+		return online;
+	}
+
+	public void setOnline(int online) {
+		this.online = online;
+	}
+
+	public int getChannelCount() {
+		return channelCount;
+	}
+
+	public void setChannelCount(int channelCount) {
+		this.channelCount = channelCount;
+	}
+
+	public List<String> getChannelList() {
+		return channelList;
+	}
+
+	public void setChannelList(List<String> channelList) {
+		this.channelList = channelList;
+	}
 }

+ 63 - 2
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java

@@ -1,8 +1,6 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import lombok.Data;
 
-@Data
 public class DeviceAlarm {
 
 	/**
@@ -47,4 +45,67 @@ public class DeviceAlarm {
 	private String alarmType;
 
 
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getAlarmPriorit() {
+		return alarmPriorit;
+	}
+
+	public void setAlarmPriorit(String alarmPriorit) {
+		this.alarmPriorit = alarmPriorit;
+	}
+
+	public String getAlarmMethod() {
+		return alarmMethod;
+	}
+
+	public void setAlarmMethod(String alarmMethod) {
+		this.alarmMethod = alarmMethod;
+	}
+
+	public String getAlarmTime() {
+		return alarmTime;
+	}
+
+	public void setAlarmTime(String alarmTime) {
+		this.alarmTime = alarmTime;
+	}
+
+	public String getAlarmDescription() {
+		return alarmDescription;
+	}
+
+	public void setAlarmDescription(String alarmDescription) {
+		this.alarmDescription = alarmDescription;
+	}
+
+	public double getLongitude() {
+		return longitude;
+	}
+
+	public void setLongitude(double longitude) {
+		this.longitude = longitude;
+	}
+
+	public double getLatitude() {
+		return latitude;
+	}
+
+	public void setLatitude(double latitude) {
+		this.latitude = latitude;
+	}
+
+	public String getAlarmType() {
+		return alarmType;
+	}
+
+	public void setAlarmType(String alarmType) {
+		this.alarmType = alarmType;
+	}
 }

+ 228 - 3
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java

@@ -1,8 +1,5 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import lombok.Data;
-
-@Data
 public class DeviceChannel {
 
 	/**
@@ -177,4 +174,232 @@ public class DeviceChannel {
 				break;
 		}
 	}
+
+	public String getChannelId() {
+		return channelId;
+	}
+
+	public void setChannelId(String channelId) {
+		this.channelId = channelId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getManufacture() {
+		return manufacture;
+	}
+
+	public void setManufacture(String manufacture) {
+		this.manufacture = manufacture;
+	}
+
+	public String getModel() {
+		return model;
+	}
+
+	public void setModel(String model) {
+		this.model = model;
+	}
+
+	public String getOwner() {
+		return owner;
+	}
+
+	public void setOwner(String owner) {
+		this.owner = owner;
+	}
+
+	public String getCivilCode() {
+		return civilCode;
+	}
+
+	public void setCivilCode(String civilCode) {
+		this.civilCode = civilCode;
+	}
+
+	public String getBlock() {
+		return block;
+	}
+
+	public void setBlock(String block) {
+		this.block = block;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public int getParental() {
+		return parental;
+	}
+
+	public void setParental(int parental) {
+		this.parental = parental;
+	}
+
+	public String getParentId() {
+		return parentId;
+	}
+
+	public void setParentId(String parentId) {
+		this.parentId = parentId;
+	}
+
+	public int getSafetyWay() {
+		return safetyWay;
+	}
+
+	public void setSafetyWay(int safetyWay) {
+		this.safetyWay = safetyWay;
+	}
+
+	public int getRegisterWay() {
+		return registerWay;
+	}
+
+	public void setRegisterWay(int registerWay) {
+		this.registerWay = registerWay;
+	}
+
+	public String getCertNum() {
+		return certNum;
+	}
+
+	public void setCertNum(String certNum) {
+		this.certNum = certNum;
+	}
+
+	public int getCertifiable() {
+		return certifiable;
+	}
+
+	public void setCertifiable(int certifiable) {
+		this.certifiable = certifiable;
+	}
+
+	public int getErrCode() {
+		return errCode;
+	}
+
+	public void setErrCode(int errCode) {
+		this.errCode = errCode;
+	}
+
+	public String getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(String endTime) {
+		this.endTime = endTime;
+	}
+
+	public String getSecrecy() {
+		return secrecy;
+	}
+
+	public void setSecrecy(String secrecy) {
+		this.secrecy = secrecy;
+	}
+
+	public String getIpAddress() {
+		return ipAddress;
+	}
+
+	public void setIpAddress(String ipAddress) {
+		this.ipAddress = ipAddress;
+	}
+
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public int getPTZType() {
+		return PTZType;
+	}
+
+	public String getPTZTypeText() {
+		return PTZTypeText;
+	}
+
+	public void setPTZTypeText(String PTZTypeText) {
+		this.PTZTypeText = PTZTypeText;
+	}
+
+	public int getStatus() {
+		return status;
+	}
+
+	public void setStatus(int status) {
+		this.status = status;
+	}
+
+	public double getLongitude() {
+		return longitude;
+	}
+
+	public void setLongitude(double longitude) {
+		this.longitude = longitude;
+	}
+
+	public double getLatitude() {
+		return latitude;
+	}
+
+	public void setLatitude(double latitude) {
+		this.latitude = latitude;
+	}
+
+	public int getSubCount() {
+		return subCount;
+	}
+
+	public void setSubCount(int subCount) {
+		this.subCount = subCount;
+	}
+
+	public String getSsrc() {
+		return ssrc;
+	}
+
+	public void setSsrc(String ssrc) {
+		this.ssrc = ssrc;
+	}
+
+	public boolean isHasAudio() {
+		return hasAudio;
+	}
+
+	public void setHasAudio(boolean hasAudio) {
+		this.hasAudio = hasAudio;
+	}
+
+	public boolean isPlay() {
+		return play;
+	}
+
+	public void setPlay(boolean play) {
+		this.play = play;
+	}
 }

+ 24 - 4
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Host.java

@@ -1,15 +1,35 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import lombok.Data;
 
-@Data
+
 public class Host {
 	
 	private String ip;
 	private int port;
 	private String address;
-	
 
-	
 
+	public String getIp() {
+		return ip;
+	}
+
+	public void setIp(String ip) {
+		this.ip = ip;
+	}
+
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
 }

+ 32 - 1
src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java

@@ -9,7 +9,6 @@ import java.util.List;
  * @author: swwheihei
  * @date:   2020年5月8日 下午2:05:56     
  */
-@Data
 public class RecordInfo {
 
 	private String deviceId;
@@ -20,4 +19,36 @@ public class RecordInfo {
 	
 	private List<RecordItem> recordList;
 
+
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public int getSumNum() {
+		return sumNum;
+	}
+
+	public void setSumNum(int sumNum) {
+		this.sumNum = sumNum;
+	}
+
+	public List<RecordItem> getRecordList() {
+		return recordList;
+	}
+
+	public void setRecordList(List<RecordItem> recordList) {
+		this.recordList = recordList;
+	}
 }

+ 71 - 3
src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java

@@ -1,14 +1,11 @@
 package com.genersoft.iot.vmp.gb28181.bean;
 
-import lombok.Data;
 
 /**
  * @Description:设备录像bean 
  * @author: swwheihei
  * @date:   2020年5月8日 下午2:06:54     
  */
-
-@Data
 public class RecordItem {
 
 	private String deviceId;
@@ -29,4 +26,75 @@ public class RecordItem {
 	
 	private String recorderId;
 
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getFilePath() {
+		return filePath;
+	}
+
+	public void setFilePath(String filePath) {
+		this.filePath = filePath;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(String startTime) {
+		this.startTime = startTime;
+	}
+
+	public String getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(String endTime) {
+		this.endTime = endTime;
+	}
+
+	public int getSecrecy() {
+		return secrecy;
+	}
+
+	public void setSecrecy(int secrecy) {
+		this.secrecy = secrecy;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getRecorderId() {
+		return recorderId;
+	}
+
+	public void setRecorderId(String recorderId) {
+		this.recorderId = recorderId;
+	}
 }

+ 4 - 2
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;
 import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
 import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
 import com.genersoft.iot.vmp.utils.redis.RedisUtil;
+import org.springframework.util.StringUtils;
 
 /**    
  * @Description:MESSAGE请求处理器
@@ -125,6 +126,9 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
 			device.setManufacturer(XmlUtil.getText(rootElement,"Manufacturer"));
 			device.setModel(XmlUtil.getText(rootElement,"Model"));
 			device.setFirmware(XmlUtil.getText(rootElement,"Firmware"));
+			if (StringUtils.isEmpty(device.getStreamMode())){
+				device.setStreamMode("UDP");
+			}
 			storager.updateDevice(device);
 			
 			RequestMessage msg = new RequestMessage();
@@ -202,8 +206,6 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
 					deviceChannel.setHasAudio(false); // 默认含有音频为false
 					storager.updateChannel(device.getDeviceId(), deviceChannel);
 				}
-				// 更新
-				storager.updateDevice(device);
 
 				RequestMessage msg = new RequestMessage();
 				msg.setDeviceId(deviceId);

+ 12 - 3
src/main/java/com/genersoft/iot/vmp/vmanager/device/DeviceController.java

@@ -66,7 +66,7 @@ public class DeviceController {
 	 * @param count 每页条数
 	 * @return 通道列表
 	 */
-	@GetMapping("devices/{deviceId}/channels")
+	@GetMapping("/devices/{deviceId}/channels")
 	public ResponseEntity<PageResult> channels(@PathVariable String deviceId,
 											   int page, int count,
 											   @RequestParam(required = false) String query,
@@ -123,7 +123,7 @@ public class DeviceController {
 	 * @param count 每页条数
 	 * @return 子通道列表
 	 */
-	@GetMapping("subChannels/{deviceId}/{channelId}/channels")
+	@GetMapping("/subChannels/{deviceId}/{channelId}/channels")
 	public ResponseEntity<PageResult> subChannels(@PathVariable String deviceId,
 												  @PathVariable String channelId,
 												  int page,
@@ -145,9 +145,18 @@ public class DeviceController {
 		return new ResponseEntity<>(pageResult,HttpStatus.OK);
 	}
 
-	@PostMapping("channel/update/{deviceId}")
+	@PostMapping("/channel/update/{deviceId}")
 	public ResponseEntity<PageResult> updateChannel(@PathVariable String deviceId,DeviceChannel channel){
 		storager.updateChannel(deviceId, channel);
 		return new ResponseEntity<>(null,HttpStatus.OK);
 	}
+
+	@GetMapping("/devices/{deviceId}/transport/{transport}")
+	@PostMapping("/devices/{deviceId}/transport/{transport}")
+	public ResponseEntity<PageResult> updateTransport(@PathVariable String deviceId, @PathVariable String transport){
+		Device device = storager.queryVideoDevice(deviceId);
+		device.setTransport(transport);
+		storager.updateDevice(device);
+		return new ResponseEntity<>(null,HttpStatus.OK);
+	}
 }

+ 176 - 2
src/main/java/com/genersoft/iot/vmp/vmanager/device/entity/Device.java

@@ -12,14 +12,12 @@ import javax.validation.constraints.Size;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
 
 /**
  * @Description:视频设备信息
  * @author: songww
  * @date:   2020年5月8日 下午2:05:56
  */
-@Data
 @ApiModel(value = "视频设备信息", description = "视频设备信息")
 @Table(name="VMP_VIDEODEVICES")
 public class Device {
@@ -224,4 +222,180 @@ public class Device {
 	@Transient
 	private List<DeviceChannel> channelList;
 
+
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getDeviceName() {
+		return deviceName;
+	}
+
+	public void setDeviceName(String deviceName) {
+		this.deviceName = deviceName;
+	}
+
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	public String getModel() {
+		return model;
+	}
+
+	public void setModel(String model) {
+		this.model = model;
+	}
+
+	public String getFirmware() {
+		return firmware;
+	}
+
+	public void setFirmware(String firmware) {
+		this.firmware = firmware;
+	}
+
+	public String getProtocol() {
+		return protocol;
+	}
+
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
+
+	public String getTransport() {
+		return transport;
+	}
+
+	public void setTransport(String transport) {
+		this.transport = transport;
+	}
+
+	public String getStreamMode() {
+		return streamMode;
+	}
+
+	public void setStreamMode(String streamMode) {
+		this.streamMode = streamMode;
+	}
+
+	public String getIp() {
+		return ip;
+	}
+
+	public void setIp(String ip) {
+		this.ip = ip;
+	}
+
+	public Integer getPort() {
+		return port;
+	}
+
+	public void setPort(Integer port) {
+		this.port = port;
+	}
+
+	public String getOnline() {
+		return online;
+	}
+
+	public void setOnline(String online) {
+		this.online = online;
+	}
+
+	public Integer getChannelSum() {
+		return channelSum;
+	}
+
+	public void setChannelSum(Integer channelSum) {
+		this.channelSum = channelSum;
+	}
+
+	public String getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getRegisterTime() {
+		return registerTime;
+	}
+
+	public void setRegisterTime(String registerTime) {
+		this.registerTime = registerTime;
+	}
+
+	public String getHeartbeatTime() {
+		return heartbeatTime;
+	}
+
+	public void setHeartbeatTime(String heartbeatTime) {
+		this.heartbeatTime = heartbeatTime;
+	}
+
+	public String getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(String updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getUpdatePerson() {
+		return updatePerson;
+	}
+
+	public void setUpdatePerson(String updatePerson) {
+		this.updatePerson = updatePerson;
+	}
+
+	public String getSyncTime() {
+		return syncTime;
+	}
+
+	public void setSyncTime(String syncTime) {
+		this.syncTime = syncTime;
+	}
+
+	public String getSyncPerson() {
+		return syncPerson;
+	}
+
+	public void setSyncPerson(String syncPerson) {
+		this.syncPerson = syncPerson;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public List<DeviceChannel> getChannelList() {
+		return channelList;
+	}
+
+	public void setChannelList(List<DeviceChannel> channelList) {
+		this.channelList = channelList;
+	}
 }

+ 191 - 2
src/main/java/com/genersoft/iot/vmp/vmanager/device/entity/DeviceChannel.java

@@ -6,14 +6,12 @@ import javax.persistence.Table;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
 
 /**
  * @Description:设备通道信息
  * @author: songww
  * @date:   2020年5月20日 下午9:00:46     
  */
-@Data
 @ApiModel(value = "设备通道信息", description = "设备通道信息")
 @Table(name="VMP_VIDEOCHANNELS")
 public class DeviceChannel {
@@ -193,4 +191,195 @@ public class DeviceChannel {
 	@Column(name="LATITUDE")
 	private double latitude;
 
+	public String getChannelId() {
+		return channelId;
+	}
+
+	public void setChannelId(String channelId) {
+		this.channelId = channelId;
+	}
+
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getChannelName() {
+		return channelName;
+	}
+
+	public void setChannelName(String channelName) {
+		this.channelName = channelName;
+	}
+
+	public String getManufacture() {
+		return manufacture;
+	}
+
+	public void setManufacture(String manufacture) {
+		this.manufacture = manufacture;
+	}
+
+	public String getModel() {
+		return model;
+	}
+
+	public void setModel(String model) {
+		this.model = model;
+	}
+
+	public String getOwner() {
+		return owner;
+	}
+
+	public void setOwner(String owner) {
+		this.owner = owner;
+	}
+
+	public String getCivilCode() {
+		return civilCode;
+	}
+
+	public void setCivilCode(String civilCode) {
+		this.civilCode = civilCode;
+	}
+
+	public String getBlock() {
+		return block;
+	}
+
+	public void setBlock(String block) {
+		this.block = block;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getParental() {
+		return parental;
+	}
+
+	public void setParental(String parental) {
+		this.parental = parental;
+	}
+
+	public String getParentId() {
+		return parentId;
+	}
+
+	public void setParentId(String parentId) {
+		this.parentId = parentId;
+	}
+
+	public String getSafetyWay() {
+		return safetyWay;
+	}
+
+	public void setSafetyWay(String safetyWay) {
+		this.safetyWay = safetyWay;
+	}
+
+	public String getRegisterWay() {
+		return registerWay;
+	}
+
+	public void setRegisterWay(String registerWay) {
+		this.registerWay = registerWay;
+	}
+
+	public String getCertNum() {
+		return certNum;
+	}
+
+	public void setCertNum(String certNum) {
+		this.certNum = certNum;
+	}
+
+	public String getCertValid() {
+		return certValid;
+	}
+
+	public void setCertValid(String certValid) {
+		this.certValid = certValid;
+	}
+
+	public String getCertErrCode() {
+		return certErrCode;
+	}
+
+	public void setCertErrCode(String certErrCode) {
+		this.certErrCode = certErrCode;
+	}
+
+	public String getCertEndTime() {
+		return certEndTime;
+	}
+
+	public void setCertEndTime(String certEndTime) {
+		this.certEndTime = certEndTime;
+	}
+
+	public String getSecrecy() {
+		return secrecy;
+	}
+
+	public void setSecrecy(String secrecy) {
+		this.secrecy = secrecy;
+	}
+
+	public String getIp() {
+		return ip;
+	}
+
+	public void setIp(String ip) {
+		this.ip = ip;
+	}
+
+	public Integer getPort() {
+		return port;
+	}
+
+	public void setPort(Integer port) {
+		this.port = port;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getOnline() {
+		return online;
+	}
+
+	public void setOnline(String online) {
+		this.online = online;
+	}
+
+	public double getLongitude() {
+		return longitude;
+	}
+
+	public void setLongitude(double longitude) {
+		this.longitude = longitude;
+	}
+
+	public double getLatitude() {
+		return latitude;
+	}
+
+	public void setLatitude(double latitude) {
+		this.latitude = latitude;
+	}
 }

+ 21 - 2
web_src/src/components/videoList.vue

@@ -29,7 +29,14 @@
 					</el-table-column>
 					<el-table-column prop="model" label="固件版本" align="center">
 					</el-table-column>
-					<el-table-column prop="transport" label="通讯方式" align="center">
+					<el-table-column label="通讯方式" align="center">
+            <template slot-scope="scope">
+              <el-select @change="transportChange(scope.row)" v-model="scope.row.streamMode" placeholder="请选择">
+                <el-option key="UDP" label="UDP" value="UDP"></el-option>
+                <el-option key="TCP-ACTIVE" label="TCP主动模式" value="TCP-ACTIVE"></el-option>
+                <el-option key="TCP-PASSIVE" label="TCP被动模式" :disabled="true" value="TCP-PASSIVE"></el-option>
+              </el-select>
+            </template>
 					</el-table-column>
 					<el-table-column prop="channelCount" label="通道数" align="center">
 					</el-table-column>
@@ -180,7 +187,19 @@
 					that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
 				}).catch(function(e) {
 				});
-			}
+			},
+      transportChange: function (row) {
+        console.log(`修改传输方式为 ${row.transport}:${row.deviceId} `);
+        let that = this;
+        this.$axios({
+          method: 'get',
+          url: '/api/devices/' + row.deviceId + '/transport/' + row.transport
+        }).then(function(res) {
+          let ssrc = res.data.ssrc;
+          that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
+        }).catch(function(e) {
+        });
+      }
 
 		}
 	};