Browse Source

********************WX***********************
同步关系

zhangweixin 4 years ago
parent
commit
2f198b0d0b
29 changed files with 793 additions and 184 deletions
  1. 3 1
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefFuncId.kt
  2. 2 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/graphtype/rel/EquipmentBase.kt
  3. 2 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/objects/Equipment.kt
  4. 1 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/objects/ZoneSpace.kt
  5. 0 73
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/rel/REq2Bd.kt
  6. 4 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/jms/SynchronousMessage.kt
  7. 4 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/jms/SynchronousMessageRel.kt
  8. 3 3
      datacenter/src/main/kotlin/com/persagy/server/services/base/Service.kt
  9. 1 3
      datacenter/src/main/kotlin/com/persagy/server/services/relation_calc/ManualRelationCalcService.kt
  10. 3 3
      datacenter/src/main/kotlin/com/persagy/server/services/relation_calc/RelationCalcService.kt
  11. 2 2
      datacenter/src/main/resources/application-dev.yml
  12. 9 9
      datacenter/src/main/resources/application-prod.yml
  13. 2 0
      datasyn/src/main/kotlin/com/persagy/server/syn/Configure.kt
  14. 76 1
      datasyn/src/main/kotlin/com/persagy/server/syn/jms/DataCenterSync.kt
  15. 4 1
      datasyn/src/main/kotlin/com/persagy/server/syn/jms/MessageProcessing.kt
  16. 2 0
      datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/EquipApi.kt
  17. 1 0
      datasyn/src/main/kotlin/com/persagy/server/syn/models/tools/FloorUtil.kt
  18. 6 3
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterBuilding.kt
  19. 8 3
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterComponent.kt
  20. 10 3
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterEquipment.kt
  21. 8 3
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterFloor.kt
  22. 6 5
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterShaft.kt
  23. 8 5
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterSpace.kt
  24. 6 3
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterSystem.kt
  25. 587 0
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/rel/AutomaticCalculationSync.kt
  26. 15 5
      datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/rel/EquipinSpaceSync.kt
  27. 3 2
      datasyn/src/main/kotlin/com/persagy/server/syn/task/SchedulerTaskRel.kt
  28. 15 54
      datasyn/src/main/kotlin/com/persagy/server/syn/utils/ParamTools.kt
  29. 2 2
      equip-component/src/main/resources/application-prod.yml

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

