Compare commits
2 Commits
5fc82d4bc3
...
040359177e
| Author | SHA1 | Date |
|---|---|---|
|
|
040359177e | |
|
|
a99053e108 |
|
|
@ -80,6 +80,7 @@ public interface IThingsBoardDomain {
|
|||
* @param deviceId 设备ID
|
||||
* @return 网关设备ID,如果设备不属于任何网关则返回 null
|
||||
*/
|
||||
@Deprecated
|
||||
String getDeviceGatewayId(String deviceId);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ public class ThingsBoardDomainImpl implements IThingsBoardDomain {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getDeviceGatewayId(String deviceId) {
|
||||
try {
|
||||
DeviceId id = new DeviceId(UUID.fromString(deviceId));
|
||||
|
|
@ -247,15 +248,11 @@ public class ThingsBoardDomainImpl implements IThingsBoardDomain {
|
|||
|
||||
try {
|
||||
|
||||
// 调用 findInfoByFrom 查询从网关出发的关系信息
|
||||
// 对应前端 API: GET /api/relations/info?fromId=xxx&fromType=DEVICE&relationTypeGroup=COMMON
|
||||
log.info("--------------------------" + gatewayDeviceId);
|
||||
EntityId gatewayId = new EntityId() {
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return UUID.fromString(gatewayDeviceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityType getEntityType() {
|
||||
return EntityType.DEVICE;
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ public class SynService {
|
|||
|
||||
try {
|
||||
// 获取子设备属性
|
||||
AttributeMap attributes = iThingsBoardDomain.getDeviceAttributes(childDeviceId);
|
||||
AttributeMap attributes = iThingsBoardDomain.getPredefinedDeviceAttributes(childDeviceId);
|
||||
|
||||
// 判断设备类型
|
||||
DeviceType deviceType = determineDeviceType(childDeviceInfo, attributes);
|
||||
|
|
|
|||
Loading…
Reference in New Issue