临时提交

This commit is contained in:
648540858
2024-08-23 17:50:29 +08:00
parent 5169eb66a3
commit d2654660cb
18 changed files with 153 additions and 219 deletions

View File

@@ -188,6 +188,9 @@ public class DeviceChannel extends CommonGBChannel {
"用于选择码流时组成码流标识。默认为null不设置。可选值: stream/streamnumber/streamprofile/streamMode")
private String streamIdentification;
@Schema(description = "通道类型, 默认0, 0 普通通道1 行政区划 2 业务分组/虚拟组织")
private int channelType;
public void setPtzType(int ptzType) {
this.ptzType = ptzType;
switch (ptzType) {

View File

@@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.common.CivilCodePo;
import com.genersoft.iot.vmp.jt1078.proc.request.Re;
import com.genersoft.iot.vmp.utils.CivilCodeUtil;
import com.genersoft.iot.vmp.utils.DateUtil;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -32,6 +31,12 @@ public class Region implements Comparable<Region>{
@Schema(description = "区域名称")
private String name;
/**
* 父区域国标ID
*/
@Schema(description = "父区域ID")
private Integer parentId;
/**
* 父区域国标ID
*/

View File

@@ -8,61 +8,11 @@ import lombok.Data;
*/
@Data
@Schema(description = "区域树")
public class RegionTree {
/**
* 数据库Id
*/
@Schema(description = "数据库Id")
private int dbId;
/**
* 区域国标编号
*/
@Schema(description = "区域国标编号")
private String id;
/**
* 区域名称
*/
@Schema(description = "区域名称")
private String label;
/**
* 父区域国标ID
*/
@Schema(description = "父区域国标ID")
private String parentDeviceId;
public class RegionTree extends Region {
@Schema(description = "是否有子节点")
private boolean isLeaf;
@Schema(description = "类型, 行政区划:0 摄像头: 1")
private int type;
public static RegionTree getInstance(Region region) {
RegionTree regionTree = new RegionTree();
regionTree.setId(region.getDeviceId());
regionTree.setLabel(region.getName());
regionTree.setParentDeviceId(region.getParentDeviceId());
regionTree.setType(0);
if (region.getDeviceId().length() < 8) {
regionTree.setLeaf(false);
}else {
regionTree.setLeaf(true);
}
return regionTree;
}
public static RegionTree getInstance(CommonGBChannel channel) {
RegionTree regionTree = new RegionTree();
regionTree.setId(channel.getGbDeviceId());
regionTree.setLabel(channel.getGbName());
regionTree.setParentDeviceId(channel.getGbCivilCode());
regionTree.setType(1);
regionTree.setLeaf(true);
return regionTree;
}
}