Преглед на файлове

********************WX************************

                   数据中心:<wip>> <添加楼层轮廓线和空间轮廓线操作>
zhangweixin преди 4 години
родител
ревизия
3975958015
променени са 41 файла, в които са добавени 421 реда и са изтрити 631 реда
  1. 0 171
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dict/DPropertyDefML.kt
  2. 5 5
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefFuncId.kt
  3. 20 13
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/response/AllDictCategory.kt
  4. 53 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/objects/SpaceOutline.kt
  5. 0 10
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/REqForBd.kt
  6. 1 4
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/REqInShList.kt
  7. 1 11
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RFlThroughFl.kt
  8. 0 3
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RFloorOtherThroughFloorList.kt
  9. 2 12
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RPeInSh.kt
  10. 0 10
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RShaftThroughShaft.kt
  11. 30 44
      datacenter/src/main/kotlin/com/persagy/server/controllers/objects/FloorController.kt
  12. 3 3
      datacenter/src/main/kotlin/com/persagy/server/services/base/Service.kt
  13. 22 80
      datacenter/src/main/kotlin/com/persagy/server/services/objects/FloorService.kt
  14. 4 5
      datacenter/src/main/kotlin/com/persagy/server/services/rel/RFlThroughFlService.kt
  15. 13 1
      equip-componnet/src/main/kotlin/com/persagy/server/controllers/dict/DictCustomController.kt
  16. 6 48
      equip-componnet/src/main/kotlin/com/persagy/server/models/objects/Building.kt
  17. 8 50
      equip-componnet/src/main/kotlin/com/persagy/server/models/objects/FloorCompon.kt
  18. 3 64
      equip-componnet/src/main/kotlin/com/persagy/server/models/objects/ZoneSpace.kt
  19. 5 26
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/EquipUpDateEnclosure.kt
  20. 3 3
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/EquipUpDateEnclosureRequest.kt
  21. 3 3
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/RSQueryResponse.kt
  22. 3 7
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ShaftSpaceVertical.kt
  23. 3 8
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/SpatialRelationship.kt
  24. 2 2
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserChangePasswordRequest.kt
  25. 2 2
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserDeleteRequest.kt
  26. 2 2
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserUpdateRequest.kt
  27. 5 0
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ZoneEquipQueryRequest.kt
  28. 7 3
      equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ZoneISpaceQueryRequest.kt
  29. 1 1
      equip-componnet/src/main/kotlin/com/persagy/server/models/responses/BaseResponse.kt
  30. 2 5
      equip-componnet/src/main/kotlin/com/persagy/server/models/responses/TokenCheckResponse.kt
  31. 1 1
      equip-componnet/src/main/kotlin/com/persagy/server/models/responses/UserCreateRequest.kt
  32. 7 3
      equip-componnet/src/main/kotlin/com/persagy/server/service/EquipAssetComponentsReqponseService.kt
  33. 6 2
      equip-componnet/src/main/kotlin/com/persagy/server/service/EquipDelService.kt
  34. 3 3
      equip-componnet/src/main/kotlin/com/persagy/server/service/PropertyEquipService.kt
  35. 177 0
      equip-componnet/src/main/kotlin/com/persagy/server/service/dict/DictDefClassService.kt
  36. 2 2
      equip-componnet/src/main/kotlin/com/persagy/server/service/objects/BuildingService.kt
  37. 3 3
      equip-componnet/src/main/kotlin/com/persagy/server/service/objects/EquipmentService.kt
  38. 2 13
      message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/Message.kt
  39. 2 7
      message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/base/BaseInfo.kt
  40. 1 1
      message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/base/RBaseInfo.kt
  41. 8 0
      pendingIssues.md

+ 0 - 171
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dict/DPropertyDefML.kt

@@ -1,171 +0,0 @@
-/*
- * *********************************************************************************************************************
- *
- *          !!
- *        .F88X
- *        X8888Y
- *      .}888888N;
- *        i888888N;        .:!              .I$WI:
- *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
- *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
- *            +888888N;  .8888888Y                                  "&&8Y.}8,
- *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
- *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
- *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
- *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
- *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
- *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
- *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
- *      .:R888888I
- *      .&888888I                                          Copyright (c) 2009-2020.  博锐尚格科技股份有限公司
- *        ~8888'
- *        .!88~                                                                     All rights reserved.
- *
- * *********************************************************************************************************************
- */
-
-package com.persagy.server.datacenter.models.entities.dict
-
-import com.alibaba.fastjson.annotation.JSONField
-import com.persagy.server.datacenter.models.entities.base.BaseInfo
-import io.swagger.v3.oas.annotations.media.Schema
-import javax.persistence.Column
-import javax.persistence.Table
-
-/**
- * 数据字典说明实体类
- *
- * @author 张维新
- */
-@Schema(description = "数据字典说明")
-@Table(name = "dict.property_def")
-class DPropertyDefML : BaseInfo() {
-
-    /** 一级标签 */
-    @Schema(description = "一级标签")
-    @Column(name = "first_tag")
-    var firstTag: String? = null
-//
-    /** 一级标签 */
-    @Schema(description = "一级标签")
-    @Column(name = "first_name")
-    var firstName: String? = null
-
-    /** 二级标签 */
-    @Schema(description = "二级标签")
-    @Column(name = "second_tag")
-    var secondTag: String? = null
-
-    /** 二级名称 */
-    @Schema(description = "二级名称")
-    @Column(name = "second_name")
-    var secondName: String? = null
-
-    /** 信息点名称 */
-    @Schema(description = "信息点名称")
-    @Column(name = "info_point_name")
-    var infoPointName: String? = null
-
-    /** 信息点编码 */
-    @Schema(description = "信息点编码")
-    @Column(name = "info_point_code")
-    var infoPointCode: String? = null
-
-    /** 类型 */
-    @Schema(description = "类型")
-    @Column(name = "datatype")
-    var dataType: String? = null
-
-    /** 输入方式 */
-    @Schema(description = "输入方式")
-    @Column(name = "inputmode")
-    var inputMode: String? = null
-
-    /** 单位 */
-    @Schema(description = "单位")
-    @Column(name = "unit")
-    @JSONField(name = "Unit")
-    var unit: String? = null
-
-    /** 类型 */
-    @Schema(description = "类型")
-    @Column(name = "type")
-    @JSONField(name = "Type")
-    var type: String? = null
-
-    /** 父指针 */
-    @Schema(description = "父指针")
-    @Column(name = "parent_id")
-    @JSONField(name = "ParentId")
-    var parentId: String? = null
-
-    /** 标记 */
-    @Schema(description = "标记")
-    @Column(name = "flag")
-    @JSONField(name = "Flag")
-    var  flag: String? = null
-
-    /** 字典选择 */
-    @Schema(description = "字典选择")
-    @Column(name = "datasource")
-    @JSONField(name = "DataSource")
-    var dataSource: String? = null
-
-    /** 备注 */
-    @Schema(description = "字典选择")
-    @Column(name = "note")
-    @JSONField(name = "Note")
-    var note: String? = null
-
-    /** 优先级 */
-    @Schema(description = "优先级")
-    @Column(name = "priority")
-    @JSONField(name = "Priority")
-    var priority: String? = null
-
-    /** 路径 */
-    @Schema(description = "路径")
-    @JSONField(name = "Path")
-    var path: String? = null
-        get() {
-            return if (firstTag == "基本信息"|| firstTag.isNullOrEmpty()){
-                infoPointCode
-            }else{
-                if (secondTag.isNullOrEmpty()){
-                    "$firstTag.$infoPointCode"
-                }else{
-                    "$firstTag.$secondTag.$infoPointCode"
-                }
-            }
-        }
-
-    /** 是否显示 */
-    @Schema(description = "是否显示")
-    @Column(name = "visible")
-    @JSONField(name = "Visible")
-    var visible: Boolean? = null
-
-    /** 是否编辑 */
-    @Schema(description = "是否编辑")
-    @Column(name = "editable")
-    @JSONField(name = "Editable")
-    var editable: Boolean? = null
-
-    /** 排序 */
-    @Schema(description = "排序")
-    @Column(name = "sort")
-    @JSONField(name = "Sort")
-    var sort: Int? = null
-
-    /** 禁止操作 */
-    @Schema(description = "禁止操作")
-    @Column(name = "un_disabled")
-    @JSONField(name = "UnDisabled")
-    var unDisabled: Boolean? = null
-
-    /** 字典内容 */
-    @Schema(description = "字典内容")
-    @JSONField(name = "Content")
-    var content: ArrayList<DPropertyDefML>? = null
-
-} // Class PropertyDef

+ 5 - 5
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefFuncId.kt

@@ -222,11 +222,11 @@ open class DefFuncId: Serializable {
                 code
             }else{
                 "infos.$code"
-//                if (secondTag.isNullOrEmpty()){
-//                    "$firstTag.$code"
-//                }else{
-//                    "$firstTag.$secondTag.$code"
-//                }
             }
         }
+
+    /** 字典内容 */
+    @Schema(description = "字典内容")
+    var content: ArrayList<DefFuncId>? = null
+
 }

+ 20 - 13
data-core/src/main/kotlin/com/persagy/server/datacenter/models/response/AllDictCategory.kt

