1
头图

foreword

In the era of high popularity of digitalization, enterprises and institutions will generate a large number of documents in their daily work, such as hospital system compilation, enterprise knowledge sharing library, etc. For these documents, manual paper-based management is very labor-intensive, and paper-based access is difficult and easy to lose, so electronic management is particularly important.
[springboot+elasticsearch+neo4j+vue+activiti] Realize digital knowledge base management system.


1. Project Overview

  1. Springboot, vue front-end and back-end separation technology.
  2. The advanced rich text editor can satisfy the 100% format restoration of word one-click paste, and supports video, graphics, etc.
  3. Full-text retrieval elasticsearch, to achieve simple and fast search results.
  4. neo4j knowledge graph, intelligent analysis.
  5. Activiti workflow application review mechanism.
  6. Team sharing and collaboration, common document collection, popular document ranking.

2. Related technical points

1. Rich Text Editor

The application of the most popular rich text editor TinyMCE, supports one-click copy and paste from word, wps, etc., 100% effect restoration, and can do custom formatting.

 <template>
  <div class="tinymce-editor">
    <Editor  v-model="editorValue" :init="editorInit" :disabled="disabled" @onClick="handleClick" />
  </div>
</template>

2. Full text search

The full-text knowledge can be retrieved according to any keyword of the document. The effect is like "Baidu click", which can simply and quickly collect the knowledge that you want to query, which solves the tedious process in the paper-based era.

3. Knowledge Graph

The knowledge graph is visualized and classified, supports the collection of documents of the same author, and the collection of documents of the same type, so as to achieve intelligent and grid-based recommendation.

 <dependency>
     <groupId>org.neo4j.driver</groupId>
      <artifactId>neo4j-java-driver</artifactId>
  </dependency>
  public boolean isNeo4jOpen() {
        try (Session session = neo4jDriver.session()) {
            logger.debug("连接成功:" + session.isOpen());
            return session.isOpen();
        } catch (Exception e) {
            logger.error("neo4J连接异常: "+e.getMessage());
        }
        return false;
    }

    public StatementResult excuteCypherSql(String cypherSql) {
        StatementResult result = null;
        try (Session session = neo4jDriver.session()) {
            logger.debug("CypherSql : "+cypherSql);
            result = session.run(cypherSql);
            session.close();
        } catch (Exception e) {
            logger.error("CypherSql执行异常: "+e.getMessage());
            throw e;
        }
        return result;
    }

4. Workflow

This system integrates the activiti workflow engine and follows the standardized process of submission by the initiator of the document -> approval by the person in charge.

 //获取bpmnModel对象
   BpmnModel bpmnModel = repositoryService.getBpmnModel(historicProcessInstance.getProcessDefinitionId());
   Process process = bpmnModel.getProcesses().get(0);
   Collection<FlowElement> flowElements = process.getFlowElements();
   Map<String, String> map = new HashMap<>();
   for (FlowElement flowElement : flowElements) {
       //判断是否是连线
       if (flowElement instanceof SequenceFlow) {
           SequenceFlow sequenceFlow = (SequenceFlow) flowElement;
           String ref = sequenceFlow.getSourceRef();
           String targetRef = sequenceFlow.getTargetRef();
           map.put(ref + targetRef, sequenceFlow.getId());
       }
   }
   List<HistoricActivityInstance> list = historyService.createHistoricActivityInstanceQuery()
           .processInstanceId(instanceId)
           .list();
   Set<String> keyList = new HashSet<>();
   for (HistoricActivityInstance i : list) {
       for (HistoricActivityInstance j : list) {
           if (i != j) {
               keyList.add(i.getActivityId() + j.getActivityId());
           }
       }
   }

Summarize

Accurate and comprehensive search capabilities and unified management, this knowledge base management system has achieved a good enabling effect with scientific methodology and practiced through actual projects, and solved the benign full life cycle management of digital assets of enterprises and institutions. Source code acquisition link: +Q:2500564056


用户bP4xPY
35 声望9 粉丝