浏览代码

**********************************wx*************************
需采集信息点设置,缺少批量同步到项目

weixinVSjinlai 4 年之前
父节点
当前提交
abbadabedb

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

@@ -112,7 +112,7 @@ open class RelEquipmentBuilding : BaseInfo() {
 
     /** 级联-设备服务的建筑 */
     @Schema(description = "级联-设备服务的建筑")
-    @SCascade(table="relationship.r_eq2bd", idColumn="id1", childIdColumn="id2", filter = "type = 'eq2bd_for'")
+    @SCascade(table="relationship.r_eq2bd", idColumn="eq_id", childIdColumn="bd_id", filter = "type = 'eq2bd_for'")
     var objectInfo: ArrayList<RelBuilding>? = null
 
 }

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

@@ -38,19 +38,19 @@ import javax.persistence.Table
  * @author 付国宝
  */
 @Schema(description = "设备设施服务于建筑实体类")
-@Table(name = "r_eq_for_bd")
+@Table(name = "relationship.r_eq2bd")
 class REqForBd : RBaseInfo(){
 
     /** 设备Id */
     @Schema(description = "设备Id")
     @Id
-    @Column(name = "equip_id")
+    @Column(name = "eq_id")
     var equipId: String? = null
 
     /** 建筑Id */
     @Schema(description = "建筑Id")
     @Id
-    @Column(name = "building_id")
+    @Column(name = "bd_id")
     var buildingId: String? = null
 
     /** 项目Id */

+ 2 - 0
datacenter/src/main/kotlin/com/persagy/server/jms/TopicReceiver.kt

@@ -32,6 +32,8 @@ import com.persagy.server.datacenter.models.jms.SynchronousMessage
 import com.persagy.server.datacenter.models.jms.SynchronousMessageRel
 import com.persagy.service.SObjectService
 import com.persagy.service.utils.SJsonUtil
+import org.springframework.amqp.rabbit.annotation.RabbitHandler
+import org.springframework.amqp.rabbit.annotation.RabbitListener
 import org.springframework.stereotype.Component
 import org.springframework.stereotype.Service
 import java.util.*

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

@@ -57,6 +57,7 @@ import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 import java.text.SimpleDateFormat
 import java.util.*
+import kotlin.collections.HashSet
 
 /**
  * 手动计算
@@ -4158,14 +4159,14 @@ open class ManualRelationCalcService {
             val rSp2SpTwoList = CommonServices.rSh2BdTwoService.select(listSF).exec()
             if (rSp2SpTwoList.size>0) {
 
-                val listId1 = ArrayList<String>()
-                val listId2 = ArrayList<String>()
+                val listId1 = HashSet<String>()
+                val listId2 = HashSet<String>()
                 for (rSp2SpTwo in rSp2SpTwoList){
                     listId1.add(rSp2SpTwo.id1!!)
                     listId2.add(rSp2SpTwo.id2!!)
                 }
                 val sCascadeQuery = sQueryRequest.cascade!!.get(0)
-                sCascadeQuery.filters = "projectId = '$projectId';id in ${listId2.toJson()}"
+                sCascadeQuery.filters = "projectId = '$projectId';id in ${listId2.toList().toJson()}"
                 list.add(SFilter.inList("id",listId1.toList()))
                 val pageQuery = CommonServices.relShaftForBdService.pageQuery(sQueryRequest, list)
                 manualRelationCalcResponse.direction = "Left"