@@ -24,23 +24,30 @@
  * *********************************************************************************************************************
  */
 
-package com.persagy.server.datacenter.models.response
+package com.persagy.server.datacenter.models.entities.objects
 
-import com.persagy.server.datacenter.models.entities.dict.DPropertyDefML
-import com.persagy.service.models.responses.SQueryResponse
-import java.io.Serializable
+import com.persagy.service.models.SBaseEntity
+import io.swagger.v3.oas.annotations.media.Schema
+import javax.persistence.Column
+import javax.persistence.Id
+import javax.persistence.Table
 
 /**
- * 所有字典分类以及信息点
+ * 楼层轮廓线
  *
- * @author 张维新
+ * @author wx  <zhangweixin@sagacloud.com>
+ * @date  2020/11/19 17:04
  */
-class AllDictCategory : Serializable , SQueryResponse<DPropertyDefML>() {
+@Schema(name = "楼层轮廓线")
+@Table(name = "floor_outline")
+class FloorOutline : SBaseEntity() {
 
-//    /** 字典内容 */
-//    @Schema(description = "字典内容")
-//    @JSONField(name = "Content")
-//    var content: ArrayList<DPropertyDef>? = null
+    @Schema(description = "楼层 id")
+    @Id
+    @Column(name = "id")
+    var id: String? = null
 
-
-} // class AllDictCategory
+    @Schema(description = "楼层轮廓线")
+    @Column(name = "outline")
+    var outline: String? = null
+}

+ 53 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/objects/SpaceOutline.kt

@@ -0,0 +1,53 @@
+/*
+ * *********************************************************************************************************************
+ *
+ *          !!
+ *        .F88X
+ *        X8888Y
+ *      .}888888N;
+ *        i888888N;        .:!              .I$WI:
+ *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
+ *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
+ *            +888888N;  .8888888Y                                  "&&8Y.}8,
+ *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
+ *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
+ *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
+ *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
+ *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
+ *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
+ *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
+ *      .:R888888I
+ *      .&888888I                                          Copyright (c) 2009-2020.  博锐尚格科技股份有限公司
+ *        ~8888'
+ *        .!88~                                                                     All rights reserved.
+ *
+ * *********************************************************************************************************************
+ */
+
+package com.persagy.server.datacenter.models.entities.objects
+
+import com.persagy.service.models.SBaseEntity
+import io.swagger.v3.oas.annotations.media.Schema
+import javax.persistence.Column
+import javax.persistence.Id
+import javax.persistence.Table
+
+/**
+ * 空间轮廓线
+ *
+ * @author wx  <zhangweixin@sagacloud.com>
+ * @date  2020/11/19 17:04
+ */
+@Schema(name = "空间轮廓线")
+@Table(name = "space_outline")
+class SpaceOutline : SBaseEntity() {
+
+    @Schema(description = "空间 id")
+    @Id
+    @Column(name = "id")
+    var id: String? = null
+
+    @Schema(description = "空间轮廓线")
+    @Column(name = "outline")
+    var outline: String? = null
+}

+ 0 - 10
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/REqForBd.kt

@@ -26,8 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
-import com.google.gson.annotations.SerializedName
 import com.persagy.server.datacenter.models.entities.base.RBaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
@@ -47,30 +45,22 @@ class REqForBd : RBaseInfo(){
     @Schema(description = "设备Id")
     @Id
     @Column(name = "equip_id")
-    @JSONField(name = "EquipId")
-    @SerializedName("EquipId")
     var equipId: String? = null
 
     /** 建筑Id */
     @Schema(description = "建筑Id")
     @Id
     @Column(name = "building_id")
-    @JSONField(name = "BuildingId")
-    @SerializedName("BuildingId")
     var buildingId: String? = null
 
     /** 项目Id */
     @Schema(description = "项目Id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
-    @SerializedName("ProjectId")
     var projectId: String? = null
 
     /** 计算标记 1 为手动 2为自动 */
     @Schema(description = "计算标记 1 为手动 2为自动 ")
     @Column(name = "sign")
-    @JSONField(name = "Sign")
-    @SerializedName("Sign")
     var sign: Int? = null
 
 } // Class REqForBd

+ 1 - 4
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/REqInShList.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.base.RBaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 
@@ -40,12 +39,10 @@ class REqInShList : RBaseInfo() {
 
     /** 设备id */
     @Schema(description = "设备id")
-    @JSONField(name = "EquipId")
     var equipId: String? = null
 
     /** 竖井id列表 */
     @Schema(description = "竖井id列表")
-    @JSONField(name = "ShaftIdList")
     var shaftIdList: ArrayList<String>? = null
 
-} // Class REqInShList
+}

+ 1 - 11
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RFlThroughFl.kt

@@ -26,8 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
-import com.google.gson.annotations.SerializedName
 import com.persagy.server.datacenter.models.entities.base.RBaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
@@ -47,30 +45,22 @@ class RFlThroughFl : RBaseInfo() {
     @Schema(description = "楼层id")
     @Id
     @Column(name = "floor_id")
-    @JSONField(name = "FloorId")
-    @SerializedName("FloorId")
     var floorId: String? = null
 
     /** 其他楼层id */
     @Schema(description = "其他楼层id")
     @Id
     @Column(name = "floor_other_id")
-    @JSONField(name = "FloorOtherId")
-    @SerializedName("FloorOtherId")
     var floorOtherId: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
-    @SerializedName("ProjectId")
     var projectId: String? = null
 
     /** 计算标记 1 为手动 2为自动 */
     @Schema(description = "计算标记 1 为手动 2为自动 ")
     @Column(name = "sign")
-    @JSONField(name = "Sign")
-    @SerializedName("Sign")
     var sign: Int? = null
 
-} // class RFlThroughFl
+}

+ 0 - 3
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RFloorOtherThroughFloorList.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.v3.oas.annotations.media.Schema
 
@@ -40,12 +39,10 @@ class RFloorOtherThroughFloorList : SBaseEntity() {
 
     /** 楼层id列表 */
     @Schema(description = "楼层id列表")
-    @JSONField(name = "FloorIdList")
     var floorIdList: ArrayList<String>? = null
 
     /** 其他楼层id */
     @Schema(description = "其他楼层id")
-    @JSONField(name = "FloorOtherId")
     var floorOtherId: String? = null
 
 } // class RFloorOtherThroughFloorList

+ 2 - 12
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RPeInSh.kt

@@ -26,8 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
-import com.google.gson.annotations.SerializedName
 import com.persagy.server.datacenter.models.entities.base.RBaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
@@ -37,7 +35,7 @@ import javax.persistence.Table
 /**
  * 资产所在竖井
  *
- * @author 张维新
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "资产所在竖井")
 @Table(name = "r_pe_in_sh")
@@ -47,30 +45,22 @@ class RPeInSh : RBaseInfo(){
     @Schema(description = "资产id")
     @Id
     @Column(name = "equip_id")
-    @JSONField(name = "EquipId")
-    @SerializedName("EquipId")
     var equipId: String? = null
 
     /** 空间id */
     @Schema(description = "空间id")
     @Id
     @Column(name = "shaft_id")
-    @JSONField(name = "ShaftId")
-    @SerializedName("ShaftId")
     var shaftId: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
-    @SerializedName("ProjectId")
     var projectId: String? = null
 
     /** 计算标记 1 为手动 2为自动 */
     @Schema(description = "计算标记 1 为手动 2为自动 ")
     @Column(name = "sign")
-    @JSONField(name = "Sign")
-    @SerializedName("Sign")
     var sign: Int? = null
 
-} // Class RPeInSh
+}

+ 0 - 10
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/RShaftThroughShaft.kt

@@ -26,8 +26,6 @@
 
 package com.persagy.server.datacenter.models.entities.rel
 
-import com.alibaba.fastjson.annotation.JSONField
-import com.google.gson.annotations.SerializedName
 import com.persagy.server.datacenter.models.entities.base.RBaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
@@ -47,30 +45,22 @@ class RShaftThroughShaft : RBaseInfo() {
     @Schema(description = "竖井id")
     @Id
     @Column(name = "shaft_id")
-    @JSONField(name = "ShaftId")
-    @SerializedName("ShaftId")
     var shaftId: String? = null
 
     /** 其他竖井id */
     @Schema(description = "其他竖井id")
     @Id
     @Column(name = "shaft_other_id")
-    @JSONField(name = "ShaftOtherId")
-    @SerializedName("ShaftOtherId")
     var shaftOtherId: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
-    @SerializedName("ProjectId")
     var projectId: String? = null
 
     /** 计算标记 1 为手动 2为自动 */
     @Schema(description = "计算标记 1 为手动 2为自动 ")
     @Column(name = "sign")
-    @JSONField(name = "Sign")
-    @SerializedName("Sign")
     var sign: Int? = null
 
 } // class RFlThroughFl

+ 30 - 44
datacenter/src/main/kotlin/com/persagy/server/controllers/objects/FloorController.kt

@@ -26,11 +26,11 @@
 
 package com.persagy.server.controllers.objects
 
-import com.persagy.base.extensions.toJson
 import com.persagy.database.SFilter
+import com.persagy.server.Opt
 import com.persagy.server.datacenter.models.entities.objects.Floor
