Explorar el Código

**************************************万达adm**********************************************
提交

zhangweixin hace 4 años
padre
commit
c984a86f87

+ 7 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/datacenter/dao/mappers/SchemeMapper.kt

@@ -121,6 +121,13 @@ interface SchemeMapper {
     @Select("SELECT building_id AS id FROM public.equipment WHERE project_id = #{projectId} AND  NOT building_id IS NULL GROUP BY building_id")
     fun buildingId(@Param("projectId") projectId: String):ArrayList<Building>
 
+    /**
+     * 统计楼层id
+     */
+    @Select("SELECT floor_id AS id FROM public.equipment WHERE project_id = #{projectId} AND  NOT floor_id IS NULL GROUP BY floor_id")
+    fun floorId(@Param("projectId") projectId: String):ArrayList<Building>
+
+
 
 
 

+ 22 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/wanda/rel/RBd2SpBuiliding.kt

@@ -0,0 +1,22 @@
+package com.persagy.server.datacenter.wanda.rel
+
+import RelBuilding
+import com.persagy.service.models.annotations.SCascade
+import io.swagger.v3.oas.annotations.media.Schema
+import javax.persistence.Table
+
+/**
+ * 建筑和楼层的关系
+ *
+ * @author wx  <zhangweixin@sagacloud.com>
+ * @date  2021/2/27 16:37
+ */
+@Schema(description = "建筑信息实体类")
+@Table(name = "building")
+class RBd2SpBuiliding: RelBuilding() {
+
+    /** 级联-设备服务的建筑 */
+    @Schema(description = "级联-设备服务的建筑")
+    @SCascade(table="public.zone_space_base", idColumn="building_id", childIdColumn="id")
+    var objectInfo: ArrayList<RelZoneSpaceBd>? = null
+}

+ 15 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/wanda/rel/RelZoneSpaceBd.kt

@@ -1,12 +1,27 @@
 package com.persagy.server.datacenter.wanda.rel
 
+import io.swagger.v3.oas.annotations.media.Schema
+import javax.persistence.Column
+import javax.persistence.Table
+
 
 /**
  * 空间和建筑
  * @author wx  <zhangweixin@sagacloud.com>
  * @date  2021/2/18 11:47
  */
+@Schema(description = "空间父类实体类")
+@Table(name = "v_space_building_floor")
 class RelZoneSpaceBd : SpaceBaseZone() {
 
+    /** 楼层名称 */
+    @Schema(description = "楼层名称")
+    @Column(name = "floor_name")
+    var floorName: String? = null
+
+    /** 建筑名称 */
+    @Schema(description = "建筑名称")
+    @Column(name = "building_name")
+    var buildingName: String? = null
 
 }

+ 3 - 5
data-core/src/main/kotlin/com/persagy/server/datacenter/wanda/rel/SpaceBaseZone.kt

@@ -31,12 +31,15 @@ import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
 import javax.persistence.Column
 import javax.persistence.Id
+import javax.persistence.Table
 
 /**
  *
  * @author wx  <zhangweixin@sagacloud.com>
  * @date  2020/12/11 12:03
  */
+@Schema(description = "空间父类实体类")
+@Table(name = "zone_space_base")
 open class SpaceBaseZone : Serializable, BaseInfo() {
 
     /** 空间ID */
@@ -75,11 +78,6 @@ open class SpaceBaseZone : Serializable, BaseInfo() {
     @Column(name = "floor_id")
     var floorId: String? = null
 
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
     /** 类型 */
     @Schema(description = "类型")
     @Column(name = "object_type")

+ 0 - 3
datacenter/src/main/kotlin/com/persagy/server/datacenter/services/relation_calc/CalcSpecialService.kt

@@ -373,11 +373,8 @@ open class CalcSpecialService {
 
                         }
                     }
-
                 }
             }
-
-
         }
         connectedBlockService.delete(SFilter.eq("projectId",projectId), SFilter.eq("buildingId",buildingId))
         val request = SCreateRequest<ConnectedBlock>()

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 103 - 2544
datacenter/src/main/kotlin/com/persagy/server/datacenter/services/relation_calc/ManualRelationCalcService.kt