فهرست منبع

Merge branch 'dev_xlk'

allen 2 سال پیش
والد
کامیت
663d07f4ae
100فایلهای تغییر یافته به همراه2368 افزوده شده و 5481 حذف شده
  1. 0 112
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityAttributeController.java
  2. 0 155
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassAttributeController.java
  3. 0 142
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassController.java
  4. 0 156
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassRelationController.java
  5. 0 235
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityController.java
  6. 0 142
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityRelationController.java
  7. 0 40
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/MapController.java
  8. 0 27
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/MonitorController.java
  9. 0 208
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/MockController.java
  10. 0 6
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/attrclsAdd.json
  11. 0 23
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/attrclsNoneList.json
  12. 0 6
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/empty200.json
  13. 0 39
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entSearchEntclses.json
  14. 0 175
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entcls.json
  15. 0 6
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsAdd.json
  16. 0 16
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsId.json
  17. 0 31
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsIdList.json
  18. 0 196
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsTree.json
  19. 0 30
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entquery.json
  20. 0 231
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/getMonitorByNum.json
  21. 0 14
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdAttrs.json
  22. 0 6
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdList.json
  23. 0 20
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdListEnd.json
  24. 0 160
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsList.json
  25. 0 181
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/showGraph.json
  26. 0 65
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/Entity.java
  27. 0 92
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityAttribute.java
  28. 0 65
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClass.java
  29. 0 100
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassAttribute.java
  30. 0 56
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassRelation.java
  31. 0 18
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassRelationVO.java
  32. 0 49
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityRelation.java
  33. 0 17
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityRelationVO.java
  34. 0 12
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityTag.java
  35. 0 17
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/GraphIcon.java
  36. 0 19
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/GraphRequest.java
  37. 0 64
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityAttributeMapper.java
  38. 0 71
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityClassAttributeMapper.java
  39. 0 74
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityClassRelationMapper.java
  40. 0 80
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityMapper.java
  41. 0 87
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityRelationMapper.java
  42. 0 66
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityAttributeService.java
  43. 0 71
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityClassAttributeService.java
  44. 0 81
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityClassRelationService.java
  45. 0 85
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityRelationService.java
  46. 0 78
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityService.java
  47. 0 20
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IMapService.java
  48. 0 119
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityAttributeServiceImpl.java
  49. 0 114
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityClassAttributeServiceImpl.java
  50. 0 145
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityClassRelationServiceImpl.java
  51. 0 142
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityRelationServiceImpl.java
  52. 0 142
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityServiceImpl.java
  53. 0 139
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/MapServiceImpl.java
  54. 0 12
      kgraph-graph/src/main/java/com/kgraph/graph/knowledge/utils/KnowledgeUtils.java
  55. 114 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/EntityClassController.java
  56. 104 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/EntityClassRelationController.java
  57. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/KgController.java
  58. 1 2
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/Neo4jEntityController.java
  59. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/Neo4jRelationController.java
  60. 83 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/domain/EntityClass.java
  61. 58 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/domain/EntityClassRelation.java
  62. 13 18
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/EntityClassMapper.java
  63. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/EntityClassRelationMapper.java
  64. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IEntityClassRelationService.java
  65. 12 18
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IEntityClassService.java
  66. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IKgService.java
  67. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/INeo4jEntityService.java
  68. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/INeo4jRelationService.java
  69. 96 0
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/EntityClassRelationServiceImpl.java
  70. 19 33
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/EntityClassServiceImpl.java
  71. 2 3
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/KgServiceImpl.java
  72. 2 3
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/Neo4JNeo4jEntityServiceImpl.java
  73. 2 4
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/Neo4JNeo4jRelationServiceImpl.java
  74. 127 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/BuildEntityRelationController.java
  75. 104 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/TBuildFlowController.java
  76. 104 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/TCheckPiontController.java
  77. 125 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/BuildEntityRelation.java
  78. 83 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/TBuildFlow.java
  79. 69 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/TCheckPiont.java
  80. 17 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/dto/BuildEntityRelationDTO.java
  81. 68 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/BuildEntityRelationMapper.java
  82. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/TBuildFlowMapper.java
  83. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/TCheckPiontMapper.java
  84. 68 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/IBuildEntityRelationService.java
  85. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/ITBuildFlowService.java
  86. 61 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/ITCheckPiontService.java
  87. 137 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/BuildEntityRelationServiceImpl.java
  88. 2 2
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/ExtractKnowledgeSubTaskServiceImpl.java
  89. 96 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/TBuildFlowServiceImpl.java
  90. 96 0
      kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/TCheckPiontServiceImpl.java
  91. 0 124
      kgraph-graph/src/main/resources/mapper/knowledge/EntityAttributeMapper.xml
  92. 0 153
      kgraph-graph/src/main/resources/mapper/knowledge/EntityClassAttributeMapper.xml
  93. 0 127
      kgraph-graph/src/main/resources/mapper/knowledge/EntityClassMapper.xml
  94. 0 209
      kgraph-graph/src/main/resources/mapper/knowledge/EntityClassRelationMapper.xml
  95. 0 163
      kgraph-graph/src/main/resources/mapper/knowledge/EntityMapper.xml
  96. 0 160
      kgraph-graph/src/main/resources/mapper/knowledge/EntityRelationMapper.xml
  97. 86 0
      kgraph-graph/src/main/resources/mapper/neo4j/EntityClassMapper.xml
  98. 110 0
      kgraph-graph/src/main/resources/mapper/neo4j/EntityClassRelationMapper.xml
  99. 117 0
      kgraph-graph/src/main/resources/mapper/suport/BuildEntityRelationMapper.xml
  100. 82 0
      kgraph-graph/src/main/resources/mapper/suport/TBuildFlowMapper.xml

+ 0 - 112
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityAttributeController.java

@@ -1,112 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.EntityAttribute;
-import com.kgraph.graph.knowledge.service.IEntityAttributeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 实体属性Controller
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@RestController
-@RequestMapping("/knowledge/entityAttribute")
-public class EntityAttributeController extends BaseController
-{
-    @Autowired
-    private IEntityAttributeService entityAttributeService;
-
-    /**
-     * 查询实体属性列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(EntityAttribute entityAttribute)
-    {
-        startPage();
-        List<EntityAttribute> list = entityAttributeService.selectEntityAttributeList(entityAttribute);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体属性列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:export')")
-    @Log(title = "实体属性", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EntityAttribute entityAttribute)
-    {
-        List<EntityAttribute> list = entityAttributeService.selectEntityAttributeList(entityAttribute);
-        ExcelUtil<EntityAttribute> util = new ExcelUtil<EntityAttribute>(EntityAttribute.class);
-        util.exportExcel(response, list, "实体属性数据");
-    }
-
-    /**
-     * 获取实体属性详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:query')")
-    @GetMapping(value = "/{attrClsId}")
-    public AjaxResult getInfo(@PathVariable("attrClsId") String attrClsId)
-    {
-        return success(entityAttributeService.selectEntityAttributeByAttrClsId(attrClsId));
-    }
-
-    /**
-     * 新增实体属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:add')")
-    @Log(title = "实体属性", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EntityAttribute entityAttribute)
-    {
-        return toAjax(entityAttributeService.insertEntityAttribute(entityAttribute));
-    }
-
-    /**
-     * 修改实体属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:edit')")
-    @Log(title = "实体属性", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EntityAttribute entityAttribute)
-    {
-        return toAjax(entityAttributeService.updateEntityAttribute(entityAttribute));
-    }
-
-    /**
-     * 删除实体属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityAttribute:remove')")
-    @Log(title = "实体属性", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{attrClsIds}")
-    public AjaxResult remove(@PathVariable String[] attrClsIds)
-    {
-        return toAjax(entityAttributeService.deleteEntityAttributeByAttrClsIds(attrClsIds));
-    }
-
-    @GetMapping(value = "/ent/{id}/attrs")
-    public AjaxResult getEntityAttrs(@RequestParam String id, @RequestParam String attrType, @RequestParam Boolean isModel) {
-        EntityAttribute entityAttribute = new EntityAttribute();
-        entityAttribute.setEntId(id);
-        entityAttribute.setAttrType(attrType);
-        return success(entityAttributeService.getEntityAttrs(entityAttribute));
-    }
-
-    @PostMapping(value = "/ent/update/batch")
-    public AjaxResult updateBatch(@RequestBody List<EntityAttribute> entityAttributeList) {
-        entityAttributeService.updateBatch(entityAttributeList);
-        return success();
-    }
-}

+ 0 - 155
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassAttributeController.java

@@ -1,155 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.EntityClassAttribute;
-import com.kgraph.graph.knowledge.service.IEntityClassAttributeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 实体类属性Controller
- * 
- * @author Allen
- * @date 2022-11-29
- */
-@RestController
-@RequestMapping("/knowledge/classAttribute")
-public class EntityClassAttributeController extends BaseController
-{
-    @Autowired
-    private IEntityClassAttributeService entityClassAttributeService;
-
-    /**
-     * 查询实体类属性列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(EntityClassAttribute entityClassAttribute)
-    {
-        startPage();
-        List<EntityClassAttribute> list = entityClassAttributeService.selectEntityClassAttributeList(entityClassAttribute);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体类属性列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:export')")
-    @Log(title = "实体类属性", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EntityClassAttribute entityClassAttribute)
-    {
-        List<EntityClassAttribute> list = entityClassAttributeService.selectEntityClassAttributeList(entityClassAttribute);
-        ExcelUtil<EntityClassAttribute> util = new ExcelUtil<EntityClassAttribute>(EntityClassAttribute.class);
-        util.exportExcel(response, list, "实体类属性数据");
-    }
-
-    /**
-     * 获取实体类属性详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:query')")
-    @GetMapping(value = "/{attrClsId}")
-    public AjaxResult getInfo(@PathVariable("attrClsId") String attrClsId)
-    {
-        return success(entityClassAttributeService.selectEntityClassAttributeByAttrClsId(attrClsId));
-    }
-
-    /**
-     * 新增实体类属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:add')")
-    @Log(title = "实体类属性", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EntityClassAttribute entityClassAttribute)
-    {
-        return toAjax(entityClassAttributeService.insertEntityClassAttribute(entityClassAttribute));
-    }
-
-    /**
-     * 修改实体类属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:edit')")
-    @Log(title = "实体类属性", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EntityClassAttribute entityClassAttribute)
-    {
-        return toAjax(entityClassAttributeService.updateEntityClassAttribute(entityClassAttribute));
-    }
-
-    /**
-     * 删除实体类属性
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classAttribute:remove')")
-    @Log(title = "实体类属性", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{attrClsIds}")
-    public AjaxResult remove(@PathVariable String[] attrClsIds)
-    {
-        return toAjax(entityClassAttributeService.deleteEntityClassAttributeByAttrClsIds(attrClsIds));
-    }
-
-    // ********************************* 以下为适配知识图谱ui接口***********************
-
-    @GetMapping("/attrcls/{entClsId}/list")
-    public AjaxResult entclsIdList(@PathVariable String entClsId, @RequestParam String attrType)
-    {
-        EntityClassAttribute entityClassAttribute = new EntityClassAttribute();
-        entityClassAttribute.setEntClsID(entClsId);
-        entityClassAttribute.setAttrType(attrType);
-        List<EntityClassAttribute> list = entityClassAttributeService.selectEntityClassAttributeList(entityClassAttribute);
-        return success(list);
-    }
-
-    @PostMapping("/attrcls/add")
-    public AjaxResult attrclsAdd(@RequestBody EntityClassAttribute entityClassAttribute)
-    {
-        return toAjax(entityClassAttributeService.insertEntityClassAttribute(entityClassAttribute));
-    }
-
-    /**
-     * 待审批属性
-     * @return
-     */
-    @GetMapping("/attrcls/none/list")
-    public AjaxResult attrclsNoneList(@RequestParam String entClsID)
-    {
-        EntityClassAttribute entityClassAttribute = new EntityClassAttribute();
-        entityClassAttribute.setEntClsID(entClsID);
-        List<EntityClassAttribute> list = entityClassAttributeService.selectNoneEntityClassAttributeByEntClsID(entityClassAttribute);
-        return success(list);
-    }
-
-    @PostMapping("/attrcls/update")
-    public AjaxResult attrclsUpdate(@RequestBody EntityClassAttribute entityClassAttribute)
-    {
-        return toAjax(entityClassAttributeService.updateEntityClassAttribute(entityClassAttribute));
-    }
-
-    @PostMapping("/attrcls/del/{id}")
-    public AjaxResult attrclsDelId(@PathVariable String id)
-    {
-        return toAjax(entityClassAttributeService.deleteEntityClassAttributeByAttrClsIds(new String[]{id}));
-    }
-
-    /**
-     * 待审批属性
-     * @return
-     */
-    @GetMapping("/attrcls/notnull/{id}/list")
-    public AjaxResult attrclsNotNullIdList(@PathVariable String id)
-    {
-        EntityClassAttribute entityClassAttribute = new EntityClassAttribute();
-        entityClassAttribute.setEntClsID(id);
-        entityClassAttribute.setNotNull(true);
-        List<EntityClassAttribute> list = entityClassAttributeService.selectEntityClassAttributeList(entityClassAttribute);
-        return success(list);
-    }
-}

+ 0 - 142
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassController.java

@@ -1,142 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.EntityClass;
-import com.kgraph.graph.knowledge.service.IEntityClassService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 实体类Controller
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@RestController
-@RequestMapping("/knowledge/class")
-public class EntityClassController extends BaseController
-{
-    @Autowired
-    private IEntityClassService entityClassService;
-
-    /**
-     * 查询实体类列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(EntityClass entityClass)
-    {
-        startPage();
-        List<EntityClass> list = entityClassService.selectEntityClassList(entityClass);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体类列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:export')")
-    @Log(title = "实体类", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EntityClass entityClass)
-    {
-        List<EntityClass> list = entityClassService.selectEntityClassList(entityClass);
-        ExcelUtil<EntityClass> util = new ExcelUtil<EntityClass>(EntityClass.class);
-        util.exportExcel(response, list, "实体类数据");
-    }
-
-    /**
-     * 获取实体类详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:query')")
-    @GetMapping(value = "/{entClsId}")
-    public AjaxResult getInfo(@PathVariable("entClsId") String entClsId)
-    {
-        return success(entityClassService.selectEntityClassByEntClsId(entClsId));
-    }
-
-    /**
-     * 新增实体类
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:add')")
-    @Log(title = "实体类", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EntityClass entityClass)
-    {
-        entityClass.setCreateBy(getUsername());
-        return toAjax(entityClassService.insertEntityClass(entityClass));
-    }
-
-    /**
-     * 修改实体类
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:edit')")
-    @Log(title = "实体类", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EntityClass entityClass)
-    {
-        return toAjax(entityClassService.updateEntityClass(entityClass));
-    }
-
-    /**
-     * 删除实体类
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:class:remove')")
-    @Log(title = "实体类", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{entClsIds}")
-    public AjaxResult remove(@PathVariable String[] entClsIds)
-    {
-        return toAjax(entityClassService.deleteEntityClassByEntClsIds(entClsIds));
-    }
-
-    // ********************************* 以下为适配知识图谱ui接口***********************
-
-    // 获取所有实体类
-    @GetMapping("/entcls")
-    public AjaxResult entcls()
-    {
-        return success(entityClassService.selectEntityClassList(new EntityClass()));
-    }
-
-    @PostMapping("/entcls/add")
-    public AjaxResult entclsAdd(@RequestBody EntityClass entityClass) {
-        int i = entityClassService.insertEntityClass(entityClass);
-        if (i > 0) {
-            return AjaxResult.success((Object) entityClass.getEntClsID());
-        } else {
-            return AjaxResult.error();
-        }
-    }
-
-    @PostMapping("/entcls/update")
-    public AjaxResult entclsUpdate(@RequestBody EntityClass entityClass)
-    {
-        return toAjax(entityClassService.updateEntityClass(entityClass));
-    }
-
-    @GetMapping("/entcls/tree")
-    public AjaxResult entclstree()
-    {
-        return success(entityClassService.selectEntityClassList(new EntityClass()));
-    }
-
-    @GetMapping("/entcls/{id}")
-    public AjaxResult entclsId(@PathVariable(value = "id") String id)
-    {
-        return success(entityClassService.selectEntityClassByEntClsId(id));
-    }
-
-    @DeleteMapping("/entcls/del/{entClsId}")
-    public AjaxResult entclsDel(@PathVariable String entClsId) {
-        return toAjax(entityClassService.deleteEntityClassByEntClsIds(new String[]{entClsId}));
-    }
-
-}

+ 0 - 156
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityClassRelationController.java

@@ -1,156 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.EntityClassRelation;
-import com.kgraph.graph.knowledge.service.IEntityClassRelationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 实体类关系Controller
- *
- * @author Allen
- * @date 2022-11-29
- */
-@RestController
-@RequestMapping("/knowledge/classRelation")
-public class EntityClassRelationController extends BaseController
-{
-    @Autowired
-    private IEntityClassRelationService entityClassRelationService;
-
-    /**
-     * 查询实体类关系列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(EntityClassRelation entityClassRelation)
-    {
-        startPage();
-        List<EntityClassRelation> list = entityClassRelationService.selectEntityClassRelationList(entityClassRelation);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体类关系列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:export')")
-    @Log(title = "实体类关系", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EntityClassRelation entityClassRelation)
-    {
-        List<EntityClassRelation> list = entityClassRelationService.selectEntityClassRelationList(entityClassRelation);
-        ExcelUtil<EntityClassRelation> util = new ExcelUtil<EntityClassRelation>(EntityClassRelation.class);
-        util.exportExcel(response, list, "实体类关系数据");
-    }
-
-    /**
-     * 获取实体类关系详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:query')")
-    @GetMapping(value = "/{relClsId}")
-    public AjaxResult getInfo(@PathVariable("relClsId") String relClsId)
-    {
-        return success(entityClassRelationService.selectEntityClassRelationByRelClsId(relClsId));
-    }
-
-    /**
-     * 新增实体类关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:add')")
-    @Log(title = "实体类关系", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EntityClassRelation entityClassRelation)
-    {
-        return toAjax(entityClassRelationService.insertEntityClassRelation(entityClassRelation));
-    }
-
-    /**
-     * 修改实体类关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:edit')")
-    @Log(title = "实体类关系", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EntityClassRelation entityClassRelation)
-    {
-        return toAjax(entityClassRelationService.updateEntityClassRelation(entityClassRelation));
-    }
-
-    /**
-     * 删除实体类关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:classRelation:remove')")
-    @Log(title = "实体类关系", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{relClsIds}")
-    public AjaxResult remove(@PathVariable String[] relClsIds)
-    {
-        return toAjax(entityClassRelationService.deleteEntityClassRelationByRelClsIds(relClsIds));
-    }
-
-    // ********************************* 以下为适配知识图谱ui接口***********************
-
-    @GetMapping("/relcls/{id}/list")
-    public AjaxResult relattrIdList(@PathVariable String id, @RequestParam(value = "entClsType") String entClsType) {
-        EntityClassRelation entityClassRelation = new EntityClassRelation();
-        if (EntityClassRelation.START_POINT.equalsIgnoreCase(entClsType)) {
-            entityClassRelation.setStartID(id);
-        } else {
-            entityClassRelation.setEndID(id);
-        }
-        List<EntityClassRelation> list = entityClassRelationService.relattrIdList(id, entClsType);
-        return success(list);
-    }
-
-    /**
-     * TODO complex
-      */
-    @GetMapping("/relcls/list")
-    public TableDataInfo relclsList(@RequestParam(required = false) String name,
-                                    @RequestParam(required = false) Boolean isModel)
-    {
-        startPage();
-        EntityClassRelation entityClassRelation = new EntityClassRelation();
-        // isModel?
-        entityClassRelation.setRelClsName(name);
-//        List<EntityClassRelation> list = entityClassRelationService.selectEntityClassRelationList(entityClassRelation);
-        List<EntityClassRelation> list = entityClassRelationService.relclsList(name);
-        return getDataTable(list);
-    }
-
-    @PostMapping("/relcls/add")
-    public AjaxResult relclsAdd(@RequestBody EntityClassRelation entityClassRelation)
-    {
-        return toAjax(entityClassRelationService.insertEntityClassRelation(entityClassRelation));
-    }
-
-    @PostMapping("/relcls/update")
-    public AjaxResult relclsUpdate(@RequestBody EntityClassRelation entityClassRelation)
-    {
-        return toAjax(entityClassRelationService.updateEntityClassRelation(entityClassRelation));
-    }
-
-    @PostMapping("/relcls/del/{relClsId}")
-    public AjaxResult relclsDel(@PathVariable String relClsId) {
-        return toAjax(entityClassRelationService.deleteEntityClassRelationByRelClsIds(new String[]{relClsId}));
-    }
-
-
-    @GetMapping("/relcls/all/list/{id}")
-    public AjaxResult relclsAllList(@PathVariable String id) {
-
-        return success(entityClassRelationService.getClazzRelVoByClassId(id));
-    }
-    @GetMapping("/relcls/getall")
-    public AjaxResult getall() {
-        return success(entityClassRelationService.getEntClsRelAllInfoList());
-    }
-}

+ 0 - 235
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityController.java

@@ -1,235 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.PageDomain;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.core.page.TableSupport;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.Entity;
-import com.kgraph.graph.knowledge.service.IEntityService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 实体Controller
- *
- * @author Allen
- * @date 2022-11-28
- */
-@RestController
-@RequestMapping("/knowledge/entity")
-public class EntityController extends BaseController
-{
-    @Autowired
-    private IEntityService entityService;
-
-    /**
-     * 查询实体列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(Entity entity)
-    {
-        startPage();
-        List<Entity> list = entityService.selectEntityList(entity);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:export')")
-    @Log(title = "实体", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, Entity entity)
-    {
-        List<Entity> list = entityService.selectEntityList(entity);
-        ExcelUtil<Entity> util = new ExcelUtil<Entity>(Entity.class);
-        util.exportExcel(response, list, "实体数据");
-    }
-
-//    /**
-//     * 获取实体详细信息
-//     */
-//    @PreAuthorize("@ss.hasPermi('knowledge:entity:query')")
-//    @GetMapping(value = "/{entId}")
-//    public AjaxResult getInfo(@PathVariable("entId") String entId)
-//    {
-//        return success(entityService.selectEntityByEntId(entId));
-//    }
-
-    /**
-     * 新增实体
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:add')")
-    @Log(title = "实体", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody Entity entity)
-    {
-        return toAjax(entityService.insertEntity(entity));
-    }
-
-    /**
-     * 修改实体
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:edit')")
-    @Log(title = "实体", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody Entity entity)
-    {
-        return toAjax(entityService.updateEntity(entity));
-    }
-
-    /**
-     * 删除实体
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:remove')")
-    @Log(title = "实体", businessType = BusinessType.DELETE)
-	@DeleteMapping("delete/{entIds}")
-    public AjaxResult remove(@PathVariable String[] entIds)
-    {
-        return toAjax(entityService.deleteEntityByEntIds(entIds));
-    }
-
-    // ********************************* 以下为适配知识图谱ui接口 ******************
-    /**
-     * 根据实体类id获取实体列表
-     */
-//    @PreAuthorize("@ss.hasPermi('knowledge:entity:list')")
-    @GetMapping("{entClsId}/list")
-    public AjaxResult getEntityListByEntityClassId(@PathVariable String entClsId)
-    {
-        Entity entity = new Entity();
-        entity.setEntClsID(entClsId);
-        List<Entity> list = entityService.selectEntityList(entity);
-        return success(list);
-    }
-
-    /**
-     * 删除实体
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entity:remove')")
-    @Log(title = "实体", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{entId}")
-    public AjaxResult delEntityById(@PathVariable String entId)
-    {
-        return toAjax(entityService.deleteEntityByEntIds(new String[]{entId}));
-    }
-
-    /**
-     * 添加实体
-     */
-//    @PreAuthorize("@ss.hasPermi('knowledge:entity:add')")
-    @Log(title = "实体", businessType = BusinessType.INSERT)
-    @PostMapping("/add")
-    public AjaxResult addEntity(@RequestBody Entity entity)
-    {
-        return toAjax(entityService.insertEntity(entity));
-    }
-
-    /**
-     * 获取实体详细信息
-     */
-//    @PreAuthorize("@ss.hasPermi('knowledge:entity:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getEntityDetailById(@PathVariable("id") String entId)
-    {
-        return success(entityService.selectEntityByEntId(entId));
-    }
-
-    /**
-     * 修改实体
-     */
-//    @PreAuthorize("@ss.hasPermi('knowledge:entity:edit')")
-    @Log(title = "实体", businessType = BusinessType.UPDATE)
-    @PutMapping("/update")
-    public AjaxResult updateEntityName(@RequestBody Entity entity)
-    {
-        return toAjax(entityService.updateEntity(entity));
-    }
-
-    @PostMapping("/ent/add")
-    public AjaxResult entAdd(@RequestBody Entity entity)
-    {
-        entityService.insertEntity(entity);
-        return success(entity);
-    }
-
-    @GetMapping(value = "/ent/entquery")
-    public TableDataInfo entquery(@RequestParam(required = false) String searchStr,
-                                          @RequestParam(required = false) String entClsIDs,
-                                          @RequestParam(required = false) Boolean isModel,
-                                          @RequestParam(required = false) String isIcon,
-                                          @RequestParam(required = false) String unionID)
-    {
-        startPage();
-        Entity entity = new Entity();
-        entity.setSearchValue(searchStr);
-        entity.setEntClsID(entClsIDs);
-        entity.setIsModel(isModel);
-        List<Entity> list = entityService.selectEntityList(entity);
-        return getDataTable(list);
-    }
-
-    @DeleteMapping("/ent/del/{entId}")
-    public AjaxResult delEntityByIds(@PathVariable String entId)
-    {
-        return toAjax(entityService.deleteEntityByEntIds(new String[]{entId}));
-    }
-
-
-    @GetMapping(value = "/ent/{id}")
-    public AjaxResult getEntityById(@PathVariable("id") String entId)
-    {
-        return success(entityService.selectEntityByEntId(entId));
-    }
-
-    @PostMapping(value = "/ent/update")
-    public AjaxResult entUpdate(@RequestBody Entity entity)
-    {
-        return toAjax(entityService.updateEntity(entity));
-    }
-
-    @GetMapping("/relcls/{direction}/{relClsId}/ent/{entId}")
-    public Map getEntclsEnt(@PathVariable String direction, @PathVariable String relClsId, @PathVariable String entId) {
-        startPage();
-        List<Entity> list = entityService.getEntclsEnt(direction, relClsId, entId);
-        TableDataInfo dataTable = getDataTable(list);
-        HashMap<String, Object> returnValue = getReturnValue(dataTable);
-        return returnValue;
-    }
-
-    private HashMap<String, Object> getReturnValue(TableDataInfo dataTable) {
-        HashMap<String, Object> returnValue = new HashMap<>(16);
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        returnValue.put("code",200);
-        returnValue.put("msg", "请求成功");
-        returnValue.put("duration", null);
-        returnValue.put("data", dataTable.getRows());
-        returnValue.put("size", pageSize);
-        returnValue.put("current", pageNum);
-        returnValue.put("headers", new String[0]);
-        returnValue.put("searchCount", true);
-        returnValue.put("pages", 1);
-        returnValue.put("total", dataTable.getTotal());
-        return returnValue;
-    }
-
-    @GetMapping("/show/entlist")
-    public AjaxResult searchByName(@RequestParam String name)
-    {
-        List<Entity> list = entityService.searchByName(name);
-        return success(list);
-    }
-}

+ 0 - 142
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/EntityRelationController.java

@@ -1,142 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.annotation.Log;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.common.core.page.PageDomain;
-import com.kgraph.common.core.page.TableDataInfo;
-import com.kgraph.common.core.page.TableSupport;
-import com.kgraph.common.enums.BusinessType;
-import com.kgraph.common.utils.poi.ExcelUtil;
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.knowledge.domain.EntityRelationVO;
-import com.kgraph.graph.knowledge.service.IEntityRelationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 实体关系Controller
- * 
- * @author kgraph
- * @date 2022-12-26
- */
-@RestController
-@RequestMapping("/knowledge/entityRelation")
-public class EntityRelationController extends BaseController
-{
-    @Autowired
-    private IEntityRelationService entityRelationService;
-
-    /**
-     * 查询实体关系列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(EntityRelation entityRelation)
-    {
-        startPage();
-        List<EntityRelation> list = entityRelationService.selectEntityRelationList(entityRelation);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出实体关系列表
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:export')")
-    @Log(title = "实体关系", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, EntityRelation entityRelation)
-    {
-        List<EntityRelation> list = entityRelationService.selectEntityRelationList(entityRelation);
-        ExcelUtil<EntityRelation> util = new ExcelUtil<EntityRelation>(EntityRelation.class);
-        util.exportExcel(response, list, "实体关系数据");
-    }
-
-    /**
-     * 获取实体关系详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:query')")
-    @GetMapping(value = "/{relId}")
-    public AjaxResult getInfo(@PathVariable("relId") String relId)
-    {
-        return success(entityRelationService.selectEntityRelationByRelId(relId));
-    }
-
-    /**
-     * 新增实体关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:add')")
-    @Log(title = "实体关系", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EntityRelation entityRelation)
-    {
-        return toAjax(entityRelationService.insertEntityRelation(entityRelation));
-    }
-
-    /**
-     * 修改实体关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:edit')")
-    @Log(title = "实体关系", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EntityRelation entityRelation)
-    {
-        return toAjax(entityRelationService.updateEntityRelation(entityRelation));
-    }
-
-    /**
-     * 删除实体关系
-     */
-    @PreAuthorize("@ss.hasPermi('knowledge:entityRelation:remove')")
-    @Log(title = "实体关系", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{relIds}")
-    public AjaxResult remove(@PathVariable String[] relIds)
-    {
-        return toAjax(entityRelationService.deleteEntityRelationByRelIds(relIds));
-    }
-
-    @GetMapping("/entcls/{direction}/{relClsId}/{entId}")
-    public Map getEntcls(@PathVariable String direction, @PathVariable String relClsId, @PathVariable String entId) {
-        startPage();
-        List<EntityRelationVO> list = entityRelationService.getRelationVOByEntityId(direction, relClsId, entId);
-        TableDataInfo dataTable = getDataTable(list);
-        HashMap<String, Object> returnValue = getReturnValue(dataTable);
-        return returnValue;
-    }
-
-    private HashMap<String, Object> getReturnValue(TableDataInfo dataTable) {
-        HashMap<String, Object> returnValue = new HashMap<>(16);
-        PageDomain pageDomain = TableSupport.buildPageRequest();
-        Integer pageNum = pageDomain.getPageNum();
-        Integer pageSize = pageDomain.getPageSize();
-        returnValue.put("code",200);
-        returnValue.put("msg", "请求成功");
-        returnValue.put("duration", null);
-        returnValue.put("data", dataTable.getRows());
-        returnValue.put("size", pageSize);
-        returnValue.put("current", pageNum);
-        returnValue.put("headers", new String[0]);
-        returnValue.put("searchCount", true);
-        returnValue.put("pages", 1);
-        returnValue.put("total", dataTable.getTotal());
-        return returnValue;
-    }
-
-
-    @PostMapping("/rel/add/batch")
-    public AjaxResult relAddBatch(@RequestBody List<EntityRelation> entityRelationList){
-        return success(entityRelationService.relAddBatch(entityRelationList));
-    }
-
-    @DeleteMapping("/rel/del/{relIds}")
-    public AjaxResult relDel(@PathVariable String[] relIds)
-    {
-        return toAjax(entityRelationService.deleteEntityRelationByRelIds(relIds));
-    }
-}

+ 0 - 40
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/MapController.java

@@ -1,40 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.common.core.domain.AjaxResult;
-import com.kgraph.graph.knowledge.domain.EntityClass;
-import com.kgraph.graph.knowledge.domain.GraphRequest;
-import com.kgraph.graph.knowledge.service.IEntityClassService;
-import com.kgraph.graph.knowledge.service.IMapService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-@RestController
-@RequestMapping("/knowledge/statisticalMap")
-public class MapController extends BaseController {
-
-    @Autowired
-    IMapService mapService;
-
-    @Autowired
-    IEntityClassService entityClassService;
-
-    @GetMapping("/all/{id}/list")
-    public AjaxResult getMap(@PathVariable String id){
-        return success(mapService.getMap(id));
-    }
-    @PostMapping("/show/graph")
-    public AjaxResult showGraph(@RequestBody GraphRequest graphRequest){
-        return success(mapService.getMap(graphRequest.getEntId()));
-    }
-
-    @GetMapping("/show/allGraph")
-    public AjaxResult showAllGraph(){
-        return success(mapService.getAllMap());
-    }
-
-    @GetMapping("/statistic/entclslist")
-    public AjaxResult entclslist(){
-        return success(entityClassService.selectEntityClassList(new EntityClass()));
-    }
-}

+ 0 - 27
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/MonitorController.java

@@ -1,27 +0,0 @@
-package com.kgraph.graph.knowledge.controller;
-
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.graph.knowledge.controller.mock.MockController;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author allen
- */
-@RequestMapping("/knowledge/monitor")
-@RestController
-public class MonitorController  extends BaseController {
-
-    @Autowired
-    MockController mockController;
-
-    @GetMapping("/getMonitorByNum/{num}")
-    public Object getMonitorByNum(@PathVariable("num") String num)
-    {
-        Object getMonitorByNum = mockController.getJsonByPath("getMonitorByNum", true);
-        return getMonitorByNum;
-    }
-}

+ 0 - 208
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/MockController.java

@@ -1,208 +0,0 @@
-package com.kgraph.graph.knowledge.controller.mock;
-
-import com.alibaba.fastjson2.JSONArray;
-import com.alibaba.fastjson2.JSONObject;
-import com.kgraph.common.core.controller.BaseController;
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.neo4j.DTO.DocInfo;
-import org.springframework.web.bind.annotation.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-
-/**
- * @author allen
- */
-@RestController
-public class MockController extends BaseController {
-    public static String  YOUR_WORKSPACE_PATH  = "C:/work/workspace/super/kgraph/kgraph-graph/";
-    public static String  BASE_PATH = YOUR_WORKSPACE_PATH + "src/main/java/com/kgraph/graph/knowledge/controller/mock/json/";
-
-    /**
-     * @Link EntityClassController.entcls
-     */
-    @Deprecated
-    @GetMapping("/entcls")
-    public Object entcls(EntityRelation entityRelation)
-    {
-        return getJsonByPath("entcls", false);
-    }
-
-    /**
-     * @Link EntityClassController.entclsAdd
-     */
-    @PostMapping("/entcls/add")
-    public Object entclsAdd()
-    {
-        return getJsonByPath("entclsAdd", false);
-    }
-
-    @PostMapping("/entcls/update")
-    public Object entclsUpdate()
-    {
-        return getJsonByPath("entclsUpdate", false);
-    }
-
-
-    @GetMapping("/entcls/tree")
-    public Object entclstree()
-    {
-        return getJsonByPath("entclstree", false);
-    }
-
-    @GetMapping("/entcls/{id}")
-    public Object entclsId()
-    {
-        return getJsonByPath("entclsId", false);
-    }
-
-    @GetMapping("/attrcls/{id}/list")
-    public Object entclsIdList()
-    {
-        return getJsonByPath("entclsIdList", false);
-    }
-
-    @PostMapping("/attrcls/add")
-    public Object attrclsAdd()
-    {
-        return getJsonByPath("attrclsAdd", false);
-    }
-
-    @GetMapping("/attrcls/none/list")
-    public Object attrclsNoneList()
-    {
-        return getJsonByPath("attrclsNoneList", false);
-    }
-
-    @PostMapping("/attrcls/update")
-    public Object attrclsUpdate()
-    {
-        return getJsonByPath("attrclsUpdate", false);
-    }
-
-    @PostMapping("/attrcls/del/{id}")
-    public Object attrclsDelId()
-    {
-        return getJsonByPath("attrclsDelId", false);
-    }
-    @GetMapping("/relcls/{id}/list")
-    public Object relattrIdList(@RequestParam(value = "entClsType") String entClsType) {
-        String fileName = "relclsIdList";
-        if (!"START".equalsIgnoreCase(entClsType)) {
-            fileName = "relclsIdListEnd";
-        }
-        return getJsonByPath(fileName, false);
-    }
-
-    @GetMapping("/relcls/list")
-    public Object relclsList()
-    {
-        return getJsonByPath("relclsList", false);
-    }
-
-    @PostMapping("/relcls/add")
-    public Object relclsAdd()
-    {
-        return getJsonByPath("relclsAdd", false);
-    }
-
-    @PostMapping("/relcls/update")
-    public Object relclsUpdate()
-    {
-        return getJsonByPath("relclsUpdate", false);
-    }
-
-    @PostMapping("/relcls/del/{id}")
-    public Object relclsDel()
-    {
-        return getJsonByPath("relclsDel", false);
-    }
-
-    // TODO 实体类-关系-属性 新概念?
-    @GetMapping("/relcls/{id}/attrs")
-    public Object relclsIdAttrs() {
-        return getJsonByPath("relclsIdAttrs", false);
-    }
-
-
-    @PostMapping("/relcls/attrcls/add")
-    public Object relclsAttrclsAdd()
-    {
-        return getJsonByPath("relclsAttrclsAdd", false);
-    }
-
-    @PostMapping("/relcls/attrcls/update")
-    public Object relclsAttrclsUpdate()
-    {
-        return getJsonByPath("relclsAttrclsUpdate", false);
-    }
-
-    @PostMapping("/relcls/attrcls/del/{id}")
-    public Object relclsAttrclsDel()
-    {
-        return getJsonByPath("relclsAttrclsDel", false);
-    }
-
-    // todo ??
-    @GetMapping("/neural/flow")
-    public Object neuralFlow() {
-        return getJsonByPath("neuralFlow", false);
-    }
-
-    //*************************************************实体相关
-
-    @GetMapping("/ent/entquery")
-    public Object entquery(EntityRelation entityRelation)
-    {
-        return getJsonByPath("entquery", false);
-    }
-
-    @GetMapping("/ent/search/entclses")
-    public Object entSearchEntclses()
-    {
-        return getJsonByPath("entSearchEntclses", false);
-    }
-
-
-
-    @PostMapping("/show/graph")
-    public Object showGraph()
-    {
-        return getJsonByPath("showGraph", false);
-    }
-
-    private String readFile(String strFile) {
-        String returnValue = "";
-        File file = new File(BASE_PATH + strFile + ".json");
-        if(!file.exists()){
-            strFile = "empty200";
-        }
-
-        try (InputStream is = new FileInputStream(BASE_PATH + strFile + ".json")) {
-            int iAvail = is.available();
-            byte[] bytes = new byte[iAvail];
-            is.read(bytes);
-            returnValue = new String(bytes);
-            logger.info("文件内容:\n" + returnValue);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-        return returnValue;
-    }
-
-    public Object getJsonByPath(String fileName, Boolean isArray) {
-        String s = readFile(fileName);
-        if (isArray) {
-            return JSONArray.parseArray(s);
-        } else {
-            return JSONObject.parseObject(s);
-        }
-    }
-
-    @PostMapping("/extractKnowledge")
-    public void extractKnowledge(@RequestBody DocInfo docInfo)
-    {
-        logger.info(docInfo.toString());
-    }
-}

+ 0 - 6
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/attrclsAdd.json

@@ -1,6 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": "c6f27bba700d4ec6b650228ea1f4ab7f"
-}

+ 0 - 23
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/attrclsNoneList.json

@@ -1,23 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": {
-    "pageCount": 1,
-    "count": 1,
-    "attrClsVOList": [
-      {
-        "attrClsID": "0e0e76ab8d2d4e80b249dbf646815f6e",
-        "attrClsName": "其他属性",
-        "attrType": null,
-        "attrValueType": "TEXT",
-        "isEdit": null,
-        "attrUnit": null,
-        "attrClsMemo": null,
-        "domain": null,
-        "entUseCount": 1,
-        "notNull": null
-      }
-    ]
-  }
-}

+ 0 - 6
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/empty200.json

@@ -1,6 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": null
-}