+import com.persagy.server.datacenter.models.entities.objects.FloorOutline
 import com.persagy.server.services.objects.FloorService
-import com.persagy.service.SPageContext
 import com.persagy.service.models.requests.SCreateRequest
 import com.persagy.service.models.requests.SQueryRequest
 import com.persagy.service.models.requests.SUpdateRequest
@@ -55,97 +55,83 @@ import org.springframework.web.bind.annotation.RestController
 @RequestMapping("/object/floor")
 open class FloorController {
     companion object {
-        // 日志
+        /** 日志 */
         private val logger = LoggerFactory.getLogger(FloorController::class.java)
-    } // Companion object
+    }
 
     /**
      * 创建楼层
      *
-     * @param   request     楼层对象
-     * @return              创建结果信息
+     * @param request     楼层对象
+     * @return 创建结果信息
      */
     @Operation(summary = "创建楼层", description = "")
     @PostMapping(value = ["/create"])
     fun create(@RequestBody request: SCreateRequest<Floor>): SCreateResponse<Floor> {
         return FloorService.create(request)
-    } // Function create()
+    }
 
     /**
      * 根据id删除楼层
      *
-     * @param   idList  id数组
-     * @return          删除的结果信息
+     * @param idList  id 数组
+     * @return 删除的结果信息
      */
     @Operation(summary = "根据id删除楼层", description = "")
     @PostMapping(value = ["/delete"])
     fun delete(@RequestBody idList: ArrayList<Floor>): SBaseResponse {
         return FloorService.deleteByKeysList( idList)
-    } // Function delete()
+    }
 
     /**
      * 更新楼层信息
      *
      *
-     * @param   request     更新的内容对象
-     * @return              更新的结果
+     * @param request     更新的内容对象
+     * @return 更新的结果
      */
     @Operation(summary = "更新楼层信息", description = "")
     @PostMapping(value = ["/update"])
     fun update(@RequestBody request: SUpdateRequest<Floor>): SBaseResponse {
         return FloorService.upDates(request)
-    } // Function update()
+    }
 
     /**
      * 更新楼层信息-Outline
      *
      *
-     * @param   request     更新楼层信息-Outline
-     * @return              更新的结果
+     * @param request     更新楼层信息 Outline
+     * @return 更新的结果
      */
     @Operation(summary = "更新楼层信息-Outline", description = "")
-    @PostMapping(value = ["/update-outline"])
-    fun updateOutlines(@RequestBody request: SUpdateRequest<Floor>): SBaseResponse {
-        logger.debug("floorUpdate =${request.toJson()}")
+    @PostMapping(value = ["/outline/update"])
+    fun updateOutlines(@RequestBody request: SUpdateRequest<FloorOutline>): SBaseResponse {
         return FloorService.updateOutline(request)
-    } // Function update()
+    }
 
     /**
      * 查询楼层信息
      *
-     * @param   request     查询信息条件
-     * @return              查询结果
+     * @param request     查询信息条件
+     * @return 查询结果
      */
-    @Operation(summary = "查询楼层信息", description = "级联对象:建筑(building)、项目(project)、楼层贯通关系(floorThroughList)")
-    @PostMapping(value = ["/query-outline"])
-    fun queryOutline(@RequestBody request: SQueryRequest): SQueryResponse<Floor> {
-        logger.debug("floorQuery =${request.toJson()}")
-        if (!request.projection.isNullOrEmpty()){
-            request.projection!!.clear()
-        }
-        val list = ArrayList<String>()
-        list.add("FloorID")
-        list.add("FloorName")
-        list.add("FloorLocalID")
-        list.add("FloorLocalName")
-        list.add("Outline")
-        list.add("StructureInfo")
-        list.add("ModelId")
-        request.projection = list
-        return FloorService.pageQuery(request, arrayListOf(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString())))
-    } // Function query()
+    @Operation(summary = "查询楼层轮廓线信息", description = "")
+    @PostMapping(value = ["/outline/query"])
+    fun queryOutline(@RequestBody request: SQueryRequest): SQueryResponse<FloorOutline> {
+        return FloorService.floorOutlineservice.pageQuery(request)
+    }
 
 
     /**
      * 查询楼层信息
      *
-     * @param   request     查询信息条件
-     * @return              查询结果
+     * @param request     查询信息条件
+     * @return 查询结果
      */
     @Operation(summary = "查询楼层信息", description = "级联对象:建筑(building)、项目(project)、楼层贯通关系(floorThroughList)")
     @PostMapping(value = ["/query"])
     fun query(@RequestBody request: SQueryRequest): SQueryResponse<Floor> {
+        return FloorService.pageQuery(request, arrayListOf(SFilter.eq("projectId", Opt.projectId!!)))
+    }
 
-        return FloorService.pageQuery(request, arrayListOf(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString())))
-    } // Function query()
-} // Class FloorController
+}

+ 3 - 3
datacenter/src/main/kotlin/com/persagy/server/services/base/Service.kt

@@ -130,7 +130,7 @@ open class Service<ENTITY : BaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectS
             }
         }
         return
-    } // Function onDeleteSuccess()
+    }
 
 
     override fun onUpdateBefore(entity: ENTITY): Boolean {
@@ -167,6 +167,6 @@ open class Service<ENTITY : BaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectS
             e.printStackTrace()
         }
         return
-    } // Function onUpdateSuccess()
+    }
 
-} // Class Service
+}

+ 22 - 80
datacenter/src/main/kotlin/com/persagy/server/services/objects/FloorService.kt

@@ -30,11 +30,13 @@ import com.persagy.database.SFilter
 import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.Opt
 import com.persagy.server.datacenter.models.entities.objects.Floor
+import com.persagy.server.datacenter.models.entities.objects.FloorOutline
 import com.persagy.server.services.assistant.ObjInfoService
 import com.persagy.server.services.base.Service
 import com.persagy.server.services.log.DataCenterLogsService
 import com.persagy.server.utils.IdUtils
 import com.persagy.server.utils.ShaftNameUtil
+import com.persagy.service.SObjectService
 import com.persagy.service.SPageContext
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SCreateRequest
@@ -52,7 +54,8 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
 
     /** 日志 */
     private val logger = LoggerFactory.getLogger(FloorService::class.java)
-
+    /** 楼层轮廓线 */
+    val floorOutlineservice = SObjectService(SMybatisDao(FloorOutline::class.java))
     /**
      * 创建之前操作
      */
@@ -303,90 +306,28 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
      */
     override fun onDeleteBefore(entity: Floor): Boolean {
         val  floor = this.select(SFilter.eq("id", entity.id!!)).entity()
-
-        val projectId = SPageContext.getHeader("projectId")
-        val coming = SPageContext.getHeader("coming")
-        val account = SPageContext.getHeader("account")
         /** 日志 */
-//        val dataCenterLogs = DataCenterLogs()
-//        dataCenterLogs.id = IdUtils.uuidCreate()
-//        dataCenterLogs.author = "dataCenter"
-//        dataCenterLogs.projectId = projectId
-//        dataCenterLogs.objectType = entity.objectType
-//        dataCenterLogs.type = "delete"
-//        dataCenterLogs.coming = coming
-//        dataCenterLogs.account = account
-//        dataCenterLogs.objectId = floor!!.id
-//        val hashMap = HashMap<String, Any?>()
-//        hashMap[entity.objectType!!] = floor
-//        dataCenterLogs.dataSource = hashMap
-//        logService.insert(dataCenterLogs)
-        DataCenterLogsService.addLogs(projectId!!,"delete","floor",
-            floor!!.id!!,floor,account,coming)
+        if (floor!=null){
+            DataCenterLogsService.addLogs(Opt.projectId!!,"delete","floor",
+                floor!!.id!!,floor,Opt.account,Opt.coming)
+        }
+
         return super.onDeleteBefore(entity)
     } // Function onDeleteBefore()
 
     /**
      * 更新楼层 Outline
      */
