|
@@ -261,18 +261,20 @@ class ChooseSpaceVM(
|
|
|
}
|
|
|
objEntity?.let {
|
|
|
val obj = objEntity.infos!!.asJsonObject
|
|
|
- val info = gson.fromJson(obj, SpaceInfo::class.java)
|
|
|
- equips.add(objEntity)
|
|
|
+ if (obj["outline"] is ArrayList<*>) {
|
|
|
+ val info = gson.fromJson(obj, SpaceInfo::class.java)
|
|
|
+ equips.add(objEntity)
|
|
|
// spaces.add(info.outline[0])
|
|
|
|
|
|
- val tunableSpace = TunableSpace()
|
|
|
- tunableSpace.outLine = info.outline
|
|
|
- tunableSpace.name = ObjectNameUtils.getEquipName(objEntity)
|
|
|
- tunableSpace.id = objEntity.id
|
|
|
- val floor = repo.getFloorById(objEntity.floorId!!)
|
|
|
- tunableSpace.floorName = floor.localName
|
|
|
- tunableSpace.floorId = objEntity.floorId
|
|
|
- spaces.add(tunableSpace)
|
|
|
+ val tunableSpace = TunableSpace()
|
|
|
+ tunableSpace.outLine = info.outline
|
|
|
+ tunableSpace.name = ObjectNameUtils.getEquipName(objEntity)
|
|
|
+ tunableSpace.id = objEntity.id
|
|
|
+ val floor = repo.getFloorById(objEntity.floorId!!)
|
|
|
+ tunableSpace.floorName = floor.localName
|
|
|
+ tunableSpace.floorId = objEntity.floorId
|
|
|
+ spaces.add(tunableSpace)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
mEmitter.SendDirective(SERVE_AREAS, spaces)
|