Procházet zdrojové kódy

********************WX***********************
添加微服务和数据中台通讯方式

zhangweixin před 4 roky
rodič
revize
c7dfff6d29

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

@@ -279,7 +279,7 @@ open class ZoneSpace: Serializable, SBaseEntity() {
     /** 级联-楼层  */
     @Schema(description = "级联-楼层")
     @SCascade(table="r_sp_in_fl", idColumn="space_id", childIdColumn="floor_id")
-    var floorlList: ArrayList<Floor>? = null
+    var floorList: ArrayList<Floor>? = null
 
     /** 对象类型 */
 //    @Schema(description = "对象类型")

+ 1 - 3
data-core/src/main/kotlin/com/persagy/server/scanbuilding/NoteTemplate.kt

@@ -26,7 +26,6 @@
 
 package com.persagy.server.scanbuilding
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
@@ -66,7 +65,6 @@ class NoteTemplate : SBaseEntity() {
     /** 版本 */
     @Schema(description = "版本")
     @Column(name = "version")
-    @JSONField(name = "Version")
     var version: Int? = null
 
-} // Class NoteTemplate
+}

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

@@ -28,7 +28,7 @@ server:
 
 spring:
   datasource:
-    url:                                jdbc:postgresql://192.168.64.14:5432/datacenterlabsl
+    url:                                jdbc:postgresql://192.168.64.15:5432/datacenterlabsl
     username:                           postgres
     password:                           cGVyc2FneV8yMDIwcXdlIUAj
 

+ 1 - 5
scanbuilding/src/main/kotlin/com/persagy/server/controller/task/EquipScanTaskController.kt

@@ -98,11 +98,7 @@ open class EquipScanTaskController {
     @PostMapping(value = ["/page-query-com"])
     fun pageQueryCom(@RequestBody request: SQueryRequest): SQueryResponse<EquipScanTaskQuery> {
         logger.debug("EquipScanTaskQuery =${request.toJson()}")
-//        val equipScanTaskQueryService = SObjectService(SMybatisDao(EquipScanTaskQuery::class.java))
-        val withFilterList = ArrayList<SFilter>()
-        withFilterList.add(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString()))
-//        withFilterList.add(SFilter.lt(SLength("category"), 6))
-        return EquipScanTaskQueryService.pageQuery(request, withFilterList)
+        return EquipScanTaskQueryService.pageQueryTwo(request)
     }
 
     /**

+ 0 - 3
scanbuilding/src/main/kotlin/com/persagy/server/controller/task/ModelScanTaskController.kt

@@ -93,9 +93,6 @@ open class ModelScanTaskController {
     @PostMapping(value = ["/page-query-com"])
     fun pageQueryCom(@RequestBody request: SQueryRequest): SQueryResponse<ModelScanTaskQuery> {
         logger.debug("modelScanTaskQuery =${request.toJson()}")
-        val equipScanTaskQueryService = SObjectService(SMybatisDao(ModelScanTaskQuery::class.java))
-        val withFilterList = ArrayList<SFilter>()
-        withFilterList.add(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString()))
         return ModelScanTaskQueryService.pageQueryTwo(request)
     } // Function pageQuery()
 

+ 2 - 2
scanbuilding/src/main/kotlin/com/persagy/server/entities/Build.kt

@@ -45,12 +45,12 @@ class Build : SBaseEntity() {
     //@Pattern(regexp="Bd[0-9a-zA-Z]{13}", message="建筑ID格式不正确!")
     @Id
     @Column(name = "id")
-    var buildId: String? = null
+    var id: String? = null
 
     /** 建筑名称 */
     @Schema(description = "建筑名称")
     @Column(name = "name")
-    var buildName: String? = null
+    var name: String? = null
 
     /** 建筑ID */
     @Schema(description = "建筑ID")

+ 20 - 1
scanbuilding/src/main/kotlin/com/persagy/server/services/task/EquipScanTaskQueryService.kt

@@ -73,7 +73,26 @@ object EquipScanTaskQueryService : SObjectService<EquipScanTaskQuery>(SMybatisDa
         return pageQuery
     } // Fun
 
-
+    fun pageQueryTwo(request: SQueryRequest): SQueryResponse<EquipScanTaskQuery> {
+        val projectId = SPageContext.getHeader("projectId").toString()
+        val withFilterList = ArrayList<SFilter>()
+        withFilterList.add(SFilter.eq("projectId", SPageContext.getHeader("projectId").toString()))
+        val pageQuery = pageQuery(request, withFilterList)
+        if (!pageQuery.content.isNullOrEmpty()&&pageQuery.content!!.size>0){
+            for (content in pageQuery.content!!){
+                val exec = select(SFilter.eq("parentId", content.equipId!!),SFilter.eq("taskParentId", content.id!!)).exec()
+                if (exec.size>0){
+                    content.component = exec
+                }
+                val defClass =
+                    defClassService.select(SFilter.eq("projectId", projectId), SFilter.eq("code", content.classCode!!)).entity()
+                if (defClass!=null) {
+                    content.equipCategory = defClass
+                }
+            }
+        }
+        return pageQuery
+    } // Fun