Browse Source

设备识别更新本地编码 且 不符合识别规则的构件抛弃

caiaf 3 years ago
parent
commit
ea6f47620a

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

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