Przeglądaj źródła

********************WX******************
调整系统关系

zhangweixin 4 lat temu
rodzic
commit
38abcd6973

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

@@ -26,11 +26,9 @@
 
 package com.persagy.server.datacenter.models.entities.graphtype.rel
 
-import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.service.models.annotations.SCascade
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
-import javax.persistence.Id
 import javax.persistence.Table
 
 /**
@@ -40,63 +38,13 @@ import javax.persistence.Table
  */
 @Schema(description = "系统信息实体类")
 @Table(name = "general_system")
-open class RelGeneralSystem : BaseInfo() {
+open class RelGeneralSystem : RelGeneralSystemBase() {
 
-    /** 系统ID */
-    @Schema(description = "系统ID")
-    @Id
-    @Column(name = "id")
-    var id: String? = null
-
-    /** 系统名称 */
-    @Schema(description = "系统名称")
-    @Column(name = "name")
-    var name: String? = null
-
-    /** 系统本地编码 */
-    @Schema(description = "系统本地编码")
-    @Column(name = "local_id")
-    var localId: String? = null
-
-    /** 系统本地名称 */
-    @Schema(description = "系统本地名称")
-    @Column(name = "local_name")
-    var localName: String? = null
-
-    /** 设计图纸中编码 */
-    @Schema(description = "设计图纸中编码")
-    @Column(name = "cad_id")
-    var cadId: String? = null
-
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
-    /** 系统分类 */
-    @Schema(description = "系统分类",required = true)
-    @Column(name = "category")
-    var category: String? = null
-
-    /** 项目id */
-    @Schema(description = "项目id",required = true)
-    @Column(name = "project_id")
-    var projectId: String? = null
-
-    /** 建筑id */
-    @Schema(description = "建筑id")
-    @Column(name = "building_id")
-    var buildingId: String? = null
-
-    /** 楼层id */
-    @Schema(description = "楼层id")
-    @Column(name = "floor_id")
-    var floorId: String? = null
 
     /** 对象类型 */
     @Schema(description = "对象类型")
     @Column(name = "object_type")
-    override var objectType: String? = "GeneralSystem"
+    override var objectType: String? = "system"
 
     /** 级联-系统服务的业务空间 */
     @Schema(description = "级联-系统服务的业务空间")

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

@@ -0,0 +1,103 @@
+/*
+ * *********************************************************************************************************************
+ *
+ *          !!
+ *        .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.graphtype.rel
+
+import com.alibaba.fastjson.annotation.JSONField
+import com.persagy.server.datacenter.models.entities.base.BaseInfo
+import com.persagy.service.models.annotations.SCascade
+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 = "general_system")
+open class RelGeneralSystemBase : BaseInfo() {
+
+    /** 系统ID */
+    @Schema(description = "系统ID")
+    @Id
+    @Column(name = "id")
+    var id: String? = null
+
+    /** 系统名称 */
+    @Schema(description = "系统名称")
+    @Column(name = "name")
+    var name: String? = null
+
+    /** 系统本地编码 */
+    @Schema(description = "系统本地编码")
+    @Column(name = "local_id")
+    var localId: String? = null
+
+    /** 系统本地名称 */
+    @Schema(description = "系统本地名称")
+    @Column(name = "local_name")
+    var localName: String? = null
+
+    /** 设计图纸中编码 */
+    @Schema(description = "设计图纸中编码")
+    @Column(name = "cad_id")
+    @JSONField(name = "cADID")
+    var cadId: String? = null
+
+    /** 系统分类 */
+    @Schema(description = "系统分类",required = true)
+    @Column(name = "class_code")
+    var classCode: String? = null
+
+    /** BIM模型中编码 */
+    @Schema(description = "BIM模型中编码")
+    @Column(name = "bim_id")
+    var bimId: String? = null
+
+    /** 项目id */
+    @Schema(description = "项目id",required = true)
+    @Column(name = "project_id")
+    var projectId: String? = null
+
+    /** 建筑id */
+    @Schema(description = "建筑id")
+    @Column(name = "building_id")
+    var buildingId: String? = null
+
+    /** 楼层id */
+    @Schema(description = "楼层id")
+    @Column(name = "floor_id")
+    var floorId: String? = null
+
+    /** 对象类型 */
+    @Schema(description = "对象类型")
+    @Column(name = "object_type")
+    override var objectType: String? = "GeneralSystem"
+
+}

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

@@ -41,88 +41,13 @@ import javax.persistence.Table
  */
 @Schema(description = "系统信息实体类")
 @Table(name = "general_system")
-open class RelGeneralSystemBuilding : BaseInfo() {
-
-    /** 系统ID */
-    @Schema(description = "系统ID")
-    @Id
-    @Column(name = "id")
-    var id: String? = null
-
-    /** 系统名称 */
-    @Schema(description = "系统名称")
-    @Column(name = "name")
-    var name: String? = null
-
-    /** 系统本地编码 */
-    @Schema(description = "系统本地编码")
-    @Column(name = "local_id")
-    var localId: String? = null
-
-    /** 系统本地名称 */
-    @Schema(description = "系统本地名称")
-    @Column(name = "local_name")
-    var localName: String? = null
-
-    /** 设计图纸中编码 */
-    @Schema(description = "设计图纸中编码")
-    @Column(name = "cad_id")
-    var cadId: String? = null
-
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
-    /** 系统分类 */
-    @Schema(description = "系统分类",required = true)
-    @Column(name = "category")
-    var category: String? = null
-
-    /** 项目id */
-    @Schema(description = "项目id",required = true)
-    @Column(name = "project_id")
-    var projectId: String? = null
-
-    /** 建筑id */
-    @Schema(description = "建筑id")
-    @Column(name = "building_id")
-    var buildingId: String? = null
-
-    /** 楼层id */
-    @Schema(description = "楼层id")
-    @Column(name = "floor_id")
-    var floorId: String? = null
-
-    /** 设定参数 */
-    @Schema(description = "设定参数")
-    @Column(name = "setting_param")
-    var settingParam: HashMap<String,Any?>? = null
-
-    /** 技术参数 */
-    @Schema(description = "技术参数")
-    @Column(name = "tech_param")
-    var techParam: HashMap<String,Any?>? = null
-
-    /** 运行参数 */
-    @Schema(description = "运行参数")
-    @Column(name = "run_param")
-    var runParam: HashMap<String,Any?>? = null
-
-    /** 自定义 */
-    @Schema(description = "自定义")
-    @Column(name = "custom_param")
-    var customParam: HashMap<String, Any?>? = null
-
-    /** 运行状态 */
-    @Schema(description = "运行状态")
-    @Column(name = "running_state")
-    var runningState: HashMap<String, Any?>? = null
+open class RelGeneralSystemBuilding : RelGeneralSystemBase() {
+
 
     /** 对象类型 */
     @Schema(description = "对象类型")
     @Column(name = "object_type")
-    override var objectType: String? = "GeneralSystem"
+    override var objectType: String? = "system"
 
     /** 专业名称 */
     @Schema(description = "专业名称")
@@ -139,11 +64,6 @@ open class RelGeneralSystemBuilding : BaseInfo() {
     @Column(name = "category_name",insertable = false,updatable = false)
     var categoryName: String? = null
 
-    /** 反馈参数 */
-    @Schema(description = "反馈参数")
-    @Column(name = "feedback_param")
-    var feedbackParam: HashMap<String,Any?>? = null
-
     /** 级联-系统服务于建筑 */
     @Schema(description = "级联-系统服务于建筑")
     @SCascade(table="r_sy_for_bd", idColumn="sys_id", childIdColumn="building_id")

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

@@ -26,11 +26,9 @@
 
 package com.persagy.server.datacenter.models.entities.graphtype.rel
 
-import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.service.models.annotations.SCascade
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
-import javax.persistence.Id
 import javax.persistence.Table
 
 /**
@@ -40,64 +38,13 @@ import javax.persistence.Table
  */
 @Schema(description = "系统信息实体类")
 @Table(name = "general_system")
-open class RelGeneralSystemFloor : BaseInfo() {
-
-    /** 系统ID */
-    @Schema(description = "系统ID")
-    @Id
-    @Column(name = "id")
-    var id: String? = null
-
-    /** 系统名称 */
-    @Schema(description = "系统名称")
-    @Column(name = "name")
-    var name: String? = null
-
-    /** 系统本地编码 */
-    @Schema(description = "系统本地编码")
-    @Column(name = "local_id")
-    var localId: String? = null
-
-    /** 系统本地名称 */
-    @Schema(description = "系统本地名称")
-    @Column(name = "local_name")
-    var localName: String? = null
-
-    /** 设计图纸中编码 */
-    @Schema(description = "设计图纸中编码")
-    @Column(name = "cad_id")
-    var cadId: String? = null
-
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
-    /** 系统分类 */
-    @Schema(description = "系统分类",required = true)
-    @Column(name = "classCode")
-    var category: String? = null
-
-    /** 项目id */
-    @Schema(description = "项目id",required = true)
-    @Column(name = "project_id")
-    var projectId: String? = null
-
-    /** 建筑id */
-    @Schema(description = "建筑id")
-    @Column(name = "building_id")
-    var buildingId: String? = null
-
-    /** 楼层id */
-    @Schema(description = "楼层id")
-    @Column(name = "floor_id")
-    var floorId: String? = null
+open class RelGeneralSystemFloor : RelGeneralSystemBase() {
 
 
     /** 对象类型 */
     @Schema(description = "对象类型")
     @Column(name = "object_type")
-    override var objectType: String? = "GeneralSystem"
+    override var objectType: String? = "system"
 
     /** 专业名称 */
     @Schema(description = "专业名称")
@@ -114,11 +61,6 @@ open class RelGeneralSystemFloor : BaseInfo() {
     @Column(name = "category_name",insertable = false,updatable = false)
     var categoryName: String? = null
 
-    /** 反馈参数 */
-    @Schema(description = "反馈参数")
-    @Column(name = "feedback_param")
-    var feedbackParam: HashMap<String,Any?>? = null
-
     /** 级联-系统服务于竖井 */
     @Schema(description = "级联-系统服务于竖井")
     @SCascade(table="r_sy_for_fl", idColumn="sys_id", childIdColumn="floor_id")

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

@@ -26,11 +26,9 @@
 
 package com.persagy.server.datacenter.models.entities.graphtype.rel
 
-import com.persagy.server.datacenter.models.entities.base.BaseInfo
 import com.persagy.service.models.annotations.SCascade
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
-import javax.persistence.Id
 import javax.persistence.Table
 
 /**
@@ -40,58 +38,7 @@ import javax.persistence.Table
  */
 @Schema(description = "系统信息实体类")
 @Table(name = "general_system")
-open class RelGeneralSystemShaft : BaseInfo() {
-
-    /** 系统ID */
-    @Schema(description = "系统ID")
-    @Id
-    @Column(name = "id")
-    var id: String? = null
-
-    /** 系统名称 */
-    @Schema(description = "系统名称")
-    @Column(name = "name")
-    var name: String? = null
-
-    /** 系统本地编码 */
-    @Schema(description = "系统本地编码")
-    @Column(name = "local_id")
-    var localId: String? = null
-
-    /** 系统本地名称 */
-    @Schema(description = "系统本地名称")
-    @Column(name = "local_name")
-    var localName: String? = null
-
-    /** 设计图纸中编码 */
-    @Schema(description = "设计图纸中编码")
-    @Column(name = "cad_id")
-    var cadId: String? = null
-
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
-    /** 系统分类 */
-    @Schema(description = "系统分类",required = true)
-    @Column(name = "classCode")
-    var category: String? = null
-
-    /** 项目id */
-    @Schema(description = "项目id",required = true)
-    @Column(name = "project_id")
-    var projectId: String? = null
-
-    /** 建筑id */
-    @Schema(description = "建筑id")
-    @Column(name = "building_id")
-    var buildingId: String? = null
-
-    /** 楼层id */
-    @Schema(description = "楼层id")
-    @Column(name = "floor_id")
-    var floorId: String? = null
+open class RelGeneralSystemShaft : RelGeneralSystemBase() {
 
     /** 对象类型 */
     @Schema(description = "对象类型")

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

@@ -72,16 +72,16 @@ open class GeneralSystem : BaseInfo() {
     @JSONField(name = "cADID")
     var cadId: String? = null
 
-    /** BIM模型中编码 */
-    @Schema(description = "BIM模型中编码")
-    @Column(name = "bim_id")
-    var bimId: String? = null
-
     /** 系统分类 */
     @Schema(description = "系统分类",required = true)
     @Column(name = "class_code")
     var classCode: String? = null
 
+    /** BIM模型中编码 */
+    @Schema(description = "BIM模型中编码")
+    @Column(name = "bim_id")
+    var bimId: String? = null
+
     /** 项目id */
     @Schema(description = "项目id",required = true)
     @Column(name = "project_id")

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

@@ -770,7 +770,7 @@ class ManualRelationAddService {
                 rSy2Fl.sysId = relEquipment.id
 //                rSy2Fl.type = "sy2fl_for"
                 rSy2Fl.sign = 1
-                RSyForFlService.replace(rSy2Fl)
+               val replace = RSyForFlService.replace(rSy2Fl)
                 try {
                     if (replace) {
                         /** 发送消息 */

+ 6 - 6
datacenter/src/main/resources/application-test.yml

@@ -28,18 +28,18 @@ server:
 
 spring:
   datasource:
-#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
-    url:                                jdbc:postgresql://datacenter:5432/datacenter
+    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://datacenter:5432/datacenter
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 
   rabbitmq:
-    host: 192.168.64.15
+    host: 192.168.100.108
     port: 9936
-    username: admin
-    password: brzj123456
+    username: pbsage
+    password: pbsage123
     #虚拟host 可以不设置,使用server默认host
-    virtual-host: /test
+    virtual-host: /adm
 
   servlet:
     multipart:

+ 64 - 0
datacenter/src/main/resources/application-test1.yml

@@ -0,0 +1,64 @@
+
+# spring-cloud相关配置
+eureka:
+  client:                                   #客户端注册进eureka服务列表内
+    service-url:
+      defaultZone:                          http://eureka-service:8761/eureka
+
+  instance:
+    # 实例ID
+    # instance-id:                            ${spring.application.name}:${server.port}:${project.version}
+    # 优先使用IP地址方式进行注册服务
+    prefer-ip-address:                      true
+
+#启用监控
+management:
+  endpoints:
+    web:
+      exposure:
+        include:
+          - "*"  # 开放所有端点health,info,metrics,通过actuator/+端点名就可以获取相应的信息。默认打开health和info
+  endpoint:
+    health:
+      #未开启actuator/health时,我们获取到的信息是{"status":"UP"},status的值还有可能是 DOWN。开启后打印详细信息
+      show-details:                       always
+
+server:
+  port: 8080
+
+spring:
+  datasource:
+#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+    url:                                jdbc:postgresql://datacenter:5432/datacenter
+    username:                           postgres
+    password:                           cGVyc2FneV8yMDIwcXdlIUAj
+
+  rabbitmq:
+    host: 192.168.64.15
+    port: 9936
+    username: admin
+    password: brzj123456
+    #虚拟host 可以不设置,使用server默认host
+    virtual-host: /test
+
+  servlet:
+    multipart:
+      max-request-size:                500MB        # 限制上传的多个文件的总大小
+      max-file-size:                   500MB        # 限制单个文件的最大值
+
+logging:
+  config: classpath:logback-spring.xml
+  level:
+    root: INFO
+    org.hibernate: INFO
+    org.hibernate.type.descriptor.sql.BasicExtractor: INFO
+    com.ys.adage.mapper: INFO
+    org.springframework: INFO
+
+mqtopid: # 消息
+  exchange:                           exchange-dmp
+  routingKey:                         routingKey-center-adm
+  admQueue:                           queue-center-adm
+  synQueue:                           queue-center-syn
+  routingKey01:                       routing-dmp-rwd
+  routingKey02:                       routing-dmp-org