Преглед на файлове

********************WX************************
字典接口

zhangweixin преди 4 години
родител
ревизия
4b0f441dd2
променени са 47 файла, в които са добавени 1624 реда и са изтрити 261 реда
  1. 1 1
      data-center/src/main/kotlin/com/persagy/server/DataCenterApp.kt
  2. 49 0
      data-center/src/main/kotlin/com/persagy/server/controllers/dict/DictControllers.kt
  3. 4 0
      data-center/src/main/kotlin/com/persagy/server/services/assistant/SchemeService.kt
  4. 237 0
      data-center/src/main/kotlin/com/persagy/server/services/dict/dictnew/DictDefClassService.kt
  5. 1 1
      data-center/src/main/resources/application-dev.yml
  6. 11 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/dao/mappers/SchemeMapper.kt
  7. 9 13
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefClass.kt
  8. 52 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefFuncId.kt
  9. 15 0
      data-core/src/main/kotlin/com/persagy/server/datacenter/models/requests/CategoryRequest.kt
  10. 19 2
      datasyn/src/main/kotlin/com/persagy/server/syn/controllers/DictControllers.kt
  11. 30 0
      datasyn/src/main/kotlin/com/persagy/server/syn/models/api/DictTypeApi.kt
  12. 162 30
      datasyn/src/main/kotlin/com/persagy/server/syn/models/response/A.java
  13. 44 0
      datasyn/src/main/kotlin/com/persagy/server/syn/models/response/DictGroupCategoryResponse.kt
  14. 341 5
      datasyn/src/main/kotlin/com/persagy/server/syn/services/dict/DClassDefService.kt
  15. 394 0
      datasyn/src/main/kotlin/com/persagy/server/syn/utils/ParamTools.kt
  16. 1 0
      labsl/build.gradle
  17. 3 3
      labsl/src/main/kotlin/com/persagy/server/labsl/LaBSLApp.kt
  18. 1 1
      labsl/src/main/kotlin/com/persagy/server/labsl/Swagger2Config.kt
  19. 1 9
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Anchor.kt
  20. 1 7
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/AttachObjectIds.kt
  21. 0 4
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Elements.kt
  22. 1 20
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Graph.kt
  23. 3 6
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/GraphCategory.kt
  24. 1 14
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Markers.kt
  25. 1 20
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Node.kt
  26. 0 4
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Pos.kt
  27. 1 16
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Relation.kt
  28. 0 3
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Size.kt
  29. 1 1
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/AnchorPub.kt
  30. 1 7
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/AttachObjectIdsPub.kt
  31. 0 4
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/ElementsPub.kt
  32. 1 19
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/GraphPub.kt
  33. 1 1
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/MarkersPub.kt
  34. 1 21
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/NodePub.kt
  35. 1 1
      labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/RelationPub.kt
  36. 14 17
      labsl/src/main/kotlin/com/persagy/server/labsl/services/GraphService.kt
  37. 1 0
      meiku/src/main/kotlin/com/persagy/server/meiku/MeiKuApp.kt
  38. 74 0
      meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuAnchorController.kt
  39. 13 6
      meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuController.kt
  40. 73 0
      meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuStateController.kt
  41. 0 8
      meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKu.kt
  42. 0 4
      meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKuAnchor.kt
  43. 0 4
      meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKuState.kt
  44. 0 2
      meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/ObjectCategory.kt
  45. 31 0
      meiku/src/main/kotlin/com/persagy/server/meiku/models/response/SCommonResponse.kt
  46. 28 6
      meiku/src/main/kotlin/com/persagy/server/meiku/services/MeiKuService.kt
  47. 1 1
      meiku/src/main/resources/application-prod.yml

+ 1 - 1
data-center/src/main/kotlin/com/persagy/server/DataCenterApp.kt

@@ -64,7 +64,7 @@ open class DataCenterApp : SpringBootServletInitializer() {
     @Suppress("MoveLambdaOutsideParentheses")
     open fun jsonHttpMessageConverters(): SJsonHttpMessageConverter {
         val fastConverter = SJsonHttpMessageConverter()
-        fastConverter.propertyNamingStrategy = com.alibaba.fastjson.PropertyNamingStrategy.PascalCase
+        fastConverter.propertyNamingStrategy = com.alibaba.fastjson.PropertyNamingStrategy.CamelCase
         return fastConverter
     } // Function fastJsonHttpMessageConverters()
 

+ 49 - 0
data-center/src/main/kotlin/com/persagy/server/controllers/dict/DictControllers.kt

@@ -0,0 +1,49 @@
+package com.persagy.server.controllers.dict
+
+import com.persagy.server.datacenter.models.entities.dictnew.DefClass
+import com.persagy.server.datacenter.models.entities.dictnew.DefFuncId
+import com.persagy.server.datacenter.models.requests.CategoryRequest
+import com.persagy.server.services.dict.dictnew.DictDefClassService
+import com.persagy.service.models.responses.SQueryResponse
+import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RequestBody
+import org.springframework.web.bind.annotation.RequestMapping
+import org.springframework.web.bind.annotation.RestController
+
+/**
+ * 字典
+ *
+ * @author  wx
+ * @date  2020/9/23 15:30
+ */
+@Api(tags = ["字典"])
+@RestController
+@RequestMapping("/dict")
+class DictControllers {
+
+    /**
+     * 字典查询所有设备类型、部件所有类型、系统类型、专业类型
+     *
+     * @param   type        查询信息条件
+     * @return              查询结果
+     */
+    @ApiOperation(value = "类型-字典查询所有设备类型、部件所有类型、系统类型、专业类型", notes = "输入设备类型:equipment,输入部件类型:component,输入系统类型:system,输入专业类型:major," +
+            "专业和系统:majorSystem,业务空间类型 space ,专业下的设备类型 majorEquipment ,设备和部件equipmentAndComponent,设备类型要以及对应的部件equipmentComponent ")
+    @PostMapping(value = ["/category"])
+    fun categoryQuery(@RequestBody categoryRequest: CategoryRequest): SQueryResponse<DefClass> {
+        return DictDefClassService.equipQuery(categoryRequest)
+    } // Function query()
+
+    /**
+     *
+     */
+    @ApiOperation(value ="查询项目下类型的信息点",notes = "")
+    @PostMapping(value = ["/query"])
+    fun categoryInfoQuery(@RequestBody categoryRequest: CategoryRequest): SQueryResponse<DefFuncId>{
+        return DictDefClassService.categoryInfoQuery(categoryRequest)
+    } //
+
+
+} // Class DictControllers

+ 4 - 0
data-center/src/main/kotlin/com/persagy/server/services/assistant/SchemeService.kt

@@ -150,4 +150,8 @@ open class SchemeService {
         }
     } // Fun
 
+    fun dictInfo(projectId: String, groupId: String,  code:String){
+        mapper.dictInfo(projectId,groupId,code)
+    } // Fun
+
 } // Class SchemeService

+ 237 - 0
data-center/src/main/kotlin/com/persagy/server/services/dict/dictnew/DictDefClassService.kt

