|
@@ -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
|