-    fun updateOutline(request: SUpdateRequest<Floor>): SBaseResponse{
+    fun updateOutline(request: SUpdateRequest<FloorOutline>): SBaseResponse{
         return try {
-            val projectId = SPageContext.getHeader("projectId")
-            val coming = SPageContext.getHeader("coming")
-            val account = SPageContext.getHeader("account")
-            val listId = ArrayList<String>()
+            val sBaseResponse = SBaseResponse(SResponseType.success)
             if (!request.content.isNullOrEmpty()){
-//                val jsonObject = JSONObject()
-//                jsonObject.put("type", "7")
-//                jsonObject.put("projectId", projectId)
-//                jsonObject.put("obj_type", "Floor")
-//                val jsonArray = JSONArray()
-                for (floor in request.content!!){
-                    try {
-                        val listOutline = ArrayList<String>()
-                        listOutline.add("Outline")
-                        val update = update(floor,listOutline)
-                        if (update){
-                            listId.add(floor.id!!)
-                            try {
-                                /** 日志 */
-//                                val dataCenterLogs = DataCenterLogs()
-//                                dataCenterLogs.id = IdUtils.uuidCreate()
-//                                dataCenterLogs.author = "dataCenter"
-//                                dataCenterLogs.projectId = projectId
-//                                dataCenterLogs.objectType = "Floor"
-//                                dataCenterLogs.type = "update-after"
-//                                dataCenterLogs.account = account
-//                                dataCenterLogs.coming = coming
-//                                dataCenterLogs.objectId = floor.id
-//                                val hashMap = HashMap<String, Any?>()
-//                                hashMap["Floor"] = floor
-//                                dataCenterLogs.dataSource = hashMap
-//                                logService.insert(dataCenterLogs)
-                                DataCenterLogsService.addLogs(projectId!!,"update-after","floor",
-                                    floor.id!!,floor,account,coming)
-                            } catch (e: Exception) {
-                                e.printStackTrace()
-                            }
-                        }
+                floorOutlineservice.updateList(request)
 
-                    } catch (e: Exception) {
-                        e.printStackTrace()
-                    }
-                }
-
-                if (listId.size>0){
-                    for (id in listId){
-//                        val jsonInfos = JSONObject()
-//                        jsonInfos.put("id", id)
-//                        jsonInfos.put("obj_type", "Floor")
-//                        jsonArray.put(jsonInfos)
-                        rabbitMqService.sendObjects(projectId!!, Opt.UPDATE,id)
+                if (!request.content.isNullOrEmpty()){
+                    for (floorOutline in request.content!!){
+                        rabbitMqService.sendObjects(Opt.projectId!!, Opt.UPDATE,floorOutline.id!!)
                     }
-//                    jsonObject.put("infos", jsonArray)
-//                    /** 发送消息 */
-//                    messageHandler.sendMessage(jsonObject.toString())
-
                     try {
                         /** 处理关系标记 */
                         val listtype = ArrayList<String>()
@@ -399,7 +340,7 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
                         listtype.add("pe2bd")
                         listtype.add("pe2fl")
                         for (type in listtype){
-                            val entity = EquipmentService.relationTypeProjectservice.select(SFilter.eq("projectId", projectId!!), SFilter.eq("relationType", type)).entity()
+                            val entity = EquipmentService.relationTypeProjectservice.select(SFilter.eq("projectId", Opt.projectId!!), SFilter.eq("relationType", type)).entity()
                             if (entity!=null){
                                 entity.computationalState = 2
                                 EquipmentService.relationTypeProjectservice.update(entity)
@@ -409,17 +350,18 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
                         e.printStackTrace()
                     }
                 }
-                val sBaseResponse = SBaseResponse(SResponseType.success)
+
                 return sBaseResponse
             }else{
-                val sBaseResponse = SBaseResponse(SResponseType.failure)
+                sBaseResponse.result = SResponseType.failure
                 return sBaseResponse
             }
+
         } catch (e: Exception) {
             e.printStackTrace()
             SBaseResponse(SResponseType.failure,e.message.toString())
         }
-    } // Fun
+    }
 
     /**
      * 删除之后
@@ -432,7 +374,7 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
             val projectId = SPageContext.getHeader("projectId")
             for (floor in entityList) {
                 ObjInfoService.delete(SFilter.eq("projectId",projectId!!), SFilter.eq("objId",floor.id!!), SFilter.eq("objType","Fl"))
-                rabbitMqService.sendObjects(floor.projectId!!, Opt.DELETE,floor.id!!)
+                rabbitMqService.sendObjects(Opt.projectId!!, Opt.DELETE,floor.id!!)
             }
         } catch (e: Exception) {
             e.printStackTrace()
@@ -475,4 +417,4 @@ object FloorService : Service<Floor>(SMybatisDao(Floor::class.java)) {
     }
 
 
-} // Object FloorService
+}

+ 4 - 5
datacenter/src/main/kotlin/com/persagy/server/services/rel/RFlThroughFlService.kt

@@ -26,13 +26,12 @@
 
 package com.persagy.server.services.rel
 
-import com.persagy.server.services.base.RService
-
+import com.persagy.base.extensions.toJson
+import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.datacenter.models.entities.rel.RFlThroughFl
 import com.persagy.server.datacenter.models.entities.rel.RFloorOtherThroughFloorList
 import com.persagy.server.datacenter.models.entities.rel.RFloorThroughFloorOtherList
-import com.persagy.base.extensions.toJson
-import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.services.base.RService
 import com.persagy.service.SPageContext
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.responses.SBaseResponse
@@ -150,7 +149,7 @@ object RFlThroughFlService : RService<RFlThroughFl>(SMybatisDao(RFlThroughFl::cl
                     jsonObject.put("obj_type", "Fl2Fl")
                     jsonObject.put("linkId",successList.toJson())
                     /** 发送消息 */
-                    messageHandler.sendMessage(jsonObject.toString())
+//                    messageHandler.sendMessage(jsonObject.toString())
 //                    kafkaService.sendNotice("datacenterrel", RelationNotice(projectId!!, "Fl2Fl", "13", IdUtils.uuidCreate(),  rFloorThroughFloorOtherList.floorId!!, null),false)
                     val sCreateResponse = SCreateResponse<RFlThroughFl>(SResponseType.success)
                     if (failureList.size>0){

+ 13 - 1
equip-componnet/src/main/kotlin/com/persagy/server/controllers/dict/DictCustomController.kt

@@ -30,10 +30,13 @@ package com.persagy.server.controllers.dict
 import com.persagy.database.SFilter
 import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.datacenter.models.entities.dictdatacenter.DictTypeConversionLog
+import com.persagy.server.datacenter.models.entities.dictnew.DefFuncId
+import com.persagy.server.service.dict.DictDefClassService
 import com.persagy.service.SObjectService
 import com.persagy.service.SPageContext
 import com.persagy.service.models.requests.SCountRequest
 import com.persagy.service.models.responses.SCountResponse
+import com.persagy.service.models.responses.SQueryResponse
 import io.swagger.v3.oas.annotations.Operation
 import io.swagger.v3.oas.annotations.tags.Tag
 import org.springframework.web.bind.annotation.PostMapping
@@ -48,7 +51,7 @@ import org.springframework.web.bind.annotation.RestController
  */
 @Tag(name = "项目化字典")
 @RestController
-@RequestMapping("/dict-custom")
+@RequestMapping("/dict")
 class DictCustomController {
 
     /** 数据中心向物理世界转数据 自定义字典 */
@@ -109,6 +112,15 @@ class DictCustomController {
 //    } // Function upDate
 
     /**
+     * 查询 M 和 L 类型的信息点
+     */
+    @Operation(summary = "字典-查询所有字典信息 M 和 L 类型,包括自定义信息点", description = "project (项目),building (建筑),floor (楼层),equipment (设备),system(系统),component (部件),space (空间)")
+    @PostMapping(value = ["/morl/query"])
+    fun queryMOrL(@RequestBody dictTypeList: ArrayList<String>): SQueryResponse<DefFuncId> {
+        return DictDefClassService.queryMOrL(dictTypeList)
+    }
+
+    /**
      * 获取不能同步到物理世界对象的数量
      */
    @Operation(summary = "获取不能同步到物理世界对象的数量", description = "")

+ 6 - 48
equip-componnet/src/main/kotlin/com/persagy/server/models/objects/Building.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.models.objects
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.server.datacenter.models.entities.objects.Project
 import com.persagy.service.models.annotations.SCascade
@@ -48,96 +47,55 @@ open class Building : BaseInfo() {
     @Schema(description = "建筑体ID")
     @Id
     @Column(name = "id")
-    @JSONField(name = "BuildID")
     var id: String? = null
 
     /** 建筑体名称 */
     @Schema(description = "建筑体名称")
     @Column(name = "name")
-    @JSONField(name = "BuildName")
     var name: String? = null
 
     /** 建筑本地编码 */
     @Schema(description = "建筑本地编码")
     @Column(name = "local_id")
-    @JSONField(name = "BuildLocalID")
     var localId: String? = null
 
     /** 建筑本地名称 */
     @Schema(description = "建筑本地名称")
     @Column(name = "local_name")
-    @JSONField(name = "BuildLocalName")
     var localName: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectID")
     var projectId: String? = null
 
     /** BIM模型中编码 */
     @Schema(description = "BIM模型中编码")
     @Column(name = "bim_id")
-    @JSONField(name = "BIMID")
     var bimId: String? = null
 
-    /** 建筑信息 */
-    @Schema(description = "建筑信息")
-    @Column(name = "building_info")
-    @JSONField(name = "BuildingInfo")
-    var buildingInfo: HashMap<String,Any?>? = null
-
-    /** 工作历 */
-    @Schema(description = "工作历")
-    @Column(name = "schedule")
-    @JSONField(name = "Schedule")
-    var schedule: HashMap<String,Any?>? = null
-
-    /** 人员信息 */
-    @Schema(description = "人员信息")
-    @Column(name = "people_info")
-    @JSONField(name = "PeopleInfo")
-    var peopleInfo: HashMap<String,Any?>? = null
-
-    /** 能耗信息 */
-    @Schema(description = "能耗信息")
-    @Column(name = "consumption_info")
-    @JSONField(name = "ConsumptionInfo")
-    var consumptionInfo: HashMap<String,Any?>? = null
-
-    /** 自定义 */
-    @Schema(description = "自定义")
-    @Column(name = "custom_param")
-    @JSONField(name = "CustomParam")
-    var customParam: HashMap<String,Any?>? = null
-
-    /** 建筑文档 */
-    @Schema(description = "建筑文档")
-    @Column(name = "building_doc")
-    @JSONField(name = "BuildingDoc")
-    var buildingDoc: HashMap<String,Any?>? = null
+    /** 信息点 */
+    @Schema(description = "信息点")
+    @Column(name = "infos")
+    var infos: HashMap<String,Any?>? = null
 
     /** 对象类型 */
     @Schema(description = "对象类型")
     @Column(name = "object_type")
-    @JSONField(name = "ObjectType")
-    override var objectType: String? = "Building"
+    override var objectType: String? = "building"
 
     /** 楼层   table  对应关系表   idColumn 对应 本类的关系id    childIdColumn 级联对象的关系id */
     @Schema(description = "级联-楼层")
     @SCascade(table="floor", idColumn="building_id", childIdColumn="id")
-    @JSONField(name = "Floor")
     var floor: ArrayList<FloorCompon>? = null
 
     /** 项目 */
     @Schema(description = "级联-项目")
     @SCascade(table="building", idColumn="id", childIdColumn="project_id")
-    @JSONField(name = "Project")
     var project: Project? = null
 
     /** 数量 */
     @Schema(description = "数量")
-    @JSONField(name = "Count")
     var count: Int? = 0
 
-} // Class Building
+}

+ 8 - 50
equip-componnet/src/main/kotlin/com/persagy/server/models/objects/FloorCompon.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.models.objects
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.assistant.PointPosition
 import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.server.datacenter.models.entities.objects.Building
@@ -50,129 +49,88 @@ open class FloorCompon : BaseInfo() {
     @Schema(description = "楼层ID")
     @Id
     @Column(name = "id")
-    @JSONField(name = "FloorID")
     var id: String? = null
 
     /** 楼层名称 */
     @Schema(description = "楼层名称")
     @Column(name = "name")
-    @JSONField(name = "FloorName")
     var name: String? = null
 
     /** 楼层本地编码 */
     @Schema(description = "楼层本地编码")
     @Column(name = "local_id")
-    @JSONField(name = "FloorLocalID")
     var localId: String? = null
 
     /** 楼层本地名称 */
     @Schema(description = "楼层本地名称")
     @Column(name = "local_name")
-    @JSONField(name = "FloorLocalName")
     var localName: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectID")
     var projectId: String? = null
 
     /** 建筑id */
     @Schema(description = "建筑id")
     @Column(name = "building_id")
-    @JSONField(name = "BuildID")
-    var buildId: String? = null
+    var buildingId: String? = null
 
     /** BIM模型中编码 */
     @Schema(description = "BIM模型中编码")
     @Column(name = "bim_id")
-    @JSONField(name = "BIMID")
     var bimId: String? = null
 
     /** 楼层顺序码 */
     @Schema(description = "楼层顺序码")
     @Column(name = "sequence_id")
-    @JSONField(name = "FloorSequenceID")
-    var sequenceId: Int? = null
-
-    /** 结构信息 */
-    @Schema(description = "结构信息")
-    @Column(name = "structure_info")
-    @JSONField(name = "StructureInfo")
-    var structureInfo: HashMap<String,Any?>? = null
-
-    /** 人员信息 */
-    @Schema(description = "结构信息")
-    @Column(name = "people_info")
-    @JSONField(name = "PeopleInfo")
-    var peopleInfo: HashMap<String,Any?>? = null
-
-    /** 自定义 */
-    @Schema(description = "自定义")
-    @Column(name = "custom_param")
-    @JSONField(name = "CustomParam")
-    var customParam: HashMap<String,Any?>? = null
+    var floorSequenceID: Int? = null
+
+    /** 楼层信息点 */
+    @Schema(description = "楼层信息点")
+    @Column(name = "infos")
+    var infos: HashMap<String,Any?>? = null
 
     /** 对象类型 */
     @Schema(description = "对象类型")
     @Column(name = "object_type")
-    @JSONField(name = "ObjectType")
-    override var objectType: String? = "Floor"
+    override var objectType: String? = "floor"
 
-    /** 工作历信息 */
-    @Schema(description = "工作历信息")
-    @Column(name = "work_calendar")
-    @JSONField(name = "WorkCalendar")
-    var workCalendar: HashMap<String,Any?>? = null
 
     /** 建筑   table  对应关系表   idColumn 对应 本类的关系id    childIdColumn 级联对象的关系id */
     @Schema(description = "级联-楼层")
     @SCascade(table="floor", idColumn="id", childIdColumn="building_id")
-    @JSONField(name = "Building")
     var building: Building? = null
 
     /** 项目 */
     @Schema(description = "级联-项目")
     @SCascade(table="floor", idColumn="id", childIdColumn="project_id")
-    @JSONField(name = "Project")
     var project: Project? = null
 
     /** 贯通关系   self = true  同样的对象查询时 id可以互相调换查询   */
     @Schema(description = "级联-贯通关系")
     @SCascade(table="r_fl_through_fl", idColumn="floor_id", childIdColumn="floor_other_id", self = true)
-    @JSONField(name = "FloorThroughList")
     var floorThroughList: ArrayList<FloorCompon>? = null
 
-//    /** 项目 */
-//    @Schema(description = "级联-项目")
-//    @SCascade(table="floor", idColumn="id", childIdColumn="project_id")
-//    @JSONField(name = "Equipment")
-//    var Equipment: ArrayList<Equipment>? = null
-
     /** 模型文件id */
     @Schema(description = "模型文件id")
     @Column(name = "model_id")
-    @JSONField(name = "ModelId")
     var modelId: String? = null
 
     /** 轮廓线 */
     @Schema(description = "轮廓线")
     @Column(name = "outline")
-    @JSONField(name = "Outline")
     var outline: ArrayList<PointPosition>? = null
 
     /** 标记 */
     @Schema(description = "标记")
-    @JSONField(name = "Sign")
     var sign: Int? = 0
 
     /** 数量 */
     @Schema(description = "数量")
-    @JSONField(name = "Count")
     var count: Int? = 0
 
     @Schema(description = "业务空间")
-    @JSONField(name = "ZoneSpaceList")
     var zoneSpaceList : ArrayList<ZoneSpace>? = null
 
 

+ 3 - 64
equip-componnet/src/main/kotlin/com/persagy/server/models/objects/ZoneSpace.kt

@@ -43,55 +43,46 @@ import javax.persistence.Table
 @Table(name = "zone_space_base")
 open class ZoneSpace:  BaseInfo() {
 
-
     /** 空间ID */
     @Schema(description = "空间ID")
     @Id
     @Column(name = "id")
-    @JSONField(name = "RoomID")
     var id: String? = null
 
     /** 空间名称 */
     @Schema(description = "空间名称")
     @Column(name = "name")
-    @JSONField(name = "RoomName")
     var name: String? = null
 
     /** 空间本地编码 */
     @Schema(description = "空间本地编码")
     @Column(name = "local_id")
-    @JSONField(name = "RoomLocalID")
     var localId: String? = null
 
     /** 空间本地名称 */
     @Schema(description = "空间本地名称")
     @Column(name = "local_name")
-    @JSONField(name = "RoomLocalName")
     var localName: String? = null
 
     /** 项目id */
     @Schema(description = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
     var projectId: String? = null
 
     /** 建筑id */
     @Schema(description = "建筑id")
     @Column(name = "building_id")
-    @JSONField(name = "BuildingId")
     var buildingId: String? = null
 
     /** 楼层id */
     @Schema(description = "楼层id")
     @Column(name = "floor_id")
-    @JSONField(name = "FloorId")
     var floorId: String? = null
 
     /** 空间二维码图片 */
     @Schema(description = "空间二维码图片")
-    @Column(name = "qr_code")
-    @JSONField(name = "RoomQRCode")
-    var qrCode: String? = null
+    @Column(name = "qr_code_pic")
+    var qRCodePic: String? = null
 
     /** 平台二维码 */
     @Schema(description = "平台二维码")
@@ -102,7 +93,6 @@ open class ZoneSpace:  BaseInfo() {
     /** BIM模型中编码 */
     @Schema(description = "BIM模型中编码")
     @Column(name = "bim_id")
-    @JSONField(name = "BIMID")
     var bimId: String? = null
 
     /** AI标记 */
@@ -110,64 +100,13 @@ open class ZoneSpace:  BaseInfo() {
     @JSONField(name = "IsAI")
     var isAi: Boolean = false
 
-//    /** 轮廓线 */
-//    @Schema(description = "轮廓线")
-//    @Column(name = "outline")
-//    @JSONField(name = "Outline")
-//    var outline: ArrayList<ArrayList<ArrayList<PointPosition>>>? = null
-//
-//    /** 轮廓线2 */
-//    @Schema(description = "轮廓线2")
-//    @Column(name = "outline2")
-//    @JSONField(name = "Outline2")
-//    var outline2: ArrayList<ArrayList<ArrayList<PointPosition>>>? = null
-
     /** 图片  */
     @Schema(description = "图片 ")
     @Column(name = "pic")
-    @JSONField(name = "Pic")
     var pic: ArrayList<TaskPic>? =null
 
-//    /** 类型 */
-//    @Schema(description = "类型")
-//    @Column(name = "object_type")
-//    @JSONField(name = "ObjectType")
-//    var objectType: String? = null
-
-//    /** 级联-建筑 */
-//    @Schema(description = "级联-建筑")
-//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="building_id")
-//    @JSONField(name = "Building")
-//    var building: Building? = null
-//
-//
-//    /** 级联-楼层  */
-//    @Schema(description = "级联-楼层")
-//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="floor_id")
-//    @JSONField(name = "Floor")
-//    var floor: Floor? = null
-
-//    /** 级联-空间类型  */
-//    @Schema(description = "级联-空间类型")
-//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="object_type")
-//    @JSONField(name = "DClassDef")
-//    var zoneName: DClassDef? = null
-//
-//    /** 级联-建筑 */
-//    @Schema(description = "级联-建筑")
-//    @SCascade(table="r_sp_in_bd", idColumn="space_id", childIdColumn="building_id")
-//    @JSONField(name = "BuildingList")
-//    var buildingList: ArrayList<Building>? = null
-//
-//    /** 级联-楼层  */
-//    @Schema(description = "级联-楼层")
-//    @SCascade(table="r_sp_in_fl", idColumn="space_id", childIdColumn="floor_id")
-//    @JSONField(name = "FloorList")
-//    var floorlList: ArrayList<Floor>? = null
-
     @Schema(description = "垂直交通关系空间id")
-    @JSONField(name = "SpaceIdList")
     var spaceIdList = ArrayList<String>()
 
 
-} // Class ZoneAirConditioning
+}

+ 5 - 26
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/EquipUpDateEnclosure.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.models.requests
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.assistant.TaskPic
 import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
@@ -34,100 +33,80 @@ import java.io.Serializable
 
 /**
  * 增量附件
+ *
+ * @author wx <zhangweixin@sagacloud.cn>
  */
 class EquipUpDateEnclosure :Serializable {
 
-    /**
-     * 设备id
-     */
+    /** 设备id */
     @Schema(description = "设备id",required = true)
-    @JSONField(name = "EquipId")
     var equipId: String? = null
 
     /** 保险文件 */
     @Schema(description = "保险文件",required = true)
-    @JSONField(name = "InsuranceFile")
     var insuranceFile: ArrayList<TaskPic>? = null
 
     /** 设备铭牌照片 */
     @Schema(description = "设备铭牌照片",required = true)
-    @JSONField(name = "Nameplate")
     var nameplate: ArrayList<TaskPic>? = null
 
     /** 设备照片 */
     @Schema(description = "设备照片",required = true)
-    @JSONField(name = "Pic")
-    var Pic: ArrayList<TaskPic>? = null
+    var pic: ArrayList<TaskPic>? = null
 
     /** 设备图纸 */
     @Schema(description = "设备图纸",required = true)
-    @JSONField(name = "Drawing")
     var drawing: ArrayList<TaskPic>? = null
 
     /** 设备文档 */
     @Schema(description = "设备文档",required = true)
-    @JSONField(name = "Archive")
     var archive: ArrayList<TaskPic>? = null
 
     /** 安装照片 */
     @Schema(description = "安装照片",required = true)
-    @JSONField(name = "InstallPic")
     var installPic: ArrayList<TaskPic>? = null
 
     /** 安装图纸 */
     @Schema(description = "安装图纸",required = true)
-    @JSONField(name = "InstallDrawing")
     var installDrawing: ArrayList<TaskPic>? = null
 
     /** 安装质检报告 */
     @Schema(description = "安装质检报告",required = true)
-    @JSONField(name = "CheckReport")
     var checkReport: ArrayList<TaskPic>? = null
 
     /** 操作说明书 */
     @Schema(description = "操作说明书",required = true)
-    @JSONField(name = "OperationManual")
     var operationManual: ArrayList<TaskPic>? = null
 
     /** 产品合格证 */
     @Schema(description = "产品合格证",required = true)
-    @JSONField(name = "ProductCertification")
     var productCertification: ArrayList<TaskPic>? = null
 
     /** 维修保养手册 */
     @Schema(description = "维修保养手册",required = true)
-    @JSONField(name = "MaintainManual")
     var maintainManual: ArrayList<TaskPic>? = null
 
     /** 安装说明书 */
     @Schema(description = "安装说明书",required = true)
-    @JSONField(name = "InstallInstruction")
     var installInstruction: ArrayList<TaskPic>? = null
 
     /** 验收报告 */
     @Schema(description = "验收报告",required = true)
-    @JSONField(name = "AcceptanceReport")
     var acceptanceReport: ArrayList<TaskPic>? = null
 
     /** 进场验收单 */
     @Schema(description = "进场验收单",required = true)
-    @JSONField(name = "ApproachingAcceptance")
     var approachingAcceptance: ArrayList<TaskPic>? = null
 
     /** 供应合同 */
     @Schema(description = "供应合同",required = true)
-    @JSONField(name = "SupplierContract")
     var supplierContract: ArrayList<TaskPic>? = null
 
     /** 检测报告 */
     @Schema(description = "检测报告",required = true)
-    @JSONField(name = "TestReport")
     var testReport: ArrayList<TaskPic>? = null
 
     /** 原厂证明 */
     @Schema(description = "原厂证明",required = true)
-    @JSONField(name = "OriginalCertificate")
     var originalCertificate: ArrayList<TaskPic>? = null
-
-
-} // Class EquipUpDateEnclosure
+}

+ 3 - 3
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/EquipUpDateEnclosureRequest.kt

@@ -30,13 +30,13 @@ import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
 
 /**
+ * 更新请求体
  *
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 class EquipUpDateEnclosureRequest<ENTITY: Any> :Serializable {
 
     /** 更新内容 */
     @Schema(description = "更新内容", required = true)
     var content: ArrayList<ENTITY>? = null
-
-
-} //
+}

+ 3 - 3
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/RSQueryResponse.kt

@@ -35,7 +35,7 @@ import java.io.Serializable
 /**
  * 查询请求应答对象基类
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "查询请求应答对象基类")
 open class RSQueryResponse<ENTITY: Serializable>(result: SResponseType = SResponseType.success, message: String = "")
@@ -56,5 +56,5 @@ open class RSQueryResponse<ENTITY: Serializable>(result: SResponseType = SRespon
     constructor(info: SPageQueryInfo<ENTITY>): this(SResponseType.success, "") {
         this.total = info.total
         this.content = info.content
-    } // Function constructor()
-} // Class SQueryResponse
+    }
+}

+ 3 - 7
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ShaftSpaceVertical.kt

@@ -26,29 +26,25 @@
 
 package com.persagy.server.models.requests
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
 
 /**
  * 和竖井关联的空间垂直交通关系
+ *
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 class ShaftSpaceVertical : Serializable{
 
     @Schema(description = "建筑体id")
-    @JSONField(name = "BuildingId")
     var buildingId: String? = null
 
     @Schema(description = "竖井id")
-    @JSONField(name = "ShaftId")
     var shaftId: String? = null
 
     @Schema(description = "空间类型")
-    @JSONField(name = "ObjectType")
     var objectType: String? = null
 
     @Schema(description = "AI开关")
-    @JSONField(name = "AiSwitch")
     var aiSwitch:Boolean? = false
-
-} // Class ShaftSpaceVertical
+}

+ 3 - 8
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/SpatialRelationship.kt

@@ -26,35 +26,30 @@
 
 package com.persagy.server.models.requests
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
 
 /**
- * 查看 关系
+ * 查看关系
  *
- * @author 张维新
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 class SpatialRelationship: Serializable {
 
     /** 建筑体id */
     @Schema(description = "建筑体id")
-    @JSONField(name = "BuildingId")
     var buildingId: String? = null
 
     /** 楼层id */
     @Schema(description = "楼层id")
-    @JSONField(name = "FloorId")
     var floorId: String? = null
 
     /** 图实例 */
     @Schema(description = "图实例")
-    @JSONField(name = "GraphType")
     var graphType: String? = null
 
     /** 图实例 */
     @Schema(description = "图实例")
-    @JSONField(name = "RelType")
     var relType: String? = null
 
-} // Class SpatialRelationship
+}

+ 2 - 2
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserChangePasswordRequest.kt

@@ -31,7 +31,7 @@ import io.swagger.v3.oas.annotations.media.Schema
 /**
  * 修改用户密码请求
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "修改用户密码请求")
 class UserChangePasswordRequest {
@@ -46,4 +46,4 @@ class UserChangePasswordRequest {
     /** 原密码 */
    @Schema(description = "原密码", required = true)
     var oldPwd: String? = null
-} // Class UserChangePasswordRequest
+}

+ 2 - 2
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserDeleteRequest.kt

@@ -31,11 +31,11 @@ import io.swagger.v3.oas.annotations.media.Schema
 /**
  * 删除用户请求
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "删除用户请求")
 class UserDeleteRequest {
     /** id */
     @Schema(description = "id", required = true)
     var id: String? = null
-} // Class UserDeleteRequest
+}