@@ -0,0 +1,237 @@
+package com.persagy.server.services.dict.dictnew
+
+import com.persagy.database.SFilter
+import com.persagy.database.SPageQueryInfo
+import com.persagy.database.SQueryBuilder
+import com.persagy.mybatis.SMybatisDao
+import com.persagy.server.datacenter.models.entities.dictnew.*
+import com.persagy.server.datacenter.models.requests.CategoryRequest
+import com.persagy.server.services.assistant.SchemeService
+import com.persagy.service.SObjectService
+import com.persagy.service.SPageContext
+import com.persagy.service.models.enums.SResponseType
+import com.persagy.service.models.responses.SQueryResponse
+import com.persagy.service.utils.SSpringContextUtil
+
+/**
+ * 字典类型
+ * @author  wx
+ * @date  2020/9/23 15:43
+ */
+object DictDefClassService : SObjectService<DefClass>(SMybatisDao(DefClass::class.java)){
+
+    /** 自定义SQL 对象 */
+    val schemeService by lazy {
+        SSpringContextUtil.getBean(SchemeService::class.java) as SchemeService
+    }
+
+        /** 方案和项目的关系 */
+        private val dictSchemeAndProjectService = SObjectService(SMybatisDao(DictSchemeAndProject::class.java))
+        /** 方案下的类型 */
+        private val dictSchemeCategotyService = SObjectService(SMybatisDao(DictSchemeCategoty::class.java))
+        /** 项目所属的集团 */
+        private val dictProjectService = SObjectService(SMybatisDao(DictProject::class.java))
+        /** 平台集团对象类型 */
+        private val defClassService = SObjectService(SMybatisDao(DefClass::class.java))
+        /** 专业 */
+        private val dictMajorService = SObjectService(SMybatisDao(DictMajor::class.java))
+        /** 信息点 */
+        private val dictDefFuncId = SObjectService(SMybatisDao(DefFuncId::class.java))
+
+
+
+    /**
+     * 查询设备、部件、系统、专业类型
+     *
+     * @param   categoryRequest     类型查询对象
+     */
+    fun equipQuery(categoryRequest: CategoryRequest): SQueryResponse<DefClass> {
+        val sQueryResponse = SQueryResponse<DefClass>()
+        if (!categoryRequest.type.isNullOrEmpty()){
+            val projectId = SPageContext.getHeader("ProjectId")
+            var dictSchemeCategoryList = ArrayList<DefClass>()
+            // 查询项目所在的集团 然后取集团字典
+//        val dictSchemeAndProject = dictSchemeAndProjectService.select(SFilter.eq("projectId", projectId!!)).entity()
+            val dictProject = dictProjectService.select(SFilter.eq("id", projectId!!)).entity()
+            if (dictProject != null){
+                var queryBuilder : SQueryBuilder<DefClass>? = null
+                var pageInfo : SPageQueryInfo<DefClass>? = null
+                when (categoryRequest.type) {
+                    "equipment" -> {
+//                    queryBuilder = select(SFilter.eq(SLength("id"), 4), SFilter.not(SFilter.isNull("parentId")))
+//                    pageInfo = queryBuilder.pageQuery(1, 1000)
+
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.eq("parentCode","equipment"), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+
+                    }
+                    "component" -> {
+//                    queryBuilder = select(SFilter.eq(SLength("id"), 6), SFilter.not(SFilter.isNull("parentId")),
+//                        SFilter.not(SFilter.eq("parentId","Space")),SFilter.not(SFilter.eq("name","租户"))
+//                    )
+//                    pageInfo = queryBuilder.pageQuery(1, 1000)
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.eq("parentCode","component"), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                    }
+                    "system" -> {
+//                    queryBuilder = select(SFilter.eq(SLength("id"), 2), SFilter.not(SFilter.eq("parentId","AllProfessionalSystemEquipment")))
+//                    pageInfo = queryBuilder.pageQuery(1, 1000)
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.eq("parentCode","system"), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                    }
+                    "major" -> {
+//                    queryBuilder = select(SFilter.eq(SLength("id"), 2), SFilter.eq("parentId","AllProfessionalSystemEquipment"))
+////                    pageInfo = queryBuilder.pageQuery(1, 1000)
+                        val dictMajorList = dictMajorService.selectAll().exec()
+                        if (dictMajorList.size>0){
+                            for (dictMajor in dictMajorList){
+                                val defClass = DefClass()
+                                defClass.code = dictMajor.code
+                                defClass.name = dictMajor.name
+                                defClass.aliasName = dictMajor.aliasName
+                                defClass.aliasCode = dictMajor.aliasCode
+                                dictSchemeCategoryList.add(defClass)
+                            }
+                        }
+                    }
+                    "majorSystem" -> {
+//                    val listClassDef = DClassDefService.select(SFilter.eq("parentId", "AllProfessionalSystemEquipment")).exec()
+//                    for (classDef in listClassDef){
+//                        val exec = DClassDefService.select(SFilter.eq("parentId", classDef.id!!)).exec()
+//                        classDef.listClassDef = exec
+//                    }
+//                    pageInfo = SPageQueryInfo(1, 1000)
+//                    pageInfo.content  = listClassDef
+                        val dictMajorList = dictMajorService.selectAll().exec()
+                        if (dictMajorList.size>0){
+                            for (dictMajor in dictMajorList){
+                                val defClass = DefClass()
+                                defClass.code = dictMajor.code
+                                defClass.name = dictMajor.name
+                                defClass.aliasName = dictMajor.aliasName
+                                defClass.aliasCode = dictMajor.aliasCode
+                                val defClassList = defClassService.select(
+                                    SFilter.eq("parentCode", "system"), SFilter.eq("type", "group"),
+                                    SFilter.eq("groupId", dictProject.groupId!!), SFilter.eq("majorCode", defClass.code!!)
+                                ).exec()
+                                defClass.children = defClassList
+                                dictSchemeCategoryList.add(defClass)
+                            }
+                        }
+                    }
+                    "space" -> {
+                        /** 业务空间类型 */
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.eq("parentCode","space"), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                    }
+                    "majorEquipment" -> {
+                        val dictMajorList = dictMajorService.selectAll().exec()
+                        if (dictMajorList.size>0){
+                            for (dictMajor in dictMajorList){
+                                val defClass = DefClass()
+                                defClass.code = dictMajor.code
+                                defClass.name = dictMajor.name
+                                defClass.aliasName = dictMajor.aliasName
+                                defClass.aliasCode = dictMajor.aliasCode
+                                val defClassList = defClassService.select(
+                                    SFilter.eq("parentCode", "equipment"), SFilter.eq("type", "group"),
+                                    SFilter.eq("groupId", dictProject.groupId!!),SFilter.eq("majorCode", defClass.code!!)
+                                ).exec()
+                                defClass.children = defClassList
+                                dictSchemeCategoryList.add(defClass)
+                            }
+                        }
+                    }
+                    "equipmentAndComponent" -> {
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.or(SFilter.eq("parentCode","component"),SFilter.eq("parentCode","equipment")), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                    }
+                    "equipmentComponent" ->{
+                        dictSchemeCategoryList = defClassService.select(
+                            SFilter.eq("parentCode","equipment"), SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                        val defClassList = defClassService.select(
+                            SFilter.eq("parentCode", "component"),
+                            SFilter.eq("type", "group"),
+                            SFilter.eq("groupId", dictProject.groupId!!)
+                        ).exec()
+                        if (dictSchemeCategoryList.size > 0){
+                            for (dictSchemeCategory in dictSchemeCategoryList){
+                                var list = ArrayList<DefClass>()
+                                for (defClass in defClassList){
+                                    if (defClass.equipmentCode == dictSchemeCategory.code){
+                                        list.add(defClass)
+                                    }
+                                }
+                                if (list.size>0){
+                                    dictSchemeCategory.children = list
+                                }
+                            }
+                        }
+                    }
+                }
+                sQueryResponse.result = SResponseType.success
+                sQueryResponse.content = dictSchemeCategoryList
+                sQueryResponse.total = dictSchemeCategoryList.size.toLong()
+            }
+        }else{
+            sQueryResponse.result = SResponseType.failure
+            sQueryResponse.message = "请输入查询类型"
+        }
+        return sQueryResponse
+    } // Fun equipQuery()
+
+    /**
+     * 查询项目下对象类型对应的信息点
+     */
+    fun categoryInfoQuery(categoryRequest: CategoryRequest): SQueryResponse<DefFuncId> {
+        val projectId = SPageContext.getHeader("ProjectId")
+        val sQueryResponse = SQueryResponse<DefFuncId>()
+        if (!categoryRequest.type.isNullOrEmpty()){
+            val dictProject = dictProjectService.select(SFilter.eq("id", projectId!!)).entity()
+            if (dictProject!=null){
+                val dictDefFuncBuilder = dictDefFuncId.select(
+                    SFilter.eq("projectId", projectId),
+                    SFilter.eq("groupId", dictProject.groupId!!),
+                    SFilter.eq("classCode", categoryRequest.type!!)
+                )
+                val dictDefFuncList = dictDefFuncBuilder.table("dict.def_funcid_project").order("sort").exec()
+                if (dictDefFuncList.size>0){
+                    sQueryResponse.content = dictDefFuncList
+                    sQueryResponse.total = dictDefFuncList.size.toLong()
+                }else{
+                    schemeService.dictInfo(projectId,dictProject.groupId!!,categoryRequest.type!!)
+                    val dictDefFuncBuilder = dictDefFuncId.select(
+                        SFilter.eq("projectId", projectId),
+                        SFilter.eq("groupId", dictProject.groupId!!),
+                        SFilter.eq("classCode", categoryRequest.type!!)
+                    )
+                    val dictDefFuncList = dictDefFuncBuilder.table("dict.def_funcid_project").order("sort").exec()
+                    sQueryResponse.content = dictDefFuncList
+                    sQueryResponse.total = dictDefFuncList.size.toLong()
+                }
+                sQueryResponse.result = SResponseType.success
+            }else{
+                sQueryResponse.result = SResponseType.failure
+            }
+        }else {
+            sQueryResponse.result = SResponseType.failure
+        }
+        return sQueryResponse
+    } // Fun categoryInfoQuery()
+
+
+
+
+} // Object DictDefClassService

+ 1 - 1
data-center/src/main/resources/application-dev.yml

@@ -34,7 +34,7 @@ spring:
     type:                               com.alibaba.druid.pool.DruidDataSource
     driver-class-name:                  org.postgresql.Driver
 #    url:                                jdbc:postgresql://60.205.177.43:5432/datacenter
-    url:                                jdbc:postgresql://47.94.89.44:5432/datacenter
+    url:                                jdbc:postgresql://60.205.177.43:5432/datacenter
     username:                           postgres
     password:                           123qwe!@#
 

Файловите разлики са ограничени, защото са твърде много
+ 11 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/dao/mappers/SchemeMapper.kt


+ 9 - 13
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefClass.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.datacenter.models.entities.dictnew
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -17,61 +16,58 @@ import javax.persistence.Table
 @Table(name = "dict.def_class")
 class DefClass : SBaseEntity(){
 
+    /** 全局id */
+    @ApiModelProperty(value = "全局id")
+    @Id
+    @Column(name = "id")
+    var  id: Int? = null
+
     /** 编码 */
     @ApiModelProperty(value = "编码")
-    @Id
     @Column(name = "code")
-    @JSONField(name = "Code")
     var  code: String? = null
 
     @ApiModelProperty(value = "名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     @ApiModelProperty(value = "别编码")
     @Column(name = "alias_code")
-    @JSONField(name = "AliasCode")
     var aliasCode: String? = null
 
     @ApiModelProperty(value = "别编名")
     @Column(name = "alias_name")
-    @JSONField(name = "AliasName")
     var aliasName: String? = null
 
     @ApiModelProperty(value = "分类:common平台级, group集团级, project项目级")
     @Column(name = "type")
-    @JSONField(name = "Type")
     var type: String? = null
 
     @ApiModelProperty(value = "集团id, 默认为 '0' ")
     @Column(name = "group_id")
-    @JSONField(name = "GroupId")
     var groupId: String? = ""
 
     @ApiModelProperty(value = "项目id, 默认为 '0' ")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
     var projectId: String? = ""
 
     @ApiModelProperty(value = "上级类型编码")
     @Column(name = "parent_code")
-    @JSONField(name = "ParentCode")
     var parentCode: String? = null
 
     @ApiModelProperty(value = "专业编码")
     @Column(name = "major_code")
-    @JSONField(name = "MajorCode")
     var majorCode: String? = null
 
     @ApiModelProperty(value = "系统编码")
     @Column(name = "system_code")
-    @JSONField(name = "SystemCode")
     var systemCode: String? = null
 
     @ApiModelProperty(value = "部件所属的设备类型")
     @Column(name = "equipment_code")
-    @JSONField(name = "EquipmentCode")
     var equipmentCode: String? = null
 
+    @ApiModelProperty(value = "子列表")
+    var children:ArrayList<DefClass>? = null
+
 } // Class DefClass

+ 52 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/entities/dictnew/DefFuncId.kt

@@ -97,12 +97,24 @@ class DefFuncId: Serializable {
     @JSONField(name = "FirstTag")
     var firstTag: String? = null
 
+    /** 一级名称 */
+    @ApiModelProperty(value = "一级名称")
+    @Column(name = "first_name")
+    @JSONField(name = "FirstName")
+    var firstName: String? = null
+
     /** 二级标签 */
     @ApiModelProperty(value = "二级标签")
     @Column(name = "second_tag")
     @JSONField(name = "SecondTag")
     var secondTag: String? = null
 
+    /** 二级名称 */
+    @ApiModelProperty(value = "二级名称")
+    @Column(name = "second_name")
+    @JSONField(name = "SecondName")
+    var secondName: String? = null
+
     /** 序列 */
     @ApiModelProperty(value = "序列")
     @Column(name = "idx")
@@ -157,4 +169,44 @@ class DefFuncId: Serializable {
     @JSONField(name = "Readonly")
     var readonly: Boolean? = null
 
+    /** 排序 */
+    @ApiModelProperty(value = "排序")
+    @Column(name = "sort")
+    @JSONField(name = "Sort")
+    var sort: Int? = null
+
+    /** 是否显示 */
+    @ApiModelProperty(value = "是否显示")
+    @Column(name = "visible")
+    @JSONField(name = "Visible")
+    var visible: Boolean? = null
+
+    /** 是否编辑 */
+    @ApiModelProperty(value = "是否编辑")
+    @Column(name = "editable")
+    @JSONField(name = "Editable")
+    var editable: Boolean? = null
+
+    /** 禁止操作 */
+    @ApiModelProperty(value = "禁止操作")
+    @Column(name = "un_disabled")
+    @JSONField(name = "UnDisabled")
+    var unDisabled: Boolean? = null
+
+    /** 路径 */
+    @ApiModelProperty(value = "路径")
+    @JSONField(name = "Path")
+    var path: String? = null
+        get() {
+            return if (firstName == "基本信息"|| firstName.isNullOrEmpty()){
+                code
+            }else{
+                if (secondTag.isNullOrEmpty()){
+                    "$firstTag.$code"
+                }else{
+                    "$firstTag.$secondTag.$code"
+                }
+            }
+        }
+
 } // Class DefFuncid

+ 15 - 0
data-core/src/main/kotlin/com/persagy/server/datacenter/models/requests/CategoryRequest.kt

@@ -0,0 +1,15 @@
+package com.persagy.server.datacenter.models.requests
+
+import java.io.Serializable
+
+/**
+ * 字典类型请求体
+ * @author  wx
+ * @date  2020/9/23 19:53
+ */
+class CategoryRequest: Serializable {
+
+    /** 类型 */
+    var type: String? = null
+
+} // Class CategoryRequest

+ 19 - 2
datasyn/src/main/kotlin/com/persagy/server/syn/controllers/DictControllers.kt

@@ -84,7 +84,7 @@ class DictControllers {
      * 集团方案对象类型
      */
     @ApiOperation(value = "007、集团方案对象类型-存入数据中心", notes = "",position = 2)
-    @GetMapping(value = ["/dict-scheme-categoty"])
+    @GetMapping(value = ["/dict-scheme-category"])
     fun dictSchemeCategoty(): SBaseResponse {
         return DClassDefService.dictSchemeCategoty()
     } // Fun dictSchemeCategoty()
@@ -93,7 +93,7 @@ class DictControllers {
      * 集团方案对象类型
      */
     @ApiOperation(value = "008、集团方案对象的信息点-存入数据中心", notes = "",position = 2)
-    @GetMapping(value = ["/dict-scheme-categoty-info"])
+    @GetMapping(value = ["/dict-scheme-category-info"])
     fun dictSchemeCategotyInfo(): SBaseResponse {
         return DClassDefService.dictSchemeCategotyInfo()
     } // Fun dictSchemeCategoty()
@@ -107,5 +107,22 @@ class DictControllers {
         return DClassDefService.dictSchemeAndProject()
     } // Fun dictSchemeAndProject()
 
+    /**
+     * 集团字典-对象类型
+     */
+    @ApiOperation(value = "010、集团字典对象类型-存入数据中心", notes = "",position = 2)
+    @GetMapping(value = ["/dict-group-category"])
+    fun dictGroup(): SBaseResponse{
+        return DClassDefService.dictGroup()
+    } // Fun dictGroup()
+
+    /**
+     * 集团字典-对象信息点
+     */
+    @ApiOperation(value = "011、集团字典-对象信息点-存入数据中心", notes = "",position = 2)
+    @GetMapping(value = ["/dict-group-info"])
+    fun dictGroupInfo(): SBaseResponse{
+        return DClassDefService.dictGroupInfo()
+    } // Fun dictGroupInfo()
 
 } // Class DictControllers

+ 30 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/models/api/DictTypeApi.kt

@@ -216,4 +216,34 @@ object DictTypeApi {
         return ArrayList()
     } // dictSchemeAndProject()
 
+    /**
+     * 集团字典类型
+     */
+    fun dictGroup(groupId: String): ArrayList<DictPlatformType>{
+        val url = "${opts.dataPlatform}/dict/class/query?groupId=$groupId"
+
+        val dictGroupCategoryResponse = SHttpUtil.getObject<DictPlatformTypeResponse>(url)
+        if (dictGroupCategoryResponse.result == opts.SUCCESS_CODE) {
+            if (!dictGroupCategoryResponse.data.isNullOrEmpty()){
+                return dictGroupCategoryResponse.data!!
+            }
+        }
+        return ArrayList()
+    } // dictGroup()
+
+    /**
+     * 集团下对象信息点
+     */
+    fun dictGroupInfo(groupId: String,code: String): ArrayList<DictPlatformInfo>{
+        val url = "${opts.dataPlatform}/dict/funcid?groupId=$groupId&classCode=$code"
+        val dictPlatformInfoResponse = SHttpUtil.getObject<DictPlatformInfoResponse>(url)
+        if (dictPlatformInfoResponse.result == opts.SUCCESS_CODE) {
+            if (!dictPlatformInfoResponse.data.isNullOrEmpty()){
+                return dictPlatformInfoResponse.data!!
+            }
+        }
+        return ArrayList()
+    } // Fun dictGroupInfo()
+
+
 } // Object DictTypeApi

Файловите разлики са ограничени, защото са твърде много
+ 162 - 30
datasyn/src/main/kotlin/com/persagy/server/syn/models/response/A.java


+ 44 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/models/response/DictGroupCategoryResponse.kt

@@ -0,0 +1,44 @@
+package com.persagy.server.syn.models.response
+
+import java.io.Serializable
+
+/**
+ * 集团字典类型
+ *
+ * @author  wx
+ * @date  2020/9/21 16:43
+ */
+class DictGroupCategoryResponse: Serializable {
+
+     var result: String? = null
+     var data: ArrayList<DataBean>? = null
+
+    class DataBean {
+
+        var code: String? = null
+        var name: String? = null
+        var aliasCode: String? = null
+        var aliasName: String? = null
+        var children: List<ChildrenBeanX>? = null
+
+        class ChildrenBeanX {
+
+            var code: String? = null
+            var name: String? = null
+            var aliasCode: String? = null
+            var aliasName: String? = null
+            var children: List<ChildrenBean>? = null
+
+            class ChildrenBean {
+
+                var code: String? = null
+                var name: String? = null
+                var aliasCode: String? = null
+                var aliasName: String? = null
+                var parentCode: String? = null
+                var majorCode: String? = null
+            }
+        }
+    }
+
+} // Class DictGroupCategoryResponse

+ 341 - 5
datasyn/src/main/kotlin/com/persagy/server/syn/services/dict/DClassDefService.kt

@@ -6,6 +6,7 @@ import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.datacenter.models.entities.dict.DClassDef
 import com.persagy.server.datacenter.models.entities.dictnew.*
 import com.persagy.server.syn.models.api.DictTypeApi
+import com.persagy.server.syn.utils.ParamTools
 import com.persagy.service.SBaseService
 import com.persagy.service.SObjectService
 import com.persagy.service.models.enums.SResponseType
@@ -116,7 +117,7 @@ object DClassDefService : SObjectService<DClassDef>(SMybatisDao(DClassDef::class
         val sBaseResponse = SBaseResponse()
         val dictPlatformList = DictTypeApi.dictPlatform()
         if (dictPlatformList.size>0){
-            defClassService.deleteAll()
+            defClassService.delete(SFilter.eq("type","common"))
             for (dictPlatform in dictPlatformList){
                 val defClass = DefClass()
                 defClass.aliasCode = dictPlatform.aliasCode
@@ -146,19 +147,96 @@ object DClassDefService : SObjectService<DClassDef>(SMybatisDao(DClassDef::class
         val sBaseResponse = SBaseResponse()
         val defClassList = defClassService.select(SFilter.eq("type", "common")).exec()
         if (defClassList.size>0){
-            defFuncIdService.delete(SFilter.eq("type", "common"))
+//            defFuncIdService.delete(SFilter.eq("groupId", "0"))
             for (defClass in defClassList){
                 val dictPlatformInfoList = DictTypeApi.dictPlatformInfo(defClass.code!!, defClass.type!!)
+                defFuncIdService.delete(SFilter.eq("classCode", defClass.code!!),SFilter.eq("groupId", "0"))
                 if (!dictPlatformInfoList.isNullOrEmpty()){
                     for (dictPlatformInfo in dictPlatformInfoList){
+                        /** 开头字母大写转小写 */
+                        val str1: String = dictPlatformInfo.code!!.substring(0, 1).toLowerCase() //直接bai将du字符zhi串第一个不管是数字还是字母都小写
+                        val str2: String = dictPlatformInfo.code!!.substring(1, dictPlatformInfo.code!!.length) //截取字符串第二个以后
+                        var str=str1+str2
                         val defFuncId = DefFuncId()
                         defFuncId.canSub = dictPlatformInfo.canSub
                         defFuncId.category = dictPlatformInfo.category
                         defFuncId.classCode = defClass.code
-                        defFuncId.code = dictPlatformInfo.code
+                        if (str == "equipLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "equipLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "sysLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "sysLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "tenantLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str =="tenantLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "roomLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "roomLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "shaftLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "shaftLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "shaftID"){
+                            defFuncId.code = "id"
+                        }else if (str == "shaftName"){
+                            defFuncId.code = "name"
+                        }else if (str == "equipID"){
+                            defFuncId.code = "id"
+                        }else if (str == "equipName"){
+                            defFuncId.code = "name"
+                        }else if (str == "sysID"){
+                            defFuncId.code = "id"
+                        }else if (str == "sysName"){
+                            defFuncId.code = "name"
+                        }else if (str == "tenantID"){
+                            defFuncId.code = "id"
+                        }else if (str == "tenantName"){
+                            defFuncId.code = "name"
+                        }else if (str == "roomID"){
+                            defFuncId.code = "id"
+                        }else if (str == "roomName"){
+                            defFuncId.code = "name"
+                        }else if (str == "projID"){
+                            defFuncId.code = "id"
+                        }else if (str == "projName"){
+                            defFuncId.code = "name"
+                        }else if (str == "projLocalName"){
+                            defFuncId.code = "localId"
+                        }else if (str == "projLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "flootID"){
+                            defFuncId.code = "id"
+                        }else if (str == "flootName"){
+                            defFuncId.code = "name"
+                        }else if (str == "floorLocalName"){
+                            defFuncId.code = "localId"
+                        }else if (str == "floorLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "buildID"){
+                            defFuncId.code = "id"
+                        }else if (str == "buildName"){
+                            defFuncId.code = "name"
+                        }else if (str == "buildLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "buildLocalName"){
+                            defFuncId.code = "localName"
+                        }else{
+                            defFuncId.code = str
+                        }
+
+
+
                         defFuncId.dataSource = dictPlatformInfo.dataSource
                         defFuncId.dataType = dictPlatformInfo.dataType
-                        defFuncId.firstTag = dictPlatformInfo.firstTag
+                        defFuncId.firstName = dictPlatformInfo.firstTag
+                        if (!dictPlatformInfo.firstTag.isNullOrEmpty()){
+                            defFuncId.firstTag = ParamTools.TwoLevelCode(dictPlatformInfo.firstTag!!)
+                        }
                         defFuncId.formater = dictPlatformInfo.formater
                         defFuncId.groupId = if (dictPlatformInfo.groupId.isNullOrEmpty()) "0" else dictPlatformInfo.groupId
                         defFuncId.idx = dictPlatformInfo.idx
@@ -170,10 +248,60 @@ object DClassDefService : SObjectService<DClassDef>(SMybatisDao(DClassDef::class
                         defFuncId.priority = dictPlatformInfo.priority
                         defFuncId.projectId = if (dictPlatformInfo.projectId.isNullOrEmpty()) "0" else dictPlatformInfo.projectId
                         defFuncId.readonly = dictPlatformInfo.readonly
-                        defFuncId.secondTag = dictPlatformInfo.secondTag
+                        defFuncId.secondName = dictPlatformInfo.secondTag
+                        if (!dictPlatformInfo.secondTag.isNullOrEmpty()){
+                            defFuncId.secondTag = ParamTools.TwoLevelCode(dictPlatformInfo.secondTag!!)
+                        }
                         defFuncId.subFlag = dictPlatformInfo.subFlag
                         defFuncId.type = dictPlatformInfo.dataType
                         defFuncId.unit = dictPlatformInfo.unit
+
+                        if (!defFuncId.name.isNullOrEmpty()){
+                            /** 排序 */
+                            if (defFuncId.name!! == "设备本地编码"||defFuncId.name!! == "楼层本地编码"){
+                                defFuncId.sort = 1
+                            }else if (defFuncId.name!! == "设备本地名称"|| defFuncId.name!! == "楼层本地名称"){
+                                defFuncId.sort = 2
+                            }else if (defFuncId.name!! == "设备二维码图片"){
+                                defFuncId.sort = 3
+                            }else if (defFuncId.name!! == "设计图纸中编码"){
+                                defFuncId.sort = 4
+                            }else if (defFuncId.name!! == "设备ID"){
+                                defFuncId.sort = 101
+                            }else if (defFuncId.name!! == "设备名称"){
+                                defFuncId.sort = 102
+                            }else if (defFuncId.name!! == "BIM模型中编码"){
+                                defFuncId.sort = 103
+                            }else if (defFuncId.name!! == "BIM模型中坐标"){
+                                defFuncId.sort = 104
+                            }else if (defFuncId.firstName != null&& defFuncId.firstName == "台账参数"){
+                                defFuncId.sort = 10
+                            }else if(defFuncId.firstName != null&& defFuncId.firstName == "通讯参数"){
+                                defFuncId.sort = 20
+                            }else {
+                                defFuncId.sort = 60
+                            }
+                        }
+
+                        val dicConfigureEditable = ParamTools.dicConfigureEditable()
+                        val containsKey = dicConfigureEditable.containsKey(defFuncId.code!!)
+                        if (containsKey){
+                            defFuncId.editable = false
+                            defFuncId.unDisabled = false
+                            defFuncId.visible = false
+                        }
+
+
+                        val dicConfigure = ParamTools.dicConfigure()
+                        if (defFuncId.code!=null){
+                            val containsKey = dicConfigure.containsKey(defFuncId.code!!)
+                            if (containsKey){
+                                defFuncId.editable = true
+                                defFuncId.unDisabled = false
+                                defFuncId.visible = true
+                            }
+                        }
+
                         defFuncIdService.insert(defFuncId)
                     }
                 }
@@ -326,6 +454,214 @@ object DClassDefService : SObjectService<DClassDef>(SMybatisDao(DClassDef::class
         return  sBaseResponse
     } // Fun dictSchemeAndProject()
 
+    /**
+     * 集团下的对象类型
+     */
+    fun dictGroup(): SBaseResponse{
+        val sBaseResponse = SBaseResponse()
+        val groupList = groupService.selectAll().exec()
+        if (groupList.size>0){
+            for (group in groupList){
+                val dictGroupList = DictTypeApi.dictGroup(group.id!!)
+                if (dictGroupList.size>0){
+                    defClassService.delete(SFilter.eq("type","group"),SFilter.eq("groupId",group.id!!))
+                    for (dictGroup in dictGroupList){
+                        val defClass = DefClass()
+                        defClass.aliasCode = dictGroup.aliasCode
+                        defClass.aliasName = dictGroup.aliasName
+                        defClass.code = dictGroup.code
+                        defClass.equipmentCode = dictGroup.equipmentCode
+                        defClass.groupId = group.id
+                        defClass.majorCode = dictGroup.majorCode
+                        defClass.name = dictGroup.name
+                        defClass.parentCode = dictGroup.parentCode
+                        defClass.projectId = "0"
+                        defClass.systemCode = dictGroup.systemCode
+                        defClass.type = "group"
+                        defClassService.replace(defClass)
+                    }
+                }
+            }
+            sBaseResponse.result = SResponseType.failure
+        }else{
+            sBaseResponse.result = SResponseType.success
+        }
+        return sBaseResponse
+    } // Fun
+
+    /**
+     * 集团下对象信息点
+     */
+    fun dictGroupInfo(): SBaseResponse{
+        val sBaseResponse = SBaseResponse()
+        val defClassList = defClassService.select(SFilter.eq("type", "group")).exec()
+        if (defClassList.size>0){
+            for (defClass in defClassList){
+                val dictGroupInfoList = DictTypeApi.dictGroupInfo(defClass.groupId!!, defClass.code!!)
+                defFuncIdService.delete(SFilter.eq("groupId",defClass.groupId!!),SFilter.eq("classCode",defClass.code!!))
+                if (dictGroupInfoList.size>0){
+                    for (dictGroupInfo in dictGroupInfoList){
+                        /** 开头字母大写转小写 */
+                        val str1: String = dictGroupInfo.code!!.substring(0, 1).toLowerCase() //直接bai将du字符zhi串第一个不管是数字还是字母都小写
+                        val str2: String = dictGroupInfo.code!!.substring(1, dictGroupInfo.code!!.length) //截取字符串第二个以后
+                        var str=str1+str2;
+                        val defFuncId = DefFuncId()
+
+                        if (str == "equipLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "equipLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "sysLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "sysLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "tenantLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str =="tenantLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "roomLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "roomLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "shaftLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "shaftLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "shaftID"){
+                            defFuncId.code = "id"
+                        }else if (str == "shaftName"){
+                            defFuncId.code = "name"
+                        }else if (str == "equipID"){
+                            defFuncId.code = "id"
+                        }else if (str == "equipName"){
+                            defFuncId.code = "name"
+                        }else if (str == "sysID"){
+                            defFuncId.code = "id"
+                        }else if (str == "sysName"){
+                            defFuncId.code = "name"
+                        }else if (str == "tenantID"){
+                            defFuncId.code = "id"
+                        }else if (str == "tenantName"){
+                            defFuncId.code = "name"
+                        }else if (str == "roomID"){
+                            defFuncId.code = "id"
+                        }else if (str == "roomName"){
+                            defFuncId.code = "name"
+                        }else if (str == "projID"){
+                            defFuncId.code = "id"
+                        }else if (str == "projName"){
+                            defFuncId.code = "name"
+                        }else if (str == "projLocalName"){
+                            defFuncId.code = "localId"
+                        }else if (str == "projLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "flootID"){
+                            defFuncId.code = "id"
+                        }else if (str == "flootName"){
+                            defFuncId.code = "name"
+                        }else if (str == "floorLocalName"){
+                            defFuncId.code = "localId"
+                        }else if (str == "floorLocalName"){
+                            defFuncId.code = "localName"
+                        }else if (str == "buildID"){
+                            defFuncId.code = "id"
+                        }else if (str == "buildName"){
+                            defFuncId.code = "name"
+                        }else if (str == "buildLocalID"){
+                            defFuncId.code = "localId"
+                        }else if (str == "buildLocalName"){
+                            defFuncId.code = "localName"
+                        }else{
+                            defFuncId.code = str
+                        }
+
+
+                        defFuncId.canSub = dictGroupInfo.canSub
+                        defFuncId.category = dictGroupInfo.category
+                        defFuncId.classCode = defClass.code
+//                        defFuncId.code = str
+                        defFuncId.dataSource = dictGroupInfo.dataSource
+                        defFuncId.dataType = dictGroupInfo.dataType
+                        if (!dictGroupInfo.firstTag.isNullOrEmpty()){
+                            defFuncId.firstTag = ParamTools.TwoLevelCode(dictGroupInfo.firstTag!!)
+                        }
+                        defFuncId.firstName = dictGroupInfo.firstTag
+                        defFuncId.formater = dictGroupInfo.formater
+                        defFuncId.groupId = defClass.groupId
+                        defFuncId.idx = dictGroupInfo.idx
+                        defFuncId.inputMode = dictGroupInfo.inputMode
+                        defFuncId.isMultiple = dictGroupInfo.isMultiple
+                        defFuncId.isRegion = dictGroupInfo.isRegion
+                        defFuncId.name = dictGroupInfo.name
+                        logger.debug("name: ${ dictGroupInfo.name} *******************************************************")
+                        defFuncId.note = dictGroupInfo.note
+                        defFuncId.priority = dictGroupInfo.priority
+                        defFuncId.projectId = if (dictGroupInfo.projectId.isNullOrEmpty()) "0" else dictGroupInfo.projectId
+                        defFuncId.readonly = dictGroupInfo.readonly
+                        if (!dictGroupInfo.secondTag.isNullOrEmpty()){
+                            defFuncId.secondTag = ParamTools.TwoLevelCode(dictGroupInfo.secondTag!!)
+                        }
+                        defFuncId.secondName = dictGroupInfo.secondTag
+                        defFuncId.subFlag = dictGroupInfo.subFlag
+                        defFuncId.type = dictGroupInfo.dataType
+                        defFuncId.unit = dictGroupInfo.unit
+
+
+                        if (!defFuncId.name.isNullOrEmpty()){
+                            /** 排序 */
+                            if (defFuncId.name!! == "设备本地编码"||defFuncId.name!! == "楼层本地编码"){
+                                defFuncId.sort = 1
+                            }else if (defFuncId.name!! == "设备本地名称"|| defFuncId.name!! == "楼层本地名称"){
+                                defFuncId.sort = 2
+                            }else if (defFuncId.name!! == "设备二维码图片"){
+                                defFuncId.sort = 3
+                            }else if (defFuncId.name!! == "设计图纸中编码"){
+                                defFuncId.sort = 4
+                            }else if (defFuncId.name!! == "设备ID"){
+                                defFuncId.sort = 101
+                            }else if (defFuncId.name!! == "设备名称"){
+                                defFuncId.sort = 102
+                            }else if (defFuncId.name!! == "BIM模型中编码"){
+                                defFuncId.sort = 103
+                            }else if (defFuncId.name!! == "BIM模型中坐标"){
+                                defFuncId.sort = 104
+                            }else if (defFuncId.firstName != null&& defFuncId.firstName == "台账参数"){
+                                defFuncId.sort = 10
+                            }else if(defFuncId.firstName != null&& defFuncId.firstName == "通讯参数"){
+                                defFuncId.sort = 20
+                            }else {
+                                defFuncId.sort = 60
+                            }
+                        }
+
+                        val dicConfigureEditable = ParamTools.dicConfigureEditable()
+                        val containsKey = dicConfigureEditable.containsKey(defFuncId.code!!)
+                        if (containsKey){
+                            defFuncId.editable = false
+                            defFuncId.unDisabled = false
+                            defFuncId.visible = false
+                        }
+
+                        val dicConfigure = ParamTools.dicConfigure()
+                        if (defFuncId.code!=null){
+                            val containsKey = dicConfigure.containsKey(defFuncId.code!!)
+                            if (containsKey){
+                                defFuncId.editable = true
+                                defFuncId.unDisabled = false
+                                defFuncId.visible = true
+                            }
+                        }
+
+                        defFuncIdService.insert(defFuncId)
+                    }
+                }
+            }
+            sBaseResponse.result = SResponseType.failure
+        }else{
+            sBaseResponse.result = SResponseType.success
+        }
+        return sBaseResponse
+    } // Fun dictGroupInfo()
 
 
 } // Object DClassDefService

+ 394 - 0
datasyn/src/main/kotlin/com/persagy/server/syn/utils/ParamTools.kt

@@ -0,0 +1,394 @@
+package com.persagy.server.syn.utils
+
+import java.util.*
+
+/**
+ * 参数对比工具类
+ *
+ * @author 张维新
+ */
+object ParamTools {
+
+    /**
+     * 物理世界 一级二级标签 编码
+     *
+     * @param name  标签名称
+     */
+    fun TwoLevelCode(name: String): String? {
+        return when (name) {
+            /** 一级 */
+            "台账参数" -> "LedgerParam"
+            "通讯参数" -> "CommParam"
+            "技术参数" -> "TechParam"
+            "技术参数" -> "TechParam"
+            "运行参数" -> "RunParam"
+            "设定参数" -> "SettingParam"
+            "报警消息" -> "Alram"
+            "结构信息" -> "StructureInfo"
+            "人员信息" -> "PeopleInfo"
+            "地理位置" -> "GeoInfo"
+            "项目信息" -> "ProjectInfo"
+            "商业信息" -> "CommercialInfo"
+            "能源价格" -> "EnergyCost"
+            "室外环境" -> "OutdoorEnv"
+            "天气预报" -> "Weather"
+            "能耗信息" -> "ConsumptionInfo"
+            "建筑信息" -> "BuildingInfo"
+            "建筑文档" -> "BuildingDoc"
+            "工作历" -> "Schedule"
+            "环境参数" -> "EnvParam"
+            "租赁信息" -> "LeaseInfo"
+            "租户信息" -> "TenantInfo"
+            "温度传感器" -> "TempSensor"
+            "技术参数-通用" -> "TechParamGeneral"
+            "运行参数-通用" -> "RunParamGeneral"
+            "速度传感器" -> "SpeedSensor"
+            "声音传感器" -> "SoundSensor"
+            "湿度传感器" -> "HumiditySensor"
+            "压力传感器" -> "PressTransd"
+            "热量传感器" -> "HeatSensor"
+            "流量传感器" -> "FlowSensor"
+            "电度传感器" -> "ElectricitySensor"
+            "位移传感器" -> "DisplSensor"
+            "浓度传感器" -> "ConcentSensor"
+            "图像传感器" -> "ImageSensor"
+            "运行状态"   -> "RunningState"
+            "反馈参数"  ->  "FeedbackParam"
+            "人流量传感器" -> "ManFlowSensor"
+            "动态信息" -> "DynamicInfor"
+
+
+            /** 二级 */
+            "建筑类型" -> "BuildingType"
+            "设计指标" -> "DesignIndex"
+            "结构参数" -> "StructureParam"
+            "面积信息" -> "AreaInfo"
+            "工作作息" -> "WorkRest"
+            "电" -> "Electric"
+            "燃气" -> "Gas"
+            "燃油" -> "Fuel"
+            "自来水" -> "TapWater"
+            "供热" -> "HeatSupply"
+            "供冷" -> "Cooling"
+            "生活热水" -> "DomesticHotWater"
+            "季节" -> "Season"
+            "空气质量" -> "AirQuality"
+            "蒸汽" -> "Steam"
+            "未来第1天" -> "DayOne"
+            "未来第2天" -> "DayTwo"
+            "未来第3天" -> "DayThree"
+            "累计" -> "Cumulative"
+            "逐时" -> "Hourly"
+            "风速" -> "WindSpeed"
+            "声强" -> "SoundIntensity"
+            "光照" -> "Illumination"
+            "温湿度" -> "TemperatureHumidity"
+            "加热器" -> "Heater"
+            "技术参数-噪声传感器" -> "NoiseSensor"
+            "无负压稳流机组" -> "PressureSteadyFlow"
+            "保险文件" -> "InsuranceDoc"
+            "发射指标" -> "LaunchIndex"
+            "毛发过滤器" -> "HairFilter"
+            "压缩机" -> "Compressor"
+            "烟气余热回收装置" -> "FlueGasWasteHeat"
+            "膜处理系统" -> "MembraneProcessingSystem"
+            "制动器" -> "Brake"
+            "矩阵" -> "Matrix"
+            "CPU状态" -> "CPUStates"
+            "制冷工况" -> "RefrigCondition"
+            "分支分配器" -> "BranchDis"
+            "接线端子" -> "ConnectionTerminal"
+            "输入" -> "Input"
+            "漏电保护器" -> "LeakageProtector"
+            "发热地膜设备" -> "FeverFilmEquip"
+            "传输" -> "transmission"
+            "整体" -> "Whole"
+            "龙骨" -> "keel"
+            "清水灭火器" -> "CleanWaterExting"
+            "扁圆形风管" -> "FlatCircularDuct"
+            "电加热" -> "ElectricHeating"
+            "隔离/接地开关" -> "EarthingSwitch"
+            "调节池" -> "RegulatingPool"
+            "送风段" -> "AirSupply"
+            "租户管理" -> "TenantManag"
+            "通用电气指标" -> "GeneralElecIndex"
+            "热回收段" -> "HeatRecoverySection"
+            "备用电源" -> "EmergencySupply"
+            "软件系统" -> "SoftwareSystem"
+            "协议" -> "Agreement"
+            "冷凝器" -> "condenser"
+            "卤代烷灭火器" -> "HalogAgentExting"
+            "加湿段" -> "HumidSection"
+            "CD录放盘" -> "CDRecording"
+            "泡沫灭火器" -> "FoamExtinguisher"
+            "辅助设备" -> "AuxiliaryEquip"
+            "客流探测" -> "PasseFlowDetec"
+            "设备厂家" -> "EquipManufactor"
+            "技术参数-热电偶温度传感器" -> "ThermTemperSensor"
+            "水地暖设备" -> "WaterHeatingEquip"
+            "柴油机" -> "DieselEngine"
+            "排水" -> "Drainage"
+            "通讯地址" -> "PostalAddress"
+            "混合器" -> "Mixer"
+            "性能" -> "performance"
+            "运行维保" -> "OperationMainte"
+            "核心层" -> "CoreLayer"
+            "发热电缆设备" -> "ThermCableEquip"
+            "车库出入口" -> "GarageEntraExit"
+            "整机" -> "CompleteMachine"
+            "电流" -> "ElectricCurrent"
+            "供应购买" -> "SupplyPurchase"
+            "塑料管" -> "PlasticPipe"
+            "技术参数-录音" -> "SoundRecording"
+            "现场安装" -> "Siteinstall"
+            "技术参数" -> "TechParam"
+            "累计指标" -> "CumulaIndex"
+            "频率" -> "Freque"
+            "活性炭罐" -> "Canister"
+            "再热段" -> "ReheaSection"
+            "接口" -> "Interf"
+            "变频机组" -> "FrequeUnit"
+            "调节阀" -> "RegulValve"
+            "矩形风管" -> "RectDuct"
+            "减速器" -> "Retarder"
+            "加压泵" -> "PressPump"
+            "圆形风管" -> "CircularDuct"
+            "断路器" -> "CircuitBreaker"
+            "电压互感器" -> "VoltageTrans"
+            "止回阀" -> "CheckValve"
+            "园林" -> "Gardens"
+            "消毒设备" -> "DisinfeEquip"
+            "总体" -> "Population"
+            "发电机组" -> "GeneratorSet"
+            "表冷段" -> "SurfaceCoolSection"
+            "喷泉" -> "Fountain"
+            "低压" -> "LowPress"
+            "播放器" -> "Player"
+            "玻璃破碎探测器" -> "GlassCrushDetec"
+            "末端" -> "End"
+            "密码键盘" -> "PasswordKeyb"
+            "灯具" -> "LampsLanterns"
+            "网络" -> "Network"
+            "出口水质" -> "ExportWaterQuality"
+            "输出" -> "Output"
+            "排风" -> "ExhaustAir"
+            "视频式" -> "VideoType"
+            "显示屏" -> "Display"
+            "总谐波" -> "TotalHarmonic"
+            "混风段" -> "MixingSection"
+            "电梯" -> "Elevator"
+            "汇聚层" -> "DistriLayer"
+            "摄像头" -> "Camera"
+            "电池" -> "Battery"
+            "电流互感器" -> "CurrentTrans"
+            "技术参数-玻璃管式温度计" -> "GlassTubeTherm"
+            "显示" -> "Display"
+            "应急照明" -> "EmerLighting"
+            "技术参数-压力式温度计" -> "PressureThermo"
+            "空间辐射指标" -> "SpatialRadiIndex"
+            "照片文档" -> "PhotoDoc"
+            "其他设备" -> "OtherEquip"
+            "指纹识别仪" -> "FingerIdent"
+            "电压" -> "Voltage"
+            "开关状态" -> "SwitchingState"
+            "对讲系统" -> "IntercomSystem"
+            "反渗透" -> "ReverseOsmosis"
+            "电源" -> "PowerSupply"
+            "接入层" -> "AccessLayer"
+            "保温材料" -> "ThermalInsulMaterial"
+            "高频头" -> "Tuner"
+            "打印机" -> "Printer"
+            "碳晶地暖设备" -> "CarCryGroHeatEquip"
+            "干粉灭火器" -> "DryPowderExti"
+            "技术参数-电阻温度传感器" -> "ResisTempeSensor"
+            "瞬时参数" -> "InstantParam"
+            "运行参数" -> "RunParam"
+            "紫外线杀菌器" -> "UltravSteri"
+            "吸收器" -> "Absorber"
+            "前置功放" -> "Preamplifier"
+            "通用" -> "Currency"
+            "紫外线发生器" -> "UltravGener"
+            "技术参数-声音通用" -> "GeneralVoice"
+            "寻车" -> "CarSearching"
+            "排放标准" -> "EmissStand"
+            "水侧" -> "WaterSide"
+            "塔盘水位" -> "TrayWater"
+            "开关保护" -> "SwitchProte"
+            "太阳能" -> "SolarEnergy"
+            "蒸汽锅炉" -> "SteamBoiler"
+            "继电器" -> "Relay"
+            "疏散指示" -> "EvacuaInstr"
+            "车位" -> "ParkingLot"
+            "接收指标" -> "ReceiIndex"
+            "臭氧发生器" -> "OzoneGenerator"
+            "电视信号" -> "TVSignal"
+            "畸变率" -> "DistortRate"
+            "熔断器" -> "Fuse"
+            "风机" -> "Fan"
+            "技术参数-温度通用" -> "TempGeneral"
+            "蒸汽冷凝水回收装置" -> "SteamConde"
+            "内胆" -> "InternalBladder"
+            "累计参数" -> "CumuParam"
+            "主机" -> "Host"
+            "消毒剂" -> "Disinf"
+            "无线模块" -> "WirelessModule"
+            "安全阀" -> "SafetyValve"
+            "IC读卡机" -> "ICCardReader"
+            "终端设备" -> "TerminalEquip"
+            "无线" -> "Wireless"
+            "新风段" -> "FreshAir"
+            "触点" -> "Contact"
+            "低压断路器(空气开关)" -> "LowBreaker"
+            "前端" -> "FrontEnd"
+            "红外探测器" -> "InfraredDetector"
+            "供水" -> "WaterSupply"
+            "柴发机组" -> "ChaiFa"
+            "减压阀" -> "PressRreliefValve"
+            "提升泵" -> "LiftingPump"
+            "中水回用池" -> "ReclaWater"
+            "监视器" -> "Monitor"
+            "移动信号放大" -> "MobileSignal"
+            "软件厂家" -> "SoftwareManu"
+            "调制器" -> "Modulator"
+            "水质要求" -> "WaterQuality"
+            "接收器" -> "Receiver"
+            "二氧化碳灭火器" -> "CarbonExting"
+            "技术参数-红外测温仪" -> "InfraredTempInstru"
+            "光端机" -> "OpticalTerminal"
+            "水处理" -> "WaterTreatment"
+            "空气侧" -> "AirSide"
+            "热水锅炉" -> "HotWaterBoiler"
+            "基本设定参数" -> "BasicSetParam"
+            "蒸发器" -> "Evaporator"
+            "发生器" -> "Generator"
+            "高压" -> "HighPressure"
+            "过滤器" -> "Filter"
+            "节流元件" -> "ThrotElement"
+            "外壳" -> "Shell"
+            "瞬时状态" -> "InstanState"
+            "配电柜" -> "PowerCabinet"
+            "过滤段" -> "FilterSegment"
+            "负荷开关" -> "LoadSwitch"
+            "保护" -> "Protect"
+            "功能" -> "Function"
+            "保温层" -> "InsulLayer"
+            "制热工况" -> "HeatingCondi"
+            "接触器" -> "Contactor"
+            "沉淀池" -> "SedimenTank"
+            "身份证阅读器" -> "IDCardReader"
+            "软化器" -> "Softener"
+            "水泵" -> "WaterPump"
+            "技术参数-IC温度传感器" -> "ICTempSensor"
+            "组件" -> "Assembly"
+            "技术参数-热敏电阻温度传感器" -> "ThermTempeSensor"
+            "联轴器" -> "Coupling"
+            "集热板" -> "CollectorPlate"
+            "线圈" -> "Coil"
+            "功放" -> "PowerAmpli"
+            "嵌板" -> "Panel"
+            "盘管" -> "Conduits"
+            "换热器" -> "HeatExcha"
+            "盖板" -> "CoverPlate"
+            "VLAN" -> "Vlan"
+            "储水箱" -> "WaterStoragetank"
+            "施肥器" -> "FertiApplicator"
+            "其他" -> "Other"
+            "功率" -> "Power"
+            "关键指标" -> "KeyIndic"
+            "通断阀" -> "OnOffValve"
+            "细格栅" -> "FineScreens"
+            "电动机" -> "Motor"
+            "瞬时指标" -> "InstanIndex"
+            "压力" -> "Pressure"
+            "工作历信息" -> "WorkCalendar"
+            else -> {
+                ""
+            }
+        }
+    }
+
+    /**
+     *字典默认不显示
+     */
+    fun dicConfigureVisible():HashMap<String,Boolean>{
+        val map = HashMap<String,Boolean>()
+
+        return map
+    }
+
+    /**
+     * 默认不可编辑的
+     */
+    fun dicConfigureEditable():HashMap<String,Boolean>{
+        val map = HashMap<String,Boolean>()
+        map["ProjID"] = false
+        map["BuildID"] = false
+        map["FloorID"] = false
+
+        map["ShaftID"] = false
+        map["ShaftName"] = false
+
+        map["SysID"] = false
+        map["SysName"] = false
+
+        map["EquipID"] = false
+        map["EquipName"] = false
+        map["EquipQRCode"] = false
+        map["BIMID"] = false
+//        map["BIMLocation"] = false
+        map["QRCodePic"] = false
+        map["DefaultQRCode"] = false
+
+        map["EquipLocalID"] = false
+        map["EquipLocalName"] = false
+
+        map["BIMFamilyName"] = false
+        map["BIMFamilySymbol"] = false
+
+        map["RoomID"] = false
+        map["RoomName"] = false
+        map["RoomQRCode"] = false
+
+        map["TenantID"] = false
+        map["TenantName"] = false
+
+        map["Outline"] = false
+        return map
+    }
+
+    /**
+     * 默认不可编辑的
+     */
+    fun dicConfigure():HashMap<String,Boolean>{
+        val map = HashMap<String,Boolean>()
+        map["ProjLocalID"] = false
+        map["ProjLocalName"] = false
+
+        map["BuildLocalID"] = false
+        map["BuildLocalName"] = false
+
+        map["FloorLocalID"] = false
+        map["FloorLocalName"] = false
+        map["FloorLocalID"] = false
+        map["ModelID"] = false
+
+        map["RoomLocalID"] = false
+        map["RoomLocalName"] = false
+
+        map["SysLocalID"] = false
+        map["SysLocalName"] = false
+
+        map["ShaftLocalID"] = false
+        map["ShaftLocalName"] = false
+
+        map["EquipLocalID"] = false
+        map["EquipLocalName"] = false
+
+        map["TenantLocalID"] = false
+        map["TenantLocalName"] = false
+
+        return map
+    }
+
+
+} // Object ParamTools

+ 1 - 0
labsl/build.gradle

@@ -99,6 +99,7 @@ dependencies {
     compile group: "com.persagy", name: "persagy-kotlin-postgresql", version: PERSAGY_KOTLIN_VERSION
     compile group: "com.persagy", name: "persagy-service-base", version: PERSAGY_SERVICE_VERSION
     compile group: "com.persagy", name: "persagy-service-mybatis", version: PERSAGY_SERVICE_VERSION
+    compile group: "com.persagy", name: "persagy-service-postgresql", version: PERSAGY_SERVICE_VERSION
 
 
     // TestNG 测试框架

+ 3 - 3
labsl/src/main/kotlin/com/persagy/server/labsl/LaBSLApp.kt

@@ -35,8 +35,8 @@ import org.springframework.context.annotation.ComponentScan
  *
  * @author  Andy
  */
-@ComponentScan(basePackages = ["com.persagy", "com.persagy.server"])           // 配置组件扫描路径
-@MapperScan("com.persagy", "com.persagy.server")                       // Mapper组件扫描路径
+@ComponentScan(basePackages = ["com.persagy"])           // 配置组件扫描路径
+@MapperScan("com.persagy")                       // Mapper组件扫描路径
 @SpringBootApplication
 open class LaBSLApp : SpringBootServletInitializer() {
     companion object {
@@ -62,7 +62,7 @@ open class LaBSLApp : SpringBootServletInitializer() {
     @Suppress("MoveLambdaOutsideParentheses")
     open fun jsonHttpMessageConverters(): SJsonHttpMessageConverter {
         val fastConverter = SJsonHttpMessageConverter()
-        fastConverter.propertyNamingStrategy = com.alibaba.fastjson.PropertyNamingStrategy.PascalCase
+        fastConverter.propertyNamingStrategy = com.alibaba.fastjson.PropertyNamingStrategy.CamelCase
         return fastConverter
     } // Function fastJsonHttpMessageConverters()
 } // Class Application

+ 1 - 1
labsl/src/main/kotlin/com/persagy/server/labsl/Swagger2Config.kt

@@ -66,7 +66,7 @@ open class Swagger2Config {
         return Docket(DocumentationType.SWAGGER_2)
                 .apiInfo(apiInfo())
                 .select()
-                .apis(RequestHandlerSelectors.basePackage("com.persagy.server"))
+                .apis(RequestHandlerSelectors.basePackage("com.persagy"))
                 .paths(PathSelectors.any())
                 .build()
                 .globalOperationParameters(pars)

+ 1 - 9
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Anchor.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -15,51 +14,44 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "锚点")
-@Table(name = "lbsl.anchor")
+@Table(name = "labsl.anchor")
 open class Anchor : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 锚点id */
     @ApiModelProperty(value = "锚点id")
     @Id
     @Column(name = "anchor_id")
-    @JSONField(name = "AnchorId")
     var anchorId: String? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图例节点 */
     @ApiModelProperty(value = "图例节点")
     @Column(name = "node_id")
-    @JSONField(name = "NodeId")
     var nodeId: String? = null
 
     /** 锚点的坐标 */
     @ApiModelProperty(value = "锚点的坐标")
     @Column(name = "pos")
-    @JSONField(name = "Pos")
     var pos: Pos? = null
 
     /** 项目id */
     @ApiModelProperty(value = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
     var projectId: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
 } // Class Anchor

+ 1 - 7
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/AttachObjectIds.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -16,40 +15,35 @@ import javax.persistence.Table
  * @date  2020/9/17 16:35
  */
 @ApiModel(description = "图例节点与对象的关系")
-@Table(name = "lbsl.attach_object_ids")
+@Table(name = "labsl.attach_object_ids")
 class AttachObjectIds : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图例节点id */
     @ApiModelProperty(value = "图例节点id",required = true )
     @Id
     @Column(name = "node_id")
-    @JSONField(name = "NodeId")
     var nodeId: String? = null
 
     /** 对象id */
     @ApiModelProperty(value = "对象id",required = true )
     @Id
     @Column(name = "object_id")
-    @JSONField(name = "ObjectId")
     var objectId: String? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
 } // Class AttachObjectIds

+ 0 - 4
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Elements.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.annotations.ApiModelProperty
 import java.io.Serializable
 import javax.validation.Valid
@@ -13,16 +12,13 @@ import javax.validation.Valid
 class Elements : Serializable {
 
     @ApiModelProperty(value = "图例节点")
-    @JSONField(name = "Nodes")
     @Valid
     var nodes : ArrayList<Node>? = null
 
     @ApiModelProperty(value = "文本注释,图上的图片说明")
-    @JSONField(name = "Markers")
     var markers : ArrayList<Markers>? = null
 
     @ApiModelProperty(value = "管线对象")
-    @JSONField(name = "Relations")
     var relations : ArrayList<Relation>? = null
 
 } // Class Elements

+ 1 - 20
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Graph.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -16,115 +15,97 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "图例")
-@Table(name = "lbsl.graph")
+@Table(name = "labsl.graph")
 open class Graph : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "ID")
     var id: String? = null
 
     /** 图类型id */
     @ApiModelProperty(value = "图类型id",required = true )
     @Id
     @Column(name = "graph_id")
-    @JSONField(name = "GraphID")
     var graphId: String? = null
 
     /** 图名称 */
     @ApiModelProperty(value = "图名称",required = true )
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图分类id */
     @ApiModelProperty(value = "图分类id",required = true )
     @Column(name = "category_id")
-    @JSONField(name = "CategoryID")
     var categoryId: String? = null
 
     /** 项目id */
     @ApiModelProperty(value = "项目id",required = true )
     @Column(name = "project_id")
-    @JSONField(name = "ProjectID")
     var projectId: String? = null
 
     /** 建筑id */
     @ApiModelProperty(value = "建筑id")
     @Column(name = "building_id")
-    @JSONField(name = "BuildingID")
     var buildingId: String? = null
 
     /** 楼层id */
     @ApiModelProperty(value = "楼层id")
     @Column(name = "floor_id")
-    @JSONField(name = "FloorID")
     var floorId: String? = null
 
     /** 说明 */
     @ApiModelProperty(value = "说明")
     @Column(name = "note")
-    @JSONField(name = "Note")
     var note: String? = null
 
     /** 版本号 */
     @ApiModelProperty(value = "版本号")
     @Column(name = "version")
-    @JSONField(name = "Version")
     var version: String? = null
 
     @ApiModelProperty(value = "系统图展示所需数据")
-    @JSONField(name = "Elements")
     open var elements: Elements? = null
 
     /** 移至回收站时间 */
     @ApiModelProperty(value = "移至回收站时间")
     @Column(name = "del_time")
-    @JSONField(name = "DelTime")
     var delTime: Date? = null
 
     /** 是否移至回收站 */
     @ApiModelProperty(value = "是否移至回收站 , false 正常,true 以至回收站")
     @Column(name = "is_available")
-    @JSONField(name = "IsAvailable")
     var isAvailable: Boolean? = false
 
     /** 内部版本号 */
     @ApiModelProperty(value = "内部版本号")
     @Column(name = "tag_version")
-    @JSONField(name = "TagVersion")
     var tagVersion: Int? = null
 
     /** 内部版本号 */
     @ApiModelProperty(value = "是否发布(true 发布、false 未发布)")
     @Column(name = "is_pub")
-    @JSONField(name = "IsPub")
     var isPub: Boolean = false
 
     /** 图片Key */
     @ApiModelProperty(value = "图片Key")
     @Column(name = "pic")
-    @JSONField(name = "Pic")
     var pic: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
     /** 页面尺寸 */
     @ApiModelProperty(value = "页面尺寸")
     @Column(name = "page_size")
-    @JSONField(name = "pageSize")
     var pageSize: HashMap<String,Any?>? = null
 
     /** 标签 */
     @ApiModelProperty(value = " 标签 ")
     @Column(name = "label")
-    @JSONField(name = "Label")
     var label: ArrayList<String>? = null
 
 } // Class Graph

+ 3 - 6
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/GraphCategory.kt

@@ -16,33 +16,30 @@ import javax.persistence.Table
  * @date  2020/9/15 11:33
  */
 @ApiModel(description = "图分类")
-@Table(name = "lbsl.graph_category")
+@Table(name = "labsl.graph_category")
 class GraphCategory : SBaseEntity(), Serializable {
 
     /** 分类编码Code */
     @ApiModelProperty(value = "分类编码Code")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Code")
+    @JSONField(name = "code")
     var id: String? = null
 
     /** 分类名称 */
     @ApiModelProperty(value = "分类名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 上级节点 */
     @ApiModelProperty(value = "上级节点")
     @Column(name = "parent_id")
-    @JSONField(name = "ParentId")
     var parentId: String? = null
 
     @ApiModelProperty(value = "子节点列表")
-    @JSONField(name = "CategoryList")
     var categoryList: ArrayList<GraphCategory>? = null
 
-    @JSONField(name = "CategoryList",serialize = false)
+    @JSONField(name = "categoryList",serialize = false)
     var sign: Boolean = false
 
 } //  Class GraphCategory

+ 1 - 14
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Markers.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -15,80 +14,68 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "文本注释,图上的图片说明")
-@Table(name = "lbsl.marker")
+@Table(name = "labsl.marker")
 open class Markers : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 标识id */
     @ApiModelProperty(value = "标识id",required = true )
     @Id
     @Column(name = "marker_id")
-    @JSONField(name = "MarkerId")
     var markerId: String? = null
 
     /** 标识名称 */
     @ApiModelProperty(value = "标识名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图标(Image),线类型(Line),文本(Text) */
     @ApiModelProperty(value = "图标(Image),线类型(Line),文本(Text)")
     @Column(name = "type")
-    @JSONField(name = "Type")
     var type: String? = null
 
     /** 位置信息 */
     @ApiModelProperty(value = "位置信息")
     @Column(name = "pos")
-    @JSONField(name = "Pos")
     var pos: Pos? = null
 
     /** 缩放 */
     @ApiModelProperty(value = "缩放")
     @Column(name = "scale")
-    @JSONField(name = "Scale")
     var scale: Pos? = null
 
     /** 旋转 */
     @ApiModelProperty(value = "旋转")
     @Column(name = "rotate")
-    @JSONField(name = "Rotate")
     var rotate: Pos? = null
 
     /** 大小 */
     @ApiModelProperty(value = "大小")
     @Column(name = "size")
-    @JSONField(name = "Size")
     var size: Size? = null
 
     @ApiModelProperty(value = "应用自定义")
     @Column(name = "properties")
-    @JSONField(name = "Properties")
     var properties : HashMap<String,Any?>? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
     @ApiModelProperty(value = "线的绘图样式")
     @Column(name = "style")
-    @JSONField(name = "Style")
     var style : HashMap<String,Any?>? = null
 
 } // Class Markers

+ 1 - 20
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Node.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -15,112 +14,94 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "图例节点")
-@Table(name = "lbsl.node")
+@Table(name = "labsl.node")
 open class Node : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图例节点id */
     @ApiModelProperty(value = "图例节点id",required = true )
     @Id
     @Column(name = "node_id")
-    @JSONField(name = "NodeId")
     var nodeId: String? = null
 
     /** 图例节点名称 */
     @ApiModelProperty(value = "图例节点名称",required = true )
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标 */
     @ApiModelProperty(value = "图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标")
     @Column(name = "graph_element_type")
-    @JSONField(name = "GraphElementType")
     var graphElementType: String? = null
 
     /** 图元ID */
     @ApiModelProperty(value = "图元ID")
     @Column(name = "graph_element_id")
-    @JSONField(name = "GraphElementId")
     var graphElementId: String? = null
 
     /** 图例数量 */
     @ApiModelProperty(value = "图例数量")
     @Column(name = "num")
-    @JSONField(name = "Num")
     var num: Int? = null
 
     /** 节点类型(image / zone) */
     @ApiModelProperty(value = "节点类型(image / zone)")
     @Column(name = "type")
-    @JSONField(name = "Type")
     var type: Int? = null
 
     /** 位置信息 */
     @ApiModelProperty(value = "位置信息")
     @Column(name = "pos")
-    @JSONField(name = "Pos")
     var pos: Pos? = null
 
     /** 缩放 */
     @ApiModelProperty(value = "缩放")
     @Column(name = "scale")
-    @JSONField(name = "Scale")
     var scale: Pos? = null
 
     /** 旋转 */
     @ApiModelProperty(value = "旋转")
     @Column(name = "rotate")
-    @JSONField(name = "Rotate")
     var rotate: Pos? = null
 
     /** 大小 */
     @ApiModelProperty(value = "大小")
     @Column(name = "size")
-    @JSONField(name = "Size")
     var size: Size? = null
 
     /** 轮廓线 */
     @ApiModelProperty(value = "轮廓线")
     @Column(name = "outline")
-    @JSONField(name = "Outline")
     var outline: ArrayList<ArrayList<Pos>>? = null
 
     @ApiModelProperty(value = "应用自定义")
     @Column(name = "properties")
-    @JSONField(name = "Properties")
     var properties : HashMap<String,Any?>? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 锚点列表 */
     @ApiModelProperty(value = "锚点列表")
-    @JSONField(name = "AnchorList")
     var anchorList: ArrayList<Anchor>? = null
 
     @ApiModelProperty(value = "图例节点与对象的关系")
-    @JSONField(name = "AttachObjectIds")
     var attachObjectIds: ArrayList<AttachObjectIds>? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
     @ApiModelProperty(value = "线的绘图样式")
     @Column(name = "style")
-    @JSONField(name = "Style")
     var style : HashMap<String,Any?>? = null
 
 } // Class node

+ 0 - 4
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Pos.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.annotations.ApiModelProperty
 import java.io.Serializable
 
@@ -13,17 +12,14 @@ class Pos : Serializable {
 
     /** X坐标 */
     @ApiModelProperty(value = "X坐标")
-    @JSONField(name = "X")
     var x: Double? = null
 
     /** Y坐标 */
     @ApiModelProperty(value = "Y坐标")
-    @JSONField(name = "Y")
     var y: Double? = null
 
     /** Z坐标 */
     @ApiModelProperty(value = "Z坐标")
-    @JSONField(name = "Z")
     var z: Double? = null
 
 } // Class Pos

+ 1 - 16
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Relation.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -15,93 +14,79 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "管线对象")
-@Table(name = "lbsl.relation")
+@Table(name = "labsl.relation")
 open class Relation : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 关系id */
     @ApiModelProperty(value = "关系id",required = true )
     @Id
     @Column(name = "relation_id")
-    @JSONField(name = "RelationId")
     var relationId: String? = null
 
     /** 关系名称 */
     @ApiModelProperty(value = "关系名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图元id */
     @ApiModelProperty(value = "图元id")
     @Column(name = "graph_element_id")
-    @JSONField(name = "GraphElementId")
     var graphElementId: String? = null
 
     /** 关联节点1_id */
     @ApiModelProperty(value = "关联节点1_id")
     @Column(name = "node1_id")
-    @JSONField(name = "Node1Id")
     var node1Id: String? = null
 
     /** 关联节点2_id */
     @ApiModelProperty(value = "关联节点2_id")
     @Column(name = "node2_id")
-    @JSONField(name = "Node2Id")
     var node2Id: String? = null
 
     /** 关联锚点1_id */
     @ApiModelProperty(value = "关联锚点1_id")
     @Column(name = "anchor1_id")
-    @JSONField(name = "Anchor1Id")
     var anchor1Id: String? = null
 
     /** 关联锚点2_id */
     @ApiModelProperty(value = "关联锚点2_id")
     @Column(name = "anchor2_id")
-    @JSONField(name = "Anchor2Id")
     var anchor2Id: String? = null
 
     /** 方向(0:无向,1:节点1到节点2,2:节点2到节点1) */
     @ApiModelProperty(value = "方向(0:无向,1:节点1到节点2,2:节点2到节点1)")
     @Column(name = "dir")
-    @JSONField(name = "Dir")
     var dir: Int? = null
 
     /** 直线(Line),水平垂直 */
     @ApiModelProperty(value = "直线(Line),水平垂直")
     @Column(name = "line_type")
-    @JSONField(name = "LineType")
     var lineType: String? = null
 
     /** 线的顶点坐标 */
     @ApiModelProperty(value = "线的顶点坐标")
     @Column(name = "point_list")
-    @JSONField(name = "PointList")
     var pointList: ArrayList<Pos>? = null
 
     @ApiModelProperty(value = "线的绘图样式")
     @Column(name = "style")
-    @JSONField(name = "Style")
     var style : HashMap<String,Any?>? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
 } // Class Relation

+ 0 - 3
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/Size.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.annotations.ApiModelProperty
 import java.io.Serializable
 
@@ -13,12 +12,10 @@ class Size : Serializable {
 
     /** Width宽 */
     @ApiModelProperty(value = "Width宽")
-    @JSONField(name = "Width")
     var width: Double? = null
 
     /** Height高 */
     @ApiModelProperty(value = "Height高")
-    @JSONField(name = "Height")
     var height: Double? = null
 
 } // Class Size

+ 1 - 1
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/AnchorPub.kt

@@ -11,6 +11,6 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "锚点")
-@Table(name = "lbsl.anchor_pub")
+@Table(name = "labsl.anchor_pub")
 class AnchorPub : Anchor(), Serializable
 

+ 1 - 7
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/AttachObjectIdsPub.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities.pub
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -16,40 +15,35 @@ import javax.persistence.Table
  * @date  2020/9/17 16:35
  */
 @ApiModel(description = "图例节点与对象的关系")
-@Table(name = "lbsl.attach_object_ids_pub")
+@Table(name = "labsl.attach_object_ids_pub")
 class AttachObjectIdsPub : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图例节点id */
     @ApiModelProperty(value = "图例节点id",required = true )
     @Id
     @Column(name = "node_id")
-    @JSONField(name = "NodeId")
     var nodeId: String? = null
 
     /** 对象id */
     @ApiModelProperty(value = "对象id",required = true )
     @Id
     @Column(name = "object_id")
-    @JSONField(name = "ObjectId")
     var objectId: String? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,4回收站 ,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = 1
 
 

+ 0 - 4
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/ElementsPub.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities.pub
 
-import com.alibaba.fastjson.annotation.JSONField
 import io.swagger.annotations.ApiModelProperty
 import java.io.Serializable
 import javax.validation.Valid
@@ -13,16 +12,13 @@ import javax.validation.Valid
 class ElementsPub : Serializable {
 
     @ApiModelProperty(value = "图例节点")
-    @JSONField(name = "Nodes")
     @Valid
     var nodes : ArrayList<NodePub>? = null
 
     @ApiModelProperty(value = "文本注释,图上的图片说明")
-    @JSONField(name = "Markers")
     var markers : ArrayList<MarkersPub>? = null
 
     @ApiModelProperty(value = "管线对象")
-    @JSONField(name = "Relations")
     var relations : ArrayList<RelationPub>? = null
 
 } // Class Elements

+ 1 - 19
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/GraphPub.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities.pub
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -16,109 +15,92 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "图例")
-@Table(name = "lbsl.graph_pub")
+@Table(name = "labsl.graph_pub")
 class GraphPub : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图类型id */
     @ApiModelProperty(value = "图类型id",required = true )
     @Id
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 图名称 */
     @ApiModelProperty(value = "图名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图分类id */
     @ApiModelProperty(value = "图分类id")
     @Column(name = "category_id")
-    @JSONField(name = "CategoryId")
     var categoryId: String? = null
 
     /** 项目id */
     @ApiModelProperty(value = "项目id")
     @Column(name = "project_id")
-    @JSONField(name = "ProjectId")
     var projectId: String? = null
 
     /** 建筑id */
     @ApiModelProperty(value = "建筑id")
     @Column(name = "building_id")
-    @JSONField(name = "BuildingId")
     var buildingId: String? = null
 
     /** 楼层id */
     @ApiModelProperty(value = "楼层id")
     @Column(name = "floor_id")
-    @JSONField(name = "FloorId")
     var floorId: String? = null
 
     /** 说明 */
     @ApiModelProperty(value = "说明")
     @Column(name = "note")
-    @JSONField(name = "Note")
     var note: String? = null
 
     /** 版本号 */
     @ApiModelProperty(value = "版本号")
     @Column(name = "version")
-    @JSONField(name = "Version")
     var version: String? = null
 
     @ApiModelProperty(value = "系统图展示所需数据")
-    @JSONField(name = "Elements")
     var elements: ElementsPub? = null
 
     /** 移至回收站时间 */
     @ApiModelProperty(value = "移至回收站时间")
     @Column(name = "del_time")
-    @JSONField(name = "DelTime")
     var delTime: Date? = null
 
     /** 移至回收站时间 */
     @ApiModelProperty(value = "移至回收站时间 , false 正常,true 以至回收站")
     @Column(name = "is_available")
-    @JSONField(name = "IsAvailable")
     var isAvailable: Boolean? = false
 
     /** 内部版本号 */
     @ApiModelProperty(value = "内部版本号")
     @Column(name = "tag_version")
-    @JSONField(name = "TagVersion")
     var tagVersion: Int? = null
 
     /** 内部版本号 */
     @ApiModelProperty(value = "是否发布(true 发布、false 未发布)")
     @Column(name = "is_pub")
-    @JSONField(name = "IsPub")
     var isPub: Boolean = false
 
     /** 图片Key */
     @ApiModelProperty(value = "图片Key")
     @Column(name = "pic")
-    @JSONField(name = "Pic")
     var pic: String? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = null
 
     /** 页面尺寸 */
     @ApiModelProperty(value = "页面尺寸")
     @Column(name = "page_size")
-    @JSONField(name = "pageSize")
     var pageSize: HashMap<String, Any?>? = null
 
 } // Class Graph

+ 1 - 1
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/MarkersPub.kt

@@ -11,6 +11,6 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "文本注释,图上的图片说明")
-@Table(name = "lbsl.marker_pub")
+@Table(name = "labsl.marker_pub")
 class MarkersPub : Markers(), Serializable
 

+ 1 - 21
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/NodePub.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.labsl.models.entities.pub
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.server.labsl.models.entities.Pos
 import com.persagy.server.labsl.models.entities.Size
 import com.persagy.service.models.SBaseEntity
@@ -17,113 +16,94 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "图例节点")
-@Table(name = "lbsl.node_pub")
+@Table(name = "labsl.node_pub")
 class NodePub : SBaseEntity(), Serializable {
 
     /** 全局id */
     @ApiModelProperty(value = "全局id" )
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图例节点id */
     @ApiModelProperty(value = "图例节点id",required = true )
     @Id
     @Column(name = "node_id")
-    @JSONField(name = "NodeId")
     var nodeId: String? = null
 
     /** 图例节点名称 */
     @ApiModelProperty(value = "图例节点名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
     /** 图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标 */
     @ApiModelProperty(value = "图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标")
     @Column(name = "graph_element_type")
-    @JSONField(name = "GraphElementType")
     var graphElementType: String? = null
 
     /** 图元ID */
     @ApiModelProperty(value = "图元ID")
     @Column(name = "graph_element_id")
-    @JSONField(name = "GraphElementId")
     var graphElementId: String? = null
 
     /** 图例数量 */
     @ApiModelProperty(value = "图例数量")
     @Column(name = "num")
-    @JSONField(name = "Num")
     var num: Int? = null
 
     /** 节点类型(image / zone) */
     @ApiModelProperty(value = "节点类型(image / zone)")
     @Column(name = "type")
-    @JSONField(name = "Type")
     var type: Int? = null
 
     /** 位置信息 */
     @ApiModelProperty(value = "位置信息")
     @Column(name = "pos")
-    @JSONField(name = "Pos")
     var pos: Pos? = null
 
     /** 缩放 */
     @ApiModelProperty(value = "缩放")
     @Column(name = "scale")
-    @JSONField(name = "Scale")
     var scale: Pos? = null
 
     /** 旋转 */
     @ApiModelProperty(value = "旋转")
     @Column(name = "rolate")
-    @JSONField(name = "Rolate")
     var rolate: Pos? = null
 
     /** 大小 */
     @ApiModelProperty(value = "大小")
     @Column(name = "size")
-    @JSONField(name = "Size")
     var size: Size? = null
 
     /** 轮廓线 */
     @ApiModelProperty(value = "轮廓线")
     @Column(name = "outline")
-    @JSONField(name = "Outline")
     var outline: ArrayList<ArrayList<Pos>>? = null
 
     @ApiModelProperty(value = "应用自定义")
     @Column(name = "properties")
-    @JSONField(name = "Properties")
     var properties : HashMap<String,Any?>? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Column(name = "graph_id")
-    @JSONField(name = "GraphId")
     var graphId: String? = null
 
     /** 锚点列表 */
     @ApiModelProperty(value = "锚点列表")
-    @JSONField(name = "AnchorList")
     var anchorList: ArrayList<AnchorPub>? = null
 
     @ApiModelProperty(value = "图例节点与对象的关系")
-    @JSONField(name = "AttachObjectIds")
     var attachObjectIds: ArrayList<AttachObjectIdsPub>? = null
 
     /** 图状态(1一般,2待审核,3审核完成,0发布) */
     @ApiModelProperty(value = "图状态(1一般,2待审核,3审核完成,0发布)")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: Int? = null
 
     @ApiModelProperty(value = "线的绘图样式")
     @Column(name = "style")
-    @JSONField(name = "Style")
     var style : HashMap<String,Any?>? = null
 
-
 } // Class

+ 1 - 1
labsl/src/main/kotlin/com/persagy/server/labsl/models/entities/pub/RelationPub.kt

@@ -11,6 +11,6 @@ import javax.persistence.Table
  * @author wx
  */
 @ApiModel(description = "管线对象")
-@Table(name = "lbsl.relation_pub")
+@Table(name = "labsl.relation_pub")
 class RelationPub : Relation(), Serializable
 

+ 14 - 17
labsl/src/main/kotlin/com/persagy/server/labsl/services/GraphService.kt

@@ -28,7 +28,6 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
 
     /** 日志 */
     private val logger = LoggerFactory.getLogger(GraphService::class.java)
-
     /** 发布的图例节点服务 */
     private val nodePubService = SObjectService(SMybatisDao(NodePub::class.java))
     /** 注释、说明 */
@@ -40,8 +39,6 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
     /** 图例节点与对象的关系 */
     private val attachObjectIdsPubService = SObjectService(SMybatisDao(AttachObjectIdsPub::class.java))
 
-    val a = "http://adm.sagacloud.cn/image-service/common/image_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true&key=1600327559023.png"
-
     /**
      * 创建之前回调
      */
@@ -215,7 +212,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
             SFilter.eq("graphId", graphPub.graphId!!),
             SFilter.eq("state", 1)
         )
-        val graph = squeryBuilder.table("lbsl.graph_pub").entity()
+        val graph = squeryBuilder.table("labsl.graph_pub").entity()
         if (graph!=null){
             //开启事务
             openTransaction()
@@ -242,7 +239,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 SFilter.eq("id", graphPub.id!!),
                 SFilter.eq("state", 1)
             )
-            val nodePubList = nodebuilder.table("lbsl.node_pub").exec()
+            val nodePubList = nodebuilder.table("labsl.node_pub").exec()
             if (nodePubList.size>0){
                 for (nodePub in nodePubList){
                     nodePub.id = graph.id
@@ -263,7 +260,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 SFilter.eq("id", graphPub.id!!),
                 SFilter.eq("state", 1)
             )
-            val markersPubList = markersbuilder.table("lbsl.marker").exec()
+            val markersPubList = markersbuilder.table("labsl.marker").exec()
             if (markersPubList.size>0){
                 for (markersPub in markersPubList){
                     markersPub.id = graph.id
@@ -284,7 +281,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 SFilter.eq("id", graphPub.id!!),
                 SFilter.eq("state", 1)
             )
-            val relationList = relationBuilder.table("lbsl.relation").exec()
+            val relationList = relationBuilder.table("labsl.relation").exec()
             if (relationList.size>0){
                 for (relation in relationList){
                     relation.id = graph.id
@@ -305,7 +302,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 SFilter.eq("id", graphPub.id!!),
                 SFilter.eq("state", 1)
             )
-            val anchorList = anchorBuilder.table("lbsl.anchor").exec()
+            val anchorList = anchorBuilder.table("labsl.anchor").exec()
             if (anchorList.size>0){
                 for (anchor in anchorList){
                     anchor.id = graph.id
@@ -327,7 +324,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 SFilter.eq("id", graphPub.id!!),
                 SFilter.eq("state", 1)
             )
-            val attachObjectIdsList = attachObjectIdsBuilder.table("lbsl.attach_object_ids").exec()
+            val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids").exec()
             if (attachObjectIdsList.size>0){
                 for (attachObjectIds in attachObjectIdsList){
                     attachObjectIds.id = graph.id
@@ -506,8 +503,8 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                 graph.delTime = time()
                 graph.state = 4
                 val list = ArrayList<String>()
-                list.add("DelTime")
-                list.add("State")
+                list.add("delTime")
+                list.add("state")
                 update(graph, list)
             }
             sBaseResponse.result = SResponseType.success
@@ -532,7 +529,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                     SFilter.eq("id", graph.id!!),
                     SFilter.eq("graphId", graph.graphId!!)
                 )
-                val graphPub = graphBuilder.table("lbsl.graph_pub").entity()
+                val graphPub = graphBuilder.table("labsl.graph_pub").entity()
                 if (graphPub!=null){
                     graphPub.id = IdUtils.uuidCreate()
                     graphPub.state = 4
@@ -544,7 +541,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                         SFilter.eq("id", graph.id!!),
                         SFilter.eq("graphId", graph.graphId!!)
                     )
-                    val nodeList = nodeBuilder.table("lbsl.node_pub").exec()
+                    val nodeList = nodeBuilder.table("labsl.node_pub").exec()
                     if (nodeList.size>0){
                         for (node in nodeList){
                             node.id = graphPub.id
@@ -555,7 +552,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                             SFilter.eq("id", graph.id!!),
                             SFilter.eq("graphId", graph.graphId!!)
                         )
-                        val anchorList = anchorBuilder.table("lbsl.anchor_pub").exec()
+                        val anchorList = anchorBuilder.table("labsl.anchor_pub").exec()
                         if (anchorList.size>0){
                             for (anchor in anchorList){
                                 anchor.id = graphPub.id
@@ -567,7 +564,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                             SFilter.eq("id", graph.id!!),
                             SFilter.eq("graphId", graph.graphId!!)
                         )
-                        val attachObjectIdsList = attachObjectIdsBuilder.table("lbsl.attach_object_ids_pub").exec()
+                        val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids_pub").exec()
                         if (attachObjectIdsList.size>0){
                             for (attachObjectIds in attachObjectIdsList){
                                 attachObjectIds.id = graphPub.id
@@ -581,7 +578,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                         SFilter.eq("id", graph.id!!),
                         SFilter.eq("graphId", graph.graphId!!)
                     )
-                    val markersList = markersBuilder.table("lbsl.marker_pub").exec()
+                    val markersList = markersBuilder.table("labsl.marker_pub").exec()
                     if (markersList.size>0){
                         for (markers in markersList){
                             markers.id = graphPub.id
@@ -593,7 +590,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
                         SFilter.eq("id", graph.id!!),
                         SFilter.eq("graphId", graph.graphId!!)
                     )
-                    val relationList = relationBuilder.table("lbsl.relation_pub").exec()
+                    val relationList = relationBuilder.table("labsl.relation_pub").exec()
                     if (relationList.size>0){
                         for (relation in relationList ){
                             relation.id = graphPub.id

+ 1 - 0
meiku/src/main/kotlin/com/persagy/server/meiku/MeiKuApp.kt

@@ -50,6 +50,7 @@ open class MeiKuApp : SpringBootServletInitializer() {
     override fun configure(application: SpringApplicationBuilder): SpringApplicationBuilder {
         return application.sources(MeiKuApp::class.java)
     } // Function configure
+
 } // Class Application
 
 /**

+ 74 - 0
meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuAnchorController.kt

@@ -0,0 +1,74 @@
+package com.persagy.server.meiku.controller
+
+import com.persagy.server.meiku.models.entities.MeiKuAnchor
+import com.persagy.server.meiku.services.MeiKuAnchorService
+import com.persagy.service.models.requests.SCountRequest
+import com.persagy.service.models.requests.SCreateRequest
+import com.persagy.service.models.requests.SQueryRequest
+import com.persagy.service.models.requests.SUpdateRequest
+import com.persagy.service.models.responses.SBaseResponse
+import com.persagy.service.models.responses.SCountResponse
+import com.persagy.service.models.responses.SCreateResponse
+import com.persagy.service.models.responses.SQueryResponse
+import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RequestBody
+import org.springframework.web.bind.annotation.RequestMapping
+import org.springframework.web.bind.annotation.RestController
+
+/**
+ * 锚点
+ *
+ * @author  wx
+ * @date  2020/9/21 14:50
+ */
+@Api(tags = ["002、锚点"])
+@RestController
+@RequestMapping("/anchor")
+class MeiKuAnchorController {
+
+    /**
+     * 创建图例
+     */
+    @ApiOperation(value="创建锚点-批量", notes="")
+    @PostMapping("/create")
+    fun create(@RequestBody request: SCreateRequest<MeiKuAnchor>): SCreateResponse<MeiKuAnchor> {
+        return MeiKuAnchorService.createList(request)
+    } // Function create()
+
+    /**
+     * 更新锚点
+     */
+    @ApiOperation(value = "锚点修改-批量", notes = "")
+    @PostMapping(value = ["/update"])
+    fun update(@RequestBody request: SUpdateRequest<MeiKuAnchor>): SBaseResponse {
+        return MeiKuAnchorService.updateList(request)
+    } // Function update()
+
+    /**
+     * 根据id删除锚点
+     */
+    @ApiOperation(value = "锚点删除", notes = "")
+    @PostMapping(value = ["/delete"])
+    fun delete(@RequestBody idList: ArrayList<MeiKuAnchor>): SBaseResponse {
+        return MeiKuAnchorService.deleteByKeysList(idList)
+    } // Function delete()
+
+    /**
+     * 查询锚点信息
+     */
+    @ApiOperation(value = "查询锚点-批量", notes = "")
+    @PostMapping(value = ["/query"])
+    fun query(@RequestBody request: SQueryRequest): SQueryResponse<MeiKuAnchor> {
+        return MeiKuAnchorService.pageQuery(request)
+    } // Function query()
+
+    @ApiOperation(value = "查询锚点统计", notes = "")
+    @PostMapping(value = ["/count"])
+    fun count(@RequestBody request: SCountRequest): SCountResponse {
+        return MeiKuAnchorService.count(request)
+    } // Function count()
+
+
+} // Class MeiKuAnchorController

+ 13 - 6
meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuController.kt

@@ -1,8 +1,8 @@
 package com.persagy.server.meiku.controller
 
 import com.persagy.server.meiku.models.entities.MeiKu
+import com.persagy.server.meiku.models.response.SCommonResponse
 import com.persagy.server.meiku.services.MeiKuService
-import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SCreateRequest
 import com.persagy.service.models.requests.SQueryRequest
 import com.persagy.service.models.requests.SUpdateRequest
@@ -58,7 +58,7 @@ class MeiKuController {
     @PostMapping(value = ["/revise"])
     fun revise(@RequestBody meiku: MeiKu): SBaseResponse{
         return MeiKuService.revise(meiku)
-    } //
+    } // revise
 
     /**
      * 根据id删除图形
@@ -66,16 +66,23 @@ class MeiKuController {
     @ApiOperation(value = "图例删除", notes = "")
     @PostMapping(value = ["/delete"])
     fun delete(@RequestBody idList: ArrayList<MeiKu>): SBaseResponse {
-        return SBaseResponse(SResponseType.success)
+        return MeiKuService.deleteByKeysList(idList)
     } // Function delete()
 
     /**
      * 查询图形信息
      */
-    @ApiOperation(value = "查询图例", notes = "")
+    @ApiOperation(value = "查询图例-批量", notes = "不包含状态和锚点")
     @PostMapping(value = ["/query"])
-    fun query(@RequestBody request: SQueryRequest): SQueryResponse<Any> {
-        return SQueryResponse(SResponseType.success)
+    fun query(@RequestBody request: SQueryRequest): SQueryResponse<MeiKu> {
+        return MeiKuService.pageQuery(request)
     } // Function query()
 
+    @ApiOperation(value = "查询图例-单量", notes = "包含状态和锚点")
+    @PostMapping(value = ["/read"])
+    fun read(@RequestBody meiku: MeiKu): SCommonResponse<MeiKu> {
+        return  MeiKuService.read(meiku)
+    } //
+
+
 } // Class MeiKuController

+ 73 - 0
meiku/src/main/kotlin/com/persagy/server/meiku/controller/MeiKuStateController.kt

@@ -0,0 +1,73 @@
+package com.persagy.server.meiku.controller
+
+import com.persagy.server.meiku.models.entities.MeiKuState
+import com.persagy.server.meiku.services.MeiKuStateService
+import com.persagy.service.models.requests.SCountRequest
+import com.persagy.service.models.requests.SCreateRequest
+import com.persagy.service.models.requests.SQueryRequest
+import com.persagy.service.models.requests.SUpdateRequest
+import com.persagy.service.models.responses.SBaseResponse
+import com.persagy.service.models.responses.SCountResponse
+import com.persagy.service.models.responses.SCreateResponse
+import com.persagy.service.models.responses.SQueryResponse
+import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RequestBody
+import org.springframework.web.bind.annotation.RequestMapping
+import org.springframework.web.bind.annotation.RestController
+
+/**
+ * 状态
+ *
+ * @author  wx
+ * @date  2020/9/21 14:50
+ */
+@Api(tags = ["003、状态"])
+@RestController
+@RequestMapping("/state")
+class MeiKuStateController {
+
+    /**
+     * 创建图例
+     */
+    @ApiOperation(value="创建状态-批量", notes="")
+    @PostMapping("/create")
+    fun create(@RequestBody request: SCreateRequest<MeiKuState>): SCreateResponse<MeiKuState> {
+        return MeiKuStateService.createList(request)
+    } // Function create()
+
+    /**
+     * 更新状态
+     */
+    @ApiOperation(value = "状态修改-批量", notes = "")
+    @PostMapping(value = ["/update"])
+    fun update(@RequestBody request: SUpdateRequest<MeiKuState>): SBaseResponse {
+        return MeiKuStateService.updateList(request)
+    } // Function update()
+
+    /**
+     * 根据id删除状态
+     */
+    @ApiOperation(value = "状态删除", notes = "")
+    @PostMapping(value = ["/delete"])
+    fun delete(@RequestBody idList: ArrayList<MeiKuState>): SBaseResponse {
+        return MeiKuStateService.deleteByKeysList(idList)
+    } // Function delete()
+
+    /**
+     * 查询状态信息
+     */
+    @ApiOperation(value = "查询状态-批量", notes = "")
+    @PostMapping(value = ["/query"])
+    fun query(@RequestBody request: SQueryRequest): SQueryResponse<MeiKuState> {
+        return MeiKuStateService.pageQuery(request)
+    } // Function query()
+
+    @ApiOperation(value = "查询状态统计", notes = "")
+    @PostMapping(value = ["/count"])
+    fun count(@RequestBody request: SCountRequest): SCountResponse {
+        return MeiKuStateService.count(request)
+    } // Function count()
+
+} // Class MeiKuStateController

+ 0 - 8
meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKu.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.meiku.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -22,40 +21,33 @@ class MeiKu : Serializable, SBaseEntity() {
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 分类 */
     @ApiModelProperty(value = "分类")
     @Column(name = "category")
-    @JSONField(name = "Category")
     var category: String? = null
 
     /** 默认图Key */
     @ApiModelProperty(value = "默认图Key")
     @Column(name = "pic")
-    @JSONField(name = "Pic")
     var pic: String? = null
 
     /** 品牌 */
     @ApiModelProperty(value = "品牌")
     @Column(name = "brand")
-    @JSONField(name = "Brand")
     var brand: String? = null
 
     /** 型号 */
     @ApiModelProperty(value = "型号")
     @Column(name = "specification")
-    @JSONField(name = "Specification")
     var specification: String? = null
 
     /** 锚点列表 */
     @ApiModelProperty(value = "锚点列表")
-    @JSONField(name = "AnchorList")
     var anchorList: ArrayList<MeiKuAnchor>? = null
 
     @ApiModelProperty(value = "状态")
-    @JSONField(name = "State")
     var state: MeiKuState? = null
 
 } // Class MeiKu

+ 0 - 4
meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKuAnchor.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.meiku.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -23,20 +22,17 @@ class MeiKuAnchor: Serializable, SBaseEntity() {
     @ApiModelProperty(value = "锚点id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "meitu_id")
-    @JSONField(name = "MeiTuId")
     var meiTuId: String? = null
 
     /** 锚点坐标 */
     @ApiModelProperty(value = "锚点坐标")
     @Column(name = "pos")
-    @JSONField(name = "Pos")
     var pos: HashMap<String,Any?>? = null
 
 } // Class MeiKuAnchor

+ 0 - 4
meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/MeiKuState.kt

@@ -1,6 +1,5 @@
 package com.persagy.server.meiku.models.entities
 
-import com.alibaba.fastjson.annotation.JSONField
 import com.persagy.service.models.SBaseEntity
 import io.swagger.annotations.ApiModel
 import io.swagger.annotations.ApiModelProperty
@@ -22,20 +21,17 @@ class MeiKuState: Serializable, SBaseEntity() {
     @ApiModelProperty(value = "状态id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 图id */
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "meitu_id")
-    @JSONField(name = "MeiTuId")
     var meiTuId: String? = null
 
     /** 状态内容 */
     @ApiModelProperty(value = "状态内容")
     @Column(name = "state")
-    @JSONField(name = "State")
     var state: HashMap<String,Any?>? = null
 
 } // class MeiKuState

+ 0 - 2
meiku/src/main/kotlin/com/persagy/server/meiku/models/entities/ObjectCategory.kt

@@ -23,13 +23,11 @@ class ObjectCategory: Serializable, SBaseEntity() {
     @ApiModelProperty(value = "图id")
     @Id
     @Column(name = "id")
-    @JSONField(name = "Id")
     var id: String? = null
 
     /** 名称 */
     @ApiModelProperty(value = "名称")
     @Column(name = "name")
-    @JSONField(name = "Name")
     var name: String? = null
 
 } // Class ObjectCategory

+ 31 - 0
meiku/src/main/kotlin/com/persagy/server/meiku/models/response/SCommonResponse.kt

@@ -0,0 +1,31 @@
+package com.persagy.server.meiku.models.response
+
+import com.persagy.service.models.enums.SResponseType
+import io.swagger.annotations.ApiModelProperty
+
+/**
+ * 返回体
+ * @author  蔡云飞
+ * @date  2020/6/9 14:56
+ */
+open class SCommonResponse<ENTITY: Any>(result: SResponseType? = SResponseType.success, message: String? = null) {
+
+    /** 结果 */
+    @ApiModelProperty(value = "结果")
+    var result: SResponseType? = SResponseType.failure
+    /** 消息 */
+    @ApiModelProperty(value = "消息")
+    var message: String? = ""
+
+    /** 结果 */
+    @ApiModelProperty(value = "结果")
+    var content: ENTITY? = null
+
+    /** 初始化 */
+    init {
+        this.result = result
+        this.message = message
+    } // init()
+
+
+}

+ 28 - 6
meiku/src/main/kotlin/com/persagy/server/meiku/services/MeiKuService.kt

@@ -3,6 +3,7 @@ package com.persagy.server.meiku.services
 import com.persagy.database.SFilter
 import com.persagy.mybatis.SMybatisDao
 import com.persagy.server.meiku.models.entities.MeiKu
+import com.persagy.server.meiku.models.response.SCommonResponse
 import com.persagy.service.SObjectService
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.responses.SBaseResponse
@@ -115,14 +116,35 @@ object MeiKuService : SObjectService<MeiKu>(SMybatisDao(MeiKu::class.java)) {
     /**
      * 读取图下面所有节点
      */
-    fun read(meiKu: MeiKu){
-        if (!meiKu.id.isNullOrEmpty()){
-            val entity = select(SFilter.eq("id", meiKu.id!!)).entity()
-            if (entity!=null){
-
+    fun read(meiKu: MeiKu):SCommonResponse<MeiKu>{
+        val sQueryResponse = SCommonResponse<MeiKu>()
+        return try {
+            if (!meiKu.id.isNullOrEmpty()){
+                val entity = select(SFilter.eq("id", meiKu.id!!)).entity()
+                if (entity!=null){
+                    val meiKuAnchorList = MeiKuAnchorService.select(SFilter.eq("id", meiKu.id!!)).exec()
+                    if (meiKuAnchorList.size>0){
+                        entity.anchorList = meiKuAnchorList
+                    }
+                    val meiKuState = MeiKuStateService.select(SFilter.eq("id", meiKu.id!!)).entity()
+                    if (meiKuState!=null){
+                        entity.state = meiKuState
+                    }
+                    sQueryResponse.content = entity
+                    sQueryResponse.result = SResponseType.success
+                }else{
+                    sQueryResponse.result = SResponseType.failure
+                }
+            }else{
+                sQueryResponse.result = SResponseType.failure
             }
+             sQueryResponse
+        } catch (e: Exception) {
+            e.printStackTrace()
+            sQueryResponse.result = SResponseType.failure
+            sQueryResponse.message = e.message.toString()
+            sQueryResponse
         }
-
     } // read()
 
 

+ 1 - 1
meiku/src/main/resources/application-prod.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   datasource:
-    url:                                jdbc:postgresql://data-center:5432/datacenter
+    url:                                jdbc:postgresql://172.17.11.228:5432/datacenter
     username:                           postgres
     password:                           123qwe!@#