Commit c5ff8113780960c55de98c0b9f3b1f895dd828e2

Authored by 648540858
1 parent 048a6ce0

优化兼容接口

src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
@@ -109,12 +109,6 @@ public class ApiDeviceController { @@ -109,12 +109,6 @@ public class ApiDeviceController {
109 // } 109 // }
110 JSONObject result = new JSONObject(); 110 JSONObject result = new JSONObject();
111 // 查询设备是否存在 111 // 查询设备是否存在
112 - Device device = storager.queryVideoDevice(serial);  
113 - if (device == null) {  
114 - result.put("ChannelCount", 0);  
115 - result.put("ChannelList", "[]");  
116 - return result;  
117 - }  
118 List<DeviceChannel> deviceChannels; 112 List<DeviceChannel> deviceChannels;
119 List<String> channelIds = null; 113 List<String> channelIds = null;
120 if (!StringUtils.isEmpty(code)) { 114 if (!StringUtils.isEmpty(code)) {
src/main/java/com/genersoft/iot/vmp/web/gb28181/dto/DeviceChannelExtent.java 0 → 100644
  1 +package com.genersoft.iot.vmp.web.gb28181.dto;
  2 +
  3 +import io.swagger.v3.oas.annotations.media.Schema;
  4 +
  5 +@Schema(description = "通道信息")
  6 +public class DeviceChannelExtent {
  7 +
  8 +
  9 + /**
  10 + * 数据库自增ID
  11 + */
  12 + @Schema(description = "数据库自增ID")
  13 + private int id;
  14 +
  15 + /**
  16 + * 通道国标编号
  17 + */
  18 + @Schema(description = "通道国标编号")
  19 + private String channelId;
  20 +
  21 + /**
  22 + * 设备国标编号
  23 + */
  24 + @Schema(description = "设备国标编号")
  25 + private String deviceId;
  26 +
  27 + /**
  28 + * 通道名
  29 + */
  30 + @Schema(description = "名称")
  31 + private String name;
  32 +
  33 + /**
  34 + * 生产厂商
  35 + */
  36 + @Schema(description = "生产厂商")
  37 + private String manufacture;
  38 +
  39 + /**
  40 + * 型号
  41 + */
  42 + @Schema(description = "型号")
  43 + private String model;
  44 +
  45 + /**
  46 + * 设备归属
  47 + */
  48 + @Schema(description = "设备归属")
  49 + private String owner;
  50 +
  51 + /**
  52 + * 行政区域
  53 + */
  54 + @Schema(description = "行政区域")
  55 + private String civilCode;
  56 +
  57 + /**
  58 + * 警区
  59 + */
  60 + @Schema(description = "警区")
  61 + private String block;
  62 +
  63 + /**
  64 + * 安装地址
  65 + */
  66 + @Schema(description = "安装地址")
  67 + private String address;
  68 +
  69 + /**
  70 + * 是否有子设备 1有, 0没有
  71 + */
  72 + @Schema(description = "是否有子设备 1有, 0没有")
  73 + private int parental;
  74 +
  75 + /**
  76 + * 父级id
  77 + */
  78 + @Schema(description = "父级id")
  79 + private String parentId;
  80 +
  81 + /**
  82 + * 信令安全模式 缺省为0; 0:不采用; 2: S/MIME签名方式; 3: S/ MIME加密签名同时采用方式; 4:数字摘要方式
  83 + */
  84 + @Schema(description = "信令安全模式 缺省为0; 0:不采用; 2: S/MIME签名方式; 3: S/ MIME加密签名同时采用方式; 4:数字摘要方式")
  85 + private int safetyWay;
  86 +
  87 + /**
  88 + * 注册方式 缺省为1;1:符合IETFRFC3261标准的认证注册模 式; 2:基于口令的双向认证注册模式; 3:基于数字证书的双向认证注册模式
  89 + */
  90 + @Schema(description = "注册方式 缺省为1;1:符合IETFRFC3261标准的认证注册模 式; 2:基于口令的双向认证注册模式; 3:基于数字证书的双向认证注册模式")
  91 + private int registerWay;
  92 +
  93 + /**
  94 + * 证书序列号
  95 + */
  96 + @Schema(description = "证书序列号")
  97 + private String certNum;
  98 +
  99 + /**
  100 + * 证书有效标识 缺省为0;证书有效标识:0:无效1: 有效
  101 + */
  102 + @Schema(description = "证书有效标识 缺省为0;证书有效标识:0:无效1: 有效")
  103 + private int certifiable;
  104 +
  105 + /**
  106 + * 证书无效原因码
  107 + */
  108 + @Schema(description = "证书无效原因码")
  109 + private int errCode;
  110 +
  111 + /**
  112 + * 证书终止有效期
  113 + */
  114 + @Schema(description = "证书终止有效期")
  115 + private String endTime;
  116 +
  117 + /**
  118 + * 保密属性 缺省为0; 0:不涉密, 1:涉密
  119 + */
  120 + @Schema(description = "保密属性 缺省为0; 0:不涉密, 1:涉密")
  121 + private String secrecy;
  122 +
  123 + /**
  124 + * IP地址
  125 + */
  126 + @Schema(description = "IP地址")
  127 + private String ipAddress;
  128 +
  129 + /**
  130 + * 端口号
  131 + */
  132 + @Schema(description = "端口号")
  133 + private int port;
  134 +
  135 + /**
  136 + * 密码
  137 + */
  138 + @Schema(description = "密码")
  139 + private String password;
  140 +
  141 + /**
  142 + * 云台类型
  143 + */
  144 + @Schema(description = "云台类型")
  145 + private int PTZType;
  146 +
  147 + /**
  148 + * 云台类型描述字符串
  149 + */
  150 + @Schema(description = "云台类型描述字符串")
  151 + private String PTZTypeText;
  152 +
  153 + /**
  154 + * 创建时间
  155 + */
  156 + @Schema(description = "创建时间")
  157 + private String createTime;
  158 +
  159 + /**
  160 + * 更新时间
  161 + */
  162 + @Schema(description = "更新时间")
  163 + private String updateTime;
  164 +
  165 + /**
  166 + * 在线/离线
  167 + * 1在线,0离线
  168 + * 默认在线
  169 + * 信令:
  170 + * <Status>ON</Status>
  171 + * <Status>OFF</Status>
  172 + * 遇到过NVR下的IPC下发信令可以推流, 但是 Status 响应 OFF
  173 + */
  174 + @Schema(description = "在线/离线, 1在线,0离线")
  175 + private int status;
  176 +
  177 + /**
  178 + * 经度
  179 + */
  180 + @Schema(description = "经度")
  181 + private double longitude;
  182 +
  183 + /**
  184 + * 纬度
  185 + */
  186 + @Schema(description = "纬度")
  187 + private double latitude;
  188 +
  189 + /**
  190 + * 经度 GCJ02
  191 + */
  192 + @Schema(description = "GCJ02坐标系经度")
  193 + private double longitudeGcj02;
  194 +
  195 + /**
  196 + * 纬度 GCJ02
  197 + */
  198 + @Schema(description = "GCJ02坐标系纬度")
  199 + private double latitudeGcj02;
  200 +
  201 + /**
  202 + * 经度 WGS84
  203 + */
  204 + @Schema(description = "WGS84坐标系经度")
  205 + private double longitudeWgs84;
  206 +
  207 + /**
  208 + * 纬度 WGS84
  209 + */
  210 + @Schema(description = "WGS84坐标系纬度")
  211 + private double latitudeWgs84;
  212 +
  213 + /**
  214 + * 子设备数
  215 + */
  216 + @Schema(description = "子设备数")
  217 + private int subCount;
  218 +
  219 + /**
  220 + * 流唯一编号,存在表示正在直播
  221 + */
  222 + @Schema(description = "流唯一编号,存在表示正在直播")
  223 + private String streamId;
  224 +
  225 + /**
  226 + * 是否含有音频
  227 + */
  228 + @Schema(description = "是否含有音频")
  229 + private boolean hasAudio;
  230 +
  231 + /**
  232 + * 标记通道的类型,0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
  233 + */
  234 + @Schema(description = "标记通道的类型,0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划")
  235 + private int channelType;
  236 +
  237 + /**
  238 + * 业务分组
  239 + */
  240 + @Schema(description = "业务分组")
  241 + private String businessGroupId;
  242 +
  243 + /**
  244 + * GPS的更新时间
  245 + */
  246 + @Schema(description = "GPS的更新时间")
  247 + private String gpsTime;
  248 +
  249 + public int getId() {
  250 + return id;
  251 + }
  252 +
  253 + public void setId(int id) {
  254 + this.id = id;
  255 + }
  256 +
  257 + public String getDeviceId() {
  258 + return deviceId;
  259 + }
  260 +
  261 + public void setDeviceId(String deviceId) {
  262 + this.deviceId = deviceId;
  263 + }
  264 +
  265 + public void setPTZType(int PTZType) {
  266 + this.PTZType = PTZType;
  267 + switch (PTZType) {
  268 + case 0:
  269 + this.PTZTypeText = "未知";
  270 + break;
  271 + case 1:
  272 + this.PTZTypeText = "球机";
  273 + break;
  274 + case 2:
  275 + this.PTZTypeText = "半球";
  276 + break;
  277 + case 3:
  278 + this.PTZTypeText = "固定枪机";
  279 + break;
  280 + case 4:
  281 + this.PTZTypeText = "遥控枪机";
  282 + break;
  283 + }
  284 + }
  285 +
  286 + public String getChannelId() {
  287 + return channelId;
  288 + }
  289 +
  290 + public void setChannelId(String channelId) {
  291 + this.channelId = channelId;
  292 + }
  293 +
  294 + public String getName() {
  295 + return name;
  296 + }
  297 +
  298 + public void setName(String name) {
  299 + this.name = name;
  300 + }
  301 +
  302 + public String getManufacture() {
  303 + return manufacture;
  304 + }
  305 +
  306 + public void setManufacture(String manufacture) {
  307 + this.manufacture = manufacture;
  308 + }
  309 +
  310 + public String getModel() {
  311 + return model;
  312 + }
  313 +
  314 + public void setModel(String model) {
  315 + this.model = model;
  316 + }
  317 +
  318 + public String getOwner() {
  319 + return owner;
  320 + }
  321 +
  322 + public void setOwner(String owner) {
  323 + this.owner = owner;
  324 + }
  325 +
  326 + public String getCivilCode() {
  327 + return civilCode;
  328 + }
  329 +
  330 + public void setCivilCode(String civilCode) {
  331 + this.civilCode = civilCode;
  332 + }
  333 +
  334 + public String getBlock() {
  335 + return block;
  336 + }
  337 +
  338 + public void setBlock(String block) {
  339 + this.block = block;
  340 + }
  341 +
  342 + public String getAddress() {
  343 + return address;
  344 + }
  345 +
  346 + public void setAddress(String address) {
  347 + this.address = address;
  348 + }
  349 +
  350 + public int getParental() {
  351 + return parental;
  352 + }
  353 +
  354 + public void setParental(int parental) {
  355 + this.parental = parental;
  356 + }
  357 +
  358 + public String getParentId() {
  359 + return parentId;
  360 + }
  361 +
  362 + public void setParentId(String parentId) {
  363 + this.parentId = parentId;
  364 + }
  365 +
  366 + public int getSafetyWay() {
  367 + return safetyWay;
  368 + }
  369 +
  370 + public void setSafetyWay(int safetyWay) {
  371 + this.safetyWay = safetyWay;
  372 + }
  373 +
  374 + public int getRegisterWay() {
  375 + return registerWay;
  376 + }
  377 +
  378 + public void setRegisterWay(int registerWay) {
  379 + this.registerWay = registerWay;
  380 + }
  381 +
  382 + public String getCertNum() {
  383 + return certNum;
  384 + }
  385 +
  386 + public void setCertNum(String certNum) {
  387 + this.certNum = certNum;
  388 + }
  389 +
  390 + public int getCertifiable() {
  391 + return certifiable;
  392 + }
  393 +
  394 + public void setCertifiable(int certifiable) {
  395 + this.certifiable = certifiable;
  396 + }
  397 +
  398 + public int getErrCode() {
  399 + return errCode;
  400 + }
  401 +
  402 + public void setErrCode(int errCode) {
  403 + this.errCode = errCode;
  404 + }
  405 +
  406 + public String getEndTime() {
  407 + return endTime;
  408 + }
  409 +
  410 + public void setEndTime(String endTime) {
  411 + this.endTime = endTime;
  412 + }
  413 +
  414 + public String getSecrecy() {
  415 + return secrecy;
  416 + }
  417 +
  418 + public void setSecrecy(String secrecy) {
  419 + this.secrecy = secrecy;
  420 + }
  421 +
  422 + public String getIpAddress() {
  423 + return ipAddress;
  424 + }
  425 +
  426 + public void setIpAddress(String ipAddress) {
  427 + this.ipAddress = ipAddress;
  428 + }
  429 +
  430 + public int getPort() {
  431 + return port;
  432 + }
  433 +
  434 + public void setPort(int port) {
  435 + this.port = port;
  436 + }
  437 +
  438 + public String getPassword() {
  439 + return password;
  440 + }
  441 +
  442 + public void setPassword(String password) {
  443 + this.password = password;
  444 + }
  445 +
  446 + public int getPTZType() {
  447 + return PTZType;
  448 + }
  449 +
  450 + public String getPTZTypeText() {
  451 + return PTZTypeText;
  452 + }
  453 +
  454 + public void setPTZTypeText(String PTZTypeText) {
  455 + this.PTZTypeText = PTZTypeText;
  456 + }
  457 +
  458 + public int getStatus() {
  459 + return status;
  460 + }
  461 +
  462 + public void setStatus(int status) {
  463 + this.status = status;
  464 + }
  465 +
  466 + public double getLongitude() {
  467 + return longitude;
  468 + }
  469 +
  470 + public void setLongitude(double longitude) {
  471 + this.longitude = longitude;
  472 + }
  473 +
  474 + public double getLatitude() {
  475 + return latitude;
  476 + }
  477 +
  478 + public void setLatitude(double latitude) {
  479 + this.latitude = latitude;
  480 + }
  481 +
  482 + public double getLongitudeGcj02() {
  483 + return longitudeGcj02;
  484 + }
  485 +
  486 + public void setLongitudeGcj02(double longitudeGcj02) {
  487 + this.longitudeGcj02 = longitudeGcj02;
  488 + }
  489 +
  490 + public double getLatitudeGcj02() {
  491 + return latitudeGcj02;
  492 + }
  493 +
  494 + public void setLatitudeGcj02(double latitudeGcj02) {
  495 + this.latitudeGcj02 = latitudeGcj02;
  496 + }
  497 +
  498 + public double getLongitudeWgs84() {
  499 + return longitudeWgs84;
  500 + }
  501 +
  502 + public void setLongitudeWgs84(double longitudeWgs84) {
  503 + this.longitudeWgs84 = longitudeWgs84;
  504 + }
  505 +
  506 + public double getLatitudeWgs84() {
  507 + return latitudeWgs84;
  508 + }
  509 +
  510 + public void setLatitudeWgs84(double latitudeWgs84) {
  511 + this.latitudeWgs84 = latitudeWgs84;
  512 + }
  513 +
  514 + public int getSubCount() {
  515 + return subCount;
  516 + }
  517 +
  518 + public void setSubCount(int subCount) {
  519 + this.subCount = subCount;
  520 + }
  521 +
  522 + public boolean isHasAudio() {
  523 + return hasAudio;
  524 + }
  525 +
  526 + public void setHasAudio(boolean hasAudio) {
  527 + this.hasAudio = hasAudio;
  528 + }
  529 +
  530 + public String getStreamId() {
  531 + return streamId;
  532 + }
  533 +
  534 + public void setStreamId(String streamId) {
  535 + this.streamId = streamId;
  536 + }
  537 +
  538 + public String getCreateTime() {
  539 + return createTime;
  540 + }
  541 +
  542 + public void setCreateTime(String createTime) {
  543 + this.createTime = createTime;
  544 + }
  545 +
  546 + public String getUpdateTime() {
  547 + return updateTime;
  548 + }
  549 +
  550 + public void setUpdateTime(String updateTime) {
  551 + this.updateTime = updateTime;
  552 + }
  553 +
  554 + public int getChannelType() {
  555 + return channelType;
  556 + }
  557 +
  558 + public void setChannelType(int channelType) {
  559 + this.channelType = channelType;
  560 + }
  561 +
  562 + public String getBusinessGroupId() {
  563 + return businessGroupId;
  564 + }
  565 +
  566 + public void setBusinessGroupId(String businessGroupId) {
  567 + this.businessGroupId = businessGroupId;
  568 + }
  569 +
  570 + public String getGpsTime() {
  571 + return gpsTime;
  572 + }
  573 +
  574 + public void setGpsTime(String gpsTime) {
  575 + this.gpsTime = gpsTime;
  576 + }
  577 +}