Ver código fonte

********************WX******************
调整空间关系

zhangweixin 4 anos atrás
pai
commit
6d40c6b15c

+ 25 - 1
datacenter/src/main/kotlin/com/persagy/server/mappers/IRelationExcelImportMapper.kt

@@ -52,7 +52,7 @@ interface IRelationExcelImportMapper {
      * @param   id2             设备ID
      * @return  excel需要的记录
      */
-    @Insert("INSERT INTO relationship.r_eq2bd(project_id, eq_id, bd_id, type, sign) VALUES(#{projectId}, #{id2}, #{id1}, #{type}, 1)")
+    @Insert("INSERT INTO relationship.r_eq2bd(project_id, eq_id, bd_id, type, sign) VALUES(#{projectId}, #{id1}, #{id2}, #{type}, 1)")
     fun eq2bd(projectId: String, type: String, id1: String, id2: String)
 
     /**
@@ -325,6 +325,18 @@ interface IRelationExcelImportMapper {
      * @param   projectId       项目ID
      * @param   type            关系类型
      * @param   id1             系统ID
+     * @param   id2             建筑ID
+     * @return  excel需要的记录
+     */
+    @Insert("INSERT INTO public.r_sy_for_bd(project_id, sys_id, building_id,  sign) VALUES(#{projectId}, #{id1}, #{id2},  1)")
+    fun sy2bdfor(projectId: String, type: String, id1: String, id2: String)
+
+    /**
+     * 建筑与竖井关系
+     *
+     * @param   projectId       项目ID
+     * @param   type            关系类型
+     * @param   id1             系统ID
      * @param   id2             楼层ID
      * @return  excel需要的记录
      */
@@ -332,6 +344,18 @@ interface IRelationExcelImportMapper {
     fun sy2fl(projectId: String, type: String, id1: String, id2: String)
 
     /**
+     * 建筑与竖井关系
+     *
+     * @param   projectId       项目ID
+     * @param   type            关系类型
+     * @param   id1             系统ID
+     * @param   id2             楼层ID
+     * @return  excel需要的记录
+     */
+    @Insert("INSERT INTO public.r_sy_for_fl(project_id, sys_id, floor_id,  sign) VALUES(#{projectId}, #{id1}, #{id2},  1)")
+    fun sy2flfor(projectId: String, type: String, id1: String, id2: String)
+
+    /**
      * 系统与竖井关系
      *
      * @param   projectId       项目ID

+ 6 - 0
datacenter/src/main/kotlin/com/persagy/server/services/graphtype/RelationTypeProjectService.kt

@@ -477,6 +477,12 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
                 excelImport.javaClass.getDeclaredMethod("sh2shfor", String::class.java, String::class.java, String::class.java, String::class.java)
             }else if(relType =="eq2fl_for"){
                 excelImport.javaClass.getDeclaredMethod("eq2fl", String::class.java, String::class.java, String::class.java, String::class.java)
+            } else if (relType =="eq2bd_for") {
+                excelImport.javaClass.getDeclaredMethod("eq2bd", String::class.java, String::class.java, String::class.java, String::class.java)
+            } else if (relType == "sy2bd_for") {
+                excelImport.javaClass.getDeclaredMethod("sy2bdfor", String::class.java, String::class.java, String::class.java, String::class.java)
+            } else if ( relType == "sy2fl_for") {
+                excelImport.javaClass.getDeclaredMethod("sy2flfor", String::class.java, String::class.java, String::class.java, String::class.java)
             } else if(relType == "sy2sh_for"){
                 cmd = "sy2shfor"
                 excelImport.javaClass.getDeclaredMethod(cmd, String::class.java, String::class.java, String::class.java, String::class.java)

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

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

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

@@ -20,8 +20,8 @@ spring:
 #    username:                           postgres
 #    password:                           123qwe!@#
 #    url:                                jdbc:postgresql://datacenter:5432/datacenter
-    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
-#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
+    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
 #    url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
     username:                           postgres
 #    password:                           persagy_2020qwe!@#

+ 2 - 2
scanbuilding/src/main/resources/application-test.yml

@@ -7,8 +7,8 @@ spring:
     #    username:                           postgres
     #    password:                           123qwe!@#
 #    url:                                jdbc:postgresql://172.17.100.16:5432/datacenter
-    url:                                jdbc:postgresql://datacenter:5432/datacenter
-#    url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://datacenter:5432/datacenter
+    url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
     username:                           postgres
     #    password:                           persagy_2020qwe!@#
     password:                           cGVyc2FneV8yMDIwcXdlIUAj