Browse Source

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

zhangweixin 4 years ago
parent
commit
e40cecfeeb

+ 49 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/graphtype/TabularStatistics.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-2021.  博锐尚格科技股份有限公司
+ *        ~8888'
+ *        .!88~                                                                     All rights reserved.
+ *
+ * *********************************************************************************************************************
+ */
+
+package com.persagy.server.datacenter.models.entities.graphtype
+
+import io.swagger.v3.oas.annotations.media.Schema
+
+/**
+ * 表格统计
+ */
+class TabularStatistics {
+
+    /** 图类型id */
+    @Schema(description = "图类型id")
+    var relationType: String? = null
+
+    @Schema(description = "成功的数量")
+    var successCount: Int? = null
+
+    @Schema(description = "失败的数量")
+    var failCount: Int? = null
+
+    @Schema(description = "状态")
+    var state: String? = null
+
+}

+ 10 - 4
datacenter/src/main/kotlin/com/persagy/server/controllers/graphtype/GraphicTypeController.kt

@@ -23,6 +23,7 @@ package com.persagy.server.controllers.graphtype
 import com.persagy.database.SFilter
 import com.persagy.server.datacenter.models.entities.graphtype.GraphicType
 import com.persagy.server.datacenter.models.entities.graphtype.RelationTypeProject
+import com.persagy.server.datacenter.models.entities.graphtype.TabularStatistics
 import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockResponse
 import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockSource
 import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockSourceRequest
@@ -89,6 +90,12 @@ open class GraphicTypeController {
         return graphicTypeMapperService.queryCounts()
     }
 
+    @Operation(summary = "查询总览数量-根据类型查询关系数量", description = "relationType 查询")
+    @PostMapping(value = ["/type/query-count"])
+    fun queryCountType(@RequestParam type: String): SQueryResponse<RelationTypeProject> {
+        return graphicTypeMapperService.queryCountsType(type)
+    }
+
     /**
      * 下载模板
      */