+ 0 - 39
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entSearchEntclses.json

@@ -1,39 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "entClsID": "39bbc6feaf9841838230d624c2087413",
-      "entClsName": "测试实体类3"
-    },
-    {
-      "entClsID": "beb27994605e40e79caa037cb101694a",
-      "entClsName": "测试类2"
-    },
-    {
-      "entClsID": "885bb3733737443c978ddadd589aaf1e",
-      "entClsName": "测试类"
-    },
-    {
-      "entClsID": "e96990429da644359fd9289c4e4cf352",
-      "entClsName": "文档"
-    },
-    {
-      "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-      "entClsName": "故障案例"
-    },
-    {
-      "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-      "entClsName": "故障"
-    },
-    {
-      "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-      "entClsName": "征兆"
-    },
-    {
-      "entClsID": "79a6dd081eab43af959bd9a642b8445b",
-      "entClsName": "测试实体类"
-    }
-  ]
-}

+ 0 - 175
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entcls.json

@@ -1,175 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "entClsID": "79a6dd081eab43af959bd9a642b8445b",
-      "entClsName": "测试实体类",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "26d6fa47ae3d4e93b49c1cf417e7c4c7",
-      "entClsName": "实体型号分类",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "bc7fdf72bbaf4d279eb91e59c6dcf8bd",
-      "entClsName": "实体型号",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "ff24a66ad16d45498372e5feb6d0242d",
-      "entClsName": "指标",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-      "entClsName": "征兆",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "5bf596334b1947d7ac3eb84f40435fd7",
-      "entClsName": "健康状态",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-      "entClsName": "故障",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-      "entClsName": "故障案例",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "ea20ccd5bfbd41a785a7cac11b230a27",
-      "entClsName": "故障起因",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "3e00179ed3c94d5683c05519c52b6516",
-      "entClsName": "故障处置",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "fe0a1c19940b41e3b1be2912fbe65666",
-      "entClsName": "故障诊断模型",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "7514270c24dd42b08b8e144c409ab30d",
-      "entClsName": "故障诊断过程",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "4ab1ce46c5da4ac58549d124e432c1d6",
-      "entClsName": "文本资源",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "e96990429da644359fd9289c4e4cf352",
-      "entClsName": "文档",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "fb977ccb7cf4406e8fc91b1554ec259a",
-      "entClsName": "1234",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "aa621c7627b04f8ebf5693ef4835d64e",
-      "entClsName": "test",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "f7f3d6209eeb4857996d37b7cf679c68",
-      "entClsName": "测试2",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "02e5bcbb74e2472180bd57f937157c20",
-      "entClsName": "Task",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "ba8250a7912246838a7b4e106f8d0c3b",
-      "entClsName": "Method",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "6d13e168d4e449c6af67a7ebb858f35c",
-      "entClsName": "Indicator",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "038b198e290341d19b96316655c94250",
-      "entClsName": "清清浅浅",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "fd29b17337a045adad742b6d6ae26a99",
-      "entClsName": "测试-meng",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "88f3ea37a811490b8bd3c898a9e705a0",
-      "entClsName": "测试-meng2",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "d11c264b446e17ac495f48452046895b",
-      "entClsName": "国家",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "4acd17fca4f8473fb8b9343e51e25a39",
-      "entClsName": "text",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "885bb3733737443c978ddadd589aaf1e",
-      "entClsName": "测试类",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "beb27994605e40e79caa037cb101694a",
-      "entClsName": "测试类2",
-      "pid": null,
-      "entClsIcon": null
-    },
-    {
-      "entClsID": "39bbc6feaf9841838230d624c2087413",
-      "entClsName": "测试实体类3",
-      "pid": null,
-      "entClsIcon": null
-    }
-  ]
-}

+ 0 - 6
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsAdd.json

@@ -1,6 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": "39bbc6feaf9841838230d624c2087413"
-}

+ 0 - 16
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsId.json

@@ -1,16 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": {
-    "entClsID": "39bbc6feaf9841838230d624c2087413",
-    "entClsName": "测试实体类3",
-    "entClsMemo": "测试实体类3的描述",
-    "entClsAllowAttrType": "CIDX,ELEM,MIME,NONE",
-    "parents": null,
-    "isRoot": "T",
-    "entClsIcon": null,
-    "backGroundColor": "#ff1e02",
-    "clsType": null
-  }
-}

+ 0 - 31
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsIdList.json

@@ -1,31 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "attrClsID": "c6f27bba700d4ec6b650228ea1f4ab7f",
-      "attrClsName": "测试实体类基础属性",
-      "attrType": "ELEM",
-      "attrValueType": "TEXT",
-      "isEdit": "T",
-      "attrUnit": "实体类基础属性单位",
-      "attrClsMemo": "实体类基础属性描述",
-      "domain": null,
-      "entUseCount": null,
-      "notNull": true
-    },
-    {
-      "attrClsID": "03cbdaf78f3d4f06a1829a528ff2293e",
-      "attrClsName": "测试实体类基础属性2",
-      "attrType": "ELEM",
-      "attrValueType": "TEXT",
-      "isEdit": "T",
-      "attrUnit": "实体类基础属性单位2",
-      "attrClsMemo": "描述,没写",
-      "domain": null,
-      "entUseCount": null,
-      "notNull": true
-    }
-  ]
-}

+ 0 - 196
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entclsTree.json

@@ -1,196 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "entClsID": "02e5bcbb74e2472180bd57f937157c20",
-      "entClsName": "Task",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "038b198e290341d19b96316655c94250",
-      "entClsName": "清清浅浅",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-      "entClsName": "征兆",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 1
-    },
-    {
-      "entClsID": "26d6fa47ae3d4e93b49c1cf417e7c4c7",
-      "entClsName": "实体型号分类",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "3e00179ed3c94d5683c05519c52b6516",
-      "entClsName": "故障处置",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "4ab1ce46c5da4ac58549d124e432c1d6",
-      "entClsName": "文本资源",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "4acd17fca4f8473fb8b9343e51e25a39",
-      "entClsName": "text",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 1
-    },
-    {
-      "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-      "entClsName": "故障",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "5bf596334b1947d7ac3eb84f40435fd7",
-      "entClsName": "健康状态",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "6d13e168d4e449c6af67a7ebb858f35c",
-      "entClsName": "Indicator",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "7514270c24dd42b08b8e144c409ab30d",
-      "entClsName": "故障诊断过程",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "79a6dd081eab43af959bd9a642b8445b",
-      "entClsName": "测试实体类",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 1
-    },
-    {
-      "entClsID": "885bb3733737443c978ddadd589aaf1e",
-      "entClsName": "测试类",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 1
-    },
-    {
-      "entClsID": "88f3ea37a811490b8bd3c898a9e705a0",
-      "entClsName": "测试-meng2",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "aa621c7627b04f8ebf5693ef4835d64e",
-      "entClsName": "test",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "ba8250a7912246838a7b4e106f8d0c3b",
-      "entClsName": "Method",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "bc7fdf72bbaf4d279eb91e59c6dcf8bd",
-      "entClsName": "实体型号",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "beb27994605e40e79caa037cb101694a",
-      "entClsName": "测试类2",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "d11c264b446e17ac495f48452046895b",
-      "entClsName": "国家",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-      "entClsName": "故障案例",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "e96990429da644359fd9289c4e4cf352",
-      "entClsName": "文档",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 1
-    },
-    {
-      "entClsID": "ea20ccd5bfbd41a785a7cac11b230a27",
-      "entClsName": "故障起因",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "f7f3d6209eeb4857996d37b7cf679c68",
-      "entClsName": "测试2",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "fb977ccb7cf4406e8fc91b1554ec259a",
-      "entClsName": "1234",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "fd29b17337a045adad742b6d6ae26a99",
-      "entClsName": "测试-meng",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "fe0a1c19940b41e3b1be2912fbe65666",
-      "entClsName": "故障诊断模型",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    },
-    {
-      "entClsID": "ff24a66ad16d45498372e5feb6d0242d",
-      "entClsName": "指标",
-      "clsType": "",
-      "childCount": 0,
-      "noneCount": 0
-    }
-  ]
-}

+ 0 - 30
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/entquery.json

@@ -1,30 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": {
-    "pageSize": 9,
-    "count": 2,
-    "pageCount": 1,
-    "entList": [
-      {
-        "entID": "680ffb1a9af742f98bae6e98f83f7c43",
-        "entName": "测试实体类3-实体2",
-        "entIcon": "",
-        "lastTime": "2022-12-02 15:35:23.902",
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "dataSrc": ""
-      },
-      {
-        "entID": "5542d913782c4e71a71a7b410611ea8f",
-        "entName": "测试新增实体",
-        "entIcon": "",
-        "lastTime": "2022-11-27 22:05:44.683",
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "dataSrc": ""
-      }
-    ]
-  }
-}

+ 0 - 231
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/getMonitorByNum.json

@@ -1,231 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "id": 1,
-      "num": "01",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 2,
-      "num": "02",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 3,
-      "num": "03",
-      "name": "故障",
-      "color1": "red",
-      "color2": "red"
-    },
-    {
-      "id": 4,
-      "num": "04",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 5,
-      "num": "05",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 6,
-      "num": "06",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 7,
-      "num": "07",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 8,
-      "num": "08",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 9,
-      "num": "09",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 10,
-      "num": "10",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 11,
-      "num": "11",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 12,
-      "num": "12",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 13,
-      "num": "13",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 14,
-      "num": "14",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 15,
-      "num": "15",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 16,
-      "num": "16",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 17,
-      "num": "17",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 18,
-      "num": "18",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 19,
-      "num": "19",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 20,
-      "num": "20",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 21,
-      "num": "21",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 22,
-      "num": "22",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 23,
-      "num": "23",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 24,
-      "num": "24",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 25,
-      "num": "25",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 26,
-      "num": "26",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 27,
-      "num": "27",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 28,
-      "num": "28",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 29,
-      "num": "29",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 30,
-      "num": "30",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 31,
-      "num": "31",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    },
-    {
-      "id": 32,
-      "num": "32",
-      "name": "健康",
-      "color1": "yellow",
-      "color2": "yellow"
-    }
-  ]
-}

+ 0 - 14
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdAttrs.json

@@ -1,14 +0,0 @@
-{
-  "code": 200,
-  "msg": "mock",
-  "duration": null,
-  "data": [
-    {
-      "attrClsID": "26e26501662246dd9e57019c239a86f5",
-      "attrClsName": "测试关系类属性3",
-      "attrUnit": null,
-      "attrClsMemo": null,
-      "attrValueType": "TEXT"
-    }
-  ]
-}

+ 0 - 6
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdList.json

@@ -1,6 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": []
-}

+ 0 - 20
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsIdListEnd.json

@@ -1,20 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": [
-    {
-      "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-      "relClsName": "关系名称",
-      "relClsMemo": null,
-      "backgroundColor": "#00afee",
-      "endEntCls": {
-        "entClsID": "beb27994605e40e79caa037cb101694a",
-        "entClsName": "测试类2",
-        "pid": null
-      },
-      "startEntClsID": "39bbc6feaf9841838230d624c2087413",
-      "startEntClsName": "测试实体类3"
-    }
-  ]
-}

+ 0 - 160
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/relclsList.json

@@ -1,160 +0,0 @@
-{
-  "records": [
-    {
-      "relClsID": "01ec78b5f6104df2bcc5cb2c73bc2be7",
-      "relClsName": "输入",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "ff24a66ad16d45498372e5feb6d0242d",
-        "entClsName": "指标",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "fe0a1c19940b41e3b1be2912fbe65666",
-        "entClsName": "故障诊断模型",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "0938dbfca79a454b8e5cae15cec108c6",
-      "relClsName": "对应",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-        "entClsName": "故障案例",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "bc7fdf72bbaf4d279eb91e59c6dcf8bd",
-        "entClsName": "实体型号",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "0a357d14b7cf4713bf7ed9d8d47291e1",
-      "relClsName": "可导致",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-        "entClsName": "故障",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-        "entClsName": "故障",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "0d695d4eca7d4c5b906703db5433e853",
-      "relClsName": "出现",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-        "entClsName": "故障案例",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-        "entClsName": "征兆",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "105bdd7d51514c1cbb3552fbd6bf0319",
-      "relClsName": "引起",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "581c9302762e4679a97b7cf23e3fd976",
-        "entClsName": "故障",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-        "entClsName": "征兆",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "16f3cf5d89084ecbb53496e21c80aa13",
-      "relClsName": "对应",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "1d61182a6ae14c529576078b8ac9384f",
-        "entClsName": "征兆",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "bc7fdf72bbaf4d279eb91e59c6dcf8bd",
-        "entClsName": "实体型号",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "1cb53b4c108e41929a7cb0f72ea33dcc",
-      "relClsName": "处置",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-        "entClsName": "故障案例",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "3e00179ed3c94d5683c05519c52b6516",
-        "entClsName": "故障处置",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-      "relClsName": "关系名称",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "beb27994605e40e79caa037cb101694a",
-        "entClsName": "测试类2",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "20393124d0bf4de1af2c4577e9721008",
-      "relClsName": "关联",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "4ab1ce46c5da4ac58549d124e432c1d6",
-        "entClsName": "文本资源",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "4ab1ce46c5da4ac58549d124e432c1d6",
-        "entClsName": "文本资源",
-        "pid": null
-      }
-    },
-    {
-      "relClsID": "2cac65cb7b6b400f9ee7fa1e6aee774a",
-      "relClsName": "起因",
-      "relClsMemo": null,
-      "startEntCls": {
-        "entClsID": "e0adf09147f84edf9751d7ce1904851f",
-        "entClsName": "故障案例",
-        "pid": null
-      },
-      "endEntCls": {
-        "entClsID": "ea20ccd5bfbd41a785a7cac11b230a27",
-        "entClsName": "故障起因",
-        "pid": null
-      }
-    }
-  ],
-  "total": 35,
-  "size": 10,
-  "current": 1,
-  "headers": null,
-  "searchCount": true,
-  "pages": 4
-}

