国标级联--选择通道003-前端页面
This commit is contained in:
@@ -61,13 +61,6 @@ public class DeviceController {
|
||||
return storager.queryVideoDeviceList(page, count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询通道数
|
||||
* @param deviceId 设备id
|
||||
* @param page 当前页
|
||||
* @param count 每页条数
|
||||
* @return 通道列表
|
||||
*/
|
||||
/**
|
||||
* 分页查询通道数
|
||||
*
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.genersoft.iot.vmp.vmanager.platform;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
|
||||
import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.vmanager.platform.bean.UpdateChannelParam;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -15,6 +18,9 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@@ -142,5 +148,34 @@ public class PlatformController {
|
||||
return new ResponseEntity<>(String.valueOf(parentPlatform != null), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping("/platforms/channelList")
|
||||
@ResponseBody
|
||||
public PageInfo<ChannelReduce> channelList(int page, int count,
|
||||
@RequestParam(required = false) String query,
|
||||
@RequestParam(required = false) Boolean online,
|
||||
@RequestParam(required = false) Boolean channelType){
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("查询所有所有通道API调用");
|
||||
}
|
||||
|
||||
PageInfo<ChannelReduce> channelReduces = storager.queryChannelListInAll(page, count, query, online, channelType, null);
|
||||
|
||||
return channelReduces;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/platforms/updateChannelForGB")
|
||||
@ResponseBody
|
||||
public ResponseEntity<String> updateChannelForGB(@RequestBody UpdateChannelParam param){
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("给上级平台添加国标通道API调用");
|
||||
}
|
||||
int result = storager.updateChannelForGB(param.getPlatformId(), param.getChannelReduces());
|
||||
|
||||
return new ResponseEntity<>(String.valueOf(result > 0), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.genersoft.iot.vmp.vmanager.platform.bean;
|
||||
|
||||
/**
|
||||
* 精简的channel信息展示,主要是选择通道的时候展示列表使用
|
||||
*/
|
||||
public class ChannelReduce {
|
||||
|
||||
/**
|
||||
* 通道id
|
||||
*/
|
||||
private String channelId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 通道名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 生产厂商
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* wan地址
|
||||
*/
|
||||
private String hostAddress;
|
||||
|
||||
/**
|
||||
* 子节点数
|
||||
*/
|
||||
private int subCount;
|
||||
|
||||
|
||||
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 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 getHostAddress() {
|
||||
return hostAddress;
|
||||
}
|
||||
|
||||
public void setHostAddress(String hostAddress) {
|
||||
this.hostAddress = hostAddress;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.genersoft.iot.vmp.vmanager.platform.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UpdateChannelParam {
|
||||
private String platformId;
|
||||
private List<ChannelReduce> channelReduces;
|
||||
|
||||
public String getPlatformId() {
|
||||
return platformId;
|
||||
}
|
||||
|
||||
public void setPlatformId(String platformId) {
|
||||
this.platformId = platformId;
|
||||
}
|
||||
|
||||
public List<ChannelReduce> getChannelReduces() {
|
||||
return channelReduces;
|
||||
}
|
||||
|
||||
public void setChannelReduces(List<ChannelReduce> channelReduces) {
|
||||
this.channelReduces = channelReduces;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user