@@ -115,13 +122,12 @@ open class GraphicTypeController {
      */
     @Operation(summary = "导入excel", description = "")
     @PostMapping("/import",consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
-    fun importExcel(@RequestPart("file") file: MultipartFile, @RequestParam relType: String, @RequestParam zoneType: String? = null) : SBaseResponse {
+    fun importExcel(@RequestPart("file") file: MultipartFile, @RequestParam relType: String, @RequestParam zoneType: String? = null) : SQueryResponse<TabularStatistics> {
         try {
-            RelationTypeProjectService.importExcel(file, relType, zoneType)
+            return RelationTypeProjectService.importExcel(file, relType, zoneType)
         }catch (e : Exception){
-            return SBaseResponse(SResponseType.failure,"error:" + e.message)
+            return SQueryResponse(SResponseType.failure,"error:" + e.message)
         }
-        return SBaseResponse(SResponseType.success, "")
     }
 
     /**

+ 139 - 0
datacenter/src/main/kotlin/com/persagy/server/services/graphtype/GraphicTypeMapperService.kt

@@ -105,6 +105,145 @@ open class GraphicTypeMapperService {
         }
     }
 
+
+
+    /**
+     * 查询数量
+     */
+    fun queryCountsType(code: String): SQueryResponse<RelationTypeProject> {
+        return try {
+            val rTn2SptService = RService(SMybatisDao(RTn2Sp::class.java))
+            val rSh2SpService = RService(SMybatisDao(RSh2Sp::class.java))
+            val rEq2SyService = RService(SMybatisDao(REq2Sy::class.java))
+            val rPe2SpService = SObjectService(SMybatisDao(RPe2Sp::class.java))
+            val rEq2EqService = RService(SMybatisDao(REq2Eq::class.java))
+            val rSy2SpService = RService(SMybatisDao(RSy2Sp::class.java))
+            val rEq2SpService = RService(SMybatisDao(REq2Sp::class.java))
+            val rSp2SpService = RService(SMybatisDao(RSp2Sp::class.java))
+            val queryResponse = SQueryResponse<RelationTypeProject>()
+            val projectId = SPageContext.getHeader("projectId")
+            val graphicTypeService = RService(SMybatisDao(GraphicType::class.java))
+            val relationTypeProjectService = RService(SMybatisDao(RelationTypeProject::class.java))
+//            val graphicTypeList = graphicTypeService.select(SFilter.eq("relationType",code),SFilter.not(SFilter.isNull("parentId"))).exec()
+//            for(graphicType in graphicTypeList){
+                var relationTypeProject = relationTypeProjectService.select(SFilter.eq("projectId",projectId!!),SFilter.eq("relationType",code)).entity()
+                    if (relationTypeProject!=null) {
+                        val tableName = relationTypeProject.tableName
+                        if(!tableName.isNullOrEmpty()&&tableName!=""){
+                            var count = 0
+                            val names = tableName.split(",")
+                            for(n in names){
+                                logger.debug("數據=${n  }")
+                                if (n == "r_sy_in_fl"||n =="r_sh_through_sh"||n =="r_sh_in_bd"
+                                    ||n =="r_sy_for_bd"|| n =="r_sy_in_sh"|| n =="r_eq_for_fl"
+                                    || n =="r_sy_for_fl"||n =="r_sy_eq"||n =="r_sy_for_sh"
+                                    ||n =="r_fl_through_fl"||n =="zone_space_base"||n =="floor"||n =="equipment"
+                                    ||n =="general_system"||n =="r_eq_for_sh"||n =="r_eq_in_sh"
+                                    ||n =="r_pe_in_sh"||n =="r_eq_for_bd"||n =="property"||n == "r_sp_in_bd"
+                                    ||n =="r_sp_in_fl"){
+                                    count += mapper.relationCount(n, projectId)
+                                }else if (n =="r_tn2sp"){
+                                    val exec = rTn2SptService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                }else if (n =="r_sh2sp"){
+                                    try {
+                                        logger.debug("类型=${relationTypeProject.relationType  }")
+                                        val exec = rSh2SpService.select(SFilter.eq("ProjectId", projectId), SFilter.eq("Type", relationTypeProject.relationType!!)).exec()
+                                        count += exec.size
+                                    } catch (e: Exception) {
+                                        e.printStackTrace()
+                                    }
+                                }else if (n =="r_eq2sy"){
+                                    val exec = RSyEqService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                }else  if (n =="r_pe2sp"){
+                                    val exec = rPe2SpService.select(SFilter.eq("ProjectId", projectId), SFilter.eq("Type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                    logger.debug("资产= ${exec.size}")
+                                }else if (n =="r_eq2eq"){
+                                    val exec = rEq2EqService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                }else if (n =="r_sy2sp"){
+                                    val exec = rSy2SpService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                }else if (n =="r_eq2sp"){
+                                    if (!relationTypeProject.zoneType.isNullOrEmpty()){
+                                        val exec = rEq2SpService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!),SFilter.eq("ZoneType", relationTypeProject.zoneType!!)).exec()
+                                        count += exec.size
+                                        logger.debug("空间数量=${relationTypeProject.relationType  }    ${exec.size} ****************************************************************************************************")
+                                    }else{
+                                        val exec = rEq2SpService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                        count += exec.size
+                                    }
+                                }else if (n =="r_sp2sp"){
+                                    val exec = rSp2SpService.select(SFilter.eq("projectId", projectId), SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += exec.size
+                                }else if (n == "property_eq"){
+                                    val exec = PropertyService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("equipId"))).exec()
+                                    count += exec.size
+                                }else if (n == "property_fl"){
+                                    val exec = PropertyService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("floorId"))).exec()
+                                    count += exec.size
+                                }else if (n == "equipment_com"){
+                                    val exec = EquipmentService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("parentId"))).exec()
+                                    count = exec.size
+                                }else if (n == "bd_sy_eq_com"){
+                                    val rSyInBdList = RSyInBdService.select(SFilter.eq("projectId", projectId)).exec()
+                                    count += rSyInBdList.size
+                                    val execEquip = EquipmentService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("buildingId"))).exec()
+                                    count += execEquip.size
+                                    val exec = EquipmentService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("parentId"))).exec()
+                                    count += exec.size
+                                }else if (n == "property_bd"){
+                                    val execEquip = PropertyService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("buildingId"))).exec()
+                                    count += execEquip.size
+                                }else if (n == "floor_bd"){
+                                    val execEquip = FloorService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("buildingId"))).exec()
+                                    count += execEquip.size
+                                }else if (n == "equipment_fl"){
+                                    val execEquip = EquipmentService.select(SFilter.eq("projectId", projectId), SFilter.not(SFilter.isNull("floorId")))
+                                    execEquip.tableName = "v_equipment"
+                                    val exec = execEquip.exec()
+                                    count += exec.size
+                                }else if(n == "relationship.r_eq2sy"){
+                                    val rEq2SyList = rEq2SyService.select(SFilter.eq("projectId", projectId),
+                                        SFilter.eq("type", relationTypeProject.relationType!!)).exec()
+                                    count += rEq2SyList.size
+                                }else if (!n.isNullOrEmpty()){
+                                    if (!relationTypeProject.relationType.isNullOrEmpty()) {
+                                        count += mapper.relationCountRelType(n, projectId,relationTypeProject.relationType!!)
+                                    }
+                                }
+                            }
+//                        for(n in names){
+//                            count += mapper.relationCount(n!!, projectId)
+//                        }
+//                        if(relationTypeProject.isThorough!!){
+//                            relationTypeProject.count = (count / 2).toLong()
+//                        }else{
+                            relationTypeProject.count = count.toLong()
+//                        }
+                        }else{
+                            relationTypeProject.count = 0
+                        }
+                    } else {
+                        relationTypeProject = RelationTypeProject()
+                        relationTypeProject.count = 0
+                        relationTypeProject.relationType = code
+                    }
+//                for(relationTypeProject in relationTypeProjectList){
+//                }
+//            }
+            queryResponse.content = arrayListOf(relationTypeProject)
+            queryResponse
+        } catch (e: Exception) {
+            e.printStackTrace()
+            SQueryResponse(SResponseType.failure, e.message!!)
+        }
+    } // Fun
+
+
+
     /**
      * 查询数量
      */

+ 312 - 63
datacenter/src/main/kotlin/com/persagy/server/services/graphtype/RelationTypeProjectService.kt

@@ -34,6 +34,7 @@ import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.Opt
 import com.persagy.server.datacenter.models.entities.dictnew.DefFuncId
 import com.persagy.server.datacenter.models.entities.graphtype.RelationTypeProject
+import com.persagy.server.datacenter.models.entities.graphtype.TabularStatistics
 import com.persagy.server.datacenter.models.entities.graphtype.rel.RelZoneSpace
 import com.persagy.server.datacenter.models.entities.objects.Equipment
 import com.persagy.server.mappers.IRelationExcelExportMapper
@@ -46,6 +47,7 @@ import com.persagy.service.SPageContext
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SUpdateRequest
 import com.persagy.service.models.responses.SBaseResponse
+import com.persagy.service.models.responses.SQueryResponse
 import com.persagy.service.utils.SSpringContextUtil
 import org.apache.poi.ss.usermodel.CellType
 import org.apache.poi.xssf.usermodel.XSSFSheet