+ 0 - 181
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/controller/mock/json/showGraph.json

@@ -1,181 +0,0 @@
-{
-  "code": 200,
-  "msg": "请求成功",
-  "duration": null,
-  "data": {
-    "entID": "680ffb1a9af742f98bae6e98f83f7c43",
-    "entName": null,
-    "entListVO": [
-      {
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "backGroundColor": "#ff1e02",
-        "entID": "680ffb1a9af742f98bae6e98f83f7c43",
-        "entName": "测试实体类3-实体2",
-        "entIcon": null,
-        "createTime": null,
-        "updateTime": null,
-        "entClsIcon": null,
-        "unionID": null,
-        "relNum": 2
-      },
-      {
-        "entClsID": "beb27994605e40e79caa037cb101694a",
-        "entClsName": "测试类2",
-        "backGroundColor": "#00afee",
-        "entID": "ee78b08123cf4cc59fb8115ef8e0354c",
-        "entName": "测试类2实体",
-        "entIcon": null,
-        "createTime": null,
-        "updateTime": null,
-        "entClsIcon": null,
-        "unionID": null,
-        "relNum": 3
-      },
-      {
-        "entClsID": "beb27994605e40e79caa037cb101694a",
-        "entClsName": "测试类2",
-        "backGroundColor": "#00afee",
-        "entID": "4aeb7f1897d543fd86f621ef07236c03",
-        "entName": "新增关联实体",
-        "entIcon": null,
-        "createTime": null,
-        "updateTime": null,
-        "entClsIcon": null,
-        "unionID": null,
-        "relNum": 3
-      },
-      {
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "backGroundColor": "#ff1e02",
-        "entID": "5542d913782c4e71a71a7b410611ea8f",
-        "entName": "测试新增实体",
-        "entIcon": null,
-        "createTime": null,
-        "updateTime": null,
-        "entClsIcon": null,
-        "unionID": null,
-        "relNum": 2
-      },
-      {
-        "entClsID": "885bb3733737443c978ddadd589aaf1e",
-        "entClsName": "测试类",
-        "backGroundColor": "#c21401",
-        "entID": "7e1a3eead9f445b6bd8a4e6628ea3258",
-        "entName": "测试类实体",
-        "entIcon": null,
-        "createTime": null,
-        "updateTime": null,
-        "entClsIcon": null,
-        "unionID": null,
-        "relNum": 2
-      }
-    ],
-    "relListVO": [
-      {
-        "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-        "relClsName": "关系名称",
-        "backGroundColor": "#00afee",
-        "relID": "0b08356a65e946a1ba8c52dd1b5edc90",
-        "relName": "",
-        "endEntID": "680ffb1a9af742f98bae6e98f83f7c43",
-        "startEntID": "ee78b08123cf4cc59fb8115ef8e0354c"
-      },
-      {
-        "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-        "relClsName": "关系名称",
-        "backGroundColor": "#00afee",
-        "relID": "2e74dbe1aa504d2c9a6f64323be795b3",
-        "relName": "",
-        "endEntID": "680ffb1a9af742f98bae6e98f83f7c43",
-        "startEntID": "4aeb7f1897d543fd86f621ef07236c03"
-      },
-      {
-        "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-        "relClsName": "关系名称",
-        "backGroundColor": "#00afee",
-        "relID": "6bf57c0d157b4369bf8ed78a10e1120e",
-        "relName": "",
-        "endEntID": "5542d913782c4e71a71a7b410611ea8f",
-        "startEntID": "ee78b08123cf4cc59fb8115ef8e0354c"
-      },
-      {
-        "relClsID": "b452894470b24ddcb322693b06d6a3bd",
-        "relClsName": "测试类关系",
-        "backGroundColor": null,
-        "relID": "652da808eae24c19b585f30f8b24baed",
-        "relName": "",
-        "endEntID": "ee78b08123cf4cc59fb8115ef8e0354c",
-        "startEntID": "7e1a3eead9f445b6bd8a4e6628ea3258"
-      },
-      {
-        "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-        "relClsName": "关系名称",
-        "backGroundColor": "#00afee",
-        "relID": "1fe2ab45b56b48c6b0bd7a532eaa4094",
-        "relName": "",
-        "endEntID": "5542d913782c4e71a71a7b410611ea8f",
-        "startEntID": "4aeb7f1897d543fd86f621ef07236c03"
-      },
-      {
-        "relClsID": "b452894470b24ddcb322693b06d6a3bd",
-        "relClsName": "测试类关系",
-        "backGroundColor": null,
-        "relID": "1b5d0810828c4c6aae10560b8b857136",
-        "relName": "",
-        "endEntID": "4aeb7f1897d543fd86f621ef07236c03",
-        "startEntID": "7e1a3eead9f445b6bd8a4e6628ea3258"
-      }
-    ],
-    "entClsListVO": [
-      {
-        "entClsID": "39bbc6feaf9841838230d624c2087413",
-        "entClsName": "测试实体类3",
-        "backGroundColor": null
-      },
-      {
-        "entClsID": "beb27994605e40e79caa037cb101694a",
-        "entClsName": "测试类2",
-        "backGroundColor": null
-      },
-      {
-        "entClsID": "885bb3733737443c978ddadd589aaf1e",
-        "entClsName": "测试类",
-        "backGroundColor": null
-      }
-    ],
-    "relClsListVO": [
-      {
-        "startEntCls": {
-          "entClsID": "beb27994605e40e79caa037cb101694a",
-          "entClsName": "测试类2",
-          "backGroundColor": null
-        },
-        "entEntCls": {
-          "entClsID": "39bbc6feaf9841838230d624c2087413",
-          "entClsName": "测试实体类3",
-          "backGroundColor": null
-        },
-        "relClsID": "1d017437eef14d6280d13ee7f143fcbf",
-        "relClsName": "关系名称",
-        "backGroundColor": null
-      },
-      {
-        "startEntCls": {
-          "entClsID": "885bb3733737443c978ddadd589aaf1e",
-          "entClsName": "测试类",
-          "backGroundColor": null
-        },
-        "entEntCls": {
-          "entClsID": "beb27994605e40e79caa037cb101694a",
-          "entClsName": "测试类2",
-          "backGroundColor": null
-        },
-        "relClsID": "b452894470b24ddcb322693b06d6a3bd",
-        "relClsName": "测试类关系",
-        "backGroundColor": null
-      }
-    ]
-  }
-}

+ 0 - 65
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/Entity.java

@@ -1,65 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 实体对象 entity
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@Data
-public class Entity extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 实体id */
-    private String entId;
-
-    /** 实体名称 */
-    @Excel(name = "实体名称")
-    private String entName;
-
-    /** 实体描述 */
-    @Excel(name = "实体描述")
-    private String entMemo;
-
-    /** 实体类id */
-    @Excel(name = "实体类id")
-    private String entClsID;
-
-    /** 是否模板 */
-    @Excel(name = "是否模板")
-    private Boolean isModel;
-
-    private Integer entIconId;
-
-    /** entIcon from GraphIcon */
-    @Excel(name = "entIcon")
-    private Integer entIcon;
-
-//    /** 是否可以为空 */
-//    @Excel(name = "是否可以为空")
-//    private Integer notNull;
-
-    /** notNullAttrVOList TODO { attrClsID: v.attrClsID, attrValue: v.attrValue } 必填列表 */
-//    "notNullAttrVOList": [ --实体必填属性列表
-//      {
-//          "attrClsID": "string",  --属性类ID
-//          "attrValue": "string"	  --属性值
-//      }
-
-    private List<EntityAttribute> notNullAttrVOList = new ArrayList<>();
-    /** TODO from EntityClass*/
-    private Object entClsName;
-    /** TODO 暂时不知道干嘛的*/
-    private Object dataSrc;
-
-}

+ 0 - 92
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityAttribute.java

@@ -1,92 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 实体属性对象 entity_attribute
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@Data
-public class EntityAttribute extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-// 属性的list是没有主键,是直接用json存储?
-//    {
-//        "entId": "string",  --实体ID
-//        "isModel": false,	  --是否为模板
-//        "list": [
-//            {
-//                "attrClsId": "string",  --属性类ID
-//                "attrId": "string",	  --属性ID
-//                "attrValue": "string",  --属性值
-//                "entAndAttrType": "ELEM" --属性类型
-//            }
-//        ]
-//    }
-
-    /** 属性id TODO */
-    private String attrID;
-
-    /** 属性值 */
-    @Excel(name = "属性值")
-    private String attrValue;
-
-    /** entID TODO */
-    @Excel(name = "entID")
-    private String entId;
-
-    /** 属性类id */
-    private String attrClsId;
-
-//    /** attrMemo TODO from EntityClassAttribute */
-//    @Excel(name = "attrMemo")
-//    private String attrMemo;
-//
-
-    /** TODO attrClsName  from EntityClassAttribute*/
-    private String attrClsName;
-    /** TODO attrClsMemo  from EntityClassAttribute*/
-    private String attrClsMemo;
-    /** TODO attrUnit  from EntityClassAttribute*/
-    private String attrUnit;
-
-    /** attrType TODO from EntityClassAttribute*/
-    @Excel(name = "attrType")
-    private String attrType;
-
-    /** TODO attrValueType  from EntityClassAttribute*/
-    private String attrValueType;
-    /** TODO notNull  from EntityClassAttribute*/
-    private Boolean notNull;
-    /** TODO domain  from EntityClassAttribute*/
-    private String domain;
-
-//    /** 是否模板 TODO */
-//    @Excel(name = "是否模板")
-//    private String model;
-
-//    /** 属性描述 from EntityClassAttribute*/
-//    @Excel(name = "属性描述")
-//    private String entAndAttrType;
-
-    // attrClsId
-    public void setAttrClsID(String attrClsID) {
-        this.attrClsId = attrClsID;
-    }
-    public String getAttrClsID() {
-        return this.attrClsId;
-    }
-
-    public void setAttrClsId(String attrClsId) {
-        this.attrClsId = attrClsId;
-    }
-    public String getAttrClsId() {
-        return this.attrClsId;
-    }
-}

+ 0 - 65
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClass.java

@@ -1,65 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * 实体类对象 entity_class
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@Data
-public class EntityClass extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 实体类ID */
-    private String entClsID;
-
-    /** 实体类父节点ID */
-    @Excel(name = "实体类父节点ID")
-    private String pid;
-
-    /** 实体类名称 */
-    @Excel(name = "实体类名称")
-    private String entClsName;
-
-    /** 实体类描述 */
-    @Excel(name = "实体类描述")
-    private String entClsMemo;
-
-    /** 实体类图标id */
-    private Long entClsIconId;
-
-    /** 实体类图标 join from GraphIcon.iconImage*/
-    @Excel(name = "实体类图标")
-    private String entClsIcon;
-
-    /** 实体类背景颜色 */
-    @Excel(name = "实体类背景颜色")
-    private String backGroundColor;
-
-    /** 实体类类型 */
-    @Excel(name = "实体类类型")
-    private String clsType;
-
-    /** 是否存在子类 */
-    @Excel(name = "是否存在子类")
-    private Long childCount;
-
-    /** 待审属性节点个数 */
-    @Excel(name = "待审属性节点个数")
-    private Long noneCount;
-
-    // TODO CIDX,ELEM,MIME,NONE
-    private String entClsAllowAttrType;
-
-    // TODO
-    private String isRoot;
-
-    private List<EntityAttribute> notNullAttrVOList;
-}

+ 0 - 100
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassAttribute.java

@@ -1,100 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-
-/**
- * 实体类属性对象 entity_class_attribute
- * 
- * @author Allen
- * @date 2022-11-29
- */
-@Data
-public class EntityClassAttribute extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 属性id */
-    private String attrClsID;
-
-    /** 属性类名称 */
-    @Excel(name = "属性类名称")
-    private String attrClsName;
-
-    /** 属性单位 */
-    @Excel(name = "属性单位")
-    private String attrUnit;
-
-    /** 属性类型(基本本属性、能力属性、媒体属性、待审属性 ELEM) todo 没看出和下面有啥区别,暂时认为两个使一样的,set get 指向attrType */
-//    @Excel(name = "属性类型")
-//    private String entAndAttrType;
-
-    /** 属性类型(基本本属性、能力属性、媒体属性、待审属性 ELEM) */
-    @Excel(name = "属性类型")
-    private String attrType;
-
-    /** 实体类id */
-    @Excel(name = "实体类id")
-    private String entClsID;
-
-    /** 属性类描述 */
-    @Excel(name = "属性类描述")
-    private String attrClsMemo;
-
-    /** 值类型 (TEXT) todo 没看出和下面的有啥区别 和下面的共用一个*/
-    @Excel(name = "值类型")
-    private String valueType;
-
-    /** 值类型 (TEXT) */
-//    @Excel(name = "值类型")
-//    private String attrValueType;
-
-    /** domainKey 暂时不知道干嘛的 */
-    @Excel(name = "domainKey")
-    private String domainKey;
-
-    /** domain TODO 与domainKey 有啥关联?*/
-    @Excel(name = "domain")
-    private String domain;
-
-    /** isPublic */
-    @Excel(name = "isPublic")
-    private Integer isPublic;
-
-    /** 最大值 */
-    @Excel(name = "最大值")
-    private String maxValue;
-
-    /** 最小值 */
-    @Excel(name = "最小值")
-    private String minValue;
-
-    /** 是否可以为空 */
-    @Excel(name = "是否可以为空")
-    private Boolean notNull;
-
-    /** entUseCount TODO */
-    @Excel(name = "entUseCount")
-    private Integer entUseCount;
-
-    /** isEdit TODO */
-    @Excel(name = "isEdit")
-    private String isEdit;
-
-    public String getEntAndAttrType(){
-        return this.attrType;
-    }
-
-    public void setEntAndAttrType(String entAndAttrType){
-        this.attrType = entAndAttrType;
-    }
-    public String getAttrValueType(){
-        return this.valueType;
-    }
-
-    public void setAttrValueType(String attrValueType){
-        this.valueType = attrValueType;
-    }
-
-}

+ 0 - 56
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassRelation.java

@@ -1,56 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-
-/**
- * 实体类关系对象 entity_class_relation
- * 
- * @author Allen
- * @date 2022-11-29
- */
-@Data
-public class EntityClassRelation extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    public static final String START_POINT = "START";
-    public static final String END_POINT = "END";
-
-    /** 关系id */
-    private String relClsID;
-
-    /** 关系类名称 */
-    @Excel(name = "关系类名称")
-    private String relClsName;
-
-    /** 关系类描述 */
-    @Excel(name = "关系类描述")
-    private String relClsMemo;
-
-    /** 关系类背景颜色 */
-    @Excel(name = "关系类背景颜色")
-    private String backGroundColor;
-
-    /** 关系类类型 */
-    @Excel(name = "关系类类型")
-    private String clsType;
-
-    // TODO 是否模板
-    private Boolean isModel;
-
-    /** 起点实体类ID */
-    @Excel(name = "起点实体类ID")
-    private String startID;
-    /** 起点实体名称 from EntityClass Allen 添加 */
-    @Excel(name = "起点实体类ID")
-    private String startName;
-
-    /** 终点实体类ID */
-    @Excel(name = "终点实体类ID")
-    private String endID;
-    /**  终点实体名称from EntityClass Allen  */
-    @Excel(name = "终点实体类ID")
-    private String endName;
-}

+ 0 - 18
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityClassRelationVO.java

@@ -1,18 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serializable;
-
-/**
- * @author allen
- */
-@Data
-public class EntityClassRelationVO implements Serializable {
-    private String relClsID;
-    private String relClsName;
-    private String direction;
-    private String otherVID;
-    private String otherVName;
-}

+ 0 - 49
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityRelation.java

@@ -1,49 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.annotation.Excel;
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-
-/**
- * 实体关系对象 entity_relation
- * 
- * @author Allen
- * @date 2022-11-29
- */
-@Data
-public class EntityRelation extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-// 关系的list是没有主键,是直接用json存储?
-//    {
-//        isModel:Boolean,
-//        relClsId:String,
-//        list:[
-//            {
-//                startEntId:String,
-//                endEntId:String
-//            }
-//        ]
-//    }
-
-    private String relId;
-
-    /** 实体关系id */
-    private String relClsId;
-
-    /** 实体关系id */
-    private String relClsName;
-
-    /** 起始实体id */
-    @Excel(name = "起始实体id")
-    private String startEntId;
-
-    /** 结束实体id */
-    @Excel(name = "结束实体id")
-    private String endEntId;
-
-    /** 是否模板 */
-    @Excel(name = "是否模板")
-    private Boolean isModel;
-
-}

+ 0 - 17
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityRelationVO.java

@@ -1,17 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * @author allen
- */
-@Data
-public class EntityRelationVO implements Serializable {
-    private String entID;
-    private String entName;
-    private String entMemo;
-    private String relId;
-    private String attrList;
-}

+ 0 - 12
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/EntityTag.java

@@ -1,12 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import com.kgraph.common.core.domain.BaseEntity;
-import lombok.Data;
-
-@Data
-public class EntityTag extends BaseEntity {
-    private String tagName;
-    private String vertexId;
-    private Boolean isModel;
-    private String userCode;
-}

+ 0 - 17
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/GraphIcon.java

@@ -1,17 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import lombok.Data;
-
-/**
- *  icon
- *
- * @author Allen
- * @date 2022-12-19
- */
-@Data
-public class GraphIcon {
-    private Long id;
-    private String businessType;
-    private String businessId;
-    private String iconImage;
-}

+ 0 - 19
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/domain/GraphRequest.java

@@ -1,19 +0,0 @@
-package com.kgraph.graph.knowledge.domain;
-
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @author allen
- */
-@Data
-public class GraphRequest {
-    private Integer degree;
-    private String delEntIds;
-    private String direction;
-    private List entConditionQueries;
-    private String entId;
-    private Boolean isModel;
-    private Integer limitNum;
-}

+ 0 - 64
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityAttributeMapper.java

@@ -1,64 +0,0 @@
-package com.kgraph.graph.knowledge.mapper;
-
-import com.kgraph.graph.knowledge.domain.EntityAttribute;
-
-import java.util.List;
-
-/**
- * 实体属性Mapper接口
- * 
- * @author Allen
- * @date 2022-11-28
- */
-public interface EntityAttributeMapper 
-{
-    /**
-     * 查询实体属性
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 实体属性
-     */
-    public EntityAttribute selectEntityAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 查询实体属性列表
-     * 
-     * @param entityAttribute 实体属性
-     * @return 实体属性集合
-     */
-    public List<EntityAttribute> selectEntityAttributeList(EntityAttribute entityAttribute);
-
-    /**
-     * 新增实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    public int insertEntityAttribute(EntityAttribute entityAttribute);
-
-    /**
-     * 修改实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    public int updateEntityAttribute(EntityAttribute entityAttribute);
-
-    /**
-     * 删除实体属性
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 结果
-     */
-    public int deleteEntityAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 批量删除实体属性
-     * 
-     * @param attrClsIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEntityAttributeByAttrClsIds(String[] attrClsIds);
-
-    List<EntityAttribute> getEntityAttrs(EntityAttribute entityAttribute);
-}

+ 0 - 71
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityClassAttributeMapper.java

