Browse Source

********************WX******************
批量处理附件

zhangweixin 4 years ago
parent
commit
8fd8e98d0e

+ 14 - 3
datacenter/src/main/kotlin/com/persagy/server/controllers/objects/GeneralSystemController.kt

@@ -35,6 +35,7 @@ import com.persagy.server.datacenter.models.entities.objects.ZoneSpace
 import com.persagy.server.datacenter.models.entities.rel.RSyEq
 import com.persagy.server.datacenter.models.entities.rel.RSyEqList
 import com.persagy.server.services.objects.GeneralSystemService
+import com.persagy.server.services.objects.GeneralSystemTwoService
 import com.persagy.service.SPageContext
 import com.persagy.service.models.requests.SCountRequest
 import com.persagy.service.models.requests.SCreateRequest
@@ -211,6 +212,16 @@ open class GeneralSystemController {
         return GeneralSystemService.createLinkEquip(rSyEqList)
     } // Function create()
 
-//    RSyInShList
-//    RSyInSpBaseList
-} // Class GeneralSystemController
+    /**
+     * 查询系统信息-试图级联建筑楼层
+     *
+     * @param   request         查询信息条件
+     * @return  SQueryResponse  查询结果
+     */
+    @Operation(summary ="查询系统信息-试图级联建筑楼层", description ="")
+    @PostMapping(value = ["/query/bdfl"])
+    fun querys( @RequestBody request: SQueryRequest): SQueryResponse<GeneralSystem> {
+        return GeneralSystemTwoService.pageQuery( request)
+    }
+
+}

+ 8 - 9
datacenter/src/main/kotlin/com/persagy/server/services/objects/GeneralSystemService.kt

@@ -63,7 +63,6 @@ import com.persagy.service.models.responses.SQueryResponse
 object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::class.java)) {
 
 
-
     /**
      * 创建之前的操作
      */
@@ -84,7 +83,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
             generalSystem.id = IdUtils.systemIdCreate(projectId!!)
         }
         return true
-    } // Function onCreateBefore()
+    }
 
 
     /**
@@ -175,7 +174,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
         }else{
             return  SCreateResponse(SResponseType.failure)
         }
-    } // Function createBdFl()
+    }
 
     /**
      * 查询之前的操作
@@ -183,14 +182,14 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
     override fun onQueryBefore(queryBuilder: SQueryBuilder<GeneralSystem>) {
         queryBuilder.tableName = "v_general_system"
         return
-    } // Function onQueryBefore()
+    }
 
     /**
      * 查询统计之前操作
      */
     override fun onCountBefore(queryBuilder: SQueryBuilder<GeneralSystem>) {
         queryBuilder.tableName = "general_system"
-    } // Function onCountBefore()
+    }
 
     /**
      * 删除之前操作
@@ -206,7 +205,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
             e.printStackTrace()
         }
         return super.onDeleteBefore(entity)
-    } // Function  onDeleteBefore
+    }
 
 
     /**
@@ -234,7 +233,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
             SQueryResponse(SResponseType.failure, e.message!!)
         }
 
-    } // Function  unSpaceSys
+    }
 
 //    /**
 //     * 查询没有和当前系统关联的设备
@@ -293,7 +292,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
             e.printStackTrace()
             SQueryResponse(SResponseType.failure, "")
         }
-    } // Fun UnSysEquip
+    }
 
     /**
      * 查询没有和当前系统关联的竖井
@@ -319,7 +318,7 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
             e.printStackTrace()
             SQueryResponse(SResponseType.failure, "")
         }
-    } // Fun unSysShaft
+    }
 
     /**
      * 查询没有和当前系统关联的空间

+ 49 - 0
datacenter/src/main/kotlin/com/persagy/server/services/objects/GeneralSystemTwoService.kt

@@ -0,0 +1,49 @@
+/*
+ * *********************************************************************************************************************
+ *
+ *          !!
+ *        .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.services.objects
+
+import com.persagy.database.SQueryBuilder
+import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.datacenter.models.entities.objects.GeneralSystem
+import com.persagy.server.services.base.Service
+
+/**
+ * 系统信息服务
+ *
+ * @author 张维新
+ */
+object GeneralSystemTwoService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::class.java)) {
+
+    /**
+     * 查询之前的操作
+     */
+    override fun onQueryBefore(queryBuilder: SQueryBuilder<GeneralSystem>) {
+        queryBuilder.tableName = "v_system"
+        return
+    }
+
+}

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

