Parcourir la source

设备解析修改

caiaf il y a 4 ans
Parent
commit
e804d487a7

+ 1 - 1
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/BackMainThread.kt

@@ -61,7 +61,7 @@ class BackMainThread {
         if(states.isEmpty()) {
 //            states.addAll(arrayListOf(state31, state3))
 //            states.addAll(arrayListOf(state1, state10, state11, state2))
-            states.addAll(arrayListOf( state31, state3, state4))
+            states.addAll(arrayListOf(state0, state1, state10, state11, state2, state20, state21, state31, state3, state4))
         }
         states.forEach { modelState ->
             modelState.prepareModel()

+ 6 - 1
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/services/json/EquipmentAnalyzer.kt

@@ -138,8 +138,13 @@ object EquipmentAnalyzer {
                         if(equipComp != null){
                             obj.family = equipComp.classCode?:"OTXXXX"
                         }else{
+                            equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!)).entity()
+                            if(equipComp != null){
+                                obj.family = equipComp.classCode?:"OTXXXX"
+                            }else{
+                                obj.family = "OTXXXX"
+                            }
                             //未识别的设备类型,类型码转换为"OTXXXX",OT表示“其他系统”,“XXXX”表示未识别的设备
-                            obj.family = "OTXXXX"
                         }
                     }else{
                         equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!)).entity()