Browse Source

feat 关系查找的bug

lihao1 2 years ago
parent
commit
78ebfc138c

+ 3 - 4
demo/src/main/java/com/sybotan/android/demo/viewmodel/EquipDetailVM.kt

@@ -25,7 +25,6 @@ import com.sybotan.android.demo.bean.result.*
 import com.sybotan.android.demo.bean.result.Position
 import com.sybotan.android.demo.retrofit.BaseViewModelInterface
 import com.sybotan.android.demo.tools.CommonUtils
-import com.sybotan.android.demo.tools.ToastUtils
 import kotlinx.coroutines.launch
 import org.kodein.di.DI
 import org.kodein.di.DIAware
@@ -263,8 +262,8 @@ class EquipDetailVM(
             val relList = mutableListOf<List<RelationPackClass>>()
             val fromList = repo.getRelConfigByCodeFrom(entity.code!!)
             val toList = repo.getRelConfigByCodeTo(entity.code!!)
-            loadCfgs(entity.code, fromList, true, configParent)
-            loadCfgs(entity.code, toList, false, configParent)
+            loadCfgs(entity.code, fromList, false, configParent)
+            loadCfgs(entity.code, toList, true, configParent)
             for (parent in configParent) {
                 var rel = ArrayList<RelationPackClass>()
                 for (child in parent.targetTypes) {
@@ -402,7 +401,7 @@ class EquipDetailVM(
         bindRelationEntityName(to)
         if (!CommonUtils.IsNull(to)) {
             for (t in to) {
-                if (child.targetCode.equals(parent.entity.classCodeTo)) {
+                if (child.targetCode.equals(parent.entity.classCodeTo) || child.targetCode.equals(parent.entity.classCodeFrom)) {
                     val pack = RelationPackClass()
                     pack.entity = t
                     pack.targetPipeType = child

+ 2 - 2
gradle.properties

@@ -17,14 +17,14 @@ SAGA_SERVICE_VERSION=1.4.140
 MAVEN_REPO_RELEASE_URL=http\://dev.dp.sagacloud.cn\:8082/repository/maven-releases/
 EVENTBUS_VERSION=3.1.1
 EASYPERMISSIONS_VERSION=1.2.0
-SAGA_ANDROID_VERSION=1.0.14
+SAGA_ANDROID_VERSION=1.0.15
 JUNIT_VERSION=5.3.1
 KOTLIN_VERSION=1.5.31
 SAGA_GROUP=cn.sagacloud
 SYBOTAN_KOTLIN_VERSION=1.2.42
 android.useAndroidX=true
 LICENSE_NAME=The Apache Software License, Version 2.0
-SAGA_CODE=26
+SAGA_CODE=27
 MAVEN_REPO_SNAPSHOT_URL=http\://dev.dp.sagacloud.cn\:8082/repository/maven-snapshots/
 NEXUS_USERNAME=saga
 DEVELOPER_ID=Andy.Sybotan