临时提交

This commit is contained in:
648540858
2024-08-01 17:50:34 +08:00
parent f7c98301ac
commit 3f2c9f6451
3 changed files with 78 additions and 10 deletions

View File

@@ -325,4 +325,21 @@ public class CommonGBChannel {
return content.toString();
}
public static CommonGBChannel build(Group group) {
GbCode gbCode = GbCode.decode(group.getDeviceId());
CommonGBChannel channel = new CommonGBChannel();
if (gbCode.getTypeCode().equals("215")) {
// 业务分组
channel.setGbName(group.getName());
channel.setGbDeviceId(group.getDeviceId());
}else {
// 虚拟组织
channel.setGbName(group.getName());
channel.setGbDeviceId(group.getDeviceId());
channel.setGbParentId(group.getParentDeviceId());
channel.setGbBusinessGroupId(group.getBusinessGroup());
}
return channel;
}
}