@@ -161,16 +163,43 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
             ""
         }
 //        val projectId = SPageContext.getHeader("projectId")
-        val file = File("/tmp/relation-$projectId-${relType}${zone}.xlsx")
+//        val file = File("/tmp/relation-$projectId-${relType}${zone}.xlsx")
+//        val workbook = if (file.exists()) {
+//            XSSFWorkbook(file)
+//        } else {
+//            XSSFWorkbook(RelationTypeProjectService::class.java.classLoader.getResourceAsStream("excel/relation-template.xlsx"))
+//        }
+//        response.contentType = "application/octet-stream"
+//        response.setHeader("Content-disposition", "attachment;filename=report-${relType}${zone}.xlsx")
+//        response.flushBuffer()
+//        workbook.write(response.outputStream)
+        logger.debug("path1 ************************************************************************************")
+        var path:String
+
+        val tomcat_path = System.getProperty("user.dir")
+
+        //获取tomcat中项目同级路径
+        val bin_path = tomcat_path.substring(tomcat_path.lastIndexOf("/") + 1, tomcat_path.length)
+        if ("bin" == bin_path) {
+            path = tomcat_path.substring(0, System.getProperty("user.dir").lastIndexOf("/")) + "/temp/"
+        } else {
+            path = "$tomcat_path/temp/"
+        }
+        val file = File(path+"$projectId-${relType}.xlsx")
+        logger.debug("path= ${file} ************************************************************************************")
         val workbook = if (file.exists()) {
             XSSFWorkbook(file)
         } else {
             XSSFWorkbook(RelationTypeProjectService::class.java.classLoader.getResourceAsStream("excel/relation-template.xlsx"))
         }
+//        val workbook =
+//            XSSFWorkbook(file)
+
         response.contentType = "application/octet-stream"
-        response.setHeader("Content-disposition", "attachment;filename=report-${relType}${zone}.xlsx")
+        response.setHeader("Content-disposition", "attachment;filename=$projectId-${relType}.xlsx")
         response.flushBuffer()
         workbook.write(response.outputStream)
+
     } // Function templateDownloads()
 
     /**
@@ -326,13 +355,17 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
      * @param   zoneType        业务空间类型
      * @return  应答体
      */