@@ -52,6 +52,8 @@ open class Opts {
 
     lateinit var data_org: String
     lateinit var data_rwd: String
+    lateinit var data_dic: String
+
 
     val SUCCESS_CODE = "success"
 

+ 2 - 2
datasyn/src/main/kotlin/com/persagy/server/syn/controllers/obj/ObjectToFromController.kt

@@ -102,10 +102,10 @@ class ObjectToFromController {
                 for (building in buildingList){
                     val createBuilding = BuildingApi.createObj(dictProject!!.groupCode!!,projectId, building)
                     if (createBuilding!=null&&createBuilding.result == "success") {
-                        logger.debug("建筑创建失败:${building}")
+                        logger.debug("建筑创建成功:${building}")
                         val updateBuilding = BuildingApi.updateObj(dictProject!!.groupCode!!,projectId, building)
                         if (updateBuilding!=null&&updateBuilding.result == "success") {
-                            logger.debug("建筑更新失败:${building.toJson()}")
+                            logger.debug("建筑更新成功:${building.toJson()}")
                         }
                     }
                 }

+ 13 - 13
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/dict/DictTypeApi.kt

@@ -71,7 +71,7 @@ object DictTypeApi {
             /** 直接 http 请求还是通过注册中心 */
             logger.debug("标记=${Configure.customProperties.eurekaorhttp}")
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/org/group/query"
+                val url = "${Configure.opts.data_org}/org/group/query"
                 val postObject = SHttpUtil.postObject<GroupResponse>(url, jsonObject)
                 DClassDefService.logger.debug("集团结果:${postObject.toJson()}")
                 if (postObject.result == "success"){
@@ -111,7 +111,7 @@ object DictTypeApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/org/project/query?userId=123456&groupCode=$code"
+                val url = "${Configure.opts.data_org}/org/project/query?userId=123456&groupCode=$code"
 
                 DClassDefService.logger.debug("url:${url}")
                 DClassDefService.logger.debug("项目请求体:${jsonObject.toJson()}")
@@ -152,7 +152,7 @@ object DictTypeApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/def/class/"
+                val url = "${Configure.opts.data_rwd}/rwd/def/class/"
                 val postObject = SHttpUtil.postObject<DictPlatformTypeResponse>(url, jsonObject)
                 if (postObject.result == Configure.opts.SUCCESS_CODE) {
                     if (!postObject.data.isNullOrEmpty()){
@@ -191,7 +191,7 @@ object DictTypeApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/def/funcid"
+                val url = "${Configure.opts.data_rwd}/rwd/def/funcid"
                 logger.debug("url=${url}")
                 logger.debug("boby=${jsonObject}")
                 val postObject = SHttpUtil.postObject<DictPlatformInfoResponse>(url, jsonObject)
@@ -230,7 +230,7 @@ object DictTypeApi {
                 jsonObject2["type"] = type
                 jsonObject["criteria"] = jsonObject2
                 if (!Configure.customProperties.eurekaorhttp) {
-                    val url = "${Configure.opts.dataPlatform}/dic/dt/data/query?groupCode=WD&userId=123456"
+                    val url = "${Configure.opts.data_dic}/dic/dt/data/query?groupCode=WD&userId=123456"
                     val postObject = SHttpUtil.postObject<DictMajorResponse>(url, jsonObject)
                     if (postObject.result == Configure.opts.SUCCESS_CODE) {
                         if (!postObject.data.isNullOrEmpty()){
@@ -269,7 +269,7 @@ object DictTypeApi {
             jsonObject2["groupId"] = groupId
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/dict/scheme/query"
+                val url = "${Configure.opts.data_dic}/dict/scheme/query"
                 val postObject = SHttpUtil.postObject<DictGroupSchemeResponse>(url, jsonObject)
                 if (postObject.result == Configure.opts.SUCCESS_CODE) {
                     if (!postObject.data.isNullOrEmpty()){
@@ -305,7 +305,7 @@ object DictTypeApi {
             jsonObject2["groupId"] = schemeId.toString()
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/dict/scheme/class/query"
+                val url = "${Configure.opts.data_dic}/dict/scheme/class/query"
                 val postObject = SHttpUtil.postObject<DictSchemeCategoryResponse>(url, jsonObject)
                 if (postObject.result == Configure.opts.SUCCESS_CODE) {
                     if (!postObject.data.isNullOrEmpty()){
@@ -341,7 +341,7 @@ object DictTypeApi {
             jsonObject2["classCode"] = code
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/dict/scheme/funcid/query"
+                val url = "${Configure.opts.data_dic}/dict/scheme/funcid/query"
                 val postObject = SHttpUtil.postObject<DictSchemeCategoryResponseInfo>(url, jsonObject)
                 if (postObject.result == Configure.opts.SUCCESS_CODE) {
                     if (!postObject.data.isNullOrEmpty()){
@@ -378,7 +378,7 @@ object DictTypeApi {
             jsonObject2["projectId"] = jsonArray
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/dict/scheme/project/query"
+                val url = "${Configure.opts.data_dic}/dict/scheme/project/query"
                 val postObject = SHttpUtil.postObject<DictSchemeAndProjectResponse>(url, jsonObject)
                 if (postObject.result == Configure.opts.SUCCESS_CODE) {
                     if (!postObject.data.isNullOrEmpty()){
@@ -414,7 +414,7 @@ object DictTypeApi {
             val jsonObject2 = JSONObject()
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/def/class?groupCode=$groupId"
+                val url = "${Configure.opts.data_rwd}/rwd/def/class?groupCode=$groupId"
                 val dictGroupCategoryResponse = SHttpUtil.postObject<DictPlatformTypeResponse>(url,jsonObject)
                 if (dictGroupCategoryResponse.result == Configure.opts.SUCCESS_CODE) {
                     if (!dictGroupCategoryResponse.data.isNullOrEmpty()){
@@ -448,7 +448,7 @@ object DictTypeApi {
             jsonObject2["classCode"] = code
             jsonObject["criteria"] = jsonObject2
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/def/funcid?groupCode=$groupId"
+                val url = "${Configure.opts.data_rwd}/rwd/def/funcid?groupCode=$groupId"
                 val dictPlatformInfoResponse = SHttpUtil.postObject<DictPlatformInfoResponse>(url,jsonObject)
                 if (dictPlatformInfoResponse.result == Configure.opts.SUCCESS_CODE) {
                     if (!dictPlatformInfoResponse.data.isNullOrEmpty()){
@@ -485,7 +485,7 @@ object DictTypeApi {
             jsonObject["criteria"] = jsonObject2
 
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/def/class?groupCode=$groupCode&projectId=$projectId"
+                val url = "${Configure.opts.data_rwd}/rwd/def/class?groupCode=$groupCode&projectId=$projectId"
                 logger.debug("url = $url")
                 logger.debug("boby = ${jsonObject.toJson()}")
                 val dictGroupCategoryResponse = SHttpUtil.postObject<DictPlatformTypeResponse>(url,jsonObject)
@@ -522,7 +522,7 @@ object DictTypeApi {
         jsonObject2["classCode"] = code
         jsonObject["criteria"] = jsonObject2
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${Configure.opts.dataPlatform}/rwd/def/funcid?groupCode=$groupId&projectId=$projectId"
+            val url = "${Configure.opts.data_rwd}/rwd/def/funcid?groupCode=$groupId&projectId=$projectId"
             val dictPlatformInfoResponse = SHttpUtil.postObject<DictPlatformInfoResponse>(url,jsonObject)
             if (dictPlatformInfoResponse.result == Configure.opts.SUCCESS_CODE) {
                 if (!dictPlatformInfoResponse.data.isNullOrEmpty()){

+ 10 - 5
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/BuildingApi.kt

@@ -27,6 +27,7 @@
 package com.persagy.server.syn.models.api.obj
 
 import com.alibaba.fastjson.JSONObject
+import com.persagy.base.extensions.toJson
 import com.persagy.base.utils.SHttpUtil
 import com.persagy.server.datacenter.models.entities.objects.Building
 import com.persagy.server.syn.Configure
@@ -91,11 +92,15 @@ object BuildingApi {
             val buildingTools = BuildingUtil.buildingTools(projectId, building)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                logger.debug("url = ${url}")
+                logger.debug("boby = ${buildingTools.toJson()}")
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, buildingTools)
                     return postObject
             } else {
                 val url = "http://${Configure.serviceNameConfig.DMPRWD}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                logger.debug("url = ${url}")
+                logger.debug("boby = ${buildingTools.toJson()}")
                 val postObject = Configure.restTemplate.postForObject(url, buildingTools, MiddleGroundDataRespose::class.java)
                     return postObject
             }
@@ -117,7 +122,7 @@ object BuildingApi {
             val buildingTools = BuildingUtil.buildingTools(projectId, building)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, buildingTools)
                 return postObject
 
@@ -145,7 +150,7 @@ object BuildingApi {
             listId.add(buildingId)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listId)
                 return postObject
 
@@ -176,7 +181,7 @@ object BuildingApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
                 if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                     return postObject.data!!
@@ -212,7 +217,7 @@ object BuildingApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
 
                 return postObject

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

@@ -70,7 +70,7 @@ object EquipApi {
         jsonObject["size"] = 1000
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject
@@ -100,7 +100,7 @@ object EquipApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject
@@ -133,7 +133,7 @@ object EquipApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject.data!!
@@ -166,7 +166,7 @@ object EquipApi {
 
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
             logger.debug("设备建筑url = ${url}")
             logger.debug("设备建筑boby= ${jsonObject.toJson()}")
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
@@ -198,7 +198,7 @@ object EquipApi {
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
                 logger.debug("999999999999999999999999999999999999999999")
-                val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
                 logger.debug("url= ${url}")
                 logger.debug("boby=${jsonObject}")
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
@@ -234,7 +234,7 @@ object EquipApi {
         /** 直接 http 请求还是通过注册中心 */
         try {
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${opts.dataPlatform}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${opts.data_rwd}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listObj)
                 return postObject
             } else {
@@ -265,7 +265,7 @@ object EquipApi {
         /** 直接 http 请求还是通过注册中心 */
         try {
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${opts.dataPlatform}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${opts.data_rwd}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 logger.debug("url= ${url}")
                 logger.debug("boby= ${listObj.toJson()}")
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listObj)
@@ -296,7 +296,7 @@ object EquipApi {
         listId.add(id)
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+            val url = "${opts.data_rwd}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listId)
                 return postObject
         } else {
@@ -314,7 +314,7 @@ object EquipApi {
     fun createRel(groupCode: String, projectId: String, jsonArray:JSONArray): Boolean {
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+            val url = "${opts.data_rwd}/rwd/instance/relation/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
 //            logger.debug("url=${url}")
 //            logger.debug("boby=${jsonArray.toJson()}")
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonArray)
@@ -335,7 +335,7 @@ object EquipApi {
     fun delRel(groupCode: String, projectId: String, jsonObject: JSONObject): Boolean {
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+            val url = "${opts.data_rwd}/rwd/instance/relation/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success") {
                 return true
@@ -366,7 +366,7 @@ object EquipApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject.data!!

+ 4 - 4
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/FloorApi.kt

@@ -62,7 +62,7 @@ object FloorApi {
             jsonObject["criteria"] = jsonObject2
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
                 if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                     return postObject.data!!
@@ -93,7 +93,7 @@ object FloorApi {
             val buildingTools = FloorUtil.floorTools(projectId, floor)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/create?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, buildingTools)
                 if (postObject.result == "success") {
                     return true
@@ -124,7 +124,7 @@ object FloorApi {
             val buildingTools = FloorUtil.floorTools(projectId, floor)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/update?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, buildingTools)
                 if (postObject.result == "success") {
                     return true
@@ -156,7 +156,7 @@ object FloorApi {
             listId.add(id)
             /** 直接 http 请求还是通过注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/delete?groupCode=$groupCode&projectId=${projectId}&appId=datacenter"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, listId)
                 if (postObject.result == "success") {
                     return true

+ 3 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/ProjectApi.kt

@@ -54,7 +54,7 @@ object ProjectApi {
             jsonObject["criteria"] = jsonObject2
             /** 判断是否使用注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/query?groupCode=${id}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/query?groupCode=${id}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
                 if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                     return postObject.data!!
@@ -88,7 +88,7 @@ object ProjectApi {
             jsonObject["criteria"] = jsonObject2
             /** 判断是否使用注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
                 if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                     return postObject.data!!
@@ -121,7 +121,7 @@ object ProjectApi {
             jsonObject["criteria"] = jsonObject2
             /** 判断是否使用注册中心 */
             if (!Configure.customProperties.eurekaorhttp) {
-                val url = "${Configure.opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+                val url = "${Configure.opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
                 val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
                 return postObject
 //                if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {

+ 1 - 1
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/ShaftApi.kt

@@ -53,7 +53,7 @@ object ShaftApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject.data!!

+ 3 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/SpaceApi.kt

@@ -60,7 +60,7 @@ object SpaceApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject.data!!
@@ -92,7 +92,7 @@ object SpaceApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {
                 return postObject.data!!
@@ -124,7 +124,7 @@ object SpaceApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/relation/query?groupCode=$groupCode&projectId=${projectId}"
 
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {

+ 1 - 1
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/obj/SystemApi.kt

@@ -64,7 +64,7 @@ object SystemApi {
         jsonObject["criteria"] = jsonObject2
         /** 直接 http 请求还是通过注册中心 */
         if (!Configure.customProperties.eurekaorhttp) {
-            val url = "${opts.dataPlatform}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
+            val url = "${opts.data_rwd}/rwd/instance/object/query?groupCode=$groupCode&projectId=${projectId}"
             val postObject = SHttpUtil.postObject<MiddleGroundDataRespose>(url, jsonObject)
             logger.debug("结果= ${postObject.toJson()}")
             if (postObject.result == "success"&&!postObject.data.isNullOrEmpty()) {

+ 2 - 1
datasyn/src/main/kotlin/com/persagy/server/syn/task/SchedulerTask.kt

@@ -29,6 +29,7 @@ package com.persagy.server.syn.task
 import com.persagy.server.syn.jms.MessageProcessing
 import org.slf4j.LoggerFactory
 import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.scheduling.annotation.Scheduled
 import org.springframework.stereotype.Service
 
 /**
@@ -52,7 +53,7 @@ class SchedulerTask {
     //cron表达式:每隔5秒执行一次
 //    @Scheduled(cron = "0 */5 * * * ?")
 //    @Scheduled(cron="0/30 * *  * * ? ")   //每5秒执行一次
-//    @Scheduled(cron = "0 */1 * * * ?")
+    @Scheduled(cron = "0 */1 * * * ?")
     fun scheduled() {
         logger.info("同步数据中心任务开始至中台")
         messageProcessing.syncDataCenter()

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

@@ -29,6 +29,7 @@ package com.persagy.server.syn.task
 import com.persagy.server.syn.jms.MessageProcessing
 import org.slf4j.LoggerFactory
 import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.scheduling.annotation.Scheduled
 import org.springframework.stereotype.Service
 
 /**
@@ -52,7 +53,7 @@ class SchedulerTaskRel {
     //cron表达式:每隔5秒执行一次
 //    @Scheduled(cron = "0 */5 * * * ?")
 //    @Scheduled(cron="0/5 * *  * * ? ")   //每5秒执行一次
-//    @Scheduled(cron = "0 */3 * * * ?")
+    @Scheduled(cron = "0 */3 * * * ?")
     fun scheduled() {
         logger.info("同步数据中心任务开始至数据中台-关系数据")
         messageProcessing.syncDataCenterRel()

+ 3 - 0
datasyn/src/main/resources/application-prod.yml

@@ -41,6 +41,9 @@ eureka:
 
 saga:
   dataPlatform:                        http://39.102.40.239:9970
+  data_org:                            http://39.102.40.239:9970
+  data_rwd:                            http://39.102.40.239:9970
+  data_dic:                            http://39.102.40.239:9970
 
 mqtopid:
   exchange:                           exchange-dmp

+ 3 - 0
datasyn/src/main/resources/application-test.yml

@@ -30,6 +30,9 @@ spring:
 saga:
   dataPlatform:                        http://192.168.64.17:8832
 #  dataPlatform:                        http://39.102.40.239:9970
+  data_org:                            http://192.168.64.17:8831
+  data_rwd:                            http://192.168.64.17:8832
+  data_dic:                            http://192.168.64.17:8830
 mqtopid:
   exchange:                           exchange-dmp
   routingKey: