临时提交
This commit is contained in:
@@ -35,10 +35,10 @@ public class GbCode {
|
||||
code = code.trim();
|
||||
GbCode gbCode = new GbCode();
|
||||
gbCode.setCenterCode(code.substring(0, 8));
|
||||
gbCode.setIndustryCode(code.substring(9, 10));
|
||||
gbCode.setTypeCode(code.substring(11, 13));
|
||||
gbCode.setNetCode(code.substring(14, 15));
|
||||
gbCode.setSn(code.substring(15, 20));
|
||||
gbCode.setIndustryCode(code.substring(8, 10));
|
||||
gbCode.setTypeCode(code.substring(10, 13));
|
||||
gbCode.setNetCode(code.substring(13, 14));
|
||||
gbCode.setSn(code.substring(14));
|
||||
return gbCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,28 +34,18 @@ public class GroupTree {
|
||||
@Schema(description = "父区域国标ID")
|
||||
private String parentDeviceId;
|
||||
|
||||
/**
|
||||
* 业务分组ID
|
||||
*/
|
||||
@Schema(description = "父区域国标ID")
|
||||
private String businessGroup;
|
||||
|
||||
@Schema(description = "是否有子节点")
|
||||
private boolean isLeaf;
|
||||
|
||||
@Schema(description = "类型, 行政区划:0 摄像头: 1")
|
||||
private int type;
|
||||
|
||||
|
||||
|
||||
public static GroupTree getInstance(Region region) {
|
||||
GroupTree regionTree = new GroupTree();
|
||||
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 GroupTree getInstance(CommonGBChannel channel) {
|
||||
GroupTree regionTree = new GroupTree();
|
||||
regionTree.setId(channel.getGbDeviceId());
|
||||
|
||||
Reference in New Issue
Block a user