+ 2 - 2
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/UserUpdateRequest.kt

@@ -31,7 +31,7 @@ import io.swagger.v3.oas.annotations.media.Schema
 /**
  * 更新用户请求
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "更新用户请求")
 class UserUpdateRequest {
@@ -62,4 +62,4 @@ class UserUpdateRequest {
     /** 身份证号码 */
     @Schema(description = "身份证号码,全局唯一")
     var certno: String? = null
-} // Class UserUpdateRequest
+}

+ 5 - 0
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ZoneEquipQueryRequest.kt

@@ -29,6 +29,11 @@ package com.persagy.server.models.requests
 import com.persagy.service.models.requests.SQueryRequest
 import io.swagger.v3.oas.annotations.media.Schema
 
+/**
+ * 业务空间查询请求体
+ *
+ * @author 张维新 <zhangweixin@sagacloud.cn>
+ */
 class ZoneEquipQueryRequest : SQueryRequest() {
 
     @Schema(description = "所属业务空间类型", example = "TenantZone")

+ 7 - 3
equip-componnet/src/main/kotlin/com/persagy/server/models/requests/ZoneISpaceQueryRequest.kt

@@ -26,14 +26,18 @@
 
 package com.persagy.server.models.requests
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.requests.SQueryRequest
 import io.swagger.v3.oas.annotations.media.Schema
 
+/**
+ * 查询空间请求体
+ *
+ * @author 张维新 <zhangweixin@sagacloud.cn>
+ */
 class ZoneISpaceQueryRequest : SQueryRequest() {
 
+    /** 楼层 id */
     @Schema(description = "楼层Id", example = "Sp*****")
-    @JSONField(name = "FloorId")
     var floorId: String? = null
 
-} //
+}

