|
@@ -15,6 +15,7 @@ import com.framework.mvvm.model.db.entity.task.RelationEntity
|
|
|
import com.framework.mvvm.model.db.entity.task.ServeAreaEntity
|
|
|
import com.framework.mvvm.model.repository.AdmRepository
|
|
|
import com.google.gson.Gson
|
|
|
+import com.google.gson.JsonArray
|
|
|
import com.google.gson.reflect.TypeToken
|
|
|
import com.sybotan.android.demo.activities.BaseActivity
|
|
|
import com.sybotan.android.demo.bean.RelConfigEntityPackClass
|
|
@@ -206,11 +207,11 @@ class ChooseSpaceVM(
|
|
|
val objFrom: String
|
|
|
val objto: String
|
|
|
if (direction == "->") {
|
|
|
- objFrom = deviceId
|
|
|
- objto = id
|
|
|
- } else {
|
|
|
objto = deviceId
|
|
|
objFrom = id
|
|
|
+ } else {
|
|
|
+ objFrom = deviceId
|
|
|
+ objto = id
|
|
|
}
|
|
|
val en = repo.getRelByGraphCodeAndRelCodeAndObjFromAndObjTo(
|
|
|
groupRelConfigEntity.entity.graphCode!!,
|
|
@@ -261,7 +262,7 @@ class ChooseSpaceVM(
|
|
|
}
|
|
|
objEntity?.let {
|
|
|
val obj = objEntity.infos!!.asJsonObject
|
|
|
- if (obj["outline"] is ArrayList<*>) {
|
|
|
+ if (obj["outline"] is JsonArray) {
|
|
|
val info = gson.fromJson(obj, SpaceInfo::class.java)
|
|
|
equips.add(objEntity)
|
|
|
// spaces.add(info.outline[0])
|