Bladeren bron

fix bug: 修复门,窗,柱,墙未同步物理世界的问题

lijie 2 jaren geleden
bovenliggende
commit
a42935592d

+ 14 - 2
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/sync/SyncEquipment.kt

@@ -101,6 +101,9 @@ class SyncEquipment : SyncObject {
         if (arr.isNullOrEmpty()){
             return
         }
+        if (properties.datacenter.equipColumn.isNullOrEmpty()){
+            return
+        }
         arr.forEach {
             val columnEquip = Equipment()
             columnEquip.localId=it.sourceId
@@ -132,6 +135,9 @@ class SyncEquipment : SyncObject {
         if (arr.isNullOrEmpty()){
             return
         }
+        if (properties.datacenter.equipWindow.isNullOrEmpty()){
+            return
+        }
         arr.forEach {
             val windowEquip = Equipment()
             windowEquip.localId=it.sourceId
@@ -195,6 +201,9 @@ class SyncEquipment : SyncObject {
         if (arr.isNullOrEmpty()){
             return
         }
+        if (properties.datacenter.equipDoor.isNullOrEmpty()){
+            return
+        }
         arr.forEach {
             val doorEquip = Equipment()
             doorEquip.localId=it.sourceId
@@ -226,6 +235,9 @@ class SyncEquipment : SyncObject {
         if (arr.isNullOrEmpty()){
             return
         }
+        if(properties.datacenter.equipWall.isNullOrEmpty()){
+            return
+        }
         arr.forEach {
             val wallEquip = Equipment()
             val infos = HashMap<String,String>()
@@ -287,8 +299,8 @@ class SyncEquipment : SyncObject {
             }
             if (doorFlag){
                 // 从名称中获取,如果族名称含有防火门关键字则返回防火门编码
-                if (familyName.contains("防火门")){
-                    return "FFFRDW"
+                if (familyName.contains("防火门") && classCodes.size>1){
+                    return classCodes[1]
                 }
             }
         }