+ 1 - 1
equip-componnet/src/main/kotlin/com/persagy/server/models/responses/BaseResponse.kt

@@ -32,7 +32,7 @@ import io.swagger.v3.oas.annotations.media.Schema
 /**
  * 应答类基类
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "应答类基类")
 open class BaseResponse(

+ 2 - 5
equip-componnet/src/main/kotlin/com/persagy/server/models/responses/TokenCheckResponse.kt

@@ -26,13 +26,12 @@
 
 package com.persagy.server.models.responses
 
-import com.fasterxml.jackson.annotation.JsonProperty
 import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * token审核应答
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "token审核应答")
 class TokenCheckResponse : BaseResponse("success"){
@@ -42,7 +41,6 @@ class TokenCheckResponse : BaseResponse("success"){
 
     /** 用户名 */
     @Schema(description = "用户名", required = true)
-    @JsonProperty(value = "username")
     var userName: String? = null
 
     /** 密码 */
@@ -51,7 +49,6 @@ class TokenCheckResponse : BaseResponse("success"){
 
     /** 真实姓名 */
     @Schema(description = "真实姓名")
-    @JsonProperty(value = "realname")
     var realName: String? = null
 
     /** 手机号码 */
@@ -73,4 +70,4 @@ class TokenCheckResponse : BaseResponse("success"){
     /** app列表 */
     @Schema(description = "app列表")
     var apps: ArrayList<String>? = null
-} // Class TokenCheckResponse
+}

