Browse Source

设备别名别编码

caiaf 3 năm trước cách đây
mục cha
commit
1e27b0b990

+ 10 - 0
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/model/datacenter/DCEquipment.kt

@@ -59,4 +59,14 @@ open class DCEquipment : DCDataBase() {
     @ApiModelProperty(value = "构件分类名称")
     @JSONField(name = "bimTypeName")
     var bimTypeName: String? = null
+
+    /** 别编码 */
+    @ApiModelProperty(value = "别编码")
+    @JSONField(name = "aliasCode")
+    var aliasCode: String? = null
+
+    /** 别名称 */
+    @ApiModelProperty(value = "别名称")
+    @JSONField(name = "aliasName")
+    var aliasName: String? = null
 }

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

@@ -163,6 +163,8 @@ class SyncEquipment : SyncObject{
             dcEquip.bimTypeID = it.value.bimTypeID
             dcEquip.bimTypeName = it.value.bimTypeName
             dcEquip.infos = it.value.infos
+            dcEquip.aliasCode = it.value.aliasCode
+            dcEquip.aliasName = it.value.aliasName
             generateCADID(dcEquip)
             val point = it.value.location?.points?.get(0)
             addLocationAndFloorId(point, dcEquip, sb)
@@ -210,6 +212,8 @@ class SyncEquipment : SyncObject{
         dcEquip.modelId = equip.modelId
         dcEquip.bimTypeID = equip.bimTypeID
         dcEquip.bimTypeName =  equip.bimTypeName
+        dcEquip.aliasCode = equip.aliasCode
+        dcEquip.aliasName = equip.aliasName
         updateList.add(dcEquip)
         if(equip.propertyId != null && dcEquip.id != null)
             propertyMap[equip.propertyId!!] = dcEquip.id!!

+ 5 - 0
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/models/entities/EquipComp.kt

@@ -65,4 +65,9 @@ open class EquipComp {
     @ApiModelProperty(value = "慧云码")
     @Column(name = "alias_code")
     var aliasCode: String? = null
+
+    /** 别名称 */
+    @ApiModelProperty(value = "别名称")
+    @Column(name = "alias_name")
+    var aliasName: String? = null
 }

+ 10 - 0
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/models/entities/Equipment.kt

@@ -161,4 +161,14 @@ class Equipment : BaseComponent(){
     @ApiModelProperty(value = "构件分类名称")
     @Column(name = "bim_type_name")
     var bimTypeName: String? = null
+
+    /** 别编码 */
+    @ApiModelProperty(value = "别编码")
+    @Column(name = "alias_code")
+    var aliasCode: String? = null
+
+    /** 别名称 */
+    @ApiModelProperty(value = "别名称")
+    @Column(name = "alias_name")
+    var aliasName: String? = null
 }

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

@@ -139,11 +139,15 @@ object EquipmentAnalyzer {
                         if(equipComp != null){
                             obj.family = equipComp.classCode?:"XXXXXX"
                             obj.bimTypeName = equipComp.bimTypeName
+                            obj.aliasCode = 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.aliasCode = equipComp.aliasCode
+                                obj.aliasName = equipComp.aliasName
                             }else{
                                 obj.family = "OTXXXX"
                             }
@@ -154,6 +158,8 @@ object EquipmentAnalyzer {
                         if(equipComp != null){
                             obj.family = equipComp.classCode?:"XXXXXX"
                             obj.bimTypeName = equipComp.bimTypeName
+                            obj.aliasCode = equipComp.aliasCode
+                            obj.aliasName = equipComp.aliasName
                         }else{
                             obj.family = "OTXXXX"
                         }