@@ -225,7 +225,9 @@ open class DefFuncId: Serializable {
         get() {
             return if (firstName == "基本信息"|| firstName.isNullOrEmpty()||firstName == "基本参数"){
                 code
-            }else{
+            } else if (code == "roomLocalFuncTypeID"||code == "RoomLocalFuncTypeName"){
+                "infos.$code"
+            } else {
                 "infos.$code"
             }
         }

+ 2 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/graphtype/rel/EquipmentBase.kt

@@ -26,6 +26,7 @@
 
 package com.persagy.server.datacenter.models.entities.graphtype.rel
 
+import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import io.swagger.v3.oas.annotations.media.Schema
 import java.io.Serializable
@@ -64,6 +65,7 @@ open class EquipmentBase : Serializable , BaseInfo(){
     /** 设计图纸中编码 */
     @Schema(description = "设计图纸中编码")
     @Column(name = "cad_id")
+    @JSONField(name = "cADID")
     var cadId: String? = null
 
     /** BIM模型中编码 */

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

@@ -26,6 +26,7 @@
 
 package com.persagy.server.datacenter.models.entities.objects
 
+import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.datacenter.models.entities.assistant.BIMLocation
 import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.server.datacenter.models.entities.dict.EquipCategory
@@ -79,6 +80,7 @@ open class Equipment : BaseInfo() {
     /** 设计图纸中编码 */
     @Schema(description = "设计图纸中编码")
     @Column(name = "cad_id")
+    @JSONField(name = "cADID")
     var cadId: String? = null
 
     /** RFID标识 */

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

@@ -186,6 +186,7 @@ open class ZoneSpace: Serializable, SBaseEntity() {
 
     /** 信息点  */
     @Schema(description = "信息点")
+    @Column(name = "infos")
     @JSONField(name = "infos")
     var infos: HashMap<String,Any?>? =null
 

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

@@ -1,73 +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.rel
-
-import com.persagy.server.datacenter.models.entities.base.RBaseInfo
-import io.swagger.v3.oas.annotations.media.Schema
-import javax.persistence.Column
-import javax.persistence.Id
-import javax.persistence.Table
-
-/**
- * 设备服务的建筑
- *
- * @author 张维新
- */
-@Schema(description = "设备设施服务于建筑实体类")
-@Table(name = "relationship.r_eq2bd")
-class REq2Bd : RBaseInfo(){
-
-    /** 设备Id */
-    @Schema(description = "设备Id")
-    @Id
-    @Column(name = "eq_id")
-    var id1: String? = null
-
-    /** 建筑Id */
-    @Schema(description = "建筑Id")
-    @Id
-    @Column(name = "bd_id")
-    var id2: String? = null
-
-    /** 项目Id */
-    @Schema(description = "项目Id")
-    @Id
-    @Column(name = "project_id")
-    var projectId: String? = null
-
-    /** 类型 */
-    @Schema(description = "类型 设备服务于建筑eq2bd_for" )
-    @Id
-    @Column(name = "type")
-    var type: String? = null
-
-    /** 计算标记 1 为手动 2为自动 */
-    @Schema(description = "计算标记 1 为手动 2为自动 ")
-    @Column(name = "sign")
-    var sign: Int? = null
-
-}

+ 4 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/jms/SynchronousMessage.kt

@@ -74,6 +74,10 @@ class SynchronousMessage : Serializable {
     /** 从 id */
     @Column(name = "to_id")
     var toId: String? = null
+    /** 数量 */
+    @Column(name = "count")
+    var count: Int = 0
+
 
     /** 最后更新日期 */
     @Column(name = "last_update", updatable = false, insertable = false)

+ 4 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/jms/SynchronousMessageRel.kt

@@ -66,6 +66,10 @@ class SynchronousMessageRel : Serializable {
     /** 从 id */
     @Column(name = "to_id")
     var toId: String? = null
+    /** 失败数量统计 */
+    @Column(name = "count")
+    var count: Int = 0
+
 
     /** 最后更新日期 */
     @Column(name = "last_update", updatable = false, insertable = false)

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

@@ -85,7 +85,7 @@ open class Service<ENTITY : BaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectS
     override fun onCreateSuccess(entityList: ArrayList<ENTITY>) {
         entityList.forEach {
             try {
-                if (!it.keyValue("id").toString().startsWith("Si")){
+                if (!it.keyValue("id").toString().startsWith("Si")&&!it.keyValue("id").toString().startsWith("Pe")){
                     rabbitMqService.sendObjects(Opt.projectId!!, Opt.CREATE,it.keyValue("id").toString())
                 }
 
@@ -122,7 +122,7 @@ open class Service<ENTITY : BaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectS
             }
 
             try {
-                if (!it.keyValue("id").toString().startsWith("Si")) {
+                if (!it.keyValue("id").toString().startsWith("Si")&&!it.keyValue("id").toString().startsWith("Pe")) {
                     rabbitMqService.sendObjects(Opt.projectId!!, Opt.DELETE, it.keyValue("id").toString())
                 }
             } catch (e: Exception) {
@@ -159,7 +159,7 @@ open class Service<ENTITY : BaseInfo>(daoClass: SAbstractDao<ENTITY>) : SObjectS
     override fun onUpdateSuccess(entityList: ArrayList<ENTITY>) {
         try {
             for (entity in entityList) {
-                if (!entity.keyValue("id").toString().startsWith("Si")) {
+                if (!entity.keyValue("id").toString().startsWith("Si")&&!entity.keyValue("id").toString().startsWith("Pe")) {
                     rabbitMqService.sendObjects(Opt.projectId!!, Opt.UPDATE, entity.keyValue("id").toString())
                 }
                 try {

+ 1 - 3
datacenter/src/main/kotlin/com/persagy/server/services/relation_calc/ManualRelationCalcService.kt

@@ -81,8 +81,6 @@ open class ManualRelationCalcService {
     private val rEq2ShService = SObjectService(SMybatisDao(REq2Sh::class.java))
     /** 设备服务于楼层 */
     private val rEq2FlService = SObjectService(SMybatisDao(REq2Fl::class.java))
-    /** 设备服务于建筑 */
-    private val rEq2BdService = SObjectService(SMybatisDao(REq2Bd::class.java))
     /** 系统和空间关系 */
     private val rSy2SpService = SObjectService(SMybatisDao(RSy2Sp::class.java))
     /** 系统和竖井关系 */
@@ -2545,7 +2543,7 @@ open class ManualRelationCalcService {
                     delete =  rEq2FlService.delete(SFilter.eq("projectId", projectId!!),
                         SFilter.eq("equipId", manualRelationCalcDel.fromId!!))
                 }else if (manualRelationCalcDel.relType =="eq2bd_for"){/** 设备服务于建筑 */
-                    delete = rEq2BdService.delete(SFilter.eq("projectId", projectId!!),
+                    delete = REqForBdService.delete(SFilter.eq("projectId", projectId!!),
                         SFilter.eq("equipId", manualRelationCalcDel.fromId!!))
                 }else if (manualRelationCalcDel.relType == "sy2sp_for") {/** 系统服务于业务空间 */
                     delete = rSy2SpService.delete(SFilter.eq("projectId", projectId!!),

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

@@ -359,7 +359,7 @@ open class RelationCalcService {
             if(result!=null && result == 0){
                 try {
                     /** 发送消息 */
-                    rabbitMqService.sendRel(Opt.projectId!!, "Eq2Sh_in","20","123","456")
+                    rabbitMqService.sendRel(Opt.projectId!!, "Eq2Sh_in","20",tables!!,"456")
                     upDate(projectId,"fl2sp")
                     upDate(projectId,"eq2fl")
                     val entity = relationTypeProjectservice.select(SFilter.eq("projectId", projectId), SFilter.eq("relationType", "eq2sp_in"), SFilter.eq("zoneType",tables!!)).entity()
@@ -497,7 +497,7 @@ open class RelationCalcService {
             val result = mapper.calcFl2Sp(tablesName,projectId)
             if(result != null && result == 0 ){
                 /** 发送消息 */
-                rabbitMqService.sendRel(Opt.projectId!!, "Fl2Sp_in","20","123","456")
+                rabbitMqService.sendRel(Opt.projectId!!, "Fl2Sp_in","20",tables!!,"456")
                 upDate(projectId,"fl2sp")
                 return SBaseResponse(SResponseType.success)
             }else{
@@ -1050,7 +1050,7 @@ open class RelationCalcService {
                     }
                     val rEq2SpList = REq2SpService.select(SFilter.eq("projectId", projectId),
                         SFilter.inList("id1", listId)
-                        , SFilter.eq("type", "eq2sp_in")).exec()
+                        , SFilter.eq("type", "eq2sp_in"), SFilter.eq("type","AirConditioningZone")).exec()
                     logger.debug("关系长度: ${rEq2SpList.size}")
                     if (rEq2SpList.size>0){
                         for (rEq2Sp in rEq2SpList) {

+ 2 - 2
datacenter/src/main/resources/application-dev.yml

@@ -33,8 +33,8 @@ spring:
     name:                               revit-algorithm
     type:                               com.alibaba.druid.pool.DruidDataSource
     driver-class-name:                  org.postgresql.Driver
-    url:                                jdbc:postgresql://60.205.177.43:5432/datacenterlabsl
-#    url:                                jdbc:postgresql://39.102.40.239:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://60.205.177.43:5432/datacenterlabsl
+    url:                                jdbc:postgresql://39.102.40.239:5432/datacenterlabsl
     username:                           postgres
 #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj

+ 9 - 9
datacenter/src/main/resources/application-prod.yml

@@ -31,20 +31,20 @@ spring:
 #    url:                                jdbc:postgresql://data-center:5432/datacenter
 #    username:                           postgres
 #    password:                           123qwe!@#
-#    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
-    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
+    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
+#    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
 #    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
     username:                           postgres
 #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
-#  rabbitmq:
-#    host: 39.102.43.179
-#    port: 9936
-#    username: admin
-#    password: brzj123456
-#    #虚拟host 可以不设置,使用server默认host
-#    virtual-host: /test
+  rabbitmq:
+    host: 39.102.43.179
+    port: 9936
+    username: admin
+    password: brzj123456
+    #虚拟host 可以不设置,使用server默认host
+    virtual-host: /test
 
   servlet:
     multipart:

+ 2 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/Configure.kt

@@ -37,6 +37,8 @@ import com.alibaba.fastjson.JSONObject
  */
 object Configure {
 
+
+    var messageTypeDataCerten = 1
     /** 数据中台消息之创建 */
     const val RWDCREATE = "instanceObjectCreate"
     /** 数据中台消息之修改 */

+ 76 - 1
datasyn/src/main/kotlin/com/persagy/server/syn/jms/DataCenterSync.kt

@@ -6,6 +6,7 @@ import com.persagy.server.datacenter.models.jms.SynchronousMessage
 import com.persagy.server.datacenter.models.jms.SynchronousMessageRel
 import com.persagy.server.syn.Configure
 import com.persagy.server.syn.services.jms.*
+import com.persagy.server.syn.services.jms.rel.AutomaticCalculationSync
 import com.persagy.server.syn.services.jms.rel.EquipinSpaceSync
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Service
@@ -45,6 +46,9 @@ class DataCenterSync {
     /** 设备所在的业务空间 */
     @Autowired
     lateinit var equipInSpaceSync: EquipinSpaceSync
+    /** 计算关系 */
+    @Autowired
+    lateinit var automaticCalculationSync: AutomaticCalculationSync
 
     /**
      * 数据中心到 - 中台数据
@@ -87,7 +91,6 @@ class DataCenterSync {
                     /** 租户 */
 //                    dataCenterVOTn.tenantType(message)
                 }
-
             }
         }
         return true
@@ -312,6 +315,7 @@ class DataCenterSync {
                         }
                         "20" -> {
                             /** 计算 */
+                            automaticCalculationSync.sp2SpConvectionNetwork01(message)
                         }
                     }
                 }
@@ -351,6 +355,7 @@ class DataCenterSync {
                         }
                         "20" -> {
                             /** 计算 */
+                            automaticCalculationSync.sp2SpSpaceNeighborhood5(message)
                         }
                     }
                 }
@@ -414,6 +419,7 @@ class DataCenterSync {
                         }
                         "20" -> {
                             /** 计算 */
+                            automaticCalculationSync.sp2SpRadiationNetwork1(message)
                         }
                     }
                 }
@@ -453,6 +459,7 @@ class DataCenterSync {
                         }
                         "20" -> {
                             /** 计算 */
+                            automaticCalculationSync.sp2SpTrafficNetwork1(message)
                         }
                     }
                 }
@@ -1032,6 +1039,7 @@ class DataCenterSync {
                         }
                         "20" -> {
                             /** 计算 */
+                            automaticCalculationSync.eq2EqSensorRelationshipSs2eq(message)
                         }
                     }
                 }
@@ -1096,6 +1104,9 @@ class DataCenterSync {
                         "12" -> { // 删除关系
                             equipInSpaceSync.delRel(message, "SensorRelationship", "Ss2Sp")
                         }
+                        "20" ->{
+                            automaticCalculationSync.eq2SpSensorRelationshipSs2sp(message)
+                        }
                     }
                 }
                 "eq2sp_x" -> { /** 暂不同步 */
@@ -1113,39 +1124,103 @@ class DataCenterSync {
                 }
                 "Eq2Bd_in" -> {
                     /** 设备设施服务于建筑 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.eq2BdFor(message)
+                        }
+                    }
                 }
                 "Eq2Sh_in" -> {
                     /** 设备设施所在竖井 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.eq2ShIn(message)
+                        }
+                    }
                 }
                 "Eq2Sp_in" ->{
                     /** 设备设施所在空间 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.eq2SpIn(message)
+                        }
+                    }
                 }
                 "Fl2Fl_Through" -> {
                     /** 楼层贯通关系 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.fl2FlThrough(message)
+                        }
+                    }
                 }
                 "Fl2Sp_in" -> {
                     /** 楼层下的业务空间 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.fl2SpIn(message)
+                        }
+                    }
+
                 }
                 "Bd2Sh_in" -> {
                     /** 建筑下的竖井 */
+                    when(message.ops){
+                        "20" -> {
+                            automaticCalculationSync.bd2ShIn(message)
+                        }
+                    }
                 }
                 "Sh2Sh_Through" -> {
                     /** 竖井贯通 */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.sh2ShThrough(message)
+                        }
+                    }
+
                 }
                 "syeq2bd" -> {
                     /** 建筑下的系统设备部件 */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.syeq2bd(message)
+                        }
+                    }
                 }
                 "Sy2Fl_in" -> {
                     /** 系统所在楼层 */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.sy2FlIn(message)
+                        }
+                    }
+
                 }
                 "Sy2Sh_in" -> {
                     /** 系统所在竖井 */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.sy2ShIn(message)
+                        }
+                    }
                 }
                 "Sy2Sp_in" -> {
                     /** 系统所在业务空间 */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.sy2SpIn(message)
+                        }
+                    }
+
                 }
                 "fengkou_for" -> {
                     /** 风口(空调风口、通风风口) 服务  */
+                    when(message.ops) {
+                        "20" -> {
+                            automaticCalculationSync.fengkouFor(message)
+                        }
+                    }
                 }
 
             }

+ 4 - 1
datasyn/src/main/kotlin/com/persagy/server/syn/jms/MessageProcessing.kt

@@ -118,7 +118,7 @@ class MessageProcessing {
                 messageTypeDataCerten =0
                 /** 查询待处理的消息 */
                 val messageList =
-                    synchronousMessageObjService.select(SFilter.not(SFilter.eq("sign", 0))).order("createTime").exec()
+                    synchronousMessageObjService.select(SFilter.not(SFilter.eq("sign", 0)),SFilter.lte("count",20)).order("createTime").exec()
                 if (messageList.size>0) {
                     /** 处理消息 */
                     dataCenterSync.dataSync(messageList)
@@ -134,6 +134,7 @@ class MessageProcessing {
             }
         } catch (e: Exception) {
             e.printStackTrace()
+            messageTypeDataCerten = 1
         }
     }
 
@@ -164,6 +165,8 @@ class MessageProcessing {
             }
         } catch (e: Exception) {
             e.printStackTrace()
+            /** 开启下次执行 */
+            messageTypeDataCenterRel = 1
         }
     }
 

+ 2 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/EquipApi.kt

@@ -152,6 +152,8 @@ object EquipApi {
     fun  createObj(groupCode: String,projectId: String, listObj: ArrayList<HashMap<String,Any?>>): Boolean {
         val url = "${opts.dataPlatform}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
 //        val buildingTools = FloorUtil.floorTools(projectId, floor)
+        logger.debug("设备创建url = ${url}")
+        logger.debug("设备创建boby = ${listObj.toJson()}")
         val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listObj)
         if (postObject.result == "success") {
             return true

+ 1 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/models/tools/FloorUtil.kt

@@ -213,6 +213,7 @@ object FloorUtil {
         hashMap["objType"] = "floor"
         hashMap["classCode"] = "floor"
         hashMap["floorSequenceId"] = floor.floorSequenceId
+        hashMap["floorSequenceID"] = floor.floorSequenceId
         if (!floor.localName.isNullOrEmpty()){
             hashMap["localName"] = floor.localName
         }

+ 6 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterBuilding.kt

@@ -80,12 +80,13 @@ class DataCenterBuilding {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count+1
                     }
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -108,6 +109,7 @@ class DataCenterBuilding {
                         }else {
                             /** 失败 */
                             message.sign = 2
+                            message.count +1
                         }
                     }
 
@@ -116,7 +118,7 @@ class DataCenterBuilding {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -127,9 +129,10 @@ class DataCenterBuilding {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 8 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterComponent.kt

@@ -82,21 +82,24 @@ class DataCenterComponent {
                                     EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
                                 if (!createRel) {
                                     message.sign = 2
+                                    message.count +1
                                 }
                             } else {
                                 message.sign = 2
+                                message.count +1
                             }
                         }
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -115,13 +118,14 @@ class DataCenterComponent {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -132,9 +136,10 @@ class DataCenterComponent {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 10 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterEquipment.kt

@@ -88,10 +88,12 @@ class DataCenterEquipment {
                                     val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
                                     if (!createRel){
                                         message.sign = 2
+                                        message.count = message.count+1
                                     }
                                 } catch (e: Exception) {
                                     e.printStackTrace()
                                     message.sign = 2
+                                    message.count = message.count+1
                                 }
                             }else if (!equip.buildingId.isNullOrEmpty()) {
                                 val toJsonObjArray =
@@ -99,17 +101,20 @@ class DataCenterEquipment {
                                 val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
                                 if (!createRel){
                                     message.sign = 2
+                                    message.count = message.count+1
                                 }
                             }
                         } else {
                             /** 失败 */
                             message.sign = 2
+                            message.count = message.count+1
                         }
 
 
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count = message.count+1
                     }
 
                 } else {
@@ -117,7 +122,7 @@ class DataCenterEquipment {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -136,13 +141,14 @@ class DataCenterEquipment {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count = message.count+1
                     }
 
                 } else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -153,9 +159,10 @@ class DataCenterEquipment {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count = message.count+1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 8 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterFloor.kt

@@ -81,23 +81,26 @@ class DataCenterFloor {
                                 val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, ObjArray)
                                 if (!createRel){
                                     message.sign = 2
+                                    message.count +1
                                 }
                             } catch (e: Exception) {
                                 e.printStackTrace()
                             }
                         } else {
                             message.sign = 2
+                            message.count +1
                         }
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -115,13 +118,14 @@ class DataCenterFloor {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 } else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -132,9 +136,10 @@ class DataCenterFloor {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 6 - 5
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterShaft.kt

@@ -78,14 +78,13 @@ class DataCenterShaft {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
-                    /** 更改标记 */
-                    synchronousMessageObjService.update(message, arrayListOf("sign"))
                 } else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -104,12 +103,13 @@ class DataCenterShaft {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
                 } else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -120,9 +120,10 @@ class DataCenterShaft {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 8 - 5
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterSpace.kt

@@ -115,22 +115,25 @@ class DataCenterSpace {
                                 val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, jsonArray)
                                 if (!createRel){
                                     message.sign = 2
+                                    message.count +1
                                 }
                             }
 
                         } else {
                             message.sign = 2
+                            message.count +1
                         }
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -149,14 +152,13 @@ class DataCenterSpace {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
-                    /** 更改标记 */
-                    synchronousMessageObjService.update(message, arrayListOf("sign"))
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -167,9 +169,10 @@ class DataCenterSpace {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 6 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/DataCenterSystem.kt

@@ -77,13 +77,14 @@ class DataCenterSystem {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
 
                 } else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.UPDATE -> {
                 /** 修改 */
@@ -102,12 +103,13 @@ class DataCenterSystem {
                     }else {
                         /** 失败 */
                         message.sign = 2
+                        message.count +1
                     }
                 }else {
                     message.sign = 0
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
             Configure.DELETE -> {
                 /** 删除 */
@@ -118,9 +120,10 @@ class DataCenterSystem {
                 }else {
                     /** 失败 */
                     message.sign = 2
+                    message.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageObjService.update(message, arrayListOf("sign"))
+                synchronousMessageObjService.update(message, arrayListOf("sign","count"))
             }
         }
     }

+ 587 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/rel/AutomaticCalculationSync.kt

@@ -0,0 +1,587 @@
+/*
+ * *********************************************************************************************************************
+ *
+ *          !!
+ *        .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.syn.services.jms.rel
+
+import com.persagy.database.SFilter
+import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.datacenter.models.entities.dictnew.DictProject
+import com.persagy.server.datacenter.models.entities.rel.*
+import com.persagy.server.datacenter.models.jms.SynchronousMessageRel
+import com.persagy.server.syn.Configure
+import com.persagy.server.syn.models.api.obj.EquipApi
+import com.persagy.service.SObjectService
+import org.springframework.stereotype.Service
+
+/**
+ * 自动计算
+ *
+ * @author wx  <zhangweixin@sagacloud.com>
+ * @date  2020/12/17 9:11
+ */
+@Service
+class AutomaticCalculationSync {
+
+    /** 设备设施服务于建筑服务 */
+    private val rEqForBdService = SObjectService(SMybatisDao(REqForBd::class.java))
+    /** 设备设施所在竖井 */
+    private val rEqInShService = SObjectService(SMybatisDao(REqInSh::class.java))
+    /** 设备所在业务空间 */
+    var rEq2SpService = SObjectService(SMybatisDao( REq2Sp::class.java))
+    /** 楼层贯通关系 */
+    var  rFlThroughFlService = SObjectService(SMybatisDao( RFlThroughFl::class.java))
+    /** 楼层下的业务空间 */
+    var  rSpinFlService = SObjectService(SMybatisDao( RSpinFl::class.java))
+    /** 数据中心建筑下的竖井关系 */
+    val rShInBdService = SObjectService(SMybatisDao(RShInBd::class.java))
+    /** 竖井贯通 */
+    val rShaftThroughShaftService = SObjectService(SMybatisDao(RShaftThroughShaft::class.java))
+    /** 系统所在楼层 */
+    val rSyInFlService = SObjectService(SMybatisDao(RSyInFl::class.java))
+    /** 系统所在竖井 */
+    val rSyInShService = SObjectService(SMybatisDao(RSyInSh::class.java))
+    /** 系统所在业务空间 */
+    val rSy2SpService = SObjectService(SMybatisDao(RSy2Sp::class.java))
+    /** 空间和空间关系 */
+    val rSp2SpService = SObjectService(SMybatisDao(RSp2Sp::class.java))
+    /** 设备和设备关系 */
+    val rEq2EqService = SObjectService(SMybatisDao(REq2Eq::class.java))
+
+    /** 缓存对象数据服务 - 数据中心到数据中台  */
+    var synchronousMessageRelService = SObjectService(SMybatisDao(SynchronousMessageRel::class.java))
+
+    /** 项目所属的集团 */
+    private val dictProjectService = SObjectService(SMybatisDao(DictProject::class.java))
+
+    /**
+     * 设备设施服务于建筑
+     */
+    fun eq2BdFor(message: SynchronousMessageRel) {
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rEqForBdList = rEqForBdService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rEqForBdList.size>0) {
+                for (rEqForBd in rEqForBdList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechForArch", "Eq2Bd", rEqForBd.equipId!!, rEqForBd.buildingId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechForArch", "Eq2Bd", rEqForBd.equipId!!, rEqForBd.buildingId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                           break
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+
+        }
+    }
+
+    /**
+     * 设备设施所在竖井
+     */
+    fun eq2ShIn(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rEqInShList = rEqInShService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rEqInShList.size>0) {
+                for (rEqInSh in rEqInShList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechInArch", "Eq2Sh", rEqInSh.equipId!!, rEqInSh.shaftId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechInArch", "Eq2Sh",rEqInSh.equipId!!, rEqInSh.shaftId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                            break
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 设备设施所在空间
+     */
+    fun eq2SpIn(message: SynchronousMessageRel) {
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rEq2SpList = rEq2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "eq2sp_in"),SFilter.eq("zoneType", message.fromId!!)).exec()
+            message.sign = 0
+            if (rEq2SpList.size>0) {
+                for (rEq2Sp in rEq2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechInArch", "Eq2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechInArch", "Eq2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 楼层贯通关系
+     */
+    fun fl2FlThrough(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rFlThroughFlList = rFlThroughFlService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rFlThroughFlList.size>0) {
+                for (rFlThroughFl in rFlThroughFlList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ThroughRelationship", "Fl2Fl", rFlThroughFl.floorId!!, rFlThroughFl.floorOtherId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ThroughRelationship", "Fl2Fl", rFlThroughFl.floorId!!, rFlThroughFl.floorOtherId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel) {
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 楼层下的业务空间
+     */
+    fun fl2SpIn(message: SynchronousMessageRel) {
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSpinFlList = rSpinFlService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rSpinFlList.size>0) {
+                for (rSpinFl in rSpinFlList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ArchSubset", "Fl2Sp", rSpinFl.floorId!!, rSpinFl.spaceId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ArchSubset", "Fl2Sp", rSpinFl.floorId!!, rSpinFl.spaceId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+
+        }
+    }
+
+    /**
+     * 建筑下的竖井
+     */
+    fun bd2ShIn(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rShInBdList = rShInBdService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rShInBdList.size>0) {
+                for (rShInBd in rShInBdList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ArchSubset", "Bd2Sh", rShInBd.buildingId!!, rShInBd.shaftId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ArchSubset", "Bd2Sh", rShInBd.buildingId!!, rShInBd.shaftId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel) {
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 竖井贯通
+     */
+    fun sh2ShThrough(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rShaftThroughShaftList = rShaftThroughShaftService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rShaftThroughShaftList.size>0) {
+                for (rShaftThroughShaft in rShaftThroughShaftList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ThroughRelationship", "Sh2Sh", rShaftThroughShaft.shaftId!!, rShaftThroughShaft.shaftOtherId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ThroughRelationship", "Sh2Sh", rShaftThroughShaft.shaftId!!, rShaftThroughShaft.shaftOtherId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 建筑下的系统设备部件
+     */
+    fun syeq2bd(message: SynchronousMessageRel){
+
+    }
+
+    /**
+     * 系统所在楼层
+     */
+    fun sy2FlIn(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSyInFlList = rSyInFlService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            message.sign = 0
+            if (rSyInFlList.size>0) {
+                for (rSyInFl in rSyInFlList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechInArch", "Sy2Fl", rSyInFl.sysId!!, rSyInFl.floorId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechInArch", "Sy2Fl", rSyInFl.sysId!!, rSyInFl.floorId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                        if (!createRel){
+                            message.sign = 2
+                            message.count +1
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                        message.sign = 2
+                        message.count +1
+                    }
+                }
+            }
+            /** 更改标记 */
+            synchronousMessageRelService.update(message, arrayListOf("sign","count"))
+        }
+    }
+
+    /**
+     * 系统所在竖井
+     */
+    fun sy2ShIn(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSyInShList = rSyInShService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            if (rSyInShList.size>0) {
+                for (rSyInSh in rSyInShList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechInArch", "Sy2Sh", rSyInSh.sysId!!, rSyInSh.shaftId!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechInArch", "Sy2Sh", rSyInSh.sysId!!, rSyInSh.shaftId!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 系统所在业务空间
+     */
+    fun sy2SpIn(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSy2SpList = rSy2SpService.select(SFilter.eq("projectId", message.projectId!!)).exec()
+            if (rSy2SpList.size>0) {
+                for (rSy2Sp in rSy2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechInArch", "Sy2Sp", rSy2Sp.id1!!, rSy2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechInArch", "Sy2Sp", rSy2Sp.id1!!, rSy2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 风口(空调风口、通风风口) 服务
+     */
+    fun fengkouFor(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rEq2SpList = rEq2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "eq2sp_for"),SFilter.inList("zoneType",
+                arrayListOf("GeneralZone","AirConditioningZone"))).exec()
+            if (rEq2SpList.size>0) {
+                for (rEq2Sp in rEq2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("MechForArch", "Eq2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("MechForArch", "Eq2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 空气自然对流
+     */
+    fun sp2SpConvectionNetwork01(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSp2SpList = rSp2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "sp2sp_ConvectionNetwork_1")).exec()
+            if (rSp2SpList.size>0) {
+                for (rSp2Sp in rSp2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ConvectionNetwork", "Natural", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ConvectionNetwork", "Natural", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 空间连通
+     */
+    fun sp2SpSpaceNeighborhood5(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSp2SpList = rSp2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "sp2sp_SpaceNeighborhood_5")).exec()
+            if (rSp2SpList.size>0) {
+                for (rSp2Sp in rSp2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("ThroughRelationship", "Connect", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("ThroughRelationship", "Connect", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 空间光照连通
+     */
+    fun sp2SpRadiationNetwork1(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSp2SpList = rSp2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "sp2sp_RadiationNetwork_1")).exec()
+            if (rSp2SpList.size>0) {
+                for (rSp2Sp in rSp2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("RadiationNetwork", "Connect", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("RadiationNetwork", "Connect", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 普通交通
+     */
+    fun sp2SpTrafficNetwork1(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSp2SpList = rSp2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "sp2sp_TrafficNetwork_1")).exec()
+            if (rSp2SpList.size>0) {
+                for (rSp2Sp in rSp2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("TrafficNetwork", "Normal", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("TrafficNetwork", "Normal", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 传感器测量设备关系
+     */
+    fun eq2EqSensorRelationshipSs2eq(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rSp2SpList = rEq2EqService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "eq2eq_SensorRelationship_ss2eq")).exec()
+            if (rSp2SpList.size>0) {
+                for (rSp2Sp in rSp2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("TrafficNetwork", "Normal", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("TrafficNetwork", "Normal", rSp2Sp.id1!!, rSp2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+    /**
+     * 传感器测量空间关系
+     */
+    fun eq2SpSensorRelationshipSs2sp(message: SynchronousMessageRel){
+        val dictProject = dictProjectService.select(SFilter.eq("id", message.projectId!!)).entity()
+        if (dictProject!=null) {
+            val rEq2SpList = rEq2SpService.select(SFilter.eq("projectId", message.projectId!!),SFilter.eq("type", "eq2sp_SensorRelationship_ss2sp")).exec()
+            if (rEq2SpList.size>0) {
+                for (rEq2Sp in rEq2SpList) {
+                    try {
+                        /** 先执行删除 */
+                        val toJsonObj = Configure.toJsonObj("SensorRelationship", "Ss2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val delRel = EquipApi.delRel(dictProject.groupCode!!, message.projectId!!, toJsonObj)
+                        /** 关系列表 */
+                        val toJsonObjArray =
+                            Configure.toJsonObjArray("SensorRelationship", "Ss2Sp", rEq2Sp.id1!!, rEq2Sp.id2!!)
+                        val createRel = EquipApi.createRel(dictProject.groupCode!!, message.projectId!!, toJsonObjArray)
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 15 - 5
datasyn/src/main/kotlin/com/persagy/server/syn/services/jms/rel/EquipinSpaceSync.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.syn.services.jms.rel
 
-import com.alibaba.fastjson.JSONArray
 import com.persagy.database.SFilter
 import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.datacenter.models.entities.dictnew.DictProject
@@ -20,6 +19,7 @@ class EquipinSpaceSync {
     var synchronousMessageRelService = SObjectService(SMybatisDao(SynchronousMessageRel::class.java))
     /** 项目所属的集团 */
     private val dictProjectService = SObjectService(SMybatisDao(DictProject::class.java))
+
     /**
      * 创建关系
      *
@@ -42,12 +42,14 @@ class EquipinSpaceSync {
                 val createRel = EquipApi.createRel(dictProject.groupCode!!, synchronousMessageRel.projectId!!, toJsonObjArray)
                 if (!createRel ){
                     synchronousMessageRel.sign = 2
+                    synchronousMessageRel.count +1
                 }
             } else {
                 synchronousMessageRel.sign = 2
+                synchronousMessageRel.count +1
             }
             /** 更改标记 */
-            synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign"))
+            synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign","count"))
         } catch (e: Exception) {
             e.printStackTrace()
         }
@@ -67,12 +69,14 @@ class EquipinSpaceSync {
                 val delRel = EquipApi.delRel(dictProject.groupCode!!, synchronousMessageRel.projectId!!, toJsonObj)
                 if (!delRel){
                     synchronousMessageRel.sign = 2
+                    synchronousMessageRel.count +1
                 }
             } else {
                 synchronousMessageRel.sign = 2
+                synchronousMessageRel.count +1
             }
             /** 更改标记 */
-            synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign"))
+            synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign","count"))
         } catch (e: Exception) {
             e.printStackTrace()
         }
@@ -98,15 +102,18 @@ class EquipinSpaceSync {
                     val createRel = EquipApi.createRel(dictProject.groupCode!!, synchronousMessageRel.projectId!!, toJsonObjArray)
                     if (!createRel ){
                         synchronousMessageRel.sign = 2
+                        synchronousMessageRel.count +1
                     }
                 } else {
                     synchronousMessageRel.sign = 2
+                    synchronousMessageRel.count +1
                 }
                 /** 更改标记 */
-                synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign"))
+                synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign","count"))
 
             } else {
                 synchronousMessageRel.sign = 2
+                synchronousMessageRel.count +1
             }
         } catch (e: Exception) {
             e.printStackTrace()
@@ -127,6 +134,7 @@ class EquipinSpaceSync {
                     val delRel = EquipApi.delRel(dictProject.groupCode!!, synchronousMessageRel.projectId!!, toJsonObj)
                     if (!delRel) {
                         synchronousMessageRel.sign = 2
+                        synchronousMessageRel.count +1
                         break
                     }
                 }
@@ -138,14 +146,16 @@ class EquipinSpaceSync {
                     val createRel = EquipApi.createRel(dictProject.groupCode!!, synchronousMessageRel.projectId!!, toJsonObjArray)
                     if (!createRel ){
                         synchronousMessageRel.sign = 2
+                        synchronousMessageRel.count +1
                     }
                 }
 
                 /** 更改标记 */
-                synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign"))
+                synchronousMessageRelService.update(synchronousMessageRel, arrayListOf("sign","count"))
 
             } else {
                 synchronousMessageRel.sign = 2
+                synchronousMessageRel.count +1
             }
         } catch (e: Exception) {
             e.printStackTrace()

+ 3 - 2
datasyn/src/main/kotlin/com/persagy/server/syn/task/SchedulerTaskRel.kt

@@ -51,10 +51,11 @@ class SchedulerTaskRel {
     lateinit var messageProcessing: MessageProcessing
 
     //cron表达式:每隔5秒执行一次
-    @Scheduled(cron = "0 */3 * * * ?")
+//    @Scheduled(cron = "0 */3 * * * ?")
 //    @Scheduled(cron="0/5 * *  * * ? ")   //每5秒执行一次
+    @Scheduled(cron = "0 */1 * * * ?")
     fun scheduled() {
         logger.info("同步数据中心任务开始至数据中台-关系数据")
-        messageProcessing.syncDataCenter()
+        messageProcessing.syncDataCenterRel()
     }
 }

+ 15 - 54
datasyn/src/main/kotlin/com/persagy/server/syn/utils/ParamTools.kt

@@ -347,38 +347,20 @@ object ParamTools {
      */
     fun dicConfigureEditable():HashMap<String,Boolean>{
         val map = HashMap<String,Boolean>()
-        map["ProjID"] = false
-        map["BuildID"] = false
-        map["FloorID"] = false
+        map["id"] = false
+        map["name"] = false
 
-        map["ShaftID"] = false
-        map["ShaftName"] = false
-
-        map["SysID"] = false
-        map["SysName"] = false
-
-        map["EquipID"] = false
-        map["EquipName"] = false
-        map["EquipQRCode"] = false
-        map["BIMID"] = false
+        map["qRCodePic"] = false
+        map["bimId"] = false
 //        map["BIMLocation"] = false
-        map["QRCodePic"] = false
-        map["DefaultQRCode"] = false
-
-        map["EquipLocalID"] = false
-        map["EquipLocalName"] = false
-
-        map["BIMFamilyName"] = false
-        map["BIMFamilySymbol"] = false
+        map["defaultQRCode"] = false
+        map["localId"] = false
+        map["localName"] = false
 
-        map["RoomID"] = false
-        map["RoomName"] = false
-        map["RoomQRCode"] = false
+        map["bimFamilyName"] = false
+        map["bimFamilySymbol"] = false
 
-        map["TenantID"] = false
-        map["TenantName"] = false
-
-        map["Outline"] = false
+        map["outline"] = false
         return map
     }
 
@@ -387,32 +369,11 @@ object ParamTools {
      */
     fun dicConfigure():HashMap<String,Boolean>{
         val map = HashMap<String,Boolean>()
-        map["ProjLocalID"] = false
-        map["ProjLocalName"] = false
-
-        map["BuildLocalID"] = false
-        map["BuildLocalName"] = false
-
-        map["FloorLocalID"] = false
-        map["FloorLocalName"] = false
-        map["FloorLocalID"] = false
-        map["ModelID"] = false
-
-        map["RoomLocalID"] = false
-        map["RoomLocalName"] = false
-
-        map["SysLocalID"] = false
-        map["SysLocalName"] = false
-
-        map["ShaftLocalID"] = false
-        map["ShaftLocalName"] = false
-
-        map["EquipLocalID"] = false
-        map["EquipLocalName"] = false
-
-        map["TenantLocalID"] = false
-        map["TenantLocalName"] = false
-
+        map["localId"] = false
+        map["localName"] = false
+        map["modelId"] = false
+        map["modelID"] = false
+        
         return map
     }
 

+ 2 - 2
equip-component/src/main/resources/application-prod.yml

@@ -19,8 +19,8 @@ spring:
 #    url:                                jdbc:postgresql://data-center:5432/datacenter
 #    username:                           postgres
 #    password:                           123qwe!@#
-#    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
-    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
+    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
+#    url:                                jdbc:postgresql://172.17.11.228:5432/datacenterlabsl
 #    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
     username:                           postgres
 #    password:                           persagy_2020qwe!@#