+ 1 - 1
equip-componnet/src/main/kotlin/com/persagy/server/models/responses/UserCreateRequest.kt

@@ -32,7 +32,7 @@ import java.io.Serializable
 /**
  * 创建用户请求
  *
- * @author  庞利祥(sybotan@126.com)
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 @Schema(description = "创建用户请求")
 class UserCreateRequest: Serializable {

+ 7 - 3
equip-componnet/src/main/kotlin/com/persagy/server/service/EquipAssetComponentsReqponseService.kt

@@ -32,15 +32,19 @@ import com.persagy.server.datacenter.models.response.EquipAssetComponentsReqpons
 import com.persagy.service.SObjectService
 
 /**
+ * 设备对应资产服务
  *
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 object EquipAssetComponentsReqponseService : SObjectService<EquipAssetComponentsReqponse>(SMybatisDao(EquipAssetComponentsReqponse::class.java)){
 
-
+    /**
+     * 请求前设置
+     */
     override fun onQueryBefore(queryBuilder: SQueryBuilder<EquipAssetComponentsReqponse>) {
         super.onQueryBefore(queryBuilder)
+        /** 设置表明 */
         queryBuilder.tableName = "v_equip_property"
     }
 
-
-} // Fun
+}

+ 6 - 2
equip-componnet/src/main/kotlin/com/persagy/server/service/EquipDelService.kt

@@ -34,12 +34,16 @@ import com.persagy.server.service.base.Service
 /**
  * 待删除的设备
  *
- * @author 张维新
+ * @author 张维新 <zhangweixin@sagacloud.cn>
  */
 object EquipDelService  : Service<EquipmentDel>(SMybatisDao(EquipmentDel::class.java)) {
 
+    /**
+     * 查询前设置
+     */
     override fun onQueryBefore(queryBuilder: SQueryBuilder<EquipmentDel>) {
+        /** 设置表明 */
         queryBuilder.tableName = "v_equip_del"
     }
 
-} // Object EquipDelService
+}

+ 3 - 3
equip-componnet/src/main/kotlin/com/persagy/server/service/PropertyEquipService.kt