-    fun importExcel(file: MultipartFile, relType: String, zoneType: String? = null): SBaseResponse {
+    fun importExcel(file: MultipartFile, relType: String, zoneType: String? = null): SQueryResponse<TabularStatistics> {
+      val sQueryResponse =  SQueryResponse<TabularStatistics>(SResponseType.success)
+        val tabularStatistics = TabularStatistics()
+        var successCount = 0
+        var failCount = 0
         try {
             if (file.isEmpty) {
                 throw Exception("未选择文件")
             }
 
-            val zone = if (zoneType != null) {
+            var zone = if (zoneType != null) {
                 "_${zoneType}"
             } else {
                 ""
@@ -358,17 +391,243 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
             logger.debug("识别编码:${code}  ******************************************")
             preExcelRelation(sheet, projectId!!, relType, code, zoneType)
 
-            readExcelRelation(sheet, projectId, relType, zoneType,code)
+            val rowNum = rowStart
+            for (i in rowNum .. sheet.lastRowNum) {
+                try {
+                    val row = sheet.getRow(i)
+                    if (row?.getCell(idCode1Col) == null ||row.getCell(idCode2Col) == null){
+                        continue
+                    }
+                    val idCode1ColValue = row.getCell(idCode1Col).toString()
+                    val idCode2ColValue = row.getCell(idCode2Col).toString()
+                    logger.debug("idCode1ColValue=${idCode1ColValue}")
+                    logger.debug("idCode2ColValue=${idCode2ColValue}")
+
+                    if (!idCode1ColValue.isEmpty() && !idCode2ColValue.isEmpty()) {
+//                        if (code.compareTo("对象ID", true) == 0) {
+//                            row.createCell(id1Col).setCellValue(idCode1ColValue)
+//                            row.createCell(id2Col).setCellValue(idCode2ColValue)
+//                        } else  {
+                            val id1List = excelImport.findObjectId(projectId!!, codeTableMap[relType.substring(0, 2)]!!, codeColMap[code]!!, idCode1ColValue)
+                            val id2List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(3, 5)]!!, codeColMap[code]!!, idCode2ColValue)
+
+                            if (id1List.count() < 1) {
+                                row.createCell(stateCol).setCellValue("未找到主对象")
+                                failCount += 1
+                                continue
+                            }
+                            if (id1List.count() > 1) {
+                                row.createCell(stateCol).setCellValue("匹配到多个主对象")
+                                failCount += 1
+                                continue
+                            }
+                            if (id2List.count() < 1) {
+                                row.createCell(stateCol).setCellValue("未找到从对象")
+                                failCount += 1
+                                continue
+                            }
+                            if (id2List.count() > 1) {
+                                row.createCell(stateCol).setCellValue("匹配到多个从对象")
+                                failCount += 1
+                                continue
+                            }
+                            logger.debug("idCode1Colid=${id1List[0]}")
+                            logger.debug("idCode2Colid=${id2List[0]}")
+                            row.createCell(id1Col).setCellValue(id1List[0])
+                            row.createCell(id2Col).setCellValue(id2List[0])
+
+                        try {
+
+                            val len = relType.indexOf("_")
+                            var cmd = if (len > 0) {
+                                relType.substring(0, len)
+                            } else {
+                                relType
+                            }
+                            val type = relType
+                            val importMethod = if (relType == "eq2bd" || relType == "pe2bd") {
+                                excelImport.javaClass.getDeclaredMethod("${relType}In", String::class.java, String::class.java, String::class.java, String::class.java)
+                            } else if (relType == "eq2fl" || relType == "pe2fl") {
+                                excelImport.javaClass.getDeclaredMethod("${relType}In", String::class.java, String::class.java, String::class.java, String::class.java)
+                            } else if (relType == "sh2bd_ArchForArch") {
+                                excelImport.javaClass.getDeclaredMethod("sh2bdfor", String::class.java, String::class.java, String::class.java, String::class.java)
+                            } else if (relType == "sh2fl_ArchForArch"){
+                                excelImport.javaClass.getDeclaredMethod("sh2flfor", String::class.java, String::class.java, String::class.java, String::class.java)
+                            }else if (relType == "sh2sh_ArchForArch"){
+                                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)
+                            } else if (cmd == "sp2sp"||cmd == "bd2sp"||cmd == "fl2sp"||cmd == "sh2sp"
+                                ||cmd == "sp2bd"||cmd == "sp2fl"||cmd == "sp2sh"||cmd == "eq2sp"){
+                                logger.debug("建筑和空间")
+                                excelImport.javaClass.getDeclaredMethod(cmd, String::class.java, String::class.java, String::class.java, String::class.java, String::class.java)
+                            } else {
+                                if(zoneType.isNullOrEmpty()) {
+                                    excelImport.javaClass.getDeclaredMethod(cmd, String::class.java, String::class.java, String::class.java, String::class.java)
+                                } else {
+                                    excelImport.javaClass.getDeclaredMethod(cmd, String::class.java, String::class.java, String::class.java, String::class.java, String::class.java)
+                                }
+                            }
+                            val rowNum = rowStart
+//                            for (i in rowNum .. sheet.lastRowNum) {
+//                                val row = sheet.getRow(i)
+                                try {
+                                    if (row == null||row.getCell(id1Col) == null||row.getCell(id2Col) == null){
+                                        sheet.getRow(0).createCell(stateCol).setCellValue("第$i 行数据为空")
+                                        continue
+                                    }
+                                    val id1 = row.getCell(id1Col).toString()
+                                    val id2 = row.getCell(id2Col).toString()
+                                    logger.debug("id1= ${id1}")
+                                    logger.debug("id2= ${id2}")
+
+                                    // 任意一个ID为空,则不能导入数据
+                                    if (id1.isEmpty() || id2.isEmpty()) {
+                                        continue
+                                    }
+//                                    logger.debug("建筑和空间6656565")
+//                                    val id1List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(0, 2)]!!, "id", id1)
+//                                    val id2List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(3, 5)]!!, "id", id2)
+//
+//                                    if (id1List.count() < 1) {
+//                                        row.createCell(stateCol).setCellValue("未找到主对象")
+//                                        logger.debug("未找到主对象")
+//                                        continue
+//                                    }
+//                                    if (id1List.count() > 1) {
+//                                        row.createCell(stateCol).setCellValue("匹配到多个主对象")
+//                                        logger.debug("匹配到多个主对象")
+//                                        continue
+//                                    }
+//                                    if (id2List.count() < 1) {
+//                                        row.createCell(stateCol).setCellValue("未找到从对象")
+//                                        logger.debug("未找到从对象")
+//                                        continue
+//                                    }
+//                                    if (id2List.count() > 1) {
+//                                        row.createCell(stateCol).setCellValue("匹配到多个从对象")
+//                                        logger.debug("匹配到多个从对象")
+//                                        continue
+//                                    }
+
+                                    logger.debug("建筑和空间333333333333333333333333333333333333")
+                                    if (cmd == "sp2sp"||cmd == "bd2sp"||cmd == "fl2sp"||cmd == "sh2sp"||cmd == "eq2sp"){
+                                        val space = spaceService.select(SFilter.eq("id", id2)).entity()
+                                        zone =  space!!.classCode!!
+                                    }else if (cmd == "sp2bd"||cmd == "sp2fl"||cmd == "sp2sh") {
+                                        val space = spaceService.select(SFilter.eq("id", id1)).entity()
+                                        zone =  space!!.classCode!!
+                                    }
+                                    logger.debug("cmd = ${cmd}********************************************")
+                                    try {
+                                        if(zoneType.isNullOrEmpty()) {
+                                            importMethod.invoke(excelImport, projectId, type, id1, id2)
+                                        } else {
+                                            logger.debug("建筑和空间********************************************")
+                                            importMethod.invoke(excelImport, projectId, type, id1, id2, zoneType)
+                                        }
+                                    } catch (e: Exception) {
+                                        e.printStackTrace()
+                                    }
+                                    successCount = successCount+1
+                                    row.createCell(stateCol).setCellValue("关联成功")
+                                } catch (e: Exception) {
+                                    e.printStackTrace()
+                                    row.createCell(stateCol).setCellValue("关联失败")
+                                }
+//                            }
+                        } catch (e: Exception) {
+                            e.printStackTrace()
+                        }
+//                        }
+                    }else {
+                        // 主对象识别码为空,则不能导入数据
+                        if (!idCode1ColValue.isEmpty() && idCode2ColValue.isEmpty()) {
+                            row.createCell(stateCol).setCellValue("失败,从对象的识别编码为空")
+                            failCount += 1
+                            // result = false
+                            continue
+                        }
+                        // 主对象识别码为空,则不能导入数据
+                        if (idCode1ColValue.isEmpty() && !idCode2ColValue.isEmpty()) {
+                            row.createCell(stateCol).setCellValue("失败,主对象的识别编码为空")
+                            failCount += 1
+                            // result = false
+                            continue
+                        }
+                    }
+                } catch (e: Exception) {
+                    e.printStackTrace()
+                    // DO NOTHING
+                }
+            }
+//            readExcelRelation(sheet, projectId, relType, zoneType,code)
+
+//            val outFile = File("/tmp/relation-$projectId-${relType}${zone}.xlsx")
+//            workbook.write(outFile.outputStream())
 
-            val outFile = File("/tmp/relation-$projectId-${relType}${zone}.xlsx")
-            workbook.write(outFile.outputStream())
-            /** 发送消息 */
-            rabbitMqService.sendRel(Opt.projectId!!, relType,"20","123","456")
+
+            // 时间
+//            val date: String = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))
+            var path:String
+            // Tomcat 路径
+            val tomcat_path = System.getProperty("user.dir")
+            // 上传的文件名
+            val myFileName = file.originalFilename
+            // 重组文件名
+            val fileName = "$projectId-${relType}.xlsx"
+            //获取tomcat中项目同级路径
+            val bin_path = tomcat_path.substring(tomcat_path.lastIndexOf("/") + 1, tomcat_path.length)
+            if ("bin" == bin_path) {
+                path = tomcat_path.substring(0, System.getProperty("user.dir").lastIndexOf("/")) + "/temp/"
+            } else {
+                path = "$tomcat_path/temp/"
+            }
+            val fileDir = File(path)
+            //如果不存在 则创建
+            if (!fileDir.exists()) {
+                fileDir.mkdirs()
+            }
+            // 文件
+            val files = File(path,fileName)
+            // 文件流
+            val os: OutputStream = FileOutputStream(files)
+            // 写入
+            workbook.write(os)
+            os.flush()
+            os.close()
+            try {
+                /** 发送消息 */
+                rabbitMqService.sendRel(Opt.projectId!!, relType,"20","123","456")
+            } catch (e: Exception) {
+                e.printStackTrace()
+            }
         } catch (e: Exception) {
             e.printStackTrace()
-            return SBaseResponse(SResponseType.failure, e.message!!)
+            return SQueryResponse(SResponseType.failure, e.message!!)
+        }
+        tabularStatistics.failCount = failCount
+        tabularStatistics.successCount = successCount
+        if (successCount>0&&failCount>0) {
+            tabularStatistics.state = "1"
+        }else if (successCount>0&&failCount==0) {
+            tabularStatistics.state = "0"
+        }else if (successCount == 0&&failCount>0) {
+            tabularStatistics.state = "2"
+        }else {
+            tabularStatistics.state = "2"
         }
-        return SBaseResponse(SResponseType.success)
+        sQueryResponse.content = arrayListOf(tabularStatistics)
+        return sQueryResponse
     } // Fun importExcel()
     /**
      * 预处理Excel数据
@@ -395,43 +654,47 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
                 val idCode2ColValue = row.getCell(idCode2Col).toString()
                 logger.debug("idCode1ColValue=${idCode1ColValue}")
                 logger.debug("idCode2ColValue=${idCode2ColValue}")
-                // 主对象识别码为空,则不能导入数据
-                if (idCode1ColValue.isEmpty() || idCode2ColValue.isEmpty()) {
-                    row.createCell(stateCol).setCellValue("失败,主对象or从对象的识别编码为空")
-                    // result = false
-                    continue
-                }
 
-                if (code.compareTo("对象ID", true) == 0) {
+                if (!idCode1ColValue.isEmpty() && !idCode2ColValue.isEmpty()) {
+                    if (code.compareTo("对象ID", true) == 0) {
+                        row.createCell(id1Col).setCellValue(idCode1ColValue)
+                        row.createCell(id2Col).setCellValue(idCode2ColValue)
 
-                    row.createCell(id1Col).setCellValue(idCode1ColValue)
-                    row.createCell(id2Col).setCellValue(idCode2ColValue)
-                } else  {
+                    } else  {
 
-                    val id1List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(0, 2)]!!, codeColMap[code]!!, idCode1ColValue)
-                    val id2List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(3, 5)]!!, codeColMap[code]!!, idCode2ColValue)
+                        val id1List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(0, 2)]!!, codeColMap[code]!!, idCode1ColValue)
+                        val id2List = excelImport.findObjectId(projectId, codeTableMap[relType.substring(3, 5)]!!, codeColMap[code]!!, idCode2ColValue)
 
-                    if (id1List.count() < 1) {
-                        row.createCell(stateCol).setCellValue("未找到主对象")
-                        continue
-                    }
-                    if (id1List.count() > 1) {
-                        row.createCell(stateCol).setCellValue("匹配到多个主对象")
-                        continue
-                    }
-                    if (id2List.count() < 1) {
-                        row.createCell(stateCol).setCellValue("未找到从对象")
-                        continue
+                        if (id1List.count() < 1) {
+                            row.createCell(stateCol).setCellValue("未找到主对象")
+                            continue
+                        }
+                        if (id1List.count() > 1) {
+                            row.createCell(stateCol).setCellValue("匹配到多个主对象")
+                            continue
+                        }
+                        if (id2List.count() < 1) {
+                            row.createCell(stateCol).setCellValue("未找到从对象")
+                            continue
+                        }
+                        if (id2List.count() > 1) {
+                            row.createCell(stateCol).setCellValue("匹配到多个从对象")
+                            continue
+                        }
+                        logger.debug("idCode1Colid=${id1List[0]}")
+                        logger.debug("idCode2Colid=${id2List[0]}")
+                        row.createCell(id1Col).setCellValue(id1List[0])
+                        row.createCell(id2Col).setCellValue(id2List[0])
                     }
-                    if (id2List.count() > 1) {
-                        row.createCell(stateCol).setCellValue("匹配到多个从对象")
+                }else {
+                    // 主对象识别码为空,则不能导入数据
+                    if (idCode1ColValue.isEmpty() || idCode2ColValue.isEmpty()) {
+                        row.createCell(stateCol).setCellValue("失败,主对象or从对象的识别编码为空")
+                        // result = false
                         continue
                     }
-                    logger.debug("idCode1Colid=${id1List[0]}")
-                    logger.debug("idCode2Colid=${id2List[0]}")
-                    row.createCell(id1Col).setCellValue(id1List[0])
-                    row.createCell(id2Col).setCellValue(id2List[0])
                 }
+
             } catch (e: Exception) {
                 e.printStackTrace()
                 // DO NOTHING
@@ -457,14 +720,7 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
             } else {
                 relType
             }
-//        val type = if (len > 0) {
-//            relType.substring(len + 1)
-//        } else {
-//            ""
-//        }
-
             val type = relType
-
             val importMethod = if (relType == "eq2bd" || relType == "pe2bd") {
                 excelImport.javaClass.getDeclaredMethod("${relType}In", String::class.java, String::class.java, String::class.java, String::class.java)
             } else if (relType == "eq2fl" || relType == "pe2fl") {
@@ -509,17 +765,6 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
                 val id2 = row.getCell(id2Col).toString()
                     logger.debug("id1= ${id1}")
                     logger.debug("id2= ${id2}")
-//                    if (code.compareTo("对象ID", true) == 0) {
-//
-//                        row.createCell(id1Col).setCellValue(id1)
-//                        row.createCell(id2Col).setCellValue(id2)
-//
-//                    } else  {
-
-
-//                        row.createCell(id1Col).setCellValue(id1List[0])
-//                        row.createCell(id2Col).setCellValue(id2List[0])
-//                    }
 
                 // 任意一个ID为空,则不能导入数据
                 if (id1.isEmpty() || id2.isEmpty()) {
@@ -559,11 +804,15 @@ object RelationTypeProjectService : RService<RelationTypeProject>(SMybatisDao(Re
                         zoneType =  space!!.classCode
                     }
                     logger.debug("cmd = ${cmd}********************************************")
-                    if(zoneType.isNullOrEmpty()) {
-                        importMethod.invoke(excelImport, projectId, type, id1, id2)
-                    } else {
-                        logger.debug("建筑和空间********************************************")
-                        importMethod.invoke(excelImport, projectId, type, id1, id2, zoneType)
+                    try {
+                        if(zoneType.isNullOrEmpty()) {
+                            importMethod.invoke(excelImport, projectId, type, id1, id2)
+                        } else {
+                            logger.debug("建筑和空间********************************************")
+                            importMethod.invoke(excelImport, projectId, type, id1, id2, zoneType)
+                        }
+                    } catch (e: Exception) {
+                        e.printStackTrace()
                     }
                     row.createCell(stateCol).setCellValue("关联成功")
                 } catch (e: Exception) {

+ 42 - 32
datacenter/src/main/kotlin/com/persagy/server/services/objects/GeneralSystemService.kt

@@ -404,56 +404,66 @@ object GeneralSystemService : Service<GeneralSystem>(SMybatisDao(GeneralSystem::
         var list = ArrayList<SFilter>()
         list.add(SFilter.eq("projectId",projectId!!))
 
-        if(!floorId.isNullOrEmpty()&&!floorId.equals("1")&&(buildingId.isNullOrEmpty()||buildingId.equals("1"))){
+        if(!floorId.isNullOrEmpty()&&!floorId.equals("1")&&!buildingId.isNullOrEmpty()){
             /** 楼层id不为空且不为1,建筑id为空 ---> 系统和楼层关系表 取系统id */
             val objList = syinFlService.select(SFilter.eq("floorId", floorId)).distinct().projection("sysId").exec()
             if(!objList.isNullOrEmpty()){
                 for (obj in objList){
                     idList.add(obj.sysId!!)
                 }
-            }else{
-                idList.add("")
             }