@@ -1,71 +0,0 @@
-package com.kgraph.graph.knowledge.mapper;
-
-import com.kgraph.graph.knowledge.domain.EntityClassAttribute;
-
-import java.util.List;
-
-/**
- * 实体类属性Mapper接口
- * 
- * @author Allen
- * @date 2022-11-29
- */
-public interface EntityClassAttributeMapper 
-{
-    /**
-     * 查询实体类属性
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 实体类属性
-     */
-    public EntityClassAttribute selectEntityClassAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 查询实体类属性列表
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 实体类属性集合
-     */
-    public List<EntityClassAttribute> selectEntityClassAttributeList(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 新增实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    public int insertEntityClassAttribute(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 修改实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    public int updateEntityClassAttribute(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 删除实体类属性
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 结果
-     */
-    public int deleteEntityClassAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 批量删除实体类属性
-     * 
-     * @param attrClsIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEntityClassAttributeByAttrClsIds(String[] attrClsIds);
-
-    /**
-     * 查询待审批实体类属性列表
-     *
-     * @param entityClassAttribute 实体类属性
-     * @return 待审批实体类属性集合
-     */
-    public List<EntityClassAttribute> selectNoneEntityClassAttributeByEntClsID(EntityClassAttribute entityClassAttribute);
-
-}

+ 0 - 74
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityClassRelationMapper.java

@@ -1,74 +0,0 @@
-package com.kgraph.graph.knowledge.mapper;
-
-import com.kgraph.graph.knowledge.domain.EntityClassRelation;
-import com.kgraph.graph.knowledge.domain.EntityClassRelationVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 实体类关系Mapper接口
- *
- * @author Allen
- * @date 2022-11-29
- */
-public interface EntityClassRelationMapper
-{
-    /**
-     * 查询实体类关系
-     *
-     * @param relClsId 实体类关系主键
-     * @return 实体类关系
-     */
-    public EntityClassRelation selectEntityClassRelationByRelClsId(String relClsId);
-
-    /**
-     * 查询实体类关系列表
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 实体类关系集合
-     */
-    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation);
-
-    /**
-     * 新增实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    public int insertEntityClassRelation(EntityClassRelation entityClassRelation);
-
-    /**
-     * 修改实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    public int updateEntityClassRelation(EntityClassRelation entityClassRelation);
-
-    /**
-     * 删除实体类关系
-     *
-     * @param relClsId 实体类关系主键
-     * @return 结果
-     */
-    public int deleteEntityClassRelationByRelClsId(String relClsId);
-
-    /**
-     * 批量删除实体类关系
-     *
-     * @param relClsIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEntityClassRelationByRelClsIds(String[] relClsIds);
-
-    public List<EntityClassRelation> relattrIdList(@Param(value = "id") String id, @Param(value = "entClsType") String entClsType);
-
-    List<EntityClassRelation> getClazzRelByClassId(String id);
-
-    List<EntityClassRelationVO> getClazzRelVoByClassId(String id);
-
-    List<EntityClassRelation> getEntClsRelAllInfoList();
-
-    List<EntityClassRelation> relclsList(String name);
-}

+ 0 - 80
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityMapper.java

@@ -1,80 +0,0 @@
-package com.kgraph.graph.knowledge.mapper;
-
-import com.kgraph.graph.knowledge.domain.Entity;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * 实体Mapper接口
- * 
- * @author Allen
- * @date 2022-11-28
- */
-public interface EntityMapper 
-{
-    /**
-     * 查询实体
-     * 
-     * @param entId 实体主键
-     * @return 实体
-     */
-    public Entity selectEntityByEntId(String entId);
-
-    /**
-     * 查询实体列表
-     * 
-     * @param entity 实体
-     * @return 实体集合
-     */
-    public List<Entity> selectEntityList(Entity entity);
-
-    /**
-     * 新增实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    public int insertEntity(Entity entity);
-
-    /**
-     * 修改实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    public int updateEntity(Entity entity);
-
-    /**
-     * 删除实体
-     * 
-     * @param entId 实体主键
-     * @return 结果
-     */
-    public int deleteEntityByEntId(String entId);
-
-    /**
-     * 批量删除实体
-     * 
-     * @param entIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEntityByEntIds(String[] entIds);
-
-    /**
-     * 查询实体列表
-     *
-     * @param entityIds 实体Ids
-     * @return 实体集合
-     */
-    List<Entity> getEntityByEntityIds(String[] entityIds);
-
-    List<Entity> getEntclsEnt(@Param(value = "direction") String direction,
-                              @Param(value = "relClsId") String relClsId,
-                              @Param(value = "entId") String entId);
-
-    List<Entity> searchByName(String name);
-
-    List<Entity> getAllEntityByEntityIds();
-}

+ 0 - 87
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityRelationMapper.java

@@ -1,87 +0,0 @@
-package com.kgraph.graph.knowledge.mapper;
-
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.knowledge.domain.EntityRelationVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 实体关系Mapper接口
- * 
- * @author kgraph
- * @date 2022-12-26
- */
-public interface EntityRelationMapper 
-{
-    /**
-     * 查询实体关系
-     * 
-     * @param relId 实体关系主键
-     * @return 实体关系
-     */
-    public EntityRelation selectEntityRelationByRelId(String relId);
-
-    /**
-     * 查询实体关系列表
-     * 
-     * @param entityRelation 实体关系
-     * @return 实体关系集合
-     */
-    public List<EntityRelation> selectEntityRelationList(EntityRelation entityRelation);
-
-    /**
-     * 新增实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    public int insertEntityRelation(EntityRelation entityRelation);
-
-    /**
-     * 修改实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    public int updateEntityRelation(EntityRelation entityRelation);
-
-    /**
-     * 删除实体关系
-     * 
-     * @param relId 实体关系主键
-     * @return 结果
-     */
-    public int deleteEntityRelationByRelId(String relId);
-
-    /**
-     * 批量删除实体关系
-     * 
-     * @param relIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteEntityRelationByRelIds(String[] relIds);
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param entityId 实体id
-     * @return 实体关系集合
-     */
-    List<EntityRelation> getRelationByEntityId(String entityId);
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param direction direction
-     * @param relClsId relClsId
-     * @param entId entId
-     * @return 实体关系集合
-     */
-    List<EntityRelationVO> getRelationVOByEntityId(@Param(value = "direction") String direction,
-                                                   @Param(value = "relClsId") String relClsId,
-                                                   @Param(value = "entId") String entId);
-
-    List<EntityRelation> getAllRelationByEntityId();
-
-}

+ 0 - 66
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityAttributeService.java

@@ -1,66 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import com.kgraph.graph.knowledge.domain.EntityAttribute;
-
-import java.util.List;
-
-/**
- * 实体属性Service接口
- * 
- * @author Allen
- * @date 2022-11-28
- */
-public interface IEntityAttributeService 
-{
-    /**
-     * 查询实体属性
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 实体属性
-     */
-    public EntityAttribute selectEntityAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 查询实体属性列表
-     * 
-     * @param entityAttribute 实体属性
-     * @return 实体属性集合
-     */
-    public List<EntityAttribute> selectEntityAttributeList(EntityAttribute entityAttribute);
-
-    /**
-     * 新增实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    public int insertEntityAttribute(EntityAttribute entityAttribute);
-
-    /**
-     * 修改实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    public int updateEntityAttribute(EntityAttribute entityAttribute);
-
-    /**
-     * 批量删除实体属性
-     * 
-     * @param attrClsIds 需要删除的实体属性主键集合
-     * @return 结果
-     */
-    public int deleteEntityAttributeByAttrClsIds(String[] attrClsIds);
-
-    /**
-     * 删除实体属性信息
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 结果
-     */
-    public int deleteEntityAttributeByAttrClsId(String attrClsId);
-
-    List<EntityAttribute> getEntityAttrs(EntityAttribute entityAttribute);
-
-    void updateBatch(List<EntityAttribute> entityAttributeList);
-}

+ 0 - 71
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityClassAttributeService.java

@@ -1,71 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import com.kgraph.graph.knowledge.domain.EntityClassAttribute;
-
-import java.util.List;
-
-/**
- * 实体类属性Service接口
- * 
- * @author Allen
- * @date 2022-11-29
- */
-public interface IEntityClassAttributeService 
-{
-    /**
-     * 查询实体类属性
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 实体类属性
-     */
-    public EntityClassAttribute selectEntityClassAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 查询实体类属性列表
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 实体类属性集合
-     */
-    public List<EntityClassAttribute> selectEntityClassAttributeList(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 新增实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    public int insertEntityClassAttribute(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 修改实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    public int updateEntityClassAttribute(EntityClassAttribute entityClassAttribute);
-
-    /**
-     * 批量删除实体类属性
-     * 
-     * @param attrClsIds 需要删除的实体类属性主键集合
-     * @return 结果
-     */
-    public int deleteEntityClassAttributeByAttrClsIds(String[] attrClsIds);
-
-    /**
-     * 删除实体类属性信息
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 结果
-     */
-    public int deleteEntityClassAttributeByAttrClsId(String attrClsId);
-
-    /**
-     * 查询待审批实体类属性列表
-     *
-     * @param entityClassAttribute 实体类属性
-     * @return 待审批实体类属性集合
-     */
-    public List<EntityClassAttribute> selectNoneEntityClassAttributeByEntClsID(EntityClassAttribute entityClassAttribute);
-
-}

+ 0 - 81
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityClassRelationService.java

@@ -1,81 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import com.kgraph.graph.knowledge.domain.EntityClassRelation;
-import com.kgraph.graph.knowledge.domain.EntityClassRelationVO;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-/**
- * 实体类关系Service接口
- *
- * @author Allen
- * @date 2022-11-29
- */
-public interface IEntityClassRelationService
-{
-    /**
-     * 查询实体类关系
-     *
-     * @param relClsId 实体类关系主键
-     * @return 实体类关系
-     */
-    public EntityClassRelation selectEntityClassRelationByRelClsId(String relClsId);
-
-    /**
-     * 查询实体类关系列表
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 实体类关系集合
-     */
-    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation);
-
-    /**
-     * 查询实体类关系列表
-     *
-     * @param id id
-     * @param entClsType entClsType
-     * @return 实体类关系集合
-     */
-    public List<EntityClassRelation> relattrIdList(String id, String entClsType);
-
-    /**
-     * 新增实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    public int insertEntityClassRelation(EntityClassRelation entityClassRelation);
-
-    /**
-     * 修改实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    public int updateEntityClassRelation(EntityClassRelation entityClassRelation);
-
-    /**
-     * 批量删除实体类关系
-     *
-     * @param relClsIds 需要删除的实体类关系主键集合
-     * @return 结果
-     */
-    public int deleteEntityClassRelationByRelClsIds(String[] relClsIds);
-
-    /**
-     * 删除实体类关系信息
-     *
-     * @param relClsId 实体类关系主键
-     * @return 结果
-     */
-    public int deleteEntityClassRelationByRelClsId(String relClsId);
-
-    public List<EntityClassRelation> getClazzRelByClassId(String id);
-
-    public List<EntityClassRelationVO> getClazzRelVoByClassId(String id);
-
-    List<EntityClassRelation> getEntClsRelAllInfoList();
-
-    List<EntityClassRelation> relclsList(String name);
-}

+ 0 - 85
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityRelationService.java

@@ -1,85 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.knowledge.domain.EntityRelationVO;
-
-import java.util.List;
-
-/**
- * 实体关系Service接口
- * 
- * @author kgraph
- * @date 2022-12-26
- */
-public interface IEntityRelationService 
-{
-    /**
-     * 查询实体关系
-     * 
-     * @param relId 实体关系主键
-     * @return 实体关系
-     */
-    public EntityRelation selectEntityRelationByRelId(String relId);
-
-    /**
-     * 查询实体关系列表
-     * 
-     * @param entityRelation 实体关系
-     * @return 实体关系集合
-     */
-    public List<EntityRelation> selectEntityRelationList(EntityRelation entityRelation);
-
-    /**
-     * 新增实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    public int insertEntityRelation(EntityRelation entityRelation);
-
-    /**
-     * 修改实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    public int updateEntityRelation(EntityRelation entityRelation);
-
-    /**
-     * 批量删除实体关系
-     * 
-     * @param relIds 需要删除的实体关系主键集合
-     * @return 结果
-     */
-    public int deleteEntityRelationByRelIds(String[] relIds);
-
-    /**
-     * 删除实体关系信息
-     * 
-     * @param relId 实体关系主键
-     * @return 结果
-     */
-    public int deleteEntityRelationByRelId(String relId);
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param entityId 实体id
-     * @return 实体关系集合
-     */
-    public List<EntityRelation> getRelationByEntityId(String entityId);
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param direction direction
-     * @param relClsId relClsId
-     * @param entId entId
-     * @return 实体关系集合
-     */
-    public List<EntityRelationVO> getRelationVOByEntityId(String direction, String relClsId, String entId);
-
-    int relAddBatch(List<EntityRelation> entityRelationList);
-
-    List<EntityRelation> getAllRelationByEntityId();
-}

+ 0 - 78
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityService.java

@@ -1,78 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import com.kgraph.graph.knowledge.domain.Entity;
-import com.kgraph.graph.knowledge.domain.EntityRelationVO;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * 实体Service接口
- * 
- * @author Allen
- * @date 2022-11-28
- */
-public interface IEntityService 
-{
-    /**
-     * 查询实体
-     * 
-     * @param entId 实体主键
-     * @return 实体
-     */
-    public Entity selectEntityByEntId(String entId);
-
-    /**
-     * 查询实体列表
-     * 
-     * @param entity 实体
-     * @return 实体集合
-     */
-    public List<Entity> selectEntityList(Entity entity);
-
-    /**
-     * 新增实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    public int insertEntity(Entity entity);
-
-    /**
-     * 修改实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    public int updateEntity(Entity entity);
-
-    /**
-     * 批量删除实体
-     * 
-     * @param entIds 需要删除的实体主键集合
-     * @return 结果
-     */
-    public int deleteEntityByEntIds(String[] entIds);
-
-    /**
-     * 删除实体信息
-     * 
-     * @param entId 实体主键
-     * @return 结果
-     */
-    public int deleteEntityByEntId(String entId);
-
-    /**
-     * 查询实体列表
-     *
-     * @param entityIdSet 实体Id set
-     * @return 实体集合
-     */
-    public List<Entity> getEntityByEntityIds(Set<String> entityIdSet);
-
-    List<Entity> getEntclsEnt(String direction, String relClsId, String entId);
-
-    List<Entity> searchByName(String name);
-
-    List<Entity> getAllEntityByEntityIds();
-}

+ 0 - 20
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IMapService.java

@@ -1,20 +0,0 @@
-package com.kgraph.graph.knowledge.service;
-
-import java.util.Map;
-
-public interface IMapService {
-
-    /**
-     * 1. 传参实体id
-     * 2. 根据实体id获取《实体关系》
-     * 3. 根据实体关系得实体id 获取所有《实体》
-     * 4. 根据实体类id 获取《实体类关系》
-     * 5. 根据实体类关系得实体类id 获取所有《实体类》
-     * 6. 把 实体关系 实体 实体类关系 实体类 封装返回
-     * @param entityId 实体id
-     * @return 实体图谱
-     */
-    Map<String, Object> getMap(String entityId);
-
-    Map<String, Object> getAllMap();
-}

+ 0 - 119
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityAttributeServiceImpl.java

@@ -1,119 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.graph.knowledge.domain.EntityAttribute;
-import com.kgraph.graph.knowledge.mapper.EntityAttributeMapper;
-import com.kgraph.graph.knowledge.service.IEntityAttributeService;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 实体属性Service业务层处理
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@Service
-public class EntityAttributeServiceImpl implements IEntityAttributeService
-{
-    @Autowired
-    private EntityAttributeMapper entityAttributeMapper;
-
-    /**
-     * 查询实体属性
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 实体属性
-     */
-    @Override
-    public EntityAttribute selectEntityAttributeByAttrClsId(String attrClsId)
-    {
-        return entityAttributeMapper.selectEntityAttributeByAttrClsId(attrClsId);
-    }
-
-    /**
-     * 查询实体属性列表
-     * 
-     * @param entityAttribute 实体属性
-     * @return 实体属性
-     */
-    @Override
-    public List<EntityAttribute> selectEntityAttributeList(EntityAttribute entityAttribute)
-    {
-        return entityAttributeMapper.selectEntityAttributeList(entityAttribute);
-    }
-
-    /**
-     * 新增实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    @Override
-    public int insertEntityAttribute(EntityAttribute entityAttribute)
-    {
-        entityAttribute.setAttrID(KnowledgeUtils.generateUUID());
-        entityAttribute.setCreateTime(DateUtils.getNowDate());
-        return entityAttributeMapper.insertEntityAttribute(entityAttribute);
-    }
-
-    /**
-     * 修改实体属性
-     * 
-     * @param entityAttribute 实体属性
-     * @return 结果
-     */
-    @Override
-    public int updateEntityAttribute(EntityAttribute entityAttribute)
-    {
-        entityAttribute.setUpdateTime(DateUtils.getNowDate());
-        return entityAttributeMapper.updateEntityAttribute(entityAttribute);
-    }
-
-    /**
-     * 批量删除实体属性
-     * 
-     * @param attrClsIds 需要删除的实体属性主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityAttributeByAttrClsIds(String[] attrClsIds)
-    {
-        return entityAttributeMapper.deleteEntityAttributeByAttrClsIds(attrClsIds);
-    }
-
-    /**
-     * 删除实体属性信息
-     * 
-     * @param attrClsId 实体属性主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityAttributeByAttrClsId(String attrClsId)
-    {
-        return entityAttributeMapper.deleteEntityAttributeByAttrClsId(attrClsId);
-    }
-
-    @Override
-    public List<EntityAttribute> getEntityAttrs(EntityAttribute entityAttribute) {
-        return entityAttributeMapper.getEntityAttrs(entityAttribute);
-    }
-
-    @Override
-    public void updateBatch(List<EntityAttribute> entityAttributeList) {
-        if(CollectionUtils.isNotEmpty(entityAttributeList)){
-            for(EntityAttribute entityAttribute : entityAttributeList){
-                if(StringUtils.isBlank(entityAttribute.getAttrID())){
-                    insertEntityAttribute(entityAttribute);
-                }else{
-                    updateEntityAttribute(entityAttribute);
-                }
-            }
-        }
-    }
-}

+ 0 - 114
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityClassAttributeServiceImpl.java

@@ -1,114 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.graph.knowledge.domain.EntityClassAttribute;
-import com.kgraph.graph.knowledge.mapper.EntityClassAttributeMapper;
-import com.kgraph.graph.knowledge.service.IEntityClassAttributeService;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 实体类属性Service业务层处理
- * 
- * @author Allen
- * @date 2022-11-29
- */
-@Service
-public class EntityClassAttributeServiceImpl implements IEntityClassAttributeService
-{
-    @Autowired
-    private EntityClassAttributeMapper entityClassAttributeMapper;
-
-    /**
-     * 查询实体类属性
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 实体类属性
-     */
-    @Override
-    public EntityClassAttribute selectEntityClassAttributeByAttrClsId(String attrClsId)
-    {
-        return entityClassAttributeMapper.selectEntityClassAttributeByAttrClsId(attrClsId);
-    }
-
-    /**
-     * 查询实体类属性列表
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 实体类属性
-     */
-    @Override
-    public List<EntityClassAttribute> selectEntityClassAttributeList(EntityClassAttribute entityClassAttribute)
-    {
-        return entityClassAttributeMapper.selectEntityClassAttributeList(entityClassAttribute);
-    }
-
-    /**
-     * 新增实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    @Override
-    public int insertEntityClassAttribute(EntityClassAttribute entityClassAttribute)
-    {
-        entityClassAttribute.setAttrClsID(KnowledgeUtils.generateUUID());
-        entityClassAttribute.setCreateTime(DateUtils.getNowDate());
-        if(StringUtils.isBlank(entityClassAttribute.getIsEdit())){
-            entityClassAttribute.setIsEdit("T");
-        }
-        return entityClassAttributeMapper.insertEntityClassAttribute(entityClassAttribute);
-    }
-
-    /**
-     * 修改实体类属性
-     * 
-     * @param entityClassAttribute 实体类属性
-     * @return 结果
-     */
-    @Override
-    public int updateEntityClassAttribute(EntityClassAttribute entityClassAttribute)
-    {
-        entityClassAttribute.setUpdateTime(DateUtils.getNowDate());
-        return entityClassAttributeMapper.updateEntityClassAttribute(entityClassAttribute);
-    }
-
-    /**
-     * 批量删除实体类属性
-     * 
-     * @param attrClsIds 需要删除的实体类属性主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityClassAttributeByAttrClsIds(String[] attrClsIds)
-    {
-        return entityClassAttributeMapper.deleteEntityClassAttributeByAttrClsIds(attrClsIds);
-    }
-
-    /**
-     * 删除实体类属性信息
-     * 
-     * @param attrClsId 实体类属性主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityClassAttributeByAttrClsId(String attrClsId)
-    {
-        return entityClassAttributeMapper.deleteEntityClassAttributeByAttrClsId(attrClsId);
-    }
-
-    /**
-     * 查询待审批实体类属性列表
-     *
-     * @param entityClassAttribute 实体类属性
-     * @return 待审批实体类属性集合
-     */
-    @Override
-    public List<EntityClassAttribute> selectNoneEntityClassAttributeByEntClsID(EntityClassAttribute entityClassAttribute) {
-        return entityClassAttributeMapper.selectNoneEntityClassAttributeByEntClsID(entityClassAttribute);
-    }
-}

+ 0 - 145
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityClassRelationServiceImpl.java

@@ -1,145 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.common.utils.StringUtils;
-import com.kgraph.graph.knowledge.domain.EntityClassRelation;
-import com.kgraph.graph.knowledge.domain.EntityClassRelationVO;
-import com.kgraph.graph.knowledge.mapper.EntityClassRelationMapper;
-import com.kgraph.graph.knowledge.service.IEntityClassRelationService;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 实体类关系Service业务层处理
- *
- * @author Allen
- * @date 2022-11-29
- */
-@Service
-public class EntityClassRelationServiceImpl implements IEntityClassRelationService
-{
-    @Autowired
-    private EntityClassRelationMapper entityClassRelationMapper;
-
-    /**
-     * 查询实体类关系
-     *
-     * @param relClsId 实体类关系主键
-     * @return 实体类关系
-     */
-    @Override
-    public EntityClassRelation selectEntityClassRelationByRelClsId(String relClsId)
-    {
-        return entityClassRelationMapper.selectEntityClassRelationByRelClsId(relClsId);
-    }
-
-    /**
-     * 查询实体类关系列表
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 实体类关系
-     */
-    @Override
-    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation)
-    {
-        return entityClassRelationMapper.selectEntityClassRelationList(entityClassRelation);
-    }
-
-    /**
-     * 查询实体类关系列表
-     *
-     * @param id 实体类关系
-     * @return 实体类关系
-     */
-    @Override
-    public List<EntityClassRelation> relattrIdList(String id, String entClsType) {
-//        EntityClassRelation entityClassRelation = new EntityClassRelation();
-//        if (EntityClassRelation.START_POINT.equalsIgnoreCase(entClsType)) {
-//            entityClassRelation.setStartID(id);
-//        } else {
-//            entityClassRelation.setEndID(id);
-//        }
-        return entityClassRelationMapper.relattrIdList(id, entClsType);
-    }
-
-    /**
-     * 新增实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    @Override
-    public int insertEntityClassRelation(EntityClassRelation entityClassRelation)
-    {
-        String relClsID = entityClassRelation.getRelClsID();
-        if(StringUtils.isNotEmpty(relClsID)){
-            EntityClassRelation entityClassRelationDb = entityClassRelationMapper.selectEntityClassRelationByRelClsId(relClsID);
-            if(entityClassRelationDb != null){
-                entityClassRelation.setRelClsName(entityClassRelationDb.getRelClsName());
-            }
-        }
-        entityClassRelation.setRelClsID(KnowledgeUtils.generateUUID());
-        entityClassRelation.setCreateTime(DateUtils.getNowDate());
-        return entityClassRelationMapper.insertEntityClassRelation(entityClassRelation);
-    }
-
-    /**
-     * 修改实体类关系
-     *
-     * @param entityClassRelation 实体类关系
-     * @return 结果
-     */
-    @Override
-    public int updateEntityClassRelation(EntityClassRelation entityClassRelation)
-    {
-        entityClassRelation.setUpdateTime(DateUtils.getNowDate());
-        return entityClassRelationMapper.updateEntityClassRelation(entityClassRelation);
-    }
-
-    /**
-     * 批量删除实体类关系
-     *
-     * @param relClsIds 需要删除的实体类关系主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityClassRelationByRelClsIds(String[] relClsIds)
-    {
-        return entityClassRelationMapper.deleteEntityClassRelationByRelClsIds(relClsIds);
-    }
-
-    /**
-     * 删除实体类关系信息
-     *
-     * @param relClsId 实体类关系主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityClassRelationByRelClsId(String relClsId)
-    {
-        return entityClassRelationMapper.deleteEntityClassRelationByRelClsId(relClsId);
-    }
-
-    @Override
-    public List<EntityClassRelation> getClazzRelByClassId(String id) {
-        return entityClassRelationMapper.getClazzRelByClassId(id);
-    }
-    @Override
-    public List<EntityClassRelationVO> getClazzRelVoByClassId(String id) {
-        return entityClassRelationMapper.getClazzRelVoByClassId(id);
-    }
-
-    @Override
-    public List<EntityClassRelation> getEntClsRelAllInfoList() {
-        return entityClassRelationMapper.getEntClsRelAllInfoList();
-    }
-
-    @Override
-    public List<EntityClassRelation> relclsList(String name) {
-        return entityClassRelationMapper.relclsList(name);
-    }
-
-}

+ 0 - 142
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityRelationServiceImpl.java

@@ -1,142 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.knowledge.domain.EntityRelationVO;
-import com.kgraph.graph.knowledge.mapper.EntityRelationMapper;
-import com.kgraph.graph.knowledge.service.IEntityRelationService;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 实体关系Service业务层处理
- * 
- * @author kgraph
- * @date 2022-12-26
- */
-@Service
-public class EntityRelationServiceImpl implements IEntityRelationService
-{
-    @Autowired
-    private EntityRelationMapper entityRelationMapper;
-
-    /**
-     * 查询实体关系
-     * 
-     * @param relId 实体关系主键
-     * @return 实体关系
-     */
-    @Override
-    public EntityRelation selectEntityRelationByRelId(String relId)
-    {
-        return entityRelationMapper.selectEntityRelationByRelId(relId);
-    }
-
-    /**
-     * 查询实体关系列表
-     * 
-     * @param entityRelation 实体关系
-     * @return 实体关系
-     */
-    @Override
-    public List<EntityRelation> selectEntityRelationList(EntityRelation entityRelation)
-    {
-        return entityRelationMapper.selectEntityRelationList(entityRelation);
-    }
-
-    /**
-     * 新增实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    @Override
-    public int insertEntityRelation(EntityRelation entityRelation)
-    {
-        entityRelation.setCreateTime(DateUtils.getNowDate());
-        entityRelation.setRelId(KnowledgeUtils.generateUUID());
-        return entityRelationMapper.insertEntityRelation(entityRelation);
-    }
-
-    /**
-     * 修改实体关系
-     * 
-     * @param entityRelation 实体关系
-     * @return 结果
-     */
-    @Override
-    public int updateEntityRelation(EntityRelation entityRelation)
-    {
-        entityRelation.setUpdateTime(DateUtils.getNowDate());
-        return entityRelationMapper.updateEntityRelation(entityRelation);
-    }
-
-    /**
-     * 批量删除实体关系
-     * 
-     * @param relIds 需要删除的实体关系主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityRelationByRelIds(String[] relIds)
-    {
-        return entityRelationMapper.deleteEntityRelationByRelIds(relIds);
-    }
-
-    /**
-     * 删除实体关系信息
-     * 
-     * @param relId 实体关系主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityRelationByRelId(String relId)
-    {
-        return entityRelationMapper.deleteEntityRelationByRelId(relId);
-    }
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param entityId 实体id
-     * @return 实体关系集合
-     */
-    @Override
-    public List<EntityRelation> getRelationByEntityId(String entityId) {
-        return entityRelationMapper.getRelationByEntityId(entityId);
-    }
-
-    /**
-     * 查询实体关系列表
-     *
-     * @param direction direction
-     * @param relClsId relClsId
-     * @param entId entId
-     * @return 实体关系集合
-     */
-    @Override
-    public List<EntityRelationVO> getRelationVOByEntityId(String direction, String relClsId, String entId) {
-        return entityRelationMapper.getRelationVOByEntityId(direction, relClsId, entId);
-    }
-
-    @Override
-    public int relAddBatch(List<EntityRelation> entityRelationList) {
-        if (CollectionUtils.isNotEmpty(entityRelationList)) {
-            for (EntityRelation entityRelation : entityRelationList) {
-                insertEntityRelation(entityRelation);
-            }
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    @Override
-    public List<EntityRelation> getAllRelationByEntityId() {
-        return entityRelationMapper.getAllRelationByEntityId();
-    }
-}

+ 0 - 142
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityServiceImpl.java

@@ -1,142 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.graph.knowledge.domain.Entity;
-import com.kgraph.graph.knowledge.domain.EntityAttribute;
-import com.kgraph.graph.knowledge.mapper.EntityMapper;
-import com.kgraph.graph.knowledge.service.IEntityAttributeService;
-import com.kgraph.graph.knowledge.service.IEntityService;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-/**
- * 实体Service业务层处理
- * 
- * @author Allen
- * @date 2022-11-28
- */
-@Service
-public class EntityServiceImpl implements IEntityService
-{
-    @Autowired
-    private EntityMapper entityMapper;
-
-    @Autowired
-    private IEntityAttributeService entityAttributeService;
-
-    /**
-     * 查询实体
-     * 
-     * @param entId 实体主键
-     * @return 实体
-     */
-    @Override
-    public Entity selectEntityByEntId(String entId)
-    {
-        return entityMapper.selectEntityByEntId(entId);
-    }
-
-    /**
-     * 查询实体列表
-     * 
-     * @param entity 实体
-     * @return 实体
-     */
-    @Override
-    public List<Entity> selectEntityList(Entity entity)
-    {
-        return entityMapper.selectEntityList(entity);
-    }
-
-    /**
-     * 新增实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    @Override
-    public int insertEntity(Entity entity)
-    {
-        entity.setEntId(KnowledgeUtils.generateUUID());
-        entity.setCreateTime(DateUtils.getNowDate());
-        int returnValue = entityMapper.insertEntity(entity);
-        List<EntityAttribute> notNullAttrVOList = entity.getNotNullAttrVOList();
-        if(CollectionUtils.isNotEmpty(notNullAttrVOList)){
-            for (EntityAttribute entityAttribute : notNullAttrVOList) {
-                entityAttribute.setEntId(entity.getEntId());
-                entityAttributeService.insertEntityAttribute(entityAttribute);
-            }
-        }
-        return returnValue;
-
-    }
-
-    /**
-     * 修改实体
-     * 
-     * @param entity 实体
-     * @return 结果
-     */
-    @Override
-    public int updateEntity(Entity entity)
-    {
-        entity.setUpdateTime(DateUtils.getNowDate());
-        return entityMapper.updateEntity(entity);
-    }
-
-    /**
-     * 批量删除实体
-     * 
-     * @param entIds 需要删除的实体主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityByEntIds(String[] entIds)
-    {
-        return entityMapper.deleteEntityByEntIds(entIds);
-    }
-
-    /**
-     * 删除实体信息
-     * 
-     * @param entId 实体主键
-     * @return 结果
-     */
-    @Override
-    public int deleteEntityByEntId(String entId)
-    {
-        return entityMapper.deleteEntityByEntId(entId);
-    }
-
-    /**
-     * 查询实体列表
-     *
-     * @param entityIdSet 实体Id set
-     * @return 实体集合
-     */
-    @Override
-    public List<Entity> getEntityByEntityIds(Set<String> entityIdSet) {
-        return entityMapper.getEntityByEntityIds(entityIdSet.toArray(new String[0]));
-    }
-
-    @Override
-    public List<Entity> getEntclsEnt(String direction, String relClsId, String entId) {
-        return entityMapper.getEntclsEnt(direction, relClsId, entId);
-    }
-
-    @Override
-    public List<Entity> searchByName(String name) {
-        return entityMapper.searchByName(name);
-    }
-
-    @Override
-    public List<Entity> getAllEntityByEntityIds() {
-        return entityMapper.getAllEntityByEntityIds();
-    }
-}

+ 0 - 139
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/MapServiceImpl.java

@@ -1,139 +0,0 @@
-package com.kgraph.graph.knowledge.service.impl;
-
-import com.kgraph.graph.knowledge.domain.Entity;
-import com.kgraph.graph.knowledge.domain.EntityClass;
-import com.kgraph.graph.knowledge.domain.EntityClassRelation;
-import com.kgraph.graph.knowledge.domain.EntityRelation;
-import com.kgraph.graph.knowledge.service.*;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-
-/**
- * @author allen
- */
-@Service
-public class MapServiceImpl implements IMapService {
-
-    @Autowired
-    IEntityClassService entityClassService;
-    @Autowired
-    IEntityClassRelationService entityClassRelationService;
-    @Autowired
-    IEntityService entityService;
-    @Autowired
-    IEntityRelationService entityRelationService;
-
-
-
-    /**
-     * 1. 传参实体id
-     * 2. 根据实体id获取《实体关系》
-     * 3. 根据实体关系得实体id 获取所有《实体》
-     * 4.1 根据实体获取实体类id
-     * 4.2  根据实体类id 获取《实体类关系》
-     * 5. 根据实体类关系得实体类id 获取所有《实体类》
-     * 6. 把 实体关系 实体 实体类关系 实体类 封装返回
-     * @param entityId 实体id
-     * @return 实体图谱
-     */
-    @Override
-    public Map<String, Object> getMap(String entityId) {
-        Map<String, Object> returnValue = new HashMap<>(8);
-
-        returnValue.put("entID",entityId);
-        HashSet<String> ids = new HashSet<>();
-        ids.add(entityId);
-        List<Entity> ents = entityService.getEntityByEntityIds(ids);
-        if (CollectionUtils.isNotEmpty(ents)) {
-            returnValue.put("entName", ents.get(0).getEntName());
-        } else {
-            returnValue.put("entName", null);
-        }
-
-        // 2. 根据实体id获取《实体关系》
-        List<EntityRelation> entityRelationList = entityRelationService.getRelationByEntityId(entityId);
-        returnValue.put("relListVO", entityRelationList);
-
-        // 3. 根据实体关系得实体id 获取所有《实体》
-        List<Entity> entityList = getEntListVO(entityId, entityRelationList);
-        returnValue.put("entListVO", entityList);
-
-        // 4.1 根据实体获取实体类id
-        String classId = null;
-        if (CollectionUtils.isNotEmpty(entityList)) {
-            for (Entity entity : entityList) {
-                if (entityId.equals(entity.getEntId())) {
-                    classId = entity.getEntClsID();
-                }
-            }
-        }
-
-        // 4.2 根据实体类id 获取《实体类关系》
-        List<EntityClassRelation> entityClassRelationList = null;
-        if(StringUtils.isNotBlank(classId)) {
-            entityClassRelationList = entityClassRelationService.getClazzRelByClassId(classId);
-        }
-        returnValue.put("relClsListVO", entityClassRelationList);
-
-        // 5. 根据实体类关系得实体类id 获取所有《实体类》
-        List<EntityClass> entityClassList = getEntClsListVO(returnValue, classId, entityClassRelationList);
-        returnValue.put("entClsListVO", entityClassList);
-        return returnValue;
-    }
-
-    @Override
-    public Map<String, Object> getAllMap() {
-        Map<String, Object> returnValue = new HashMap<>(8);
-        returnValue.put("entID", null);
-        returnValue.put("entName", null);
-        // 2. 根据实体id获取《实体关系》
-        List<EntityRelation> entityRelationList = entityRelationService.getAllRelationByEntityId();
-        returnValue.put("relListVO", entityRelationList);
-
-        // 3. 根据实体关系得实体id 获取所有《实体》
-        List<Entity> entityList = entityService.getAllEntityByEntityIds();
-        returnValue.put("entListVO", entityList);
-//        // 4.2 根据实体类id 获取《实体类关系》
-//        entityClassRelationList = entityClassRelationService.getClazzRelByClassId(classId);
-//        returnValue.put("relClsListVO", entityClassRelationList);
-//        // 5. 根据实体类关系得实体类id 获取所有《实体类》
-//        List<EntityClass> entityClassList = getEntClsListVO(returnValue, classId, entityClassRelationList);
-//        returnValue.put("entClsListVO", entityClassList);
-        return returnValue;
-    }
-
-    private List<EntityClass> getEntClsListVO(Map<String, Object> returnValue, String classId, List<EntityClassRelation> entityClassRelationList) {
-        Set<String> entityClassIdSet;
-        if (CollectionUtils.isNotEmpty(entityClassRelationList)) {
-            entityClassIdSet = new HashSet(entityClassRelationList.size() * 2);
-            for (EntityClassRelation entityClassRelation : entityClassRelationList) {
-                entityClassIdSet.add(entityClassRelation.getStartID());
-                entityClassIdSet.add(entityClassRelation.getEndID());
-            }
-        } else {
-            entityClassIdSet = new HashSet<>(2);
-            entityClassIdSet.add(classId);
-        }
-        return entityClassService.getEntityClassByIds(entityClassIdSet);
-    }
-
-    private List<Entity> getEntListVO(String entityId, List<EntityRelation> entityRelationList) {
-        Set<String> entityIdSet;
-        if(CollectionUtils.isNotEmpty(entityRelationList)) {
-            entityIdSet = new HashSet<>(entityRelationList.size() * 2);
-            for (EntityRelation entityRelation : entityRelationList) {
-                entityIdSet.add(entityRelation.getStartEntId());
-                entityIdSet.add(entityRelation.getEndEntId());
-            }
-        }else{
-            entityIdSet = new HashSet<>(2);
-            entityIdSet.add(entityId);
-        }
-        List<Entity> entityList = entityService.getEntityByEntityIds(entityIdSet);
-        return entityList;
-    }
-}

+ 0 - 12
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/utils/KnowledgeUtils.java

@@ -1,12 +0,0 @@
-package com.kgraph.graph.knowledge.utils;
-
-import com.kgraph.common.utils.uuid.UUID;
-
-/**
- * @author allen
- */
-public class KnowledgeUtils {
-    public static String generateUUID() {
-        return UUID.randomUUID().toString().replaceAll("-", "");
-    }
-}

+ 114 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/EntityClassController.java

@@ -0,0 +1,114 @@
+package com.kgraph.graph.neo4j.controller;
+
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.graph.neo4j.domain.EntityClass;
+import com.kgraph.graph.neo4j.service.IEntityClassService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 实体类Controller
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+@RestController
+@RequestMapping("/neo4j/class")
+public class EntityClassController extends BaseController
+{
+    @Autowired
+    private IEntityClassService entityClassService;
+
+    /**
+     * 查询实体类列表
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(EntityClass entityClass)
+    {
+        startPage();
+        List<EntityClass> list = entityClassService.selectEntityClassList(entityClass);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出实体类列表
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:export')")
+    @Log(title = "实体类", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, EntityClass entityClass)
+    {
+        List<EntityClass> list = entityClassService.selectEntityClassList(entityClass);
+        ExcelUtil<EntityClass> util = new ExcelUtil<EntityClass>(EntityClass.class);
+        util.exportExcel(response, list, "实体类数据");
+    }
+
+    /**
+     * 获取实体类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(entityClassService.selectEntityClassById(id));
+    }
+
+    /**
+     * 新增实体类
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:add')")
+    @Log(title = "实体类", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody EntityClass entityClass)
+    {
+        return toAjax(entityClassService.insertEntityClass(entityClass));
+    }
+
+    /**
+     * 修改实体类
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:edit')")
+    @Log(title = "实体类", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody EntityClass entityClass)
+    {
+        return toAjax(entityClassService.updateEntityClass(entityClass));
+    }
+
+    /**
+     * 删除实体类
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class:remove')")
+    @Log(title = "实体类", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(entityClassService.deleteEntityClassByIds(ids));
+    }
+
+    /**
+     * 查询实体类列表
+     */
+    @GetMapping("/getOption")
+    public AjaxResult getOption()
+    {
+        return success(entityClassService.getOption());
+    }
+}

+ 104 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/EntityClassRelationController.java

@@ -0,0 +1,104 @@
+package com.kgraph.graph.neo4j.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.graph.neo4j.domain.EntityClassRelation;
+import com.kgraph.graph.neo4j.service.IEntityClassRelationService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 实体类关系Controller
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+@RestController
+@RequestMapping("/neo4j/class_relation")
+public class EntityClassRelationController extends BaseController
+{
+    @Autowired
+    private IEntityClassRelationService entityClassRelationService;
+
+    /**
+     * 查询实体类关系列表
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(EntityClassRelation entityClassRelation)
+    {
+        startPage();
+        List<EntityClassRelation> list = entityClassRelationService.selectEntityClassRelationList(entityClassRelation);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出实体类关系列表
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:export')")
+    @Log(title = "实体类关系", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, EntityClassRelation entityClassRelation)
+    {
+        List<EntityClassRelation> list = entityClassRelationService.selectEntityClassRelationList(entityClassRelation);
+        ExcelUtil<EntityClassRelation> util = new ExcelUtil<EntityClassRelation>(EntityClassRelation.class);
+        util.exportExcel(response, list, "实体类关系数据");
+    }
+
+    /**
+     * 获取实体类关系详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(entityClassRelationService.selectEntityClassRelationById(id));
+    }
+
+    /**
+     * 新增实体类关系
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:add')")
+    @Log(title = "实体类关系", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody EntityClassRelation entityClassRelation)
+    {
+        return toAjax(entityClassRelationService.insertEntityClassRelation(entityClassRelation));
+    }
+
+    /**
+     * 修改实体类关系
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:edit')")
+    @Log(title = "实体类关系", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody EntityClassRelation entityClassRelation)
+    {
+        return toAjax(entityClassRelationService.updateEntityClassRelation(entityClassRelation));
+    }
+
+    /**
+     * 删除实体类关系
+     */
+    @PreAuthorize("@ss.hasPermi('neo4j:class_relation:remove')")
+    @Log(title = "实体类关系", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(entityClassRelationService.deleteEntityClassRelationByIds(ids));
+    }
+}

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/KgController.java

@@ -5,7 +5,7 @@ import com.kgraph.common.core.domain.AjaxResult;
 import com.kgraph.graph.neo4j.DTO.KgDTO;
 import com.kgraph.graph.neo4j.VO.GraphVO;
 import com.kgraph.graph.neo4j.domain.Neo4jRelation;
-import com.kgraph.graph.neo4j.seavice.IKgService;
+import com.kgraph.graph.neo4j.service.IKgService;
 import com.kgraph.graph.neo4j.uitils.Neo4j2VOUtils;
 import com.kgraph.graph.suport.domain.QuestionRecord;
 import com.kgraph.graph.suport.service.IQuestionRecordService;

+ 1 - 2
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/Neo4jEntityController.java

@@ -4,10 +4,9 @@ import com.kgraph.common.core.controller.BaseController;
 import com.kgraph.common.core.domain.AjaxResult;
 import com.kgraph.graph.neo4j.DTO.EntityDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jEntity;
-import com.kgraph.graph.neo4j.seavice.INeo4jEntityService;
+import com.kgraph.graph.neo4j.service.INeo4jEntityService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
 import org.springframework.web.bind.annotation.*;
 
 @RestController

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/Neo4jRelationController.java

@@ -4,7 +4,7 @@ import com.kgraph.common.core.controller.BaseController;
 import com.kgraph.common.core.domain.AjaxResult;
 import com.kgraph.graph.neo4j.DTO.RelationDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jRelation;
-import com.kgraph.graph.neo4j.seavice.INeo4jRelationService;
+import com.kgraph.graph.neo4j.service.INeo4jRelationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.web.bind.annotation.*;

+ 83 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/domain/EntityClass.java

@@ -0,0 +1,83 @@
+package com.kgraph.graph.neo4j.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 实体类对象 entity_class
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+public class EntityClass extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 实体类ID */
+    private Long id;
+
+    /** 实体类名称 */
+    @Excel(name = "实体类名称")
+    private String name;
+
+    /** 实体类描述 */
+    @Excel(name = "实体类描述")
+    private String desc;
+
+    /** 实体类背景颜色 */
+    @Excel(name = "实体类背景颜色")
+    private String backGroundColor;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setDesc(String desc) 
+    {
+        this.desc = desc;
+    }
+
+    public String getDesc() 
+    {
+        return desc;
+    }
+    public void setBackGroundColor(String backGroundColor) 
+    {
+        this.backGroundColor = backGroundColor;
+    }
+
+    public String getBackGroundColor() 
+    {
+        return backGroundColor;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("desc", getDesc())
+            .append("backGroundColor", getBackGroundColor())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 58 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/domain/EntityClassRelation.java

@@ -0,0 +1,58 @@
+package com.kgraph.graph.neo4j.domain;
+
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 实体类关系对象 entity_class_relation
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+@Data
+public class EntityClassRelation extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 实体类ID
+     */
+    private Long id;
+
+    /**
+     * 实体类名称
+     */
+    @Excel(name = "实体类名称")
+    private String name;
+
+    /**
+     * 实体类描述
+     */
+    @Excel(name = "实体类描述")
+    private String desc;
+
+    /**
+     * 实体类背景颜色
+     */
+    @Excel(name = "实体类背景颜色")
+    private String backGroundColor;
+
+    /**
+     * 起点实体类id
+     */
+    @Excel(name = "起点实体类id")
+    private Long startId;
+
+    private String startName;
+
+    /**
+     * 起点实体类id
+     */
+    @Excel(name = "起点实体类id")
+    private Long endId;
+
+    private String endName;
+
+}

+ 13 - 18
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/mapper/EntityClassMapper.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/EntityClassMapper.java

@@ -1,25 +1,25 @@
-package com.kgraph.graph.knowledge.mapper;
+package com.kgraph.graph.neo4j.mapper;
 
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 
-import com.kgraph.graph.knowledge.domain.EntityClass;
+import com.kgraph.graph.neo4j.domain.EntityClass;
 
 /**
  * 实体类Mapper接口
  * 
- * @author Allen
- * @date 2022-11-28
+ * @author kgraph
+ * @date 2023-05-23
  */
 public interface EntityClassMapper 
 {
     /**
      * 查询实体类
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 实体类
      */
-    public EntityClass selectEntityClassByEntClsId(String entClsId);
+    public EntityClass selectEntityClassById(Long id);
 
     /**
      * 查询实体类列表
@@ -48,24 +48,19 @@ public interface EntityClassMapper
     /**
      * 删除实体类
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 结果
      */
-    public int deleteEntityClassByEntClsId(String entClsId);
+    public int deleteEntityClassById(Long id);
 
     /**
      * 批量删除实体类
      * 
-     * @param entClsIds 需要删除的数据主键集合
+     * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteEntityClassByEntClsIds(String[] entClsIds);
+    public int deleteEntityClassByIds(Long[] ids);
+
+    List<Map> getOption();
 
-    /**
-     * 查询实体类列表
-     *
-     * @param entityClassIds 实体ids
-     * @return 实体类集合
-     */
-    List<EntityClass> getEntityClassByIds(String[] entityClassIds);
 }

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/EntityClassRelationMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.neo4j.mapper;
+
+import java.util.List;
+import com.kgraph.graph.neo4j.domain.EntityClassRelation;
+
+/**
+ * 实体类关系Mapper接口
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+public interface EntityClassRelationMapper 
+{
+    /**
+     * 查询实体类关系
+     * 
+     * @param id 实体类关系主键
+     * @return 实体类关系
+     */
+    public EntityClassRelation selectEntityClassRelationById(Long id);
+
+    /**
+     * 查询实体类关系列表
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 实体类关系集合
+     */
+    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation);
+
+    /**
+     * 新增实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    public int insertEntityClassRelation(EntityClassRelation entityClassRelation);
+
+    /**
+     * 修改实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    public int updateEntityClassRelation(EntityClassRelation entityClassRelation);
+
+    /**
+     * 删除实体类关系
+     * 
+     * @param id 实体类关系主键
+     * @return 结果
+     */
+    public int deleteEntityClassRelationById(Long id);
+
+    /**
+     * 批量删除实体类关系
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteEntityClassRelationByIds(Long[] ids);
+}

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IEntityClassRelationService.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.neo4j.service;
+
+import java.util.List;
+import com.kgraph.graph.neo4j.domain.EntityClassRelation;
+
+/**
+ * 实体类关系Service接口
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+public interface IEntityClassRelationService 
+{
+    /**
+     * 查询实体类关系
+     * 
+     * @param id 实体类关系主键
+     * @return 实体类关系
+     */
+    public EntityClassRelation selectEntityClassRelationById(Long id);
+
+    /**
+     * 查询实体类关系列表
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 实体类关系集合
+     */
+    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation);
+
+    /**
+     * 新增实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    public int insertEntityClassRelation(EntityClassRelation entityClassRelation);
+
+    /**
+     * 修改实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    public int updateEntityClassRelation(EntityClassRelation entityClassRelation);
+
+    /**
+     * 批量删除实体类关系
+     * 
+     * @param ids 需要删除的实体类关系主键集合
+     * @return 结果
+     */
+    public int deleteEntityClassRelationByIds(Long[] ids);
+
+    /**
+     * 删除实体类关系信息
+     * 
+     * @param id 实体类关系主键
+     * @return 结果
+     */
+    public int deleteEntityClassRelationById(Long id);
+}

+ 12 - 18
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/IEntityClassService.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IEntityClassService.java

@@ -1,25 +1,25 @@
-package com.kgraph.graph.knowledge.service;
+package com.kgraph.graph.neo4j.service;
 
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 
-import com.kgraph.graph.knowledge.domain.EntityClass;
+import com.kgraph.graph.neo4j.domain.EntityClass;
 
 /**
  * 实体类Service接口
  * 
- * @author Allen
- * @date 2022-11-28
+ * @author kgraph
+ * @date 2023-05-23
  */
 public interface IEntityClassService 
 {
     /**
      * 查询实体类
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 实体类
      */
-    public EntityClass selectEntityClassByEntClsId(String entClsId);
+    public EntityClass selectEntityClassById(Long id);
 
     /**
      * 查询实体类列表
@@ -48,24 +48,18 @@ public interface IEntityClassService
     /**
      * 批量删除实体类
      * 
-     * @param entClsIds 需要删除的实体类主键集合
+     * @param ids 需要删除的实体类主键集合
      * @return 结果
      */
-    public int deleteEntityClassByEntClsIds(String[] entClsIds);
+    public int deleteEntityClassByIds(Long[] ids);
 
     /**
      * 删除实体类信息
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 结果
      */
-    public int deleteEntityClassByEntClsId(String entClsId);
+    public int deleteEntityClassById(Long id);
 
-    /**
-     * 查询实体类列表
-     *
-     * @param entityClassIdSet 实体id set
-     * @return 实体类集合
-     */
-    public List<EntityClass>  getEntityClassByIds(Set<String> entityClassIdSet);
+    List<Map> getOption();
 }

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/IKgService.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/IKgService.java

@@ -1,4 +1,4 @@
-package com.kgraph.graph.neo4j.seavice;
+package com.kgraph.graph.neo4j.service;
 
 import com.kgraph.graph.neo4j.DTO.KgDTO;
 import com.kgraph.graph.neo4j.DTO.KgDocDTO;

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/INeo4jEntityService.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/INeo4jEntityService.java

@@ -1,4 +1,4 @@
-package com.kgraph.graph.neo4j.seavice;
+package com.kgraph.graph.neo4j.service;
 
 import com.kgraph.graph.neo4j.DTO.EntityDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jEntity;

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/INeo4jRelationService.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/INeo4jRelationService.java

@@ -1,4 +1,4 @@
-package com.kgraph.graph.neo4j.seavice;
+package com.kgraph.graph.neo4j.service;
 
 import com.kgraph.graph.neo4j.DTO.RelationDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jEntity;

+ 96 - 0
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/EntityClassRelationServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.graph.neo4j.service.impl;
+
+import java.util.List;
+import com.kgraph.common.utils.DateUtils;;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.graph.neo4j.mapper.EntityClassRelationMapper;
+import com.kgraph.graph.neo4j.domain.EntityClassRelation;
+import com.kgraph.graph.neo4j.service.IEntityClassRelationService;
+
+/**
+ * 实体类关系Service业务层处理
+ * 
+ * @author kgraph
+ * @date 2023-05-23
+ */
+@Service
+public class EntityClassRelationServiceImpl implements IEntityClassRelationService 
+{
+    @Autowired
+    private EntityClassRelationMapper entityClassRelationMapper;
+
+    /**
+     * 查询实体类关系
+     * 
+     * @param id 实体类关系主键
+     * @return 实体类关系
+     */
+    @Override
+    public EntityClassRelation selectEntityClassRelationById(Long id)
+    {
+        return entityClassRelationMapper.selectEntityClassRelationById(id);
+    }
+
+    /**
+     * 查询实体类关系列表
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 实体类关系
+     */
+    @Override
+    public List<EntityClassRelation> selectEntityClassRelationList(EntityClassRelation entityClassRelation)
+    {
+        return entityClassRelationMapper.selectEntityClassRelationList(entityClassRelation);
+    }
+
+    /**
+     * 新增实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    @Override
+    public int insertEntityClassRelation(EntityClassRelation entityClassRelation)
+    {
+        entityClassRelation.setCreateTime(DateUtils.getNowDate());
+        return entityClassRelationMapper.insertEntityClassRelation(entityClassRelation);
+    }
+
+    /**
+     * 修改实体类关系
+     * 
+     * @param entityClassRelation 实体类关系
+     * @return 结果
+     */
+    @Override
+    public int updateEntityClassRelation(EntityClassRelation entityClassRelation)
+    {
+        entityClassRelation.setUpdateTime(DateUtils.getNowDate());
+        return entityClassRelationMapper.updateEntityClassRelation(entityClassRelation);
+    }
+
+    /**
+     * 批量删除实体类关系
+     * 
+     * @param ids 需要删除的实体类关系主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEntityClassRelationByIds(Long[] ids)
+    {
+        return entityClassRelationMapper.deleteEntityClassRelationByIds(ids);
+    }
+
+    /**
+     * 删除实体类关系信息
+     * 
+     * @param id 实体类关系主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEntityClassRelationById(Long id)
+    {
+        return entityClassRelationMapper.deleteEntityClassRelationById(id);
+    }
+}

+ 19 - 33
kgraph-graph/src/main/java/com/kgraph/graph/knowledge/service/impl/EntityClassServiceImpl.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/EntityClassServiceImpl.java

@@ -1,22 +1,20 @@
-package com.kgraph.graph.knowledge.service.impl;
+package com.kgraph.graph.neo4j.service.impl;
 
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 
-import com.kgraph.common.utils.DateUtils;
-import com.kgraph.graph.knowledge.utils.KnowledgeUtils;
-import org.apache.commons.lang3.StringUtils;
+import com.kgraph.common.utils.DateUtils;;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.kgraph.graph.knowledge.mapper.EntityClassMapper;
-import com.kgraph.graph.knowledge.domain.EntityClass;
-import com.kgraph.graph.knowledge.service.IEntityClassService;
+import com.kgraph.graph.neo4j.mapper.EntityClassMapper;
+import com.kgraph.graph.neo4j.domain.EntityClass;
+import com.kgraph.graph.neo4j.service.IEntityClassService;
 
 /**
  * 实体类Service业务层处理
  * 
- * @author Allen
- * @date 2022-11-28
+ * @author kgraph
+ * @date 2023-05-23
  */
 @Service
 public class EntityClassServiceImpl implements IEntityClassService 
@@ -27,13 +25,13 @@ public class EntityClassServiceImpl implements IEntityClassService
     /**
      * 查询实体类
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 实体类
      */
     @Override
-    public EntityClass selectEntityClassByEntClsId(String entClsId)
+    public EntityClass selectEntityClassById(Long id)
     {
-        return entityClassMapper.selectEntityClassByEntClsId(entClsId);
+        return entityClassMapper.selectEntityClassById(id);
     }
 
     /**
@@ -57,13 +55,7 @@ public class EntityClassServiceImpl implements IEntityClassService
     @Override
     public int insertEntityClass(EntityClass entityClass)
     {
-        entityClass.setEntClsID(KnowledgeUtils.generateUUID());
         entityClass.setCreateTime(DateUtils.getNowDate());
-        entityClass.setEntClsAllowAttrType("ELEM,MIME,CIDX,NONE");
-        if(StringUtils.isBlank(entityClass.getIsRoot())){
-            entityClass.setIsRoot("T");
-        }
-
         return entityClassMapper.insertEntityClass(entityClass);
     }
 
@@ -83,35 +75,29 @@ public class EntityClassServiceImpl implements IEntityClassService
     /**
      * 批量删除实体类
      * 
-     * @param entClsIds 需要删除的实体类主键
+     * @param ids 需要删除的实体类主键
      * @return 结果
      */
     @Override
-    public int deleteEntityClassByEntClsIds(String[] entClsIds)
+    public int deleteEntityClassByIds(Long[] ids)
     {
-        return entityClassMapper.deleteEntityClassByEntClsIds(entClsIds);
+        return entityClassMapper.deleteEntityClassByIds(ids);
     }
 
     /**
      * 删除实体类信息
      * 
-     * @param entClsId 实体类主键
+     * @param id 实体类主键
      * @return 结果
      */
     @Override
-    public int deleteEntityClassByEntClsId(String entClsId)
+    public int deleteEntityClassById(Long id)
     {
-        return entityClassMapper.deleteEntityClassByEntClsId(entClsId);
+        return entityClassMapper.deleteEntityClassById(id);
     }
 
-    /**
-     * 查询实体类列表
-     *
-     * @param entityClassIdSet 实体id set
-     * @return 实体类集合
-     */
     @Override
-    public List<EntityClass> getEntityClassByIds(Set<String> entityClassIdSet) {
-        return entityClassMapper.getEntityClassByIds(entityClassIdSet.toArray(new String[0]));
+    public List<Map> getOption() {
+        return entityClassMapper.getOption();
     }
 }

+ 2 - 3
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/impl/KgServiceImpl.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/KgServiceImpl.java

@@ -1,14 +1,13 @@
-package com.kgraph.graph.neo4j.seavice.impl;
+package com.kgraph.graph.neo4j.service.impl;
 
 import com.kgraph.common.core.domain.BaseResponse;
 import com.kgraph.common.core.domain.entity.SysDictData;
-import com.kgraph.graph.neo4j.DTO.DocInfo;
 import com.kgraph.graph.neo4j.DTO.KgDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jEntity;
 import com.kgraph.graph.neo4j.domain.Neo4jRelation;
 import com.kgraph.graph.neo4j.mapper.EntityRepository;
 import com.kgraph.graph.neo4j.mapper.RelationRepository;
-import com.kgraph.graph.neo4j.seavice.IKgService;
+import com.kgraph.graph.neo4j.service.IKgService;
 import com.kgraph.system.service.ISysDictDataService;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;

+ 2 - 3
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/impl/Neo4JNeo4jEntityServiceImpl.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/Neo4JNeo4jEntityServiceImpl.java

@@ -1,14 +1,13 @@
-package com.kgraph.graph.neo4j.seavice.impl;
+package com.kgraph.graph.neo4j.service.impl;
 
 import com.kgraph.common.utils.StringUtils;
 import com.kgraph.graph.neo4j.DTO.EntityDTO;
 import com.kgraph.graph.neo4j.domain.Neo4jEntity;
 import com.kgraph.graph.neo4j.mapper.EntityRepository;
-import com.kgraph.graph.neo4j.seavice.INeo4jEntityService;
+import com.kgraph.graph.neo4j.service.INeo4jEntityService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
 @Service

+ 2 - 4
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/impl/Neo4JNeo4jRelationServiceImpl.java → kgraph-graph/src/main/java/com/kgraph/graph/neo4j/service/impl/Neo4JNeo4jRelationServiceImpl.java

@@ -1,15 +1,13 @@
-package com.kgraph.graph.neo4j.seavice.impl;
+package com.kgraph.graph.neo4j.service.impl;
 
 import com.kgraph.common.utils.StringUtils;
 import com.kgraph.graph.neo4j.DTO.RelationDTO;
-import com.kgraph.graph.neo4j.domain.Neo4jEntity;
 import com.kgraph.graph.neo4j.domain.Neo4jRelation;
 import com.kgraph.graph.neo4j.mapper.RelationRepository;
-import com.kgraph.graph.neo4j.seavice.INeo4jRelationService;
+import com.kgraph.graph.neo4j.service.INeo4jRelationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
 @Service

+ 127 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/BuildEntityRelationController.java

@@ -0,0 +1,127 @@
+package com.kgraph.graph.suport.controller;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.file.FileUtils;
+import com.kgraph.graph.suport.dto.BuildEntityRelationDTO;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.graph.suport.domain.BuildEntityRelation;
+import com.kgraph.graph.suport.service.IBuildEntityRelationService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 实体构建Controller
+ * 
+ * @author kgraph
+ * @date 2023-05-24
+ */
+@RestController
+@RequestMapping("/suport/relation")
+public class BuildEntityRelationController extends BaseController
+{
+    @Autowired
+    private IBuildEntityRelationService buildEntityRelationService;
+
+    /**
+     * 查询实体构建列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BuildEntityRelation buildEntityRelation)
+    {
+        startPage();
+        List<BuildEntityRelation> list = buildEntityRelationService.selectBuildEntityRelationList(buildEntityRelation);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出实体构建列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:export')")
+    @Log(title = "实体构建", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BuildEntityRelation buildEntityRelation)
+    {
+        List<BuildEntityRelation> list = buildEntityRelationService.selectBuildEntityRelationList(buildEntityRelation);
+        ExcelUtil<BuildEntityRelation> util = new ExcelUtil<BuildEntityRelation>(BuildEntityRelation.class);
+        util.exportExcel(response, list, "实体构建数据");
+    }
+
+    /**
+     * 获取实体构建详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(buildEntityRelationService.selectBuildEntityRelationById(id));
+    }
+
+    /**
+     * 新增实体构建
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:add')")
+    @Log(title = "实体构建", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BuildEntityRelation buildEntityRelation)
+    {
+        return toAjax(buildEntityRelationService.insertBuildEntityRelation(buildEntityRelation));
+    }
+
+    /**
+     * 修改实体构建
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:edit')")
+    @Log(title = "实体构建", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BuildEntityRelation buildEntityRelation)
+    {
+        return toAjax(buildEntityRelationService.updateBuildEntityRelation(buildEntityRelation));
+    }
+
+    /**
+     * 删除实体构建
+     */
+    @PreAuthorize("@ss.hasPermi('suport:relation:remove')")
+    @Log(title = "实体构建", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(buildEntityRelationService.deleteBuildEntityRelationByIds(ids));
+    }
+
+    @GetMapping("/getClassRelationList/{id}")
+    public AjaxResult getClassRelationList(@PathVariable("id") Long subtaskId)
+    {
+        return success(buildEntityRelationService.getClassRelationList(subtaskId));
+    }
+
+    @PreAuthorize("@ss.hasPermi('suport:relation:add')")
+    @Log(title = "实体关系构建", businessType = BusinessType.INSERT)
+    @PostMapping("/bu1ildEntityRelation")
+    public AjaxResult bu1ildEntityRelation(@RequestBody List<BuildEntityRelationDTO> bu1ildEntityRelationDTOList)
+    {
+        return success(buildEntityRelationService.bu1ildEntityRelation(bu1ildEntityRelationDTOList));
+    }
+}

+ 104 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/TBuildFlowController.java

@@ -0,0 +1,104 @@
+package com.kgraph.graph.suport.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.graph.suport.domain.TBuildFlow;
+import com.kgraph.graph.suport.service.ITBuildFlowService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 构建流程Controller
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+@RestController
+@RequestMapping("/suport/flow")
+public class TBuildFlowController extends BaseController
+{
+    @Autowired
+    private ITBuildFlowService tBuildFlowService;
+
+    /**
+     * 查询构建流程列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBuildFlow tBuildFlow)
+    {
+        startPage();
+        List<TBuildFlow> list = tBuildFlowService.selectTBuildFlowList(tBuildFlow);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出构建流程列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:export')")
+    @Log(title = "构建流程", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBuildFlow tBuildFlow)
+    {
+        List<TBuildFlow> list = tBuildFlowService.selectTBuildFlowList(tBuildFlow);
+        ExcelUtil<TBuildFlow> util = new ExcelUtil<TBuildFlow>(TBuildFlow.class);
+        util.exportExcel(response, list, "构建流程数据");
+    }
+
+    /**
+     * 获取构建流程详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(tBuildFlowService.selectTBuildFlowById(id));
+    }
+
+    /**
+     * 新增构建流程
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:add')")
+    @Log(title = "构建流程", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBuildFlow tBuildFlow)
+    {
+        return toAjax(tBuildFlowService.insertTBuildFlow(tBuildFlow));
+    }
+
+    /**
+     * 修改构建流程
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:edit')")
+    @Log(title = "构建流程", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBuildFlow tBuildFlow)
+    {
+        return toAjax(tBuildFlowService.updateTBuildFlow(tBuildFlow));
+    }
+
+    /**
+     * 删除构建流程
+     */
+    @PreAuthorize("@ss.hasPermi('suport:flow:remove')")
+    @Log(title = "构建流程", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tBuildFlowService.deleteTBuildFlowByIds(ids));
+    }
+}

+ 104 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/controller/TCheckPiontController.java

@@ -0,0 +1,104 @@
+package com.kgraph.graph.suport.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.graph.suport.domain.TCheckPiont;
+import com.kgraph.graph.suport.service.ITCheckPiontService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 检查点管理Controller
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+@RestController
+@RequestMapping("/suport/piont")
+public class TCheckPiontController extends BaseController
+{
+    @Autowired
+    private ITCheckPiontService tCheckPiontService;
+
+    /**
+     * 查询检查点管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TCheckPiont tCheckPiont)
+    {
+        startPage();
+        List<TCheckPiont> list = tCheckPiontService.selectTCheckPiontList(tCheckPiont);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出检查点管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:export')")
+    @Log(title = "检查点管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TCheckPiont tCheckPiont)
+    {
+        List<TCheckPiont> list = tCheckPiontService.selectTCheckPiontList(tCheckPiont);
+        ExcelUtil<TCheckPiont> util = new ExcelUtil<TCheckPiont>(TCheckPiont.class);
+        util.exportExcel(response, list, "检查点管理数据");
+    }
+
+    /**
+     * 获取检查点管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(tCheckPiontService.selectTCheckPiontById(id));
+    }
+
+    /**
+     * 新增检查点管理
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:add')")
+    @Log(title = "检查点管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TCheckPiont tCheckPiont)
+    {
+        return toAjax(tCheckPiontService.insertTCheckPiont(tCheckPiont));
+    }
+
+    /**
+     * 修改检查点管理
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:edit')")
+    @Log(title = "检查点管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TCheckPiont tCheckPiont)
+    {
+        return toAjax(tCheckPiontService.updateTCheckPiont(tCheckPiont));
+    }
+
+    /**
+     * 删除检查点管理
+     */
+    @PreAuthorize("@ss.hasPermi('suport:piont:remove')")
+    @Log(title = "检查点管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tCheckPiontService.deleteTCheckPiontByIds(ids));
+    }
+}

+ 125 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/BuildEntityRelation.java

@@ -0,0 +1,125 @@
+package com.kgraph.graph.suport.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 实体构建对象 t_build_entity_relation
+ * 
+ * @author kgraph
+ * @date 2023-05-24
+ */
+public class BuildEntityRelation extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 子任务id */
+    @Excel(name = "子任务id")
+    private Long subTaskId;
+
+    /** 主体实体类id */
+    @Excel(name = "主体实体类id")
+    private Long subEntityClassId;
+
+    /** 客体实体类id */
+    @Excel(name = "客体实体类id")
+    private Long objEntityClassId;
+
+    /** 实体类关系id */
+    @Excel(name = "实体类关系id")
+    private Long entityClassRelId;
+
+    /** 主体 */
+    @Excel(name = "主体")
+    private String subEntity;
+
+    /** 客体 */
+    @Excel(name = "客体")
+    private String objEntity;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSubTaskId(Long subTaskId) 
+    {
+        this.subTaskId = subTaskId;
+    }
+
+    public Long getSubTaskId() 
+    {
+        return subTaskId;
+    }
+    public void setSubEntityClassId(Long subEntityClassId) 
+    {
+        this.subEntityClassId = subEntityClassId;
+    }
+
+    public Long getSubEntityClassId() 
+    {
+        return subEntityClassId;
+    }
+    public void setObjEntityClassId(Long objEntityClassId) 
+    {
+        this.objEntityClassId = objEntityClassId;
+    }
+
+    public Long getObjEntityClassId() 
+    {
+        return objEntityClassId;
+    }
+    public void setEntityClassRelId(Long entityClassRelId) 
+    {
+        this.entityClassRelId = entityClassRelId;
+    }
+
+    public Long getEntityClassRelId() 
+    {
+        return entityClassRelId;
+    }
+    public void setSubEntity(String subEntity) 
+    {
+        this.subEntity = subEntity;
+    }
+
+    public String getSubEntity() 
+    {
+        return subEntity;
+    }
+    public void setObjEntity(String objEntity) 
+    {
+        this.objEntity = objEntity;
+    }
+
+    public String getObjEntity() 
+    {
+        return objEntity;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("subTaskId", getSubTaskId())
+            .append("subEntityClassId", getSubEntityClassId())
+            .append("objEntityClassId", getObjEntityClassId())
+            .append("entityClassRelId", getEntityClassRelId())
+            .append("subEntity", getSubEntity())
+            .append("objEntity", getObjEntity())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 83 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/TBuildFlow.java

@@ -0,0 +1,83 @@
+package com.kgraph.graph.suport.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 构建流程对象 t_build_flow
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public class TBuildFlow extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 故障编码 */
+    @Excel(name = "故障编码")
+    private String errorCode;
+
+    /** 流程数据 */
+    @Excel(name = "流程数据")
+    private String flowEncode;
+
+    /** 流程树json */
+    @Excel(name = "流程树json")
+    private String flowTreeJson;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setErrorCode(String errorCode) 
+    {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorCode() 
+    {
+        return errorCode;
+    }
+    public void setFlowEncode(String flowEncode) 
+    {
+        this.flowEncode = flowEncode;
+    }
+
+    public String getFlowEncode() 
+    {
+        return flowEncode;
+    }
+    public void setFlowTreeJson(String flowTreeJson) 
+    {
+        this.flowTreeJson = flowTreeJson;
+    }
+
+    public String getFlowTreeJson() 
+    {
+        return flowTreeJson;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("errorCode", getErrorCode())
+            .append("flowEncode", getFlowEncode())
+            .append("flowTreeJson", getFlowTreeJson())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 69 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/domain/TCheckPiont.java

@@ -0,0 +1,69 @@
+package com.kgraph.graph.suport.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 检查点管理对象 t_check_piont
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public class TCheckPiont extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 编码 */
+    @Excel(name = "编码")
+    private String code;
+
+    /** 检查点 */
+    @Excel(name = "检查点")
+    private String checkPiont;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCode(String code) 
+    {
+        this.code = code;
+    }
+
+    public String getCode() 
+    {
+        return code;
+    }
+    public void setCheckPiont(String checkPiont) 
+    {
+        this.checkPiont = checkPiont;
+    }
+
+    public String getCheckPiont() 
+    {
+        return checkPiont;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("code", getCode())
+            .append("checkPiont", getCheckPiont())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 17 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/dto/BuildEntityRelationDTO.java

@@ -0,0 +1,17 @@
+package com.kgraph.graph.suport.dto;
+
+import lombok.Data;
+
+@Data
+public class BuildEntityRelationDTO {
+    private Long id;
+    private Long relationId;
+    private Long startId;
+    private Long endId;
+    private Long subTaskId;
+    String name;
+    String subName;
+    String objName;
+    String SubEntity;
+    String objEntity;
+}

+ 68 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/BuildEntityRelationMapper.java

@@ -0,0 +1,68 @@
+package com.kgraph.graph.suport.mapper;
+
+import java.util.List;
+import java.util.Map;
+
+import com.kgraph.graph.suport.domain.BuildEntityRelation;
+import com.kgraph.graph.suport.dto.BuildEntityRelationDTO;
+
+/**
+ * 实体构建Mapper接口
+ * 
+ * @author kgraph
+ * @date 2023-05-24
+ */
+public interface BuildEntityRelationMapper 
+{
+    /**
+     * 查询实体构建
+     * 
+     * @param id 实体构建主键
+     * @return 实体构建
+     */
+    public BuildEntityRelation selectBuildEntityRelationById(Long id);
+
+    /**
+     * 查询实体构建列表
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 实体构建集合
+     */
+    public List<BuildEntityRelation> selectBuildEntityRelationList(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 新增实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    public int insertBuildEntityRelation(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 修改实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    public int updateBuildEntityRelation(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 删除实体构建
+     * 
+     * @param id 实体构建主键
+     * @return 结果
+     */
+    public int deleteBuildEntityRelationById(Long id);
+
+    /**
+     * 批量删除实体构建
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBuildEntityRelationByIds(Long[] ids);
+
+    public List<Map> getClassRelationList(Long subtaskId);
+
+    public int bu1ildEntityRelation(List<BuildEntityRelationDTO> bu1ildEntityRelationDTOList);
+}

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/TBuildFlowMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.suport.mapper;
+
+import java.util.List;
+import com.kgraph.graph.suport.domain.TBuildFlow;
+
+/**
+ * 构建流程Mapper接口
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public interface TBuildFlowMapper 
+{
+    /**
+     * 查询构建流程
+     * 
+     * @param id 构建流程主键
+     * @return 构建流程
+     */
+    public TBuildFlow selectTBuildFlowById(Long id);
+
+    /**
+     * 查询构建流程列表
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 构建流程集合
+     */
+    public List<TBuildFlow> selectTBuildFlowList(TBuildFlow tBuildFlow);
+
+    /**
+     * 新增构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    public int insertTBuildFlow(TBuildFlow tBuildFlow);
+
+    /**
+     * 修改构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    public int updateTBuildFlow(TBuildFlow tBuildFlow);
+
+    /**
+     * 删除构建流程
+     * 
+     * @param id 构建流程主键
+     * @return 结果
+     */
+    public int deleteTBuildFlowById(Long id);
+
+    /**
+     * 批量删除构建流程
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBuildFlowByIds(Long[] ids);
+}

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/mapper/TCheckPiontMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.suport.mapper;
+
+import java.util.List;
+import com.kgraph.graph.suport.domain.TCheckPiont;
+
+/**
+ * 检查点管理Mapper接口
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public interface TCheckPiontMapper 
+{
+    /**
+     * 查询检查点管理
+     * 
+     * @param id 检查点管理主键
+     * @return 检查点管理
+     */
+    public TCheckPiont selectTCheckPiontById(Long id);
+
+    /**
+     * 查询检查点管理列表
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 检查点管理集合
+     */
+    public List<TCheckPiont> selectTCheckPiontList(TCheckPiont tCheckPiont);
+
+    /**
+     * 新增检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    public int insertTCheckPiont(TCheckPiont tCheckPiont);
+
+    /**
+     * 修改检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    public int updateTCheckPiont(TCheckPiont tCheckPiont);
+
+    /**
+     * 删除检查点管理
+     * 
+     * @param id 检查点管理主键
+     * @return 结果
+     */
+    public int deleteTCheckPiontById(Long id);
+
+    /**
+     * 批量删除检查点管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTCheckPiontByIds(Long[] ids);
+}

+ 68 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/IBuildEntityRelationService.java

@@ -0,0 +1,68 @@
+package com.kgraph.graph.suport.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.kgraph.graph.suport.domain.BuildEntityRelation;
+import com.kgraph.graph.suport.dto.BuildEntityRelationDTO;
+
+/**
+ * 实体构建Service接口
+ * 
+ * @author kgraph
+ * @date 2023-05-24
+ */
+public interface IBuildEntityRelationService 
+{
+    /**
+     * 查询实体构建
+     * 
+     * @param id 实体构建主键
+     * @return 实体构建
+     */
+    public BuildEntityRelation selectBuildEntityRelationById(Long id);
+
+    /**
+     * 查询实体构建列表
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 实体构建集合
+     */
+    public List<BuildEntityRelation> selectBuildEntityRelationList(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 新增实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    public int insertBuildEntityRelation(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 修改实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    public int updateBuildEntityRelation(BuildEntityRelation buildEntityRelation);
+
+    /**
+     * 批量删除实体构建
+     * 
+     * @param ids 需要删除的实体构建主键集合
+     * @return 结果
+     */
+    public int deleteBuildEntityRelationByIds(Long[] ids);
+
+    /**
+     * 删除实体构建信息
+     * 
+     * @param id 实体构建主键
+     * @return 结果
+     */
+    public int deleteBuildEntityRelationById(Long id);
+
+    List<Map> getClassRelationList(Long subtaskId);
+
+    int bu1ildEntityRelation(List<BuildEntityRelationDTO> bu1ildEntityRelationDTOList);
+}

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/ITBuildFlowService.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.suport.service;
+
+import java.util.List;
+import com.kgraph.graph.suport.domain.TBuildFlow;
+
+/**
+ * 构建流程Service接口
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public interface ITBuildFlowService 
+{
+    /**
+     * 查询构建流程
+     * 
+     * @param id 构建流程主键
+     * @return 构建流程
+     */
+    public TBuildFlow selectTBuildFlowById(Long id);
+
+    /**
+     * 查询构建流程列表
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 构建流程集合
+     */
+    public List<TBuildFlow> selectTBuildFlowList(TBuildFlow tBuildFlow);
+
+    /**
+     * 新增构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    public int insertTBuildFlow(TBuildFlow tBuildFlow);
+
+    /**
+     * 修改构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    public int updateTBuildFlow(TBuildFlow tBuildFlow);
+
+    /**
+     * 批量删除构建流程
+     * 
+     * @param ids 需要删除的构建流程主键集合
+     * @return 结果
+     */
+    public int deleteTBuildFlowByIds(Long[] ids);
+
+    /**
+     * 删除构建流程信息
+     * 
+     * @param id 构建流程主键
+     * @return 结果
+     */
+    public int deleteTBuildFlowById(Long id);
+}

+ 61 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/ITCheckPiontService.java

@@ -0,0 +1,61 @@
+package com.kgraph.graph.suport.service;
+
+import java.util.List;
+import com.kgraph.graph.suport.domain.TCheckPiont;
+
+/**
+ * 检查点管理Service接口
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+public interface ITCheckPiontService 
+{
+    /**
+     * 查询检查点管理
+     * 
+     * @param id 检查点管理主键
+     * @return 检查点管理
+     */
+    public TCheckPiont selectTCheckPiontById(Long id);
+
+    /**
+     * 查询检查点管理列表
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 检查点管理集合
+     */
+    public List<TCheckPiont> selectTCheckPiontList(TCheckPiont tCheckPiont);
+
+    /**
+     * 新增检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    public int insertTCheckPiont(TCheckPiont tCheckPiont);
+
+    /**
+     * 修改检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    public int updateTCheckPiont(TCheckPiont tCheckPiont);
+
+    /**
+     * 批量删除检查点管理
+     * 
+     * @param ids 需要删除的检查点管理主键集合
+     * @return 结果
+     */
+    public int deleteTCheckPiontByIds(Long[] ids);
+
+    /**
+     * 删除检查点管理信息
+     * 
+     * @param id 检查点管理主键
+     * @return 结果
+     */
+    public int deleteTCheckPiontById(Long id);
+}

+ 137 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/BuildEntityRelationServiceImpl.java

@@ -0,0 +1,137 @@
+package com.kgraph.graph.suport.service.impl;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.kgraph.common.utils.DateUtils;;
+import com.kgraph.graph.suport.dto.BuildEntityRelationDTO;
+import com.kgraph.graph.suport.mapper.ExtractKnowledgeSubTaskMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.graph.suport.mapper.BuildEntityRelationMapper;
+import com.kgraph.graph.suport.domain.BuildEntityRelation;
+import com.kgraph.graph.suport.service.IBuildEntityRelationService;
+
+/**
+ * 实体构建Service业务层处理
+ * 
+ * @author kgraph
+ * @date 2023-05-24
+ */
+@Service
+public class BuildEntityRelationServiceImpl implements IBuildEntityRelationService 
+{
+    @Autowired
+    private BuildEntityRelationMapper buildEntityRelationMapper;
+
+    @Autowired
+    private ExtractKnowledgeSubTaskMapper extractKnowledgeSubTaskMapper;
+
+    /**
+     * 查询实体构建
+     * 
+     * @param id 实体构建主键
+     * @return 实体构建
+     */
+    @Override
+    public BuildEntityRelation selectBuildEntityRelationById(Long id)
+    {
+        return buildEntityRelationMapper.selectBuildEntityRelationById(id);
+    }
+
+    /**
+     * 查询实体构建列表
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 实体构建
+     */
+    @Override
+    public List<BuildEntityRelation> selectBuildEntityRelationList(BuildEntityRelation buildEntityRelation)
+    {
+        return buildEntityRelationMapper.selectBuildEntityRelationList(buildEntityRelation);
+    }
+
+    /**
+     * 新增实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    @Override
+    public int insertBuildEntityRelation(BuildEntityRelation buildEntityRelation)
+    {
+        buildEntityRelation.setCreateTime(DateUtils.getNowDate());
+        return buildEntityRelationMapper.insertBuildEntityRelation(buildEntityRelation);
+    }
+
+    /**
+     * 修改实体构建
+     * 
+     * @param buildEntityRelation 实体构建
+     * @return 结果
+     */
+    @Override
+    public int updateBuildEntityRelation(BuildEntityRelation buildEntityRelation)
+    {
+        buildEntityRelation.setUpdateTime(DateUtils.getNowDate());
+        return buildEntityRelationMapper.updateBuildEntityRelation(buildEntityRelation);
+    }
+
+    /**
+     * 批量删除实体构建
+     * 
+     * @param ids 需要删除的实体构建主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBuildEntityRelationByIds(Long[] ids)
+    {
+        return buildEntityRelationMapper.deleteBuildEntityRelationByIds(ids);
+    }
+
+    /**
+     * 删除实体构建信息
+     * 
+     * @param id 实体构建主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBuildEntityRelationById(Long id)
+    {
+        return buildEntityRelationMapper.deleteBuildEntityRelationById(id);
+    }
+
+    @Override
+    public List<Map> getClassRelationList(Long subtaskId) {
+        return buildEntityRelationMapper.getClassRelationList(subtaskId);
+    }
+
+    @Override
+    public int bu1ildEntityRelation(List<BuildEntityRelationDTO> bu1ildEntityRelationDTOList) {
+        // 构建实体关系表
+        int res = 0;
+        Long id = 0L;
+        for (BuildEntityRelationDTO entityRelationDTO : bu1ildEntityRelationDTOList) {
+            BuildEntityRelation buildEntityRelation = new BuildEntityRelation();
+            buildEntityRelation.setId(entityRelationDTO.getId());
+            buildEntityRelation.setEntityClassRelId(entityRelationDTO.getRelationId());
+            buildEntityRelation.setSubTaskId(entityRelationDTO.getSubTaskId());
+            buildEntityRelation.setSubEntityClassId(entityRelationDTO.getStartId());
+            buildEntityRelation.setObjEntityClassId(entityRelationDTO.getEndId());
+            buildEntityRelation.setSubEntity(entityRelationDTO.getSubEntity());
+            buildEntityRelation.setObjEntity(entityRelationDTO.getObjEntity());
+            if (entityRelationDTO.getId() != null) {
+                res += updateBuildEntityRelation(buildEntityRelation);
+            } else {
+                res += insertBuildEntityRelation(buildEntityRelation);
+            }
+            if(entityRelationDTO.getSubTaskId() != null) {
+                id = entityRelationDTO.getSubTaskId();
+            }
+        }
+        // 更新子任务状态
+        extractKnowledgeSubTaskMapper.updateSubTaskStatusById(id, "3", null, new Date());
+        return res;
+    }
+}

+ 2 - 2
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/ExtractKnowledgeSubTaskServiceImpl.java

@@ -9,7 +9,7 @@ import com.kgraph.common.utils.file.FileUtils;
 import com.kgraph.graph.neo4j.DTO.DocInfo;
 import com.kgraph.graph.neo4j.DTO.KgDTO;
 import com.kgraph.graph.neo4j.DTO.KgDocDTO;
-import com.kgraph.graph.neo4j.seavice.IKgService;
+import com.kgraph.graph.neo4j.service.IKgService;
 import com.kgraph.graph.suport.domain.ExtractKnowledgeSubTask;
 import com.kgraph.graph.suport.domain.ExtractKnowledgeTask;
 import com.kgraph.graph.suport.domain.ExtractResult;
@@ -220,7 +220,7 @@ public class ExtractKnowledgeSubTaskServiceImpl implements IExtractKnowledgeSubT
     public void approveSubTask(Long id, String status, ExtractResult extractResult) {
 
         // 更新子任务状态
-        extractKnowledgeSubTaskMapper.updateSubTaskStatusById(id, status, null, null);
+        extractKnowledgeSubTaskMapper.updateSubTaskStatusById(id, status, null, new Date());
 
         // 审批 则同步到图数据库 保存json
         if (ExtractKnowledgeSubTask.REVIEWED.equals(status)) {

+ 96 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/TBuildFlowServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.graph.suport.service.impl;
+
+import java.util.List;
+import com.kgraph.common.utils.DateUtils;;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.graph.suport.mapper.TBuildFlowMapper;
+import com.kgraph.graph.suport.domain.TBuildFlow;
+import com.kgraph.graph.suport.service.ITBuildFlowService;
+
+/**
+ * 构建流程Service业务层处理
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+@Service
+public class TBuildFlowServiceImpl implements ITBuildFlowService 
+{
+    @Autowired
+    private TBuildFlowMapper tBuildFlowMapper;
+
+    /**
+     * 查询构建流程
+     * 
+     * @param id 构建流程主键
+     * @return 构建流程
+     */
+    @Override
+    public TBuildFlow selectTBuildFlowById(Long id)
+    {
+        return tBuildFlowMapper.selectTBuildFlowById(id);
+    }
+
+    /**
+     * 查询构建流程列表
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 构建流程
+     */
+    @Override
+    public List<TBuildFlow> selectTBuildFlowList(TBuildFlow tBuildFlow)
+    {
+        return tBuildFlowMapper.selectTBuildFlowList(tBuildFlow);
+    }
+
+    /**
+     * 新增构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    @Override
+    public int insertTBuildFlow(TBuildFlow tBuildFlow)
+    {
+        tBuildFlow.setCreateTime(DateUtils.getNowDate());
+        return tBuildFlowMapper.insertTBuildFlow(tBuildFlow);
+    }
+
+    /**
+     * 修改构建流程
+     * 
+     * @param tBuildFlow 构建流程
+     * @return 结果
+     */
+    @Override
+    public int updateTBuildFlow(TBuildFlow tBuildFlow)
+    {
+        tBuildFlow.setUpdateTime(DateUtils.getNowDate());
+        return tBuildFlowMapper.updateTBuildFlow(tBuildFlow);
+    }
+
+    /**
+     * 批量删除构建流程
+     * 
+     * @param ids 需要删除的构建流程主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBuildFlowByIds(Long[] ids)
+    {
+        return tBuildFlowMapper.deleteTBuildFlowByIds(ids);
+    }
+
+    /**
+     * 删除构建流程信息
+     * 
+     * @param id 构建流程主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBuildFlowById(Long id)
+    {
+        return tBuildFlowMapper.deleteTBuildFlowById(id);
+    }
+}

+ 96 - 0
kgraph-graph/src/main/java/com/kgraph/graph/suport/service/impl/TCheckPiontServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.graph.suport.service.impl;
+
+import java.util.List;
+import com.kgraph.common.utils.DateUtils;;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.graph.suport.mapper.TCheckPiontMapper;
+import com.kgraph.graph.suport.domain.TCheckPiont;
+import com.kgraph.graph.suport.service.ITCheckPiontService;
+
+/**
+ * 检查点管理Service业务层处理
+ * 
+ * @author kgraph
+ * @date 2023-05-28
+ */
+@Service
+public class TCheckPiontServiceImpl implements ITCheckPiontService 
+{
+    @Autowired
+    private TCheckPiontMapper tCheckPiontMapper;
+
+    /**
+     * 查询检查点管理
+     * 
+     * @param id 检查点管理主键
+     * @return 检查点管理
+     */
+    @Override
+    public TCheckPiont selectTCheckPiontById(Long id)
+    {
+        return tCheckPiontMapper.selectTCheckPiontById(id);
+    }
+
+    /**
+     * 查询检查点管理列表
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 检查点管理
+     */
+    @Override
+    public List<TCheckPiont> selectTCheckPiontList(TCheckPiont tCheckPiont)
+    {
+        return tCheckPiontMapper.selectTCheckPiontList(tCheckPiont);
+    }
+
+    /**
+     * 新增检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    @Override
+    public int insertTCheckPiont(TCheckPiont tCheckPiont)
+    {
+        tCheckPiont.setCreateTime(DateUtils.getNowDate());
+        return tCheckPiontMapper.insertTCheckPiont(tCheckPiont);
+    }
+
+    /**
+     * 修改检查点管理
+     * 
+     * @param tCheckPiont 检查点管理
+     * @return 结果
+     */
+    @Override
+    public int updateTCheckPiont(TCheckPiont tCheckPiont)
+    {
+        tCheckPiont.setUpdateTime(DateUtils.getNowDate());
+        return tCheckPiontMapper.updateTCheckPiont(tCheckPiont);
+    }
+
+    /**
+     * 批量删除检查点管理
+     * 
+     * @param ids 需要删除的检查点管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckPiontByIds(Long[] ids)
+    {
+        return tCheckPiontMapper.deleteTCheckPiontByIds(ids);
+    }
+
+    /**
+     * 删除检查点管理信息
+     * 
+     * @param id 检查点管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCheckPiontById(Long id)
+    {
+        return tCheckPiontMapper.deleteTCheckPiontById(id);
+    }
+}

+ 0 - 124
kgraph-graph/src/main/resources/mapper/knowledge/EntityAttributeMapper.xml

@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityAttributeMapper">
-    
-    <resultMap type="EntityAttribute" id="EntityAttributeResult">
-        <result property="attrID"    column="attr_id"    />
-        <result property="attrValue"    column="attr_value"    />
-        <result property="entId"    column="ent_id"    />
-        <result property="attrClsId"    column="attr_cls_id"    />
-        <result property="attrClsName"    column="attr_cls_name"    />
-        <result property="attrClsMemo"    column="attr_cls_memo"    />
-        <result property="attrUnit"    column="attr_unit"    />
-        <result property="attrType"    column="attr_type"    />
-        <result property="attrValueType"    column="attr_value_type"    />
-        <result property="notNull"    column="not_null"    />
-        <result property="domain"    column="domain"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectEntityAttributeVo">
-        select attr_id, attr_value, ent_id, attr_cls_id, create_by, create_time, update_by, update_time from entity_attribute
-    </sql>
-
-
-    <select id="selectEntityAttributeList" parameterType="EntityAttribute" resultMap="EntityAttributeResult">
-        <include refid="selectEntityAttributeVo"/>
-        <where>  
-            <if test="attrValue != null  and attrValue != ''"> and attr_value = #{attrValue}</if>
-            <if test="entId != null  and entId != ''"> and ent_id = #{entId}</if>
-            <if test="attrClsId != null  and attrClsId != ''"> and attr_cls_id = #{attrClsId}</if>
-        </where>
-    </select>
-
-    <select id="selectEntityAttributeByAttrClsId" parameterType="String" resultMap="EntityAttributeResult">
-        <include refid="selectEntityAttributeVo"/>
-        where attr_id = #{attrID}
-    </select>
-    
-    <select id="selectEntityAttributeByAttrID" parameterType="String" resultMap="EntityAttributeResult">
-        <include refid="selectEntityAttributeVo"/>
-        where attr_id = #{attrID}
-    </select>
-        
-    <insert id="insertEntityAttribute" parameterType="EntityAttribute">
-        insert into entity_attribute
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="attrID != null">attr_id,</if>
-            <if test="attrValue != null">attr_value,</if>
-            <if test="entId != null">ent_id,</if>
-            <if test="attrClsId != null">attr_cls_id,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="attrID != null">#{attrID},</if>
-            <if test="attrValue != null">#{attrValue},</if>
-            <if test="entId != null">#{entId},</if>
-            <if test="attrClsId != null">#{attrClsId},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntityAttribute" parameterType="EntityAttribute">
-        update entity_attribute
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="attrValue != null">attr_value = #{attrValue},</if>
-            <if test="entId != null">ent_id = #{entId},</if>
-            <if test="attrClsId != null">attr_cls_id = #{attrClsId},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where attr_id = #{attrID}
-    </update>
-
-    <delete id="deleteEntityAttributeByAttrID" parameterType="String">
-        delete from entity_attribute where attr_id = #{attrID}
-    </delete>
-
-    <delete id="deleteEntityAttributeByAttrIDs" parameterType="String">
-        delete from entity_attribute where attr_id in 
-        <foreach item="attrID" collection="array" open="(" separator="," close=")">
-            #{attrID}
-        </foreach>
-    </delete>
-    <select id="getEntityAttrs" parameterType="EntityAttribute" resultMap="EntityAttributeResult">
-        SELECT
-            (select ea.attr_id from entity_attribute ea where ea.attr_cls_id = eca.attr_cls_id and ea.ent_id = #{entId}) attr_id,
-            (select ea.attr_value from entity_attribute ea where ea.attr_cls_id = eca.attr_cls_id and ea.ent_id = #{entId}) attr_value,
-            #{entId} ent_id,
-            eca.attr_cls_id,
-            eca.attr_cls_name,
-            eca.attr_cls_memo,
-            eca.attr_unit,
-            eca.attr_type,
-            eca.attr_value_type,
-            eca.not_null,
-            eca.domain
-        FROM
-            entity_class_attribute eca
-        WHERE
-            eca.attr_type = #{attrType}
-            AND eca.ent_cls_id IN (
-            SELECT
-                ent.ent_cls_id
-            FROM
-                entity ent
-            WHERE
-                ent_id = #{entId})
-    </select>
-
-
-</mapper>

+ 0 - 153
kgraph-graph/src/main/resources/mapper/knowledge/EntityClassAttributeMapper.xml

@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityClassAttributeMapper">
-    
-    <resultMap type="EntityClassAttribute" id="EntityClassAttributeResult">
-        <result property="attrClsID"    column="attr_cls_id"    />
-        <result property="attrClsName"    column="attr_cls_name"    />
-        <result property="attrUnit"    column="attr_unit"    />
-        <result property="entAndAttrType"    column="ent_and_attr_type"    />
-        <result property="attrType"    column="attr_type"    />
-        <result property="entClsID"    column="ent_cls_id"    />
-        <result property="attrClsMemo"    column="attr_cls_memo"    />
-        <result property="valueType"    column="value_type"    />
-        <result property="attrValueType"    column="attr_value_type"    />
-        <result property="domainKey"    column="domain_key"    />
-        <result property="domain"    column="domain"    />
-        <result property="isPublic"    column="is_public"    />
-        <result property="maxValue"    column="max_value"    />
-        <result property="minValue"    column="min_value"    />
-        <result property="notNull"    column="not_null"    />
-        <result property="entUseCount"    column="ent_use_count"    />
-        <result property="isEdit"    column="is_edit"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectEntityClassAttributeVo">
-        select attr_cls_id, attr_cls_name, attr_unit, ent_and_attr_type, attr_type, ent_cls_id, attr_cls_memo, value_type, attr_value_type, domain_key, domain, is_public, max_value, min_value, not_null, ent_use_count, is_edit, create_by, create_time, update_by, update_time from entity_class_attribute
-    </sql>
-
-    <select id="selectEntityClassAttributeList" parameterType="EntityClassAttribute" resultMap="EntityClassAttributeResult">
-        <include refid="selectEntityClassAttributeVo"/>
-        <where>  
-            <if test="attrClsName != null  and attrClsName != ''"> and attr_cls_name like concat('%', #{attrClsName}, '%')</if>
-            <if test="attrUnit != null  and attrUnit != ''"> and attr_unit = #{attrUnit}</if>
-            <if test="entAndAttrType != null  and entAndAttrType != ''"> and ent_and_attr_type = #{entAndAttrType}</if>
-            <if test="attrType != null  and attrType != ''"> and attr_type = #{attrType}</if>
-            <if test="entClsID != null  and entClsID != ''"> and ent_cls_id = #{entClsID}</if>
-            <if test="attrClsMemo != null  and attrClsMemo != ''"> and attr_cls_memo = #{attrClsMemo}</if>
-            <if test="valueType != null  and valueType != ''"> and value_type = #{valueType}</if>
-            <if test="attrValueType != null  and attrValueType != ''"> and attr_value_type = #{attrValueType}</if>
-            <if test="domainKey != null  and domainKey != ''"> and domain_key = #{domainKey}</if>
-            <if test="domain != null  and domain != ''"> and domain = #{domain}</if>
-            <if test="isPublic != null "> and is_public = #{isPublic}</if>
-            <if test="maxValue != null  and maxValue != ''"> and max_value = #{maxValue}</if>
-            <if test="minValue != null  and minValue != ''"> and min_value = #{minValue}</if>
-            <if test="notNull != null "> and not_null = #{notNull}</if>
-            <if test="entUseCount != null "> and ent_use_count = #{entUseCount}</if>
-            <if test="isEdit != null  and isEdit != ''"> and is_edit = #{isEdit}</if>
-        </where>
-    </select>
-    
-    <select id="selectEntityClassAttributeByAttrClsId" parameterType="String" resultMap="EntityClassAttributeResult">
-        <include refid="selectEntityClassAttributeVo"/>
-        where attr_cls_id = #{attrClsID}
-    </select>
-        
-    <insert id="insertEntityClassAttribute" parameterType="EntityClassAttribute">
-        insert into entity_class_attribute
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="attrClsID != null">attr_cls_id,</if>
-            <if test="attrClsName != null">attr_cls_name,</if>
-            <if test="attrUnit != null">attr_unit,</if>
-            <if test="entAndAttrType != null">ent_and_attr_type,</if>
-            <if test="attrType != null">attr_type,</if>
-            <if test="entClsID != null">ent_cls_id,</if>
-            <if test="attrClsMemo != null">attr_cls_memo,</if>
-            <if test="valueType != null">value_type,</if>
-            <if test="attrValueType != null">attr_value_type,</if>
-            <if test="domainKey != null">domain_key,</if>
-            <if test="domain != null">domain,</if>
-            <if test="isPublic != null">is_public,</if>
-            <if test="maxValue != null">max_value,</if>
-            <if test="minValue != null">min_value,</if>
-            <if test="notNull != null">not_null,</if>
-            <if test="entUseCount != null">ent_use_count,</if>
-            <if test="isEdit != null">is_edit,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="attrClsID != null">#{attrClsID},</if>
-            <if test="attrClsName != null">#{attrClsName},</if>
-            <if test="attrUnit != null">#{attrUnit},</if>
-            <if test="entAndAttrType != null">#{entAndAttrType},</if>
-            <if test="attrType != null">#{attrType},</if>
-            <if test="entClsID != null">#{entClsID},</if>
-            <if test="attrClsMemo != null">#{attrClsMemo},</if>
-            <if test="valueType != null">#{valueType},</if>
-            <if test="attrValueType != null">#{attrValueType},</if>
-            <if test="domainKey != null">#{domainKey},</if>
-            <if test="domain != null">#{domain},</if>
-            <if test="isPublic != null">#{isPublic},</if>
-            <if test="maxValue != null">#{maxValue},</if>
-            <if test="minValue != null">#{minValue},</if>
-            <if test="notNull != null">#{notNull},</if>
-            <if test="entUseCount != null">#{entUseCount},</if>
-            <if test="isEdit != null">#{isEdit},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntityClassAttribute" parameterType="EntityClassAttribute">
-        update entity_class_attribute
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="attrClsName != null">attr_cls_name = #{attrClsName},</if>
-            <if test="attrUnit != null">attr_unit = #{attrUnit},</if>
-            <if test="entAndAttrType != null">ent_and_attr_type = #{entAndAttrType},</if>
-            <if test="attrType != null">attr_type = #{attrType},</if>
-            <if test="entClsID != null">ent_cls_id = #{entClsID},</if>
-            <if test="attrClsMemo != null">attr_cls_memo = #{attrClsMemo},</if>
-            <if test="valueType != null">value_type = #{valueType},</if>
-            <if test="attrValueType != null">attr_value_type = #{attrValueType},</if>
-            <if test="domainKey != null">domain_key = #{domainKey},</if>
-            <if test="domain != null">domain = #{domain},</if>
-            <if test="isPublic != null">is_public = #{isPublic},</if>
-            <if test="maxValue != null">max_value = #{maxValue},</if>
-            <if test="minValue != null">min_value = #{minValue},</if>
-            <if test="notNull != null">not_null = #{notNull},</if>
-            <if test="entUseCount != null">ent_use_count = #{entUseCount},</if>
-            <if test="isEdit != null">is_edit = #{isEdit},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where attr_cls_id = #{attrClsID}
-    </update>
-
-    <delete id="deleteEntityClassAttributeByAttrClsId" parameterType="String">
-        delete from entity_class_attribute where attr_cls_id = #{attrClsID}
-    </delete>
-
-    <delete id="deleteEntityClassAttributeByAttrClsIds" parameterType="String">
-        delete from entity_class_attribute where attr_cls_id in 
-        <foreach item="attrClsID" collection="array" open="(" separator="," close=")">
-            #{attrClsID}
-        </foreach>
-    </delete>
-    <select id="selectNoneEntityClassAttributeByEntClsID" parameterType="String" resultMap="EntityClassAttributeResult">
-        <include refid="selectEntityClassAttributeVo"/>
-        where (attr_type is null or attr_type = 'NONE') and ent_cls_id = #{entClsID}
-    </select>
-</mapper>

+ 0 - 127
kgraph-graph/src/main/resources/mapper/knowledge/EntityClassMapper.xml

@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityClassMapper">
-    
-    <resultMap type="EntityClass" id="EntityClassResult">
-        <result property="entClsID"    column="ent_cls_id"    />
-        <result property="pid"    column="pid"    />
-        <result property="entClsName"    column="ent_cls_name"    />
-        <result property="entClsMemo"    column="ent_cls_memo"    />
-        <result property="entClsIconId"    column="ent_cls_icon_id"    />
-        <result property="backGroundColor"    column="back_ground_color"    />
-        <result property="clsType"    column="cls_type"    />
-        <result property="childCount"    column="child_count"    />
-        <result property="noneCount"    column="none_count"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="entClsAllowAttrType"    column="ent_cls_allow_attr_type"    />
-        <result property="isRoot"    column="is_root"    />
-    </resultMap>
-
-    <sql id="selectEntityClassVo">
-        select ent_cls_id, pid, ent_cls_name, ent_cls_memo, ent_cls_icon_id, back_ground_color, cls_type, child_count, none_count, create_by, create_time, update_by, update_time, ent_cls_allow_attr_type, is_root from entity_class
-    </sql>
-
-    <select id="selectEntityClassList" parameterType="EntityClass" resultMap="EntityClassResult">
-        <include refid="selectEntityClassVo"/>
-        <where>  
-            <if test="pid != null  and pid != ''"> and pid = #{pid}</if>
-            <if test="entClsName != null  and entClsName != ''"> and ent_cls_name like concat('%', #{entClsName}, '%')</if>
-            <if test="entClsMemo != null  and entClsMemo != ''"> and ent_cls_memo = #{entClsMemo}</if>
-            <if test="entClsIconId != null  and entClsIconId != ''"> and ent_cls_icon_id = #{entClsIconId}</if>
-            <if test="backGroundColor != null  and backGroundColor != ''"> and back_ground_color = #{backGroundColor}</if>
-            <if test="clsType != null  and clsType != ''"> and cls_type = #{clsType}</if>
-            <if test="childCount != null "> and child_count = #{childCount}</if>
-            <if test="noneCount != null "> and none_count = #{noneCount}</if>
-            <if test="entClsAllowAttrType != null  and entClsAllowAttrType != ''"> and ent_cls_allow_attr_type = #{entClsAllowAttrType}</if>
-            <if test="isRoot != null  and isRoot != ''"> and is_root = #{isRoot}</if>
-        </where>
-    </select>
-    
-    <select id="selectEntityClassByEntClsId" parameterType="String" resultMap="EntityClassResult">
-        <include refid="selectEntityClassVo"/>
-        where ent_cls_id = #{entClsID}
-    </select>
-        
-    <insert id="insertEntityClass" parameterType="EntityClass">
-        insert into entity_class
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="entClsID != null">ent_cls_id,</if>
-            <if test="pid != null">pid,</if>
-            <if test="entClsName != null">ent_cls_name,</if>
-            <if test="entClsMemo != null">ent_cls_memo,</if>
-            <if test="entClsIconId != null">ent_cls_icon_id,</if>
-            <if test="backGroundColor != null">back_ground_color,</if>
-            <if test="clsType != null">cls_type,</if>
-            <if test="childCount != null">child_count,</if>
-            <if test="noneCount != null">none_count,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="entClsAllowAttrType != null">ent_cls_allow_attr_type,</if>
-            <if test="isRoot != null">is_root,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="entClsID != null">#{entClsID},</if>
-            <if test="pid != null">#{pid},</if>
-            <if test="entClsName != null">#{entClsName},</if>
-            <if test="entClsMemo != null">#{entClsMemo},</if>
-            <if test="entClsIconId != null">#{entClsIconId},</if>
-            <if test="backGroundColor != null">#{backGroundColor},</if>
-            <if test="clsType != null">#{clsType},</if>
-            <if test="childCount != null">#{childCount},</if>
-            <if test="noneCount != null">#{noneCount},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="entClsAllowAttrType != null">#{entClsAllowAttrType},</if>
-            <if test="isRoot != null">#{isRoot},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntityClass" parameterType="EntityClass">
-        update entity_class
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="pid != null">pid = #{pid},</if>
-            <if test="entClsName != null">ent_cls_name = #{entClsName},</if>
-            <if test="entClsMemo != null">ent_cls_memo = #{entClsMemo},</if>
-            <if test="entClsIconId != null">ent_cls_icon_id = #{entClsIconId},</if>
-            <if test="backGroundColor != null">back_ground_color = #{backGroundColor},</if>
-            <if test="clsType != null">cls_type = #{clsType},</if>
-            <if test="childCount != null">child_count = #{childCount},</if>
-            <if test="noneCount != null">none_count = #{noneCount},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="entClsAllowAttrType != null">ent_cls_allow_attr_type = #{entClsAllowAttrType},</if>
-            <if test="isRoot != null">is_root = #{isRoot},</if>
-        </trim>
-        where ent_cls_id = #{entClsID}
-    </update>
-
-    <delete id="deleteEntityClassByEntClsId" parameterType="String">
-        delete from entity_class where ent_cls_id = #{entClsID}
-    </delete>
-
-    <delete id="deleteEntityClassByEntClsIds" parameterType="String">
-        delete from entity_class where ent_cls_id in 
-        <foreach item="entClsID" collection="array" open="(" separator="," close=")">
-            #{entClsID}
-        </foreach>
-    </delete>
-
-    <select id="getEntityClassByIds" parameterType="String" resultMap="EntityClassResult">
-        <include refid="selectEntityClassVo"/>
-        where ent_cls_id in
-        <foreach item="entClsID" collection="array" open="(" separator="," close=")">
-            #{entClsID}
-        </foreach>
-    </select>
-</mapper>

+ 0 - 209
kgraph-graph/src/main/resources/mapper/knowledge/EntityClassRelationMapper.xml

@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityClassRelationMapper">
-
-    <resultMap type="EntityClassRelation" id="EntityClassRelationResult">
-        <result property="relClsID"    column="rel_cls_id"    />
-        <result property="relClsName"    column="rel_cls_name"    />
-        <result property="relClsMemo"    column="rel_cls_memo"    />
-        <result property="backGroundColor"    column="back_ground_color"    />
-        <result property="clsType"    column="cls_type"    />
-        <result property="isModel"    column="is_model"    />
-        <result property="startID"    column="start_id"    />
-        <result property="startName"    column="startName"    />
-        <result property="endID"    column="end_id"    />
-        <result property="endName"    column="endName"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectEntityClassRelationVo">
-        select rel_cls_id, rel_cls_name, rel_cls_memo, back_ground_color, cls_type, is_model, start_id, end_id, create_by, create_time, update_by, update_time from entity_class_relation
-    </sql>
-
-    <select id="selectEntityClassRelationList" parameterType="EntityClassRelation" resultMap="EntityClassRelationResult">
-        <include refid="selectEntityClassRelationVo"/>
-        <where>
-            <if test="relClsName != null  and relClsName != ''"> and rel_cls_name like concat('%', #{relClsName}, '%')</if>
-            <if test="relClsMemo != null  and relClsMemo != ''"> and rel_cls_memo = #{relClsMemo}</if>
-            <if test="backGroundColor != null  and backGroundColor != ''"> and back_ground_color = #{backGroundColor}</if>
-            <if test="clsType != null  and clsType != ''"> and cls_type = #{clsType}</if>
-            <if test="isModel != null "> and is_model = #{isModel}</if>
-            <if test="startID != null  and startID != ''"> and start_id = #{startID}</if>
-            <if test="endID != null  and endID != ''"> and end_id = #{endID}</if>
-        </where>
-    </select>
-
-    <select id="selectEntityClassRelationByRelClsId" parameterType="String" resultMap="EntityClassRelationResult">
-        <include refid="selectEntityClassRelationVo"/>
-        where rel_cls_id = #{relClsID}
-    </select>
-
-    <insert id="insertEntityClassRelation" parameterType="EntityClassRelation">
-        insert into entity_class_relation
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="relClsID != null">rel_cls_id,</if>
-            <if test="relClsName != null">rel_cls_name,</if>
-            <if test="relClsMemo != null">rel_cls_memo,</if>
-            <if test="backGroundColor != null">back_ground_color,</if>
-            <if test="clsType != null">cls_type,</if>
-            <if test="isModel != null">is_model,</if>
-            <if test="startID != null and startID != ''">start_id,</if>
-            <if test="endID != null and endID != ''">end_id,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="relClsID != null">#{relClsID},</if>
-            <if test="relClsName != null">#{relClsName},</if>
-            <if test="relClsMemo != null">#{relClsMemo},</if>
-            <if test="backGroundColor != null">#{backGroundColor},</if>
-            <if test="clsType != null">#{clsType},</if>
-            <if test="isModel != null">#{isModel},</if>
-            <if test="startID != null and startID != ''">#{startID},</if>
-            <if test="endID != null and endID != ''">#{endID},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntityClassRelation" parameterType="EntityClassRelation">
-        update entity_class_relation
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="relClsName != null">rel_cls_name = #{relClsName},</if>
-            <if test="relClsMemo != null">rel_cls_memo = #{relClsMemo},</if>
-            <if test="backGroundColor != null">back_ground_color = #{backGroundColor},</if>
-            <if test="clsType != null">cls_type = #{clsType},</if>
-            <if test="isModel != null">is_model = #{isModel},</if>
-            <if test="startID != null and startID != ''">start_id = #{startID},</if>
-            <if test="endID != null and endID != ''">end_id = #{endID},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where rel_cls_id = #{relClsID}
-    </update>
-
-    <delete id="deleteEntityClassRelationByRelClsId" parameterType="String">
-        delete from entity_class_relation where rel_cls_id = #{relClsID}
-    </delete>
-
-    <delete id="deleteEntityClassRelationByRelClsIds" parameterType="String">
-        delete from entity_class_relation where rel_cls_id in
-        <foreach item="relClsID" collection="array" open="(" separator="," close=")">
-            #{relClsID}
-        </foreach>
-    </delete>
-
-    <select id="relattrIdList" resultMap="EntityClassRelationResult">
-        SELECT
-            ecr.rel_cls_id,
-            ecr.rel_cls_name,
-            ecr.rel_cls_memo,
-            ecr.back_ground_color,
-            ecr.cls_type,
-            ecr.is_model,
-            ecr.start_id,
-            ecs.ent_cls_name startName,
-            ecr.end_id,
-            ece.ent_cls_name endName,
-            ecr.create_by,
-            ecr.create_time,
-            ecr.update_by,
-            ecr.update_time
-        FROM
-            entity_class_relation ecr,
-            entity_class ecs,
-            entity_class ece
-        WHERE
-            ecr.start_id = ecs.ent_cls_id
-            AND ecr.end_id = ece.ent_cls_id
-            <if test="entClsType == 'START'">AND start_id = #{id}</if>
-            <if test="entClsType == 'ENT'">AND end_id = #{id}</if>
-    </select>
-
-    <select id="getClazzRelByClassId" parameterType="String" resultMap="EntityClassRelationResult">
-        select rel_cls_id, rel_cls_name, rel_cls_memo, back_ground_color, cls_type, is_model, start_id, end_id, create_by, create_time, update_by, update_time from entity_class_relation
-        where start_id = #{id} or end_id = #{id}
-    </select>
-
-    <select id="getClazzRelVoByClassId" parameterType="String" resultType="com.kgraph.graph.knowledge.domain.EntityClassRelationVO">
-        (
-            SELECT
-                rel_cls_id relClsID,
-                rel_cls_name relClsName,
-                'START' direction,
-                ecr.end_id otherVID,
-                ec.ent_cls_name otherVName
-            FROM
-                entity_class_relation ecr,
-                entity_class ec
-            WHERE
-                ecr.end_id = ec.ent_cls_id
-                AND start_id = #{id}
-        )
-            UNION ALL
-        (
-            SELECT
-                rel_cls_id relClsID,
-                rel_cls_name relClsName,
-                'ENT' direction,
-                ecr.end_id otherVID,
-                ec.ent_cls_name otherVName
-            FROM
-                entity_class_relation ecr,
-                entity_class ec
-            WHERE
-                ecr.start_id = ec.ent_cls_id
-                AND ecr.start_id != #{id}
-                AND end_id = #{id}
-        )
-    </select>
-
-    <select id="getEntClsRelAllInfoList" parameterType="EntityClassRelation" resultMap="EntityClassRelationResult">
-        SELECT
-            ecr.rel_cls_id,
-            ecr.rel_cls_name,
-            ecr.rel_cls_memo,
-            ecr.back_ground_color,
-            ecr.cls_type,
-            ecr.is_model,
-            ecr.start_id,
-            ecs.ent_cls_name startName,
-            ecr.end_id,
-            ece.ent_cls_name endName,
-            ecr.create_by,
-            ecr.create_time,
-            ecr.update_by,
-            ecr.update_time
-        FROM
-            entity_class_relation ecr,
-            entity_class ecs,
-            entity_class ece
-        WHERE
-            1 = 1
-            AND ecr.start_id = ecs.ent_cls_id
-            AND ecr.end_id = ece.ent_cls_id
-    </select>
-
-    <select id="relclsList" parameterType="String" resultMap="EntityClassRelationResult">
-        SELECT
-            max( ecr.rel_cls_id ) rel_cls_id,
-            rel_cls_name,
-            rel_cls_memo
-        FROM
-            entity_class_relation ecr
-        GROUP BY
-            rel_cls_name,
-            rel_cls_memo
-    </select>
-</mapper>

+ 0 - 163
kgraph-graph/src/main/resources/mapper/knowledge/EntityMapper.xml

@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityMapper">
-    
-    <resultMap type="Entity" id="EntityResult">
-        <result property="entId"    column="ent_id"    />
-        <result property="entName"    column="ent_name"    />
-        <result property="entMemo"    column="ent_memo"    />
-        <result property="entClsID"    column="ent_cls_id"    />
-        <result property="isModel"    column="is_model"    />
-        <result property="entIconId"    column="ent_icon_id"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectEntityVo">
-        select ent_id, ent_name, ent_memo, ent_cls_id, is_model, ent_icon_id, create_by, create_time, update_by, update_time from entity
-    </sql>
-
-    <select id="selectEntityList" parameterType="Entity" resultMap="EntityResult">
-        <include refid="selectEntityVo"/>
-        <where>  
-            <if test="entName != null  and entName != ''"> and ent_name like concat('%', #{entName}, '%')</if>
-            <if test="entMemo != null  and entMemo != ''"> and ent_memo = #{entMemo}</if>
-            <if test="entClsID != null  and entClsID != ''"> and ent_cls_id = #{entClsID}</if>
-            <if test="isModel != null "> and is_model = #{isModel}</if>
-            <if test="entIconId != null  and entIconId != ''"> and ent_icon_id = #{entIconId}</if>
-        </where>
-    </select>
-    
-    <select id="selectEntityByEntId" parameterType="String" resultMap="EntityResult">
-        <include refid="selectEntityVo"/>
-        where ent_id = #{entId}
-    </select>
-        
-    <insert id="insertEntity" parameterType="Entity">
-        insert into entity
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="entId != null">ent_id,</if>
-            <if test="entName != null">ent_name,</if>
-            <if test="entMemo != null">ent_memo,</if>
-            <if test="entClsID != null">ent_cls_id,</if>
-            <if test="isModel != null">is_model,</if>
-            <if test="entIconId != null and entIconId != ''">ent_icon_id,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="entId != null">#{entId},</if>
-            <if test="entName != null">#{entName},</if>
-            <if test="entMemo != null">#{entMemo},</if>
-            <if test="entClsID != null">#{entClsID},</if>
-            <if test="isModel != null">#{isModel},</if>
-            <if test="entIconId != null and entIconId != ''">#{entIconId},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntity" parameterType="Entity">
-        update entity
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="entName != null">ent_name = #{entName},</if>
-            <if test="entMemo != null">ent_memo = #{entMemo},</if>
-            <if test="entClsID != null">ent_cls_id = #{entClsID},</if>
-            <if test="isModel != null">is_model = #{isModel},</if>
-            <if test="entIconId != null and entIconId != ''">ent_icon_id = #{entIconId},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where ent_id = #{entId}
-    </update>
-
-    <delete id="deleteEntityByEntId" parameterType="String">
-        delete from entity where ent_id = #{entId}
-    </delete>
-
-    <delete id="deleteEntityByEntIds" parameterType="String">
-        delete from entity where ent_id in 
-        <foreach item="entId" collection="array" open="(" separator="," close=")">
-            #{entId}
-        </foreach>
-    </delete>
-
-
-    <select id="getEntityByEntityIds" parameterType="String" resultMap="EntityResult">
-        <include refid="selectEntityVo"/>
-        where ent_id in
-        <foreach item="entId" collection="array" open="(" separator="," close=")">
-            #{entId}
-        </foreach>
-    </select>
-
-    <select id="getAllEntityByEntityIds" resultMap="EntityResult">
-        <include refid="selectEntityVo"/>
-    </select>
-
-
-
-    <select id="getEntclsEnt" parameterType="String" resultMap="EntityResult">
-        <if test="direction == 'START'">
-            SELECT
-                ent.ent_id,
-                ent.ent_name,
-                ent.ent_memo,
-                ent.ent_cls_id,
-                ent.is_model,
-                ent.ent_icon_id,
-                ent.create_by,
-                ent.create_time,
-                ent.update_by,
-                ent.update_time
-            FROM
-                entity ent,
-                entity_class_relation ecr
-            WHERE
-                ecr.end_id = ent.ent_cls_id
-                AND ecr.rel_cls_id = #{relClsId}
-                AND ent.ent_id != #{entId}
-        </if>
-        <if test="direction != 'START'">
-            SELECT
-                ent.ent_id,
-                ent.ent_name,
-                ent.ent_memo,
-                ent.ent_cls_id,
-                ent.is_model,
-                ent.ent_icon_id,
-                ent.create_by,
-                ent.create_time,
-                ent.update_by,
-                ent.update_time
-            FROM
-                entity ent,
-                entity_class_relation ecr
-            WHERE
-                ecr.start_id = ent.ent_cls_id
-                AND ecr.rel_cls_id = #{relClsId}
-                AND ent.ent_id != #{entId}
-        </if>
-    </select>
-    <select id="searchByName" parameterType="String" resultMap="EntityResult">
-
-            SELECT
-                ent.ent_id,
-                ent.ent_name
-            FROM
-                entity ent
-            WHERE
-                ent.ent_name like concat('%', #{name}, '%')
-    </select>
-
-</mapper>

+ 0 - 160
kgraph-graph/src/main/resources/mapper/knowledge/EntityRelationMapper.xml

@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityRelationMapper">
-    
-    <resultMap type="EntityRelation" id="EntityRelationResult">
-        <result property="relId"    column="rel_id"    />
-        <result property="relClsId"    column="rel_cls_id"    />
-        <result property="relClsName"    column="rel_cls_name"    />
-        <result property="startEntId"    column="start_ent_id"    />
-        <result property="endEntId"    column="end_ent_id"    />
-        <result property="isModel"    column="is_model"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectEntityRelationVo">
-        select rel_id, rel_cls_id, start_ent_id, end_ent_id, is_model, create_by, create_time, update_by, update_time from entity_relation
-    </sql>
-
-    <select id="selectEntityRelationList" parameterType="EntityRelation" resultMap="EntityRelationResult">
-        <include refid="selectEntityRelationVo"/>
-        <where>  
-            <if test="relClsId != null  and relClsId != ''"> and rel_cls_id = #{relClsId}</if>
-            <if test="startEntId != null  and startEntId != ''"> and start_ent_id = #{startEntId}</if>
-            <if test="endEntId != null  and endEntId != ''"> and end_ent_id = #{endEntId}</if>
-            <if test="isModel != null "> and is_model = #{isModel}</if>
-        </where>
-    </select>
-    
-    <select id="selectEntityRelationByRelId" parameterType="String" resultMap="EntityRelationResult">
-        <include refid="selectEntityRelationVo"/>
-        where rel_id = #{relId}
-    </select>
-        
-    <insert id="insertEntityRelation" parameterType="EntityRelation">
-        insert into entity_relation
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="relId != null">rel_id,</if>
-            <if test="relClsId != null">rel_cls_id,</if>
-            <if test="startEntId != null">start_ent_id,</if>
-            <if test="endEntId != null">end_ent_id,</if>
-            <if test="isModel != null">is_model,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="relId != null">#{relId},</if>
-            <if test="relClsId != null">#{relClsId},</if>
-            <if test="startEntId != null">#{startEntId},</if>
-            <if test="endEntId != null">#{endEntId},</if>
-            <if test="isModel != null">#{isModel},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateEntityRelation" parameterType="EntityRelation">
-        update entity_relation
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="relClsId != null">rel_cls_id = #{relClsId},</if>
-            <if test="startEntId != null">start_ent_id = #{startEntId},</if>
-            <if test="endEntId != null">end_ent_id = #{endEntId},</if>
-            <if test="isModel != null">is_model = #{isModel},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where rel_id = #{relId}
-    </update>
-
-    <delete id="deleteEntityRelationByRelId" parameterType="String">
-        delete from entity_relation where rel_id = #{relId}
-    </delete>
-
-    <delete id="deleteEntityRelationByRelIds" parameterType="String">
-        delete from entity_relation where rel_id in 
-        <foreach item="relId" collection="array" open="(" separator="," close=")">
-            #{relId}
-        </foreach>
-    </delete>
-
-    <select id="getRelationByEntityId" parameterType="String" resultMap="EntityRelationResult">
-        SELECT
-            er.rel_id,
-            er.rel_cls_id,
-            ecr.rel_cls_name,
-            er.start_ent_id,
-            er.end_ent_id,
-            er.is_model,
-            er.create_by,
-            er.create_time,
-            er.update_by,
-            er.update_time
-        FROM
-            entity_relation er,
-            entity_class_relation ecr
-        WHERE
-            er.rel_cls_id = ecr.rel_cls_id
-            AND (start_ent_id = #{id} or end_ent_id = #{id})
-    </select>
-
-    <select id="getAllRelationByEntityId" resultMap="EntityRelationResult">
-        SELECT
-            er.rel_id,
-            er.rel_cls_id,
-            ecr.rel_cls_name,
-            er.start_ent_id,
-            er.end_ent_id,
-            er.is_model,
-            er.create_by,
-            er.create_time,
-            er.update_by,
-            er.update_time
-        FROM
-            entity_relation er,
-            entity_class_relation ecr
-        WHERE
-            er.rel_cls_id = ecr.rel_cls_id
-    </select>
-
-    <select id="getRelationVOByEntityId" parameterType="String" resultType="com.kgraph.graph.knowledge.domain.EntityRelationVO">
-        <if test="direction != 'START'">
-            SELECT
-                rel_id relId,
-                start_ent_id entID,
-                ent.ent_name entName,
-                ent.ent_memo entMemo
-            FROM
-                entity_relation er,
-                entity ent
-            WHERE
-                er.start_ent_id = ent.ent_id
-                AND er.rel_cls_id = #{relClsId}
-                AND er.end_ent_id = #{entId}
-        </if>
-        <if test="direction == 'START'">
-            SELECT
-                rel_id relId,
-                end_ent_id entID,
-                ent.ent_name entName,
-                ent.ent_memo entMemo
-            FROM
-                entity_relation er,
-                entity ent
-            WHERE
-                er.end_ent_id = ent.ent_id
-                AND er.rel_cls_id = #{relClsId}
-                AND er.start_ent_id = #{entId}
-        </if>
-    </select>
-</mapper>

+ 86 - 0
kgraph-graph/src/main/resources/mapper/neo4j/EntityClassMapper.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kgraph.graph.neo4j.mapper.EntityClassMapper">
+    
+    <resultMap type="EntityClass" id="EntityClassResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="desc"    column="desc"    />
+        <result property="backGroundColor"    column="back_ground_color"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectEntityClassVo">
+        select id, `name`, `desc`, back_ground_color, create_by, create_time, update_by, update_time from entity_class
+    </sql>
+
+    <select id="selectEntityClassList" parameterType="EntityClass" resultMap="EntityClassResult">
+        <include refid="selectEntityClassVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and `name` like concat('%', #{name}, '%')</if>
+            <if test="desc != null  and desc != ''"> and `desc` = #{desc}</if>
+            <if test="backGroundColor != null  and backGroundColor != ''"> and back_ground_color = #{backGroundColor}</if>
+        </where>
+    </select>
+    
+    <select id="selectEntityClassById" parameterType="Long" resultMap="EntityClassResult">
+        <include refid="selectEntityClassVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertEntityClass" parameterType="EntityClass" useGeneratedKeys="true" keyProperty="id">
+        insert into entity_class
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">`name`,</if>
+            <if test="desc != null">`desc`,</if>
+            <if test="backGroundColor != null">back_ground_color,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="desc != null">#{desc},</if>
+            <if test="backGroundColor != null">#{backGroundColor},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateEntityClass" parameterType="EntityClass">
+        update entity_class
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">`name` = #{name},</if>
+            <if test="desc != null">`desc` = #{desc},</if>
+            <if test="backGroundColor != null">back_ground_color = #{backGroundColor},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteEntityClassById" parameterType="Long">
+        delete from entity_class where id = #{id}
+    </delete>
+
+    <delete id="deleteEntityClassByIds" parameterType="String">
+        delete from entity_class where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getOption" resultType="Map">
+        select id, name from entity_class
+    </select>
+</mapper>

+ 110 - 0
kgraph-graph/src/main/resources/mapper/neo4j/EntityClassRelationMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kgraph.graph.neo4j.mapper.EntityClassRelationMapper">
+    
+    <resultMap type="EntityClassRelation" id="EntityClassRelationResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="desc"    column="desc"    />
+        <result property="backGroundColor"    column="back_ground_color"    />
+        <result property="startId"    column="start_id"    />
+        <result property="startName"    column="startName"    />
+        <result property="endId"    column="end_id"    />
+        <result property="endName"    column="endName"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectEntityClassRelationVo">
+        SELECT
+            ecr.id,
+            ecr.`name`,
+            ecr.`desc`,
+            ecr.back_ground_color,
+            ecr.start_id,
+            ecs.`name` as startName,
+            ecr.end_id,
+            ece.`name` as endName,
+            ecr.create_by,
+            ecr.create_time,
+            ecr.update_by,
+            ecr.update_time
+        FROM
+            entity_class_relation ecr
+                LEFT JOIN entity_class ecs ON ecr.start_id = ecs.id
+                LEFT JOIN entity_class ece ON ecr.end_id = ece.id
+    </sql>
+
+    <select id="selectEntityClassRelationList" parameterType="EntityClassRelation" resultMap="EntityClassRelationResult">
+        <include refid="selectEntityClassRelationVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and `name` like concat('%', #{name}, '%')</if>
+            <if test="desc != null  and desc != ''"> and `desc` = #{desc}</if>
+            <if test="backGroundColor != null  and backGroundColor != ''"> and back_ground_color = #{backGroundColor}</if>
+            <if test="startId != null "> and start_id = #{startId}</if>
+            <if test="endId != null "> and end_id = #{endId}</if>
+        </where>
+    </select>
+    
+    <select id="selectEntityClassRelationById" parameterType="Long" resultMap="EntityClassRelationResult">
+        <include refid="selectEntityClassRelationVo"/>
+        where ecr.id = #{id}
+    </select>
+        
+    <insert id="insertEntityClassRelation" parameterType="EntityClassRelation" useGeneratedKeys="true" keyProperty="id">
+        insert into entity_class_relation
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">`name`,</if>
+            <if test="desc != null">`desc`,</if>
+            <if test="backGroundColor != null">back_ground_color,</if>
+            <if test="startId != null">start_id,</if>
+            <if test="endId != null">end_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="desc != null">#{desc},</if>
+            <if test="backGroundColor != null">#{backGroundColor},</if>
+            <if test="startId != null">#{startId},</if>
+            <if test="endId != null">#{endId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateEntityClassRelation" parameterType="EntityClassRelation">
+        update entity_class_relation
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">`name` = #{name},</if>
+            <if test="desc != null">`desc` = #{desc},</if>
+            <if test="backGroundColor != null">back_ground_color = #{backGroundColor},</if>
+            <if test="startId != null">start_id = #{startId},</if>
+            <if test="endId != null">end_id = #{endId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteEntityClassRelationById" parameterType="Long">
+        delete from entity_class_relation where id = #{id}
+    </delete>
+
+    <delete id="deleteEntityClassRelationByIds" parameterType="String">
+        delete from entity_class_relation where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 117 - 0
kgraph-graph/src/main/resources/mapper/suport/BuildEntityRelationMapper.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kgraph.graph.suport.mapper.BuildEntityRelationMapper">
+    
+    <resultMap type="BuildEntityRelation" id="BuildEntityRelationResult">
+        <result property="id"    column="id"    />
+        <result property="subTaskId"    column="sub_task_id"    />
+        <result property="subEntityClassId"    column="sub_entity_class_id"    />
+        <result property="objEntityClassId"    column="obj_entity_class_id"    />
+        <result property="entityClassRelId"    column="entity_class_rel_id"    />
+        <result property="subEntity"    column="sub_entity"    />
+        <result property="objEntity"    column="obj_entity"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectBuildEntityRelationVo">
+        select id, sub_task_id, sub_entity_class_id, obj_entity_class_id, entity_class_rel_id, sub_entity, obj_entity, create_by, create_time, update_by, update_time from t_build_entity_relation
+    </sql>
+
+    <select id="selectBuildEntityRelationList" parameterType="BuildEntityRelation" resultMap="BuildEntityRelationResult">
+        <include refid="selectBuildEntityRelationVo"/>
+        <where>  
+            <if test="subTaskId != null "> and sub_task_id = #{subTaskId}</if>
+            <if test="subEntityClassId != null "> and sub_entity_class_id = #{subEntityClassId}</if>
+            <if test="objEntityClassId != null "> and obj_entity_class_id = #{objEntityClassId}</if>
+            <if test="entityClassRelId != null "> and entity_class_rel_id = #{entityClassRelId}</if>
+            <if test="subEntity != null  and subEntity != ''"> and sub_entity = #{subEntity}</if>
+            <if test="objEntity != null  and objEntity != ''"> and obj_entity = #{objEntity}</if>
+        </where>
+    </select>
+    
+    <select id="selectBuildEntityRelationById" parameterType="Long" resultMap="BuildEntityRelationResult">
+        <include refid="selectBuildEntityRelationVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertBuildEntityRelation" parameterType="BuildEntityRelation" useGeneratedKeys="true" keyProperty="id">
+        insert into t_build_entity_relation
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="subTaskId != null">sub_task_id,</if>
+            <if test="subEntityClassId != null">sub_entity_class_id,</if>
+            <if test="objEntityClassId != null">obj_entity_class_id,</if>
+            <if test="entityClassRelId != null">entity_class_rel_id,</if>
+            <if test="subEntity != null">sub_entity,</if>
+            <if test="objEntity != null">obj_entity,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="subTaskId != null">#{subTaskId},</if>
+            <if test="subEntityClassId != null">#{subEntityClassId},</if>
+            <if test="objEntityClassId != null">#{objEntityClassId},</if>
+            <if test="entityClassRelId != null">#{entityClassRelId},</if>
+            <if test="subEntity != null">#{subEntity},</if>
+            <if test="objEntity != null">#{objEntity},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBuildEntityRelation" parameterType="BuildEntityRelation">
+        update t_build_entity_relation
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="subTaskId != null">sub_task_id = #{subTaskId},</if>
+            <if test="subEntityClassId != null">sub_entity_class_id = #{subEntityClassId},</if>
+            <if test="objEntityClassId != null">obj_entity_class_id = #{objEntityClassId},</if>
+            <if test="entityClassRelId != null">entity_class_rel_id = #{entityClassRelId},</if>
+            <if test="subEntity != null">sub_entity = #{subEntity},</if>
+            <if test="objEntity != null">obj_entity = #{objEntity},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBuildEntityRelationById" parameterType="Long">
+        delete from t_build_entity_relation where id = #{id}
+    </delete>
+
+    <delete id="deleteBuildEntityRelationByIds" parameterType="String">
+        delete from t_build_entity_relation where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getClassRelationList" resultType="Map">
+        SELECT
+            tbr.id,
+            ecr.id relationId,
+            ecr.start_id startId,
+            ecr.end_id endId,
+            tbr.sub_task_id subTaskId,
+            ( SELECT ec.`name` FROM entity_class ec WHERE ec.id = ecr.start_id ) AS subName,
+            ( SELECT `name` FROM entity_class ec WHERE ec.id = ecr.end_id ) AS objName,
+            ecr.`name`,
+            tbr.sub_entity subEntity,
+            tbr.obj_entity objEntity
+        FROM
+            entity_class_relation ecr
+                LEFT JOIN t_build_entity_relation tbr ON ecr.id = tbr.entity_class_rel_id
+                AND ecr.start_id = tbr.sub_entity_class_id
+                AND ecr.end_id = tbr.obj_entity_class_id
+                AND tbr.sub_task_id = #{subTaskId}
+    </select>
+</mapper>

+ 82 - 0
kgraph-graph/src/main/resources/mapper/suport/TBuildFlowMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kgraph.graph.suport.mapper.TBuildFlowMapper">
+    
+    <resultMap type="TBuildFlow" id="TBuildFlowResult">
+        <result property="id"    column="id"    />
+        <result property="errorCode"    column="error_code"    />
+        <result property="flowEncode"    column="flow_encode"    />
+        <result property="flowTreeJson"    column="flow_tree_json"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTBuildFlowVo">
+        select id, error_code, flow_encode, flow_tree_json, create_by, create_time, update_by, update_time from t_build_flow
+    </sql>
+
+    <select id="selectTBuildFlowList" parameterType="TBuildFlow" resultMap="TBuildFlowResult">
+        <include refid="selectTBuildFlowVo"/>
+        <where>  
+            <if test="errorCode != null  and errorCode != ''"> and error_code = #{errorCode}</if>
+            <if test="flowEncode != null  and flowEncode != ''"> and flow_encode = #{flowEncode}</if>
+            <if test="flowTreeJson != null  and flowTreeJson != ''"> and flow_tree_json = #{flowTreeJson}</if>
+        </where>
+    </select>
+    
+    <select id="selectTBuildFlowById" parameterType="Long" resultMap="TBuildFlowResult">
+        <include refid="selectTBuildFlowVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTBuildFlow" parameterType="TBuildFlow" useGeneratedKeys="true" keyProperty="id">
+        insert into t_build_flow
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="errorCode != null">error_code,</if>
+            <if test="flowEncode != null">flow_encode,</if>
+            <if test="flowTreeJson != null">flow_tree_json,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="errorCode != null">#{errorCode},</if>
+            <if test="flowEncode != null">#{flowEncode},</if>
+            <if test="flowTreeJson != null">#{flowTreeJson},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTBuildFlow" parameterType="TBuildFlow">
+        update t_build_flow
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="errorCode != null">error_code = #{errorCode},</if>
+            <if test="flowEncode != null">flow_encode = #{flowEncode},</if>
+            <if test="flowTreeJson != null">flow_tree_json = #{flowTreeJson},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTBuildFlowById" parameterType="Long">
+        delete from t_build_flow where id = #{id}
+    </delete>
+
+    <delete id="deleteTBuildFlowByIds" parameterType="String">
+        delete from t_build_flow where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است