@@ -80,15 +80,15 @@ object PropertyEquipService : Service<PropertyEquip>(SMybatisDao(PropertyEquip::
 
                     }
 
-                    if (!equipUpDateEnclosure.Pic.isNullOrEmpty()){
+                    if (!equipUpDateEnclosure.pic.isNullOrEmpty()){
                         if (!equip!!.infos.isNullOrEmpty()) {
                             val containsKey1 = equip!!.infos!!.containsKey(Opt.PIC)
                             if (containsKey1) {
                                 val any = equip!!.infos!![Opt.PIC] as JSONArray
-                                any.addAll(equipUpDateEnclosure.Pic!!)
+                                any.addAll(equipUpDateEnclosure.pic!!)
                                 equip!!.infos!![Opt.PIC] = any
                             } else {
-                                equip!!.infos!![Opt.PIC] = equipUpDateEnclosure.Pic!!
+                                equip!!.infos!![Opt.PIC] = equipUpDateEnclosure.pic!!
                             }
                         }
                     }

+ 177 - 0
equip-componnet/src/main/kotlin/com/persagy/server/service/dict/DictDefClassService.kt

@@ -0,0 +1,177 @@
+/*
+ * *********************************************************************************************************************
+ *
+ *          !!
+ *        .F88X
+ *        X8888Y
+ *      .}888888N;
+ *        i888888N;        .:!              .I$WI:
+ *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
+ *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
+ *            +888888N;  .8888888Y                                  "&&8Y.}8,
+ *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
+ *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
+ *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
+ *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
+ *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
+ *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
+ *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
+ *      .:R888888I
+ *      .&888888I                                          Copyright (c) 2009-2020.  博锐尚格科技股份有限公司
+ *        ~8888'
+ *        .!88~                                                                     All rights reserved.
+ *
+ * *********************************************************************************************************************
+ */
+
+package com.persagy.server.service.dict
+
+import com.persagy.database.SFilter
+import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.Opt
+import com.persagy.server.datacenter.models.entities.dictnew.DefClass
+import com.persagy.server.datacenter.models.entities.dictnew.DefFuncId
+import com.persagy.service.SObjectService
+import com.persagy.service.models.enums.SResponseType
+import com.persagy.service.models.responses.SQueryResponse
+
+/**
+ * 字典服务
+ *
+ * @author wx  <zhangweixin@sagacloud.com>
+ * @date  2020/11/17 17:28
+ */
+object DictDefClassService: SObjectService<DefFuncId>(SMybatisDao(DefFuncId::class.java)) {
+
+    /** 平台集团对象类型 */
+    private val defClassService = SObjectService(SMybatisDao(DefClass::class.java))
+    /**
+     * 查询 M 和 L 类型的信息点
+     */
+    fun queryMOrL(dictTypeList: ArrayList<String>): SQueryResponse<DefFuncId> {
+        /** 返回对象 */
+        val sQueryResponse = SQueryResponse<DefFuncId>(SResponseType.success)
+        /** 对象列表 */
+        var list = ArrayList<DefFuncId>()
+        /** 入参不为空 */
+        if (!dictTypeList.isNullOrEmpty()){
+            /** 遍历入参列表 */
+            for (dictType in dictTypeList){
+                /** 类型筛选 */
+                when(dictType){
+                    "project" -> {
+                        /** 项目 */
+                        list.add(typeStatisticsOne("project","项目"))
+                    }
+                    "building" -> {
+                        /** 建筑 */
+                        list.add(typeStatisticsOne("building","建筑"))
+                    }
+                    "floor" -> {
+                        /** 楼层 */
+                        list.add(typeStatisticsOne("floor","楼层"))
+                    }
+                    "equipment" -> {
+                        /** 设备 */
+                        list.add(typeStatisticsTwo("equipment","设备"))
+                    }
+                    "component" -> {
+                        /** 部件 */
+                        list.add(typeStatisticsTwo("component","部件"))
+                    }
+                    "system" -> {
+                        /** 系统 */
+                        list.add(typeStatisticsTwo("system","系统"))
+                    }
+                    "space" -> {
+                        /** 空间 */
+                        list.add(typeStatisticsTwo("space","空间"))
+                    }
+                }
+            }
+
+            /** 列表赋值 */
+            sQueryResponse.content = list
+        }else {
+            /** 返回状态 */
+            sQueryResponse.result = SResponseType.failure
+        }
+
+        /** 返回对象 */
+        return sQueryResponse
+    }
+
+    /**
+     * 项目、建筑、楼层 M 或 L 信息点统计
+     *
+     * @param code  编码
+     * @param name  名称
+     * @return 信息点对象
+     */
+    private fun typeStatisticsOne(code: String,name:String): DefFuncId {
+        /** 实例化对象 */
+        val defFuncId = DefFuncId()
+        /** 查询 M 或 L 信息点 */
+        val infosList = select(
+            SFilter.eq("projectId", Opt.projectId!!), SFilter.eq("classCode", code),
+           SFilter.not(SFilter.eq("category","STATIC"))
+        ).exec()
+        /** 编码赋值 */
+        defFuncId.code = code
+        /** 名称赋值 */
+        defFuncId.name = name
+        /** 列表赋值 */
+        defFuncId.content = infosList
+        /** 返回对象 */
+        return defFuncId
+    }
+
+    /**
+     * 设备、部件、系统、空间 M 或 L 信息点统计
+     *
+     * @param code  编码
+     * @param name  名称
+     * @return 信息点对象
+     */
+    private fun typeStatisticsTwo(code: String,name:String): DefFuncId {
+        /** 返回对象 */
+        val defFuncId = DefFuncId()
+        /** 名称 */
+        defFuncId.name = name
+        /** 编码 */
+        defFuncId.code = code
+        /** 对象列表 */
+        var equipList = ArrayList<DefFuncId>()
+        /** 查询  */
+        val typeList = defClassService.select(
+            SFilter.eq("parentCode", code),
+            SFilter.eq("projectId", Opt.projectId!!)
+        ).exec()
+        /** 遍历列表 */
+        for (type in typeList){
+            /** 实例化对象 */
+            val defFuncId = DefFuncId()
+            /** 名称 */
+            defFuncId.name = type.name
+            /** 编码 */
+            defFuncId.code = type.code
+            /** 查询 */
+            val equipInfosList = select(
+                SFilter.eq("projectId", Opt.projectId!!), SFilter.eq("classCode", type.code!!),
+                SFilter.not(SFilter.eq("category","STATIC"))
+            ).exec()
+            /** 列表赋值 */
+            defFuncId.content = equipInfosList
+            /** 添加到列表 */
+            equipList.add(defFuncId)
+        }
+
+        /** 列表赋值 */
+        defFuncId.content = equipList
+        /** 返回对象 */
+        return defFuncId
+    }
+
+
+
+}

+ 2 - 2
equip-componnet/src/main/kotlin/com/persagy/server/service/objects/BuildingService.kt

@@ -53,7 +53,7 @@ object BuildingService : Service<Building>(SMybatisDao(Building::class.java)) {
             val pageQuery = pageQuery(request, arrayListOf(SFilter.eq("projectId", projectId!!)))
             if (!pageQuery.content.isNullOrEmpty()){
                 for ( building in  pageQuery.content!!){
-                    val floorList = FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("BuildID", building.id!!)).exec()
+                    val floorList = FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("buildingId", building.id!!)).exec()
 
                     var count = 0
                     for (floor in floorList){
@@ -62,7 +62,7 @@ object BuildingService : Service<Building>(SMybatisDao(Building::class.java)) {
 //                            val floorList = FloorService.select(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString()), SFilter.not(SFilter.eq("FloorID", floor.id!!)),
 //                                    SFilter.isNull("Outline"), SFilter.eq("ModelId", floor.modelId!!)).exec()
                             val floorList = FloorService.select(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString()),
-                                     SFilter.eq("ModelId", floor.modelId!!)).exec()
+                                     SFilter.eq("modelId", floor.modelId!!)).exec()
                             if (floorList.size>1){
                                 floor.sign = 1
                                 count++

+ 3 - 3
equip-componnet/src/main/kotlin/com/persagy/server/service/objects/EquipmentService.kt

@@ -652,15 +652,15 @@ object EquipmentService : Service<Equipment>(SMybatisDao(Equipment::class.java))
                         continue
                     }
                     logger.debug("设备id= ${equip?.id}")
-                    if (!equipUpDateEnclosure.Pic.isNullOrEmpty()){
+                    if (!equipUpDateEnclosure.pic.isNullOrEmpty()){
                         if (!equip!!.infos.isNullOrEmpty()) {
                             val containsKey1 = equip!!.infos!!.containsKey(Opt.PIC)
                             if (containsKey1) {
                                 val any = equip!!.infos!![Opt.PIC] as JSONArray
-                                any.addAll(equipUpDateEnclosure.Pic!!)
+                                any.addAll(equipUpDateEnclosure.pic!!)
                                 equip!!.infos!![Opt.PIC] = any
                             } else {
-                                equip!!.infos!![Opt.PIC] = equipUpDateEnclosure.Pic!!
+                                equip!!.infos!![Opt.PIC] = equipUpDateEnclosure.pic!!
                             }
                         }
                     }

+ 2 - 13
message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/Message.kt

@@ -27,13 +27,11 @@
 package com.persagy.server.messagecenter.models.entities
 
 
-import com.persagy.server.messagecenter.models.entities.base.RBaseInfo
-import com.alibaba.fastjson.annotation.JSONField
-import com.fasterxml.jackson.annotation.JsonProperty
 import com.persagy.server.datacenter.models.entities.objects.Project
+import com.persagy.server.messagecenter.models.entities.base.RBaseInfo
 import com.persagy.service.models.annotations.SCascade
 import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
 import javax.persistence.Id
 import javax.persistence.Table
@@ -51,55 +49,46 @@ open class Message: RBaseInfo(){
     @Schema(description = "ID")
     @Id
     @Column(name = "id")
-    @JsonProperty("Id")
     var id: String? = null
 
     /** 项目ID */
     @Schema(description = "项目ID")
     @Column(name = "project_id")
-    @JsonProperty("ProjectId")
     var projectId: String? = null
 
     /** 标题 */
     @Schema(description = "标题")
     @Column(name = "title")
-    @JSONField(name = "Title")
     var title: String? = null
 
     /** 发送消息的模块 */
     @Schema(description = "发送消息的模块")
     @Column(name = "module")
-    @JSONField(name = "Module")
     var module: String? = null
 
     /** 枚举类型: Info, Warning, Error, Success */
     @Schema(description = "枚举类型: Info, Warning, Error, Success")
     @Column(name = "type")
-    @JSONField(name = "Type")
     var type: String? = null
 
     /** 消息内容 */
     @Schema(description = "消息内容")
     @Column(name = "content")
-    @JSONField(name = "Content")
     var content: MessageContent? = null
 
     /** 用户id */
     @Schema(description = "用户id")
     @Column(name = "user_id")
-    @JSONField(name = "UserId")
     var userId: String? = null
 
     /** 是否已读 */
     @Schema(description = "是否已读")
     @Column(name = "read")
-    @JSONField(name = "Read")
     var read: Boolean? = null
 
     /** 级联-项目 */
     @Schema(description = "级联-项目")
     @SCascade(table="message.message", idColumn="id", childIdColumn="project_id")
-    @JSONField(name = "Project")
     var project: ArrayList<Project>? = null
 
 } // Class Message

+ 2 - 7
message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/base/BaseInfo.kt

@@ -27,8 +27,7 @@
 package com.persagy.server.messagecenter.models.entities.base
 
 import com.fasterxml.jackson.annotation.JsonFormat
-import com.fasterxml.jackson.annotation.JsonProperty
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
 import java.util.*
 import javax.persistence.Column
@@ -45,27 +44,23 @@ open class BaseInfo : Serializable {
     @Schema(description = "ID")
     @Id
     @Column(name = "id")
-    @JsonProperty("Id")
     var id: String? = null
 
     /** 项目ID */
     @Schema(description = "项目ID")
     @Column(name = "project_id")
-    @JsonProperty("ProjectId")
     var projectId: String? = null
 
     /** 更新时间 */
     @Schema(description = "更新时间", example = "2019-03-01 10:10:10")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Column(name = "last_update", updatable = false, insertable = false)
-    @JsonProperty("LastUpdate")
     var lastUpdate: Date? = null
 
     /** 创建时间 */
     @Schema(description = "创建时间", example = "2019-03-01 10:10:10")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Column(name = "create_time", updatable = false, insertable = false)
-    @JsonProperty("CreateTime")
     var createTime: Date? = null
 
-} // Class BaseInfo
+}

+ 1 - 1
message-center/src/main/kotlin/com/persagy/server/messagecenter/models/entities/base/RBaseInfo.kt

@@ -46,4 +46,4 @@ open class RBaseInfo : SBaseEntity() {
 //    @JSONField(name =value = "Id")
 //    var id: String? = null
 
-} // Class DicRequest
+}

+ 8 - 0
pendingIssues.md

@@ -36,4 +36,12 @@ v_equip_component_count
  密码: @)!^sagacloud
 ```
 
+缓存数据服务器
+```
+ip: 192.168.12.14
+账号:root
+密码:cGVyc2FneV8yMDIwbGFic2wlIyQ=
+
+```
+