-            list.add(SFilter.inList("id",idList.toList()))
-        }else if((floorId.isNullOrEmpty()||floorId.equals("1"))&&!buildingId.isNullOrEmpty()&&!buildingId.equals("1")){
-            /** 楼层id为空,建筑id不为空且不为1 ---> 系统和建筑关系表 取系统id */
-            val objList = syinBdService.select(SFilter.eq("buildingId", buildingId)).distinct().projection("sysId").exec()
-            if(!objList.isNullOrEmpty()) {
-                for (obj in objList) {
-                    idList.add(obj.sysId!!)
-                }
-            }else{
-                idList.add("")
+            if (idList.size>0) {
+                list.add(SFilter.inList("id",idList.toList()))
             }
-            list.add(SFilter.inList("id", idList.toList()))
-        }else if(!floorId.isNullOrEmpty()&&floorId.equals("1")&&!buildingId.isNullOrEmpty()&&buildingId.equals("1")){
-            /** 楼层id为1,建筑id为1 ---> 系统id不在(系统和楼层关系表 取系统id  系统和建筑关系表 取系统id)之内*/
-            val objList1 = syinFlService.selectAll().distinct().projection("sysId").exec()
-            if(!objList1.isNullOrEmpty()){
-                for (obj in objList1){
-                    idList.add(obj.sysId!!)
+        }else if(!floorId.isNullOrEmpty()&&floorId.equals("1")&&!buildingId.isNullOrEmpty()&&!buildingId.equals("1")){
+            /** 楼层id为空,建筑id不为空且不为1 ---> 系统和建筑关系表 取系统id */
+            /** 未明确楼层的 */
+            val syinFloorList = syinFlService.select(SFilter.eq("projectId",projectId)).distinct().projection("sysId").exec()
+            val idSet = HashSet<String>()
+            if (syinFloorList.size>0) {
+                for (syinFloor in syinFloorList) {
+                    idSet.add(syinFloor.floorId!!)
                 }
             }
-            val objList2 = syinBdService.selectAll().distinct().projection("sysId").exec()
-            if(!objList2.isNullOrEmpty()) {
-                for (obj in objList2) {
-                    idList.add(obj.sysId!!)
-                }
+           val listSFilter = ArrayList<SFilter>()
+            listSFilter.add(SFilter.eq("buildingId", buildingId))
+            listSFilter.add(SFilter.eq("projectId", projectId))
+            if (idSet.size>0) {
+                listSFilter.add(SFilter.not(SFilter.inList("sysId",idSet.toList())))
             }
-            list.add(SFilter.not(SFilter.inList("id", idList.toList())))
-        }else if(!floorId.isNullOrEmpty()&&!floorId.equals("1")&&!buildingId.isNullOrEmpty()&&!buildingId.equals("1")){
-            /** 楼层id不为空,建筑id不为空 ---> 系统和楼层关系表 取系统id  将建筑id作为条件 */
-            val objList = syinFlService.select(SFilter.eq("floorId", floorId),SFilter.eq("buildingId", buildingId)).distinct().projection("sysId").exec()
+            val objList = syinBdService.select(listSFilter).distinct().projection("sysId").exec()
             if(!objList.isNullOrEmpty()) {
                 for (obj in objList) {
                     idList.add(obj.sysId!!)
                 }
-            }else{
-                idList.add("")
             }
+            if (idList.size>0) {
+                list.add(SFilter.inList("id", idList.toList()))
+            }
+        }else if(floorId.isNullOrEmpty()&&!buildingId.isNullOrEmpty()&&buildingId.equals("1")){
+            /** 楼层id为1,建筑id为1 ---> 系统id不在(系统和楼层关系表 取系统id  系统和建筑关系表 取系统id)之内*/
+            val buildingList = syinBdService.select(SFilter.eq("projectId", projectId)).distinct().projection("sysId").exec()
+            if (buildingList.size>0) {
+                for (building in buildingList) {
+                    idList.add(building.sysId!!)
+                }
+                list.add(SFilter.not(SFilter.inList("id", idList.toList())))
 
-            list.add(SFilter.inList("id", idList.toList()))
+            }
         }
+//        else if(!floorId.isNullOrEmpty()&&!floorId.equals("1")&&!buildingId.isNullOrEmpty()&&!buildingId.equals("1")){
+//            /** 楼层id不为空,建筑id不为空 ---> 系统和楼层关系表 取系统id  将建筑id作为条件 */
+//            val objList = syinFlService.select(SFilter.eq("floorId", floorId),SFilter.eq("buildingId", buildingId)).distinct().projection("sysId").exec()
+//            if(!objList.isNullOrEmpty()) {
+//                for (obj in objList) {
+//                    idList.add(obj.sysId!!)
+//                }
+//            }else{
+//                idList.add("")
+//            }
+//
+//            list.add(SFilter.inList("id", idList.toList()))
+//        }
 //        else if(floorId.isNullOrEmpty()&&buildingId.isNullOrEmpty()){
 //            /** 楼层id为空,建筑id为空 ---> 查询所有 */
 //        }

+ 2 - 1
datacenter/src/main/kotlin/com/persagy/server/services/objects/PropertyService.kt

@@ -31,6 +31,7 @@ import com.persagy.base.extensions.toJson
 import com.persagy.database.SFilter
 import com.persagy.database.SQueryBuilder
 import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.Opt
 import com.persagy.server.datacenter.models.entities.logs.DataCenterLogs
 import com.persagy.server.datacenter.models.entities.objects.Equipment
 import com.persagy.server.datacenter.models.entities.objects.Property
@@ -110,7 +111,7 @@ object PropertyService : Service<Property>(SMybatisDao(Property::class.java)) {
                             userLog.comming = "app"
                             userLog.action = "创建资产"
                             userLog.id = IdUtils.uuidCreate()
-                            userLog.note = "项目ID: "+projectId+" 用户ID:"+user!!.id+" 手机号:"+ account+" 请求来源:"+comming+ " "+entity.toJson()
+                            userLog.note = "项目ID: "+Opt.projectId+" 用户ID:"+user!!.id+" 手机号:"+ account+" 请求来源:"+comming+ " "+entity.toJson()
                             userLog.phone = account
                             userLog.projectId = projectId
                             userLog.userId = user.id

+ 2 - 2
datacenter/src/main/kotlin/com/persagy/server/services/objects/ZoneSpaceBaseService.kt

@@ -440,7 +440,7 @@ object ZoneSpaceBaseService : ServiceSpace<ZoneSpace>(SMybatisDao(ZoneSpace::cla
             val projectId = SPageContext.getHeader("projectId")
 
             if (request.floorId.isNullOrEmpty()) {
-                val pageQuery = defClassService.pageQuery(request, arrayListOf(SFilter.eq("projectId", projectId!!), SFilter.eq("parentCode","space")))
+                val pageQuery = defClassService.pageQuery(request, arrayListOf(SFilter.eq("type","common"), SFilter.eq("parentCode","space")))
                 val list = ArrayList<DictSpaceProject>()
                 if (!pageQuery.content.isNullOrEmpty()) {
                     for (content in pageQuery.content!!) {
@@ -457,7 +457,7 @@ object ZoneSpaceBaseService : ServiceSpace<ZoneSpace>(SMybatisDao(ZoneSpace::cla
                 sQueryResponse.result = SResponseType.success
                 return sQueryResponse
             } else {
-                val pageQuery = defClassService.pageQuery(request, arrayListOf(SFilter.eq("projectId", projectId!!), SFilter.eq("parentCode","space")))
+                val pageQuery = defClassService.pageQuery(request, arrayListOf(SFilter.eq("projectId", "common"), SFilter.eq("parentCode","space")))
                 val contentList = pageQuery.content
                 val list = ArrayList<DictSpaceProject>()
                 if (contentList != null && contentList.size > 0) {

+ 7 - 9
datacenter/src/main/resources/application-test.yml

@@ -1,15 +1,12 @@
 
-# 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
+      #      defaultZone:                          http://192.168.64.18:9931/eureka
+      defaultZone:                          http://frame:123456@192.168.64.18:9931/eureka
+      #      defaultZone:                          http://admin:1qaz2wsx@127.0.0.1:8888/eureka/ #增加密码
+      enable-self-preservation: false # 设为false,关闭自我保护
+      eviction-interval-timer-in-ms: 5000 # 清理间隔(单位毫秒,默认是60*1000)启用主动失效,
 
 #启用监控
 management:
@@ -28,8 +25,9 @@ server:
 
 spring:
   datasource:
-    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+#    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
 #    url:                                jdbc:postgresql://datacenter:5432/datacenterlabsl
+    url:                                jdbc:postgresql://192.168.64.15:5432/datacenter
 #    url:                                jdbc:postgresql://datacenter:5432/datacenter
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj

+ 12 - 12
datacenter/src/main/resources/logback-spring.xml

@@ -37,26 +37,26 @@
         </encoder>
     </appender>
 
-<!--    &lt;!&ndash; 定义cn.sagacloud包的日志级别 &ndash;&gt;-->
-<!--    <logger name="com.persagy" level="debug" additivity="false">-->
-<!--        <appender-ref ref="STDOUT"/>-->
-<!--    </logger>-->
-
-<!--    &lt;!&ndash; 定义com.persagy包的日志级别 &ndash;&gt;-->
-<!--    <logger name="com.persagy" level="debug" additivity="false">-->
-<!--        <appender-ref ref="STDOUT"/>-->
-<!--    </logger>-->
-
     <!-- 定义cn.sagacloud包的日志级别 -->
-    <logger name="com.persagy" level="ERROR" additivity="false">
+    <logger name="com.persagy" level="debug" additivity="false">
         <appender-ref ref="STDOUT"/>
     </logger>
 
     <!-- 定义com.persagy包的日志级别 -->
-    <logger name="com.persagy" level="ERROR" additivity="false">
+    <logger name="com.persagy" level="debug" additivity="false">
         <appender-ref ref="STDOUT"/>
     </logger>
 
+<!--    &lt;!&ndash; 定义cn.sagacloud包的日志级别 &ndash;&gt;-->
+<!--    <logger name="com.persagy" level="ERROR" additivity="false">-->
+<!--        <appender-ref ref="STDOUT"/>-->
+<!--    </logger>-->
+
+<!--    &lt;!&ndash; 定义com.persagy包的日志级别 &ndash;&gt;-->
+<!--    <logger name="com.persagy" level="ERROR" additivity="false">-->
+<!--        <appender-ref ref="STDOUT"/>-->
+<!--    </logger>-->
+
 
     <!-- ERROR级别日志 -->
     <!-- 滚动记录文件,先将日志记录到指定文件,当符合某个条件时,将日志记录到其他文件 RollingFileAppender -->

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

@@ -53,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()

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

@@ -53,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()

+ 12 - 12
datasyn/src/main/resources/logback-spring.xml

@@ -32,26 +32,26 @@
         </encoder>
     </appender>
 
-<!--    &lt;!&ndash; 定义cn.sagacloud包的日志级别 &ndash;&gt;-->
-<!--    <logger name="com.persagy" level="DEBUG" additivity="false">-->
-<!--        <appender-ref ref="STDOUT"/>-->
-<!--    </logger>-->
-
-<!--    &lt;!&ndash; 定义com.persagy包的日志级别 &ndash;&gt;-->
-<!--    <logger name="com.persagy" level="DEBUG" additivity="false">-->
-<!--        <appender-ref ref="STDOUT"/>-->
-<!--    </logger>-->
-
     <!-- 定义cn.sagacloud包的日志级别 -->
-    <logger name="com.persagy" level="ERROR" additivity="false">
+    <logger name="com.persagy" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT"/>
     </logger>
 
     <!-- 定义com.persagy包的日志级别 -->
-    <logger name="com.persagy" level="ERROR" additivity="false">
+    <logger name="com.persagy" level="DEBUG" additivity="false">
         <appender-ref ref="STDOUT"/>
     </logger>
 
+<!--    &lt;!&ndash; 定义cn.sagacloud包的日志级别 &ndash;&gt;-->
+<!--    <logger name="com.persagy" level="ERROR" additivity="false">-->
+<!--        <appender-ref ref="STDOUT"/>-->
+<!--    </logger>-->
+
+<!--    &lt;!&ndash; 定义com.persagy包的日志级别 &ndash;&gt;-->
+<!--    <logger name="com.persagy" level="ERROR" additivity="false">-->
+<!--        <appender-ref ref="STDOUT"/>-->
+<!--    </logger>-->
+
 
 <!--    &lt;!&ndash; 定义cn.sagacloud包的日志级别 &ndash;&gt;-->
 <!--    <logger name="com.persagy" level="ERROR" additivity="false">-->