allen 2 lat temu
commit
dd9baf304c
100 zmienionych plików z 10047 dodań i 0 usunięć
  1. 48 0
      .gitignore
  2. BIN
      kgraph-admin/.DS_Store
  3. 7 0
      kgraph-admin/Dockerfile
  4. 6 0
      kgraph-admin/docker-compose.yml
  5. 286 0
      kgraph-admin/mvnw
  6. 161 0
      kgraph-admin/mvnw.cmd
  7. 132 0
      kgraph-admin/pom.xml
  8. 20 0
      kgraph-admin/src/main/java/com/kgraph/KgraphApplication.java
  9. 17 0
      kgraph-admin/src/main/java/com/kgraph/KgraphServletInitializer.java
  10. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/DataFileController.java
  11. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/EquipController.java
  12. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/FaultInfoController.java
  13. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/FaultRecordController.java
  14. 105 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/MajorController.java
  15. 94 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/common/CaptchaController.java
  16. 163 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/common/CommonController.java
  17. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/equipPartsController.java
  18. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/equipSysController.java
  19. 120 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/CacheController.java
  20. 26 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/ServerController.java
  21. 82 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysLogininforController.java
  22. 69 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysOperlogController.java
  23. 92 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysUserOnlineController.java
  24. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/platformController.java
  25. 134 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysConfigController.java
  26. 132 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDeptController.java
  27. 121 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDictDataController.java
  28. 132 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDictTypeController.java
  29. 28 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysIndexController.java
  30. 86 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysLoginController.java
  31. 142 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysMenuController.java
  32. 91 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysNoticeController.java
  33. 130 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysPostController.java
  34. 143 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysProfileController.java
  35. 37 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysRegisterController.java
  36. 263 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysRoleController.java
  37. 256 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysUserController.java
  38. 23 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/tool/SwaggerController.java
  39. 183 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/tool/TestController.java
  40. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/typeDictController.java
  41. 125 0
      kgraph-admin/src/main/java/com/kgraph/web/core/config/SwaggerConfig.java
  42. 237 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/DataFile.java
  43. 181 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/Equip.java
  44. 195 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/FaultInfo.java
  45. 362 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/FaultRecord.java
  46. 93 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/Major.java
  47. 339 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/equipParts.java
  48. 265 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/equipSys.java
  49. 97 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/platform.java
  50. 83 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/typeDict.java
  51. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/DataFileMapper.java
  52. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/EquipMapper.java
  53. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/FaultInfoMapper.java
  54. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/FaultRecordMapper.java
  55. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/MajorMapper.java
  56. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/equipPartsMapper.java
  57. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/equipSysMapper.java
  58. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/platformMapper.java
  59. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/typeDictMapper.java
  60. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IDataFileService.java
  61. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IEquipService.java
  62. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IFaultInfoService.java
  63. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IFaultRecordService.java
  64. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IMajorService.java
  65. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IequipPartsService.java
  66. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IequipSysService.java
  67. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IplatformService.java
  68. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/ItypeDictService.java
  69. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/DataFileServiceImpl.java
  70. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/EquipServiceImpl.java
  71. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/FaultInfoServiceImpl.java
  72. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/FaultRecordServiceImpl.java
  73. 93 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/MajorServiceImpl.java
  74. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/equipPartsServiceImpl.java
  75. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/equipSysServiceImpl.java
  76. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/platformServiceImpl.java
  77. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/typeDictServiceImpl.java
  78. 1 0
      kgraph-admin/src/main/resources/META-INF/spring-devtools.properties
  79. 57 0
      kgraph-admin/src/main/resources/application-druid.yml
  80. 136 0
      kgraph-admin/src/main/resources/application.yml
  81. 24 0
      kgraph-admin/src/main/resources/banner.txt
  82. 37 0
      kgraph-admin/src/main/resources/i18n/messages.properties
  83. 93 0
      kgraph-admin/src/main/resources/logback.xml
  84. 84 0
      kgraph-admin/src/main/resources/mapper/common/typeDictMapper.xml
  85. 137 0
      kgraph-admin/src/main/resources/mapper/dataCenter/DataFileMapper.xml
  86. 117 0
      kgraph-admin/src/main/resources/mapper/ledger/EquipMapper.xml
  87. 73 0
      kgraph-admin/src/main/resources/mapper/ledger/MajorMapper.xml
  88. 172 0
      kgraph-admin/src/main/resources/mapper/ledger/equipPartsMapper.xml
  89. 147 0
      kgraph-admin/src/main/resources/mapper/ledger/equipSysMapper.xml
  90. 87 0
      kgraph-admin/src/main/resources/mapper/ledger/platformMapper.xml
  91. 122 0
      kgraph-admin/src/main/resources/mapper/maintenance/FaultInfoMapper.xml
  92. 182 0
      kgraph-admin/src/main/resources/mapper/maintenance/FaultRecordMapper.xml
  93. 20 0
      kgraph-admin/src/main/resources/mybatis/mybatis-config.xml
  94. 130 0
      kgraph-common/pom.xml
  95. 19 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/Anonymous.java
  96. 33 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/DataScope.java
  97. 28 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/DataSource.java
  98. 188 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/Excel.java
  99. 18 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/Excels.java
  100. 45 0
      kgraph-common/src/main/java/com/kgraph/common/annotation/Log.java

+ 48 - 0
.gitignore

@@ -0,0 +1,48 @@
+######################################################################
+# Build Tools
+
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### JRebel ###
+rebel.xml
+
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+*.tar
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

BIN
kgraph-admin/.DS_Store


+ 7 - 0
kgraph-admin/Dockerfile

@@ -0,0 +1,7 @@
+FROM openjdk:8-jre
+RUN echo "Asia/Shanghai" > /etc/timezone
+VOLUME /tmp
+ARG JAR_FILE
+ADD ${JAR_FILE} app.jar
+EXPOSE 11082
+CMD ["java","-jar","-Xms256m", "-Xmx512m","/app.jar"]

+ 6 - 0
kgraph-admin/docker-compose.yml

@@ -0,0 +1,6 @@
+version: '1.0'
+services:
+  project:
+    image: KGraph:1.0
+    ports:
+      - "11082:11082/tcp"

+ 286 - 0
kgraph-admin/mvnw

@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        wget "$jarUrl" -O "$wrapperJarPath"
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        curl -o "$wrapperJarPath" "$jarUrl"
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 161 - 0
kgraph-admin/mvnw.cmd

@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+	IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    echo Found %WRAPPER_JAR%
+) else (
+    echo Couldn't find %WRAPPER_JAR%, downloading it ...
+	echo Downloading from: %DOWNLOAD_URL%
+    powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+    echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 132 - 0
kgraph-admin/pom.xml

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>kgraph</artifactId>
+        <groupId>com.kgraph</groupId>
+        <version>1.0.2</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>kgraph-admin</artifactId>
+
+    <description>
+        web服务入口
+    </description>
+
+    <dependencies>
+
+        <!-- spring-boot-devtools -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional> <!-- 表示依赖不会传递 -->
+        </dependency>
+
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+         <!-- Mysql驱动包 -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- 核心模块-->
+        <dependency>
+            <groupId>com.kgraph</groupId>
+            <artifactId>kgraph-framework</artifactId>
+        </dependency>
+
+        <!-- 定时任务-->
+        <dependency>
+            <groupId>com.kgraph</groupId>
+            <artifactId>kgraph-quartz</artifactId>
+        </dependency>
+
+        <!-- 代码生成-->
+        <dependency>
+            <groupId>com.kgraph</groupId>
+            <artifactId>kgraph-generator</artifactId>
+        </dependency>
+
+        <!-- graph模块-->
+        <dependency>
+            <groupId>com.kgraph</groupId>
+            <artifactId>kgraph-graph</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>1.4.10</version>
+                <executions>
+                    <execution>
+                        <id>default</id>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            <configuration>
+                <failOnMissingWebXml>false</failOnMissingWebXml>
+                <warName>${project.artifactId}</warName>
+            </configuration>
+           </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>1.4.10</version>
+                <executions>
+                    <execution>
+                        <id>default</id>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <repository>${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                </configuration>
+            </plugin>
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 20 - 0
kgraph-admin/src/main/java/com/kgraph/KgraphApplication.java

@@ -0,0 +1,20 @@
+package com.kgraph;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+
+/**
+ * 启动程序
+ * 
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+public class KgraphApplication
+{
+    public static void main(String[] args)
+    {
+        // System.setProperty("spring.devtools.restart.enabled", "false");
+        SpringApplication.run(KgraphApplication.class, args);
+        System.out.println("(♥◠‿◠)ノ゙  知识图谱启动成功   ლ(´ڡ`ლ)゙  ");
+    }
+}

+ 17 - 0
kgraph-admin/src/main/java/com/kgraph/KgraphServletInitializer.java

@@ -0,0 +1,17 @@
+package com.kgraph;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ * 
+ */
+public class KgraphServletInitializer extends SpringBootServletInitializer
+{
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+    {
+        return application.sources(KgraphApplication.class);
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/DataFileController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.DataFile;
+import com.kgraph.web.service.IDataFileService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 文件管理Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/dataCenter/dataFile")
+public class DataFileController extends BaseController
+{
+    @Autowired
+    private IDataFileService dataFileService;
+
+    /**
+     * 查询文件管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DataFile dataFile)
+    {
+        startPage();
+        List<DataFile> list = dataFileService.selectDataFileList(dataFile);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出文件管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:export')")
+    @Log(title = "文件管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DataFile dataFile)
+    {
+        List<DataFile> list = dataFileService.selectDataFileList(dataFile);
+        ExcelUtil<DataFile> util = new ExcelUtil<DataFile>(DataFile.class);
+        util.exportExcel(response, list, "文件管理数据");
+    }
+
+    /**
+     * 获取文件管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(dataFileService.selectDataFileById(id));
+    }
+
+    /**
+     * 新增文件管理
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:add')")
+    @Log(title = "文件管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DataFile dataFile)
+    {
+        return toAjax(dataFileService.insertDataFile(dataFile));
+    }
+
+    /**
+     * 修改文件管理
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:edit')")
+    @Log(title = "文件管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DataFile dataFile)
+    {
+        return toAjax(dataFileService.updateDataFile(dataFile));
+    }
+
+    /**
+     * 删除文件管理
+     */
+    @PreAuthorize("@ss.hasPermi('dataCenter:dataFile:remove')")
+    @Log(title = "文件管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(dataFileService.deleteDataFileByIds(ids));
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/EquipController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.Equip;
+import com.kgraph.web.service.IEquipService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 装备Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/ledger/equip")
+public class EquipController extends BaseController
+{
+    @Autowired
+    private IEquipService equipService;
+
+    /**
+     * 查询装备列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(Equip equip)
+    {
+        startPage();
+        List<Equip> list = equipService.selectEquipList(equip);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出装备列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:export')")
+    @Log(title = "装备", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, Equip equip)
+    {
+        List<Equip> list = equipService.selectEquipList(equip);
+        ExcelUtil<Equip> util = new ExcelUtil<Equip>(Equip.class);
+        util.exportExcel(response, list, "装备数据");
+    }
+
+    /**
+     * 获取装备详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(equipService.selectEquipById(id));
+    }
+
+    /**
+     * 新增装备
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:add')")
+    @Log(title = "装备", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody Equip equip)
+    {
+        return toAjax(equipService.insertEquip(equip));
+    }
+
+    /**
+     * 修改装备
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:edit')")
+    @Log(title = "装备", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody Equip equip)
+    {
+        return toAjax(equipService.updateEquip(equip));
+    }
+
+    /**
+     * 删除装备
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:equip:remove')")
+    @Log(title = "装备", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(equipService.deleteEquipByIds(ids));
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/FaultInfoController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.FaultInfo;
+import com.kgraph.web.service.IFaultInfoService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 故障缺陷Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/maintenance/faultInfo")
+public class FaultInfoController extends BaseController
+{
+    @Autowired
+    private IFaultInfoService faultInfoService;
+
+    /**
+     * 查询故障缺陷列表
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FaultInfo faultInfo)
+    {
+        startPage();
+        List<FaultInfo> list = faultInfoService.selectFaultInfoList(faultInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出故障缺陷列表
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:export')")
+    @Log(title = "故障缺陷", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, FaultInfo faultInfo)
+    {
+        List<FaultInfo> list = faultInfoService.selectFaultInfoList(faultInfo);
+        ExcelUtil<FaultInfo> util = new ExcelUtil<FaultInfo>(FaultInfo.class);
+        util.exportExcel(response, list, "故障缺陷数据");
+    }
+
+    /**
+     * 获取故障缺陷详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(faultInfoService.selectFaultInfoById(id));
+    }
+
+    /**
+     * 新增故障缺陷
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:add')")
+    @Log(title = "故障缺陷", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FaultInfo faultInfo)
+    {
+        return toAjax(faultInfoService.insertFaultInfo(faultInfo));
+    }
+
+    /**
+     * 修改故障缺陷
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:edit')")
+    @Log(title = "故障缺陷", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FaultInfo faultInfo)
+    {
+        return toAjax(faultInfoService.updateFaultInfo(faultInfo));
+    }
+
+    /**
+     * 删除故障缺陷
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultInfo:remove')")
+    @Log(title = "故障缺陷", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(faultInfoService.deleteFaultInfoByIds(ids));
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/FaultRecordController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.FaultRecord;
+import com.kgraph.web.service.IFaultRecordService;
+import com.kgraph.common.utils.poi.ExcelUtil;
+import com.kgraph.common.core.page.TableDataInfo;
+
+/**
+ * 故障记录Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/maintenance/faultRecord")
+public class FaultRecordController extends BaseController
+{
+    @Autowired
+    private IFaultRecordService faultRecordService;
+
+    /**
+     * 查询故障记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FaultRecord faultRecord)
+    {
+        startPage();
+        List<FaultRecord> list = faultRecordService.selectFaultRecordList(faultRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出故障记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:export')")
+    @Log(title = "故障记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, FaultRecord faultRecord)
+    {
+        List<FaultRecord> list = faultRecordService.selectFaultRecordList(faultRecord);
+        ExcelUtil<FaultRecord> util = new ExcelUtil<FaultRecord>(FaultRecord.class);
+        util.exportExcel(response, list, "故障记录数据");
+    }
+
+    /**
+     * 获取故障记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(faultRecordService.selectFaultRecordById(id));
+    }
+
+    /**
+     * 新增故障记录
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:add')")
+    @Log(title = "故障记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FaultRecord faultRecord)
+    {
+        return toAjax(faultRecordService.insertFaultRecord(faultRecord));
+    }
+
+    /**
+     * 修改故障记录
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:edit')")
+    @Log(title = "故障记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FaultRecord faultRecord)
+    {
+        return toAjax(faultRecordService.updateFaultRecord(faultRecord));
+    }
+
+    /**
+     * 删除故障记录
+     */
+    @PreAuthorize("@ss.hasPermi('maintenance:faultRecord:remove')")
+    @Log(title = "故障记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(faultRecordService.deleteFaultRecordByIds(ids));
+    }
+}

+ 105 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/MajorController.java

@@ -0,0 +1,105 @@
+package com.kgraph.web.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+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 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.web.domain.Major;
+import com.kgraph.web.service.IMajorService;
+
+/**
+ * 专业Controller
+ * 
+ * @author kgraph
+ * @date 2023-02-14
+ */
+@RestController
+@RequestMapping("/ledger/major")
+public class MajorController extends BaseController
+{
+    @Autowired
+    private IMajorService majorService;
+
+    /**
+     * 查询专业列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(Major major)
+    {
+        startPage();
+        List<Major> list = majorService.selectMajorList(major);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出专业列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:export')")
+    @Log(title = "专业", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, Major major)
+    {
+        List<Major> list = majorService.selectMajorList(major);
+        ExcelUtil<Major> util = new ExcelUtil<Major>(Major.class);
+        util.exportExcel(response, list, "专业数据");
+    }
+
+    /**
+     * 获取专业详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(majorService.selectMajorById(id));
+    }
+
+    /**
+     * 新增专业
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:add')")
+    @Log(title = "专业", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody Major major)
+    {
+        return toAjax(majorService.insertMajor(major));
+    }
+
+    /**
+     * 修改专业
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:edit')")
+    @Log(title = "专业", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody Major major)
+    {
+        return toAjax(majorService.updateMajor(major));
+    }
+
+    /**
+     * 删除专业
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:major:remove')")
+    @Log(title = "专业", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(majorService.deleteMajorByIds(ids));
+    }
+}

+ 94 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/common/CaptchaController.java

@@ -0,0 +1,94 @@
+package com.kgraph.web.controller.common;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.config.KgraphConfig;
+import com.kgraph.common.constant.CacheConstants;
+import com.kgraph.common.constant.Constants;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.redis.RedisCache;
+import com.kgraph.common.utils.sign.Base64;
+import com.kgraph.common.utils.uuid.IdUtils;
+import com.kgraph.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.google.code.kaptcha.Producer;
+
+/**
+ * 验证码操作处理
+ * 
+ */
+@RestController
+public class CaptchaController
+{
+    @Resource(name = "captchaProducer")
+    private Producer captchaProducer;
+
+    @Resource(name = "captchaProducerMath")
+    private Producer captchaProducerMath;
+
+    @Autowired
+    private RedisCache redisCache;
+    
+    @Autowired
+    private ISysConfigService configService;
+    /**
+     * 生成验证码
+     */
+    @GetMapping("/captchaImage")
+    public AjaxResult getCode(HttpServletResponse response) throws IOException
+    {
+        AjaxResult ajax = AjaxResult.success();
+        boolean captchaEnabled = configService.selectCaptchaEnabled();
+        ajax.put("captchaEnabled", captchaEnabled);
+        if (!captchaEnabled)
+        {
+            return ajax;
+        }
+
+        // 保存验证码信息
+        String uuid = IdUtils.simpleUUID();
+        String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
+
+        String capStr = null, code = null;
+        BufferedImage image = null;
+
+        // 生成验证码
+        String captchaType = KgraphConfig.getCaptchaType();
+        if ("math".equals(captchaType))
+        {
+            String capText = captchaProducerMath.createText();
+            capStr = capText.substring(0, capText.lastIndexOf("@"));
+            code = capText.substring(capText.lastIndexOf("@") + 1);
+            image = captchaProducerMath.createImage(capStr);
+        }
+        else if ("char".equals(captchaType))
+        {
+            capStr = code = captchaProducer.createText();
+            image = captchaProducer.createImage(capStr);
+        }
+
+        redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
+        // 转换流信息写出
+        FastByteArrayOutputStream os = new FastByteArrayOutputStream();
+        try
+        {
+            ImageIO.write(image, "jpg", os);
+        }
+        catch (IOException e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+
+        ajax.put("uuid", uuid);
+        ajax.put("img", Base64.encode(os.toByteArray()));
+        return ajax;
+    }
+}

+ 163 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/common/CommonController.java

@@ -0,0 +1,163 @@
+package com.kgraph.web.controller.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.config.KgraphConfig;
+import com.kgraph.common.constant.Constants;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.file.FileUploadUtils;
+import com.kgraph.common.utils.file.FileUtils;
+import com.kgraph.framework.config.ServerConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 通用请求处理
+ * 
+ */
+@RestController
+@RequestMapping("/common")
+public class CommonController
+{
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ServerConfig serverConfig;
+
+    private static final String FILE_DELIMETER = ",";
+
+    /**
+     * 通用下载请求
+     * 
+     * @param fileName 文件名称
+     * @param delete 是否删除
+     */
+    @GetMapping("/download")
+    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(fileName))
+            {
+                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
+            }
+            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
+            String filePath = KgraphConfig.getDownloadPath() + fileName;
+
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, realFileName);
+            FileUtils.writeBytes(filePath, response.getOutputStream());
+            if (delete)
+            {
+                FileUtils.deleteFile(filePath);
+            }
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+
+    /**
+     * 通用上传请求(单个)
+     */
+    @PostMapping("/upload")
+    public AjaxResult uploadFile(MultipartFile file) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = KgraphConfig.getUploadPath();
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("fileName", fileName);
+            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("originalFilename", file.getOriginalFilename());
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 通用上传请求(多个)
+     */
+    @PostMapping("/uploads")
+    public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = KgraphConfig.getUploadPath();
+            List<String> urls = new ArrayList<String>();
+            List<String> fileNames = new ArrayList<String>();
+            List<String> newFileNames = new ArrayList<String>();
+            List<String> originalFilenames = new ArrayList<String>();
+            for (MultipartFile file : files)
+            {
+                // 上传并返回新文件名称
+                String fileName = FileUploadUtils.upload(filePath, file);
+                String url = serverConfig.getUrl() + fileName;
+                urls.add(url);
+                fileNames.add(fileName);
+                newFileNames.add(FileUtils.getName(fileName));
+                originalFilenames.add(file.getOriginalFilename());
+            }
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+            ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+            ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+            ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 本地资源通用下载
+     */
+    @GetMapping("/download/resource")
+    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
+            throws Exception
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(resource))
+            {
+                throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
+            }
+            // 本地资源路径
+            String localPath = KgraphConfig.getProfile();
+            // 数据库资源地址
+            String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
+            // 下载名称
+            String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, downloadName);
+            FileUtils.writeBytes(downloadPath, response.getOutputStream());
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/equipPartsController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.equipParts;
+import com.kgraph.web.service.IequipPartsService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 部件管理Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/ledger/parts")
+public class equipPartsController extends BaseController
+{
+    @Autowired
+    private IequipPartsService equipPartsService;
+
+    /**
+     * 查询部件管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(equipParts equipParts)
+    {
+        startPage();
+        List<equipParts> list = equipPartsService.selectequipPartsList(equipParts);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出部件管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:export')")
+    @Log(title = "部件管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, equipParts equipParts)
+    {
+        List<equipParts> list = equipPartsService.selectequipPartsList(equipParts);
+        ExcelUtil<equipParts> util = new ExcelUtil<equipParts>(equipParts.class);
+        util.exportExcel(response, list, "部件管理数据");
+    }
+
+    /**
+     * 获取部件管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(equipPartsService.selectequipPartsById(id));
+    }
+
+    /**
+     * 新增部件管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:add')")
+    @Log(title = "部件管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody equipParts equipParts)
+    {
+        return toAjax(equipPartsService.insertequipParts(equipParts));
+    }
+
+    /**
+     * 修改部件管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:edit')")
+    @Log(title = "部件管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody equipParts equipParts)
+    {
+        return toAjax(equipPartsService.updateequipParts(equipParts));
+    }
+
+    /**
+     * 删除部件管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:parts:remove')")
+    @Log(title = "部件管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(equipPartsService.deleteequipPartsByIds(ids));
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/equipSysController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.equipSys;
+import com.kgraph.web.service.IequipSysService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 系统与子系统Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/ledger/eqiupSys")
+public class equipSysController extends BaseController
+{
+    @Autowired
+    private IequipSysService equipSysService;
+
+    /**
+     * 查询系统与子系统列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(equipSys equipSys)
+    {
+        startPage();
+        List<equipSys> list = equipSysService.selectequipSysList(equipSys);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出系统与子系统列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:export')")
+    @Log(title = "系统与子系统", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, equipSys equipSys)
+    {
+        List<equipSys> list = equipSysService.selectequipSysList(equipSys);
+        ExcelUtil<equipSys> util = new ExcelUtil<equipSys>(equipSys.class);
+        util.exportExcel(response, list, "系统与子系统数据");
+    }
+
+    /**
+     * 获取系统与子系统详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(equipSysService.selectequipSysById(id));
+    }
+
+    /**
+     * 新增系统与子系统
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:add')")
+    @Log(title = "系统与子系统", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody equipSys equipSys)
+    {
+        return toAjax(equipSysService.insertequipSys(equipSys));
+    }
+
+    /**
+     * 修改系统与子系统
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:edit')")
+    @Log(title = "系统与子系统", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody equipSys equipSys)
+    {
+        return toAjax(equipSysService.updateequipSys(equipSys));
+    }
+
+    /**
+     * 删除系统与子系统
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:eqiupSys:remove')")
+    @Log(title = "系统与子系统", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(equipSysService.deleteequipSysByIds(ids));
+    }
+}

+ 120 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/CacheController.java

@@ -0,0 +1,120 @@
+package com.kgraph.web.controller.monitor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import com.kgraph.common.constant.CacheConstants;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.system.domain.SysCache;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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;
+
+/**
+ * 缓存监控
+ * 
+ */
+@RestController
+@RequestMapping("/monitor/cache")
+public class CacheController
+{
+    @Autowired
+    private RedisTemplate<String, String> redisTemplate;
+
+    private final static List<SysCache> caches = new ArrayList<SysCache>();
+    {
+        caches.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "用户信息"));
+        caches.add(new SysCache(CacheConstants.SYS_CONFIG_KEY, "配置信息"));
+        caches.add(new SysCache(CacheConstants.SYS_DICT_KEY, "数据字典"));
+        caches.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "验证码"));
+        caches.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "防重提交"));
+        caches.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理"));
+        caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数"));
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @GetMapping()
+    public AjaxResult getInfo() throws Exception
+    {
+        Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
+        Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
+        Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
+
+        Map<String, Object> result = new HashMap<>(3);
+        result.put("info", info);
+        result.put("dbSize", dbSize);
+
+        List<Map<String, String>> pieList = new ArrayList<>();
+        commandStats.stringPropertyNames().forEach(key -> {
+            Map<String, String> data = new HashMap<>(2);
+            String property = commandStats.getProperty(key);
+            data.put("name", StringUtils.removeStart(key, "cmdstat_"));
+            data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
+            pieList.add(data);
+        });
+        result.put("commandStats", pieList);
+        return AjaxResult.success(result);
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @GetMapping("/getNames")
+    public AjaxResult cache()
+    {
+        return AjaxResult.success(caches);
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @GetMapping("/getKeys/{cacheName}")
+    public AjaxResult getCacheKeys(@PathVariable String cacheName)
+    {
+        Set<String> cacheKeys = redisTemplate.keys(cacheName + "*");
+        return AjaxResult.success(cacheKeys);
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @GetMapping("/getValue/{cacheName}/{cacheKey}")
+    public AjaxResult getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey)
+    {
+        String cacheValue = redisTemplate.opsForValue().get(cacheKey);
+        SysCache sysCache = new SysCache(cacheName, cacheKey, cacheValue);
+        return AjaxResult.success(sysCache);
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @DeleteMapping("/clearCacheName/{cacheName}")
+    public AjaxResult clearCacheName(@PathVariable String cacheName)
+    {
+        Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*");
+        redisTemplate.delete(cacheKeys);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @DeleteMapping("/clearCacheKey/{cacheKey}")
+    public AjaxResult clearCacheKey(@PathVariable String cacheKey)
+    {
+        redisTemplate.delete(cacheKey);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
+    @DeleteMapping("/clearCacheAll")
+    public AjaxResult clearCacheAll()
+    {
+        Collection<String> cacheKeys = redisTemplate.keys("*");
+        redisTemplate.delete(cacheKeys);
+        return AjaxResult.success();
+    }
+}

+ 26 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/ServerController.java

@@ -0,0 +1,26 @@
+package com.kgraph.web.controller.monitor;
+
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.framework.web.domain.Server;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 服务器监控
+ * 
+ */
+@RestController
+@RequestMapping("/monitor/server")
+public class ServerController
+{
+    @PreAuthorize("@ss.hasPermi('monitor:server:list')")
+    @GetMapping()
+    public AjaxResult getInfo() throws Exception
+    {
+        Server server = new Server();
+        server.copyTo();
+        return AjaxResult.success(server);
+    }
+}

+ 82 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysLogininforController.java

@@ -0,0 +1,82 @@
+package com.kgraph.web.controller.monitor;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+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.framework.web.service.SysPasswordService;
+import com.kgraph.system.domain.SysLogininfor;
+import com.kgraph.system.service.ISysLogininforService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 系统访问记录
+ * 
+ */
+@RestController
+@RequestMapping("/monitor/logininfor")
+public class SysLogininforController extends BaseController
+{
+    @Autowired
+    private ISysLogininforService logininforService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysLogininfor logininfor)
+    {
+        startPage();
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        return getDataTable(list);
+    }
+
+    @Log(title = "登录日志", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysLogininfor logininfor)
+    {
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
+        util.exportExcel(response, list, "登录日志");
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
+    @Log(title = "登录日志", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{infoIds}")
+    public AjaxResult remove(@PathVariable Long[] infoIds)
+    {
+        return toAjax(logininforService.deleteLogininforByIds(infoIds));
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
+    @Log(title = "登录日志", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/clean")
+    public AjaxResult clean()
+    {
+        logininforService.cleanLogininfor();
+        return success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
+    @Log(title = "账户解锁", businessType = BusinessType.OTHER)
+    @GetMapping("/unlock/{userName}")
+    public AjaxResult unlock(@PathVariable("userName") String userName)
+    {
+        passwordService.clearLoginRecordCache(userName);
+        return success();
+    }
+}

+ 69 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysOperlogController.java

@@ -0,0 +1,69 @@
+package com.kgraph.web.controller.monitor;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+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.system.domain.SysOperLog;
+import com.kgraph.system.service.ISysOperLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 操作日志记录
+ * 
+ */
+@RestController
+@RequestMapping("/monitor/operlog")
+public class SysOperlogController extends BaseController
+{
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysOperLog operLog)
+    {
+        startPage();
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysOperLog operLog)
+    {
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
+        util.exportExcel(response, list, "操作日志");
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.DELETE)
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/{operIds}")
+    public AjaxResult remove(@PathVariable Long[] operIds)
+    {
+        return toAjax(operLogService.deleteOperLogByIds(operIds));
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
+    @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
+    @DeleteMapping("/clean")
+    public AjaxResult clean()
+    {
+        operLogService.cleanOperLog();
+        return success();
+    }
+}

+ 92 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/monitor/SysUserOnlineController.java

@@ -0,0 +1,92 @@
+package com.kgraph.web.controller.monitor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.CacheConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.model.LoginUser;
+import com.kgraph.common.core.page.TableDataInfo;
+import com.kgraph.common.core.redis.RedisCache;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.system.domain.SysUserOnline;
+import com.kgraph.system.service.ISysUserOnlineService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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;
+
+/**
+ * 在线用户监控
+ * 
+ */
+@RestController
+@RequestMapping("/monitor/online")
+public class SysUserOnlineController extends BaseController
+{
+    @Autowired
+    private ISysUserOnlineService userOnlineService;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    @PreAuthorize("@ss.hasPermi('monitor:online:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(String ipaddr, String userName)
+    {
+        Collection<String> keys = redisCache.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
+        List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
+        for (String key : keys)
+        {
+            LoginUser user = redisCache.getCacheObject(key);
+            if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
+            {
+                if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
+                {
+                    userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
+                }
+            }
+            else if (StringUtils.isNotEmpty(ipaddr))
+            {
+                if (StringUtils.equals(ipaddr, user.getIpaddr()))
+                {
+                    userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
+                }
+            }
+            else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser()))
+            {
+                if (StringUtils.equals(userName, user.getUsername()))
+                {
+                    userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
+                }
+            }
+            else
+            {
+                userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
+            }
+        }
+        Collections.reverse(userOnlineList);
+        userOnlineList.removeAll(Collections.singleton(null));
+        return getDataTable(userOnlineList);
+    }
+
+    /**
+     * 强退用户
+     */
+    @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
+    @Log(title = "在线用户", businessType = BusinessType.FORCE)
+    @DeleteMapping("/{tokenId}")
+    public AjaxResult forceLogout(@PathVariable String tokenId)
+    {
+        redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);
+        return success();
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/platformController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.platform;
+import com.kgraph.web.service.IplatformService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 平台管理Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/ledger/platform")
+public class platformController extends BaseController
+{
+    @Autowired
+    private IplatformService platformService;
+
+    /**
+     * 查询平台管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(platform platform)
+    {
+        startPage();
+        List<platform> list = platformService.selectplatformList(platform);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出平台管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:export')")
+    @Log(title = "平台管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, platform platform)
+    {
+        List<platform> list = platformService.selectplatformList(platform);
+        ExcelUtil<platform> util = new ExcelUtil<platform>(platform.class);
+        util.exportExcel(response, list, "平台管理数据");
+    }
+
+    /**
+     * 获取平台管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(platformService.selectplatformById(id));
+    }
+
+    /**
+     * 新增平台管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:add')")
+    @Log(title = "平台管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody platform platform)
+    {
+        return toAjax(platformService.insertplatform(platform));
+    }
+
+    /**
+     * 修改平台管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:edit')")
+    @Log(title = "平台管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody platform platform)
+    {
+        return toAjax(platformService.updateplatform(platform));
+    }
+
+    /**
+     * 删除平台管理
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:platform:remove')")
+    @Log(title = "平台管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(platformService.deleteplatformByIds(ids));
+    }
+}

+ 134 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysConfigController.java

@@ -0,0 +1,134 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+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.system.domain.SysConfig;
+import com.kgraph.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 参数配置 信息操作处理
+ * 
+ */
+@RestController
+@RequestMapping("/system/config")
+public class SysConfigController extends BaseController
+{
+    @Autowired
+    private ISysConfigService configService;
+
+    /**
+     * 获取参数配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysConfig config)
+    {
+        startPage();
+        List<SysConfig> list = configService.selectConfigList(config);
+        return getDataTable(list);
+    }
+
+    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:config:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysConfig config)
+    {
+        List<SysConfig> list = configService.selectConfigList(config);
+        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
+        util.exportExcel(response, list, "参数数据");
+    }
+
+    /**
+     * 根据参数编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:query')")
+    @GetMapping(value = "/{configId}")
+    public AjaxResult getInfo(@PathVariable Long configId)
+    {
+        return success(configService.selectConfigById(configId));
+    }
+
+    /**
+     * 根据参数键名查询参数值
+     */
+    @GetMapping(value = "/configKey/{configKey}")
+    public AjaxResult getConfigKey(@PathVariable String configKey)
+    {
+        return success(configService.selectConfigByKey(configKey));
+    }
+
+    /**
+     * 新增参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:add')")
+    @Log(title = "参数管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysConfig config)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
+        {
+            return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setCreateBy(getUsername());
+        return toAjax(configService.insertConfig(config));
+    }
+
+    /**
+     * 修改参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:edit')")
+    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysConfig config)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
+        {
+            return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setUpdateBy(getUsername());
+        return toAjax(configService.updateConfig(config));
+    }
+
+    /**
+     * 删除参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{configIds}")
+    public AjaxResult remove(@PathVariable Long[] configIds)
+    {
+        configService.deleteConfigByIds(configIds);
+        return success();
+    }
+
+    /**
+     * 刷新参数缓存
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:remove')")
+    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache()
+    {
+        configService.resetConfigCache();
+        return success();
+    }
+}

+ 132 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDeptController.java

@@ -0,0 +1,132 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysDept;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.system.service.ISysDeptService;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 部门信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/dept")
+public class SysDeptController extends BaseController
+{
+    @Autowired
+    private ISysDeptService deptService;
+
+    /**
+     * 获取部门列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysDept dept)
+    {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return success(depts);
+    }
+
+    /**
+     * 查询部门列表(排除节点)
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:list')")
+    @GetMapping("/list/exclude/{deptId}")
+    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
+    {
+        List<SysDept> depts = deptService.selectDeptList(new SysDept());
+        depts.removeIf(d -> d.getDeptId().intValue() == deptId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
+        return success(depts);
+    }
+
+    /**
+     * 根据部门编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:query')")
+    @GetMapping(value = "/{deptId}")
+    public AjaxResult getInfo(@PathVariable Long deptId)
+    {
+        deptService.checkDeptDataScope(deptId);
+        return success(deptService.selectDeptById(deptId));
+    }
+
+    /**
+     * 新增部门
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:add')")
+    @Log(title = "部门管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDept dept)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
+        {
+            return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        dept.setCreateBy(getUsername());
+        return toAjax(deptService.insertDept(dept));
+    }
+
+    /**
+     * 修改部门
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:edit')")
+    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDept dept)
+    {
+        Long deptId = dept.getDeptId();
+        deptService.checkDeptDataScope(deptId);
+        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
+        {
+            return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
+        }
+        else if (dept.getParentId().equals(deptId))
+        {
+            return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
+        }
+        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
+        {
+            return error("该部门包含未停用的子部门!");
+        }
+        dept.setUpdateBy(getUsername());
+        return toAjax(deptService.updateDept(dept));
+    }
+
+    /**
+     * 删除部门
+     */
+    @PreAuthorize("@ss.hasPermi('system:dept:remove')")
+    @Log(title = "部门管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{deptId}")
+    public AjaxResult remove(@PathVariable Long deptId)
+    {
+        if (deptService.hasChildByDeptId(deptId))
+        {
+            return warn("存在下级部门,不允许删除");
+        }
+        if (deptService.checkDeptExistUser(deptId))
+        {
+            return warn("部门存在用户,不允许删除");
+        }
+        deptService.checkDeptDataScope(deptId);
+        return toAjax(deptService.deleteDeptById(deptId));
+    }
+}

+ 121 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDictDataController.java

@@ -0,0 +1,121 @@
+package com.kgraph.web.controller.system;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+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.domain.entity.SysDictData;
+import com.kgraph.common.core.page.TableDataInfo;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.poi.ExcelUtil;
+import com.kgraph.system.service.ISysDictDataService;
+import com.kgraph.system.service.ISysDictTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 数据字典信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/dict/data")
+public class SysDictDataController extends BaseController
+{
+    @Autowired
+    private ISysDictDataService dictDataService;
+
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictData dictData)
+    {
+        startPage();
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysDictData dictData)
+    {
+        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
+        ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
+        util.exportExcel(response, list, "字典数据");
+    }
+
+    /**
+     * 查询字典数据详细
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictCode}")
+    public AjaxResult getInfo(@PathVariable Long dictCode)
+    {
+        return success(dictDataService.selectDictDataById(dictCode));
+    }
+
+    /**
+     * 根据字典类型查询字典数据信息
+     */
+    @GetMapping(value = "/type/{dictType}")
+    public AjaxResult dictType(@PathVariable String dictType)
+    {
+        List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
+        if (StringUtils.isNull(data))
+        {
+            data = new ArrayList<SysDictData>();
+        }
+        return success(data);
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDictData dict)
+    {
+        dict.setCreateBy(getUsername());
+        return toAjax(dictDataService.insertDictData(dict));
+    }
+
+    /**
+     * 修改保存字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDictData dict)
+    {
+        dict.setUpdateBy(getUsername());
+        return toAjax(dictDataService.updateDictData(dict));
+    }
+
+    /**
+     * 删除字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictCodes}")
+    public AjaxResult remove(@PathVariable Long[] dictCodes)
+    {
+        dictDataService.deleteDictDataByIds(dictCodes);
+        return success();
+    }
+}

+ 132 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysDictTypeController.java

@@ -0,0 +1,132 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysDictType;
+import com.kgraph.common.core.page.TableDataInfo;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.poi.ExcelUtil;
+import com.kgraph.system.service.ISysDictTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 数据字典信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/dict/type")
+public class SysDictTypeController extends BaseController
+{
+    @Autowired
+    private ISysDictTypeService dictTypeService;
+
+    @PreAuthorize("@ss.hasPermi('system:dict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysDictType dictType)
+    {
+        startPage();
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysDictType dictType)
+    {
+        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
+        ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
+        util.exportExcel(response, list, "字典类型");
+    }
+
+    /**
+     * 查询字典类型详细
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictId}")
+    public AjaxResult getInfo(@PathVariable Long dictId)
+    {
+        return success(dictTypeService.selectDictTypeById(dictId));
+    }
+
+    /**
+     * 新增字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典类型", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysDictType dict)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setCreateBy(getUsername());
+        return toAjax(dictTypeService.insertDictType(dict));
+    }
+
+    /**
+     * 修改字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysDictType dict)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setUpdateBy(getUsername());
+        return toAjax(dictTypeService.updateDictType(dict));
+    }
+
+    /**
+     * 删除字典类型
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{dictIds}")
+    public AjaxResult remove(@PathVariable Long[] dictIds)
+    {
+        dictTypeService.deleteDictTypeByIds(dictIds);
+        return success();
+    }
+
+    /**
+     * 刷新字典缓存
+     */
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/refreshCache")
+    public AjaxResult refreshCache()
+    {
+        dictTypeService.resetDictCache();
+        return success();
+    }
+
+    /**
+     * 获取字典选择框列表
+     */
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
+        return success(dictTypes);
+    }
+}

+ 28 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysIndexController.java

@@ -0,0 +1,28 @@
+package com.kgraph.web.controller.system;
+
+import com.kgraph.common.config.KgraphConfig;
+import com.kgraph.common.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 首页
+ *
+ */
+//@RestController
+public class SysIndexController
+{
+    /** 系统基础配置 */
+    //@Autowired
+    private KgraphConfig kgraphConfig;
+
+    /**
+     * 访问首页,提示语
+     */
+    //@RequestMapping("/")
+    public String index()
+    {
+        return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", kgraphConfig.getName(), kgraphConfig.getVersion());
+    }
+}

+ 86 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysLoginController.java

@@ -0,0 +1,86 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import java.util.Set;
+
+import com.kgraph.common.constant.Constants;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysMenu;
+import com.kgraph.common.core.domain.entity.SysUser;
+import com.kgraph.common.core.domain.model.LoginBody;
+import com.kgraph.common.utils.SecurityUtils;
+import com.kgraph.framework.web.service.SysLoginService;
+import com.kgraph.framework.web.service.SysPermissionService;
+import com.kgraph.system.service.ISysMenuService;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 登录验证
+ * 
+ */
+@RestController
+public class SysLoginController
+{
+    @Autowired
+    private SysLoginService loginService;
+
+    @Autowired
+    private ISysMenuService menuService;
+
+    @Autowired
+    private SysPermissionService permissionService;
+
+    /**
+     * 登录方法
+     * 
+     * @param loginBody 登录信息
+     * @return 结果
+     */
+    @PostMapping("/login")
+    public AjaxResult login(@RequestBody LoginBody loginBody)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        // 生成令牌
+        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
+                loginBody.getUuid());
+        ajax.put(Constants.TOKEN, token);
+        return ajax;
+    }
+
+    /**
+     * 获取用户信息
+     * 
+     * @return 用户信息
+     */
+    @GetMapping("getInfo")
+    public AjaxResult getInfo()
+    {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        // 角色集合
+        Set<String> roles = permissionService.getRolePermission(user);
+        // 权限集合
+        Set<String> permissions = permissionService.getMenuPermission(user);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("user", user);
+        ajax.put("roles", roles);
+        ajax.put("permissions", permissions);
+        return ajax;
+    }
+
+    /**
+     * 获取路由信息
+     * 
+     * @return 路由信息
+     */
+    @GetMapping("getRouters")
+    public AjaxResult getRouters()
+    {
+        Long userId = SecurityUtils.getUserId();
+        List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
+        return AjaxResult.success(menuService.buildMenus(menus));
+    }
+}

+ 142 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysMenuController.java

@@ -0,0 +1,142 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysMenu;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.system.service.ISysMenuService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 菜单信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/menu")
+public class SysMenuController extends BaseController
+{
+    @Autowired
+    private ISysMenuService menuService;
+
+    /**
+     * 获取菜单列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysMenu menu)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return success(menus);
+    }
+
+    /**
+     * 根据菜单编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:query')")
+    @GetMapping(value = "/{menuId}")
+    public AjaxResult getInfo(@PathVariable Long menuId)
+    {
+        return success(menuService.selectMenuById(menuId));
+    }
+
+    /**
+     * 获取菜单下拉树列表
+     */
+    @GetMapping("/treeselect")
+    public AjaxResult treeselect(SysMenu menu)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
+        return success(menuService.buildMenuTreeSelect(menus));
+    }
+
+    /**
+     * 加载对应角色菜单列表树
+     */
+    @GetMapping(value = "/roleMenuTreeselect/{roleId}")
+    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
+    {
+        List<SysMenu> menus = menuService.selectMenuList(getUserId());
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
+        ajax.put("menus", menuService.buildMenuTreeSelect(menus));
+        return ajax;
+    }
+
+    /**
+     * 新增菜单
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:add')")
+    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysMenu menu)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
+        {
+            return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        }
+        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
+        {
+            return error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
+        }
+        menu.setCreateBy(getUsername());
+        return toAjax(menuService.insertMenu(menu));
+    }
+
+    /**
+     * 修改菜单
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:edit')")
+    @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysMenu menu)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
+        {
+            return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
+        }
+        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
+        {
+            return error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
+        }
+        else if (menu.getMenuId().equals(menu.getParentId()))
+        {
+            return error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
+        }
+        menu.setUpdateBy(getUsername());
+        return toAjax(menuService.updateMenu(menu));
+    }
+
+    /**
+     * 删除菜单
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:remove')")
+    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{menuId}")
+    public AjaxResult remove(@PathVariable("menuId") Long menuId)
+    {
+        if (menuService.hasChildByMenuId(menuId))
+        {
+            return warn("存在子菜单,不允许删除");
+        }
+        if (menuService.checkMenuExistRole(menuId))
+        {
+            return warn("菜单已分配,不允许删除");
+        }
+        return toAjax(menuService.deleteMenuById(menuId));
+    }
+}

+ 91 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysNoticeController.java

@@ -0,0 +1,91 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+
+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.system.domain.SysNotice;
+import com.kgraph.system.service.ISysNoticeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 公告 信息操作处理
+ * 
+ */
+@RestController
+@RequestMapping("/system/notice")
+public class SysNoticeController extends BaseController
+{
+    @Autowired
+    private ISysNoticeService noticeService;
+
+    /**
+     * 获取通知公告列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:notice:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysNotice notice)
+    {
+        startPage();
+        List<SysNotice> list = noticeService.selectNoticeList(notice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 根据通知公告编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:notice:query')")
+    @GetMapping(value = "/{noticeId}")
+    public AjaxResult getInfo(@PathVariable Long noticeId)
+    {
+        return success(noticeService.selectNoticeById(noticeId));
+    }
+
+    /**
+     * 新增通知公告
+     */
+    @PreAuthorize("@ss.hasPermi('system:notice:add')")
+    @Log(title = "通知公告", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysNotice notice)
+    {
+        notice.setCreateBy(getUsername());
+        return toAjax(noticeService.insertNotice(notice));
+    }
+
+    /**
+     * 修改通知公告
+     */
+    @PreAuthorize("@ss.hasPermi('system:notice:edit')")
+    @Log(title = "通知公告", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysNotice notice)
+    {
+        notice.setUpdateBy(getUsername());
+        return toAjax(noticeService.updateNotice(notice));
+    }
+
+    /**
+     * 删除通知公告
+     */
+    @PreAuthorize("@ss.hasPermi('system:notice:remove')")
+    @Log(title = "通知公告", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{noticeIds}")
+    public AjaxResult remove(@PathVariable Long[] noticeIds)
+    {
+        return toAjax(noticeService.deleteNoticeByIds(noticeIds));
+    }
+}

+ 130 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysPostController.java

@@ -0,0 +1,130 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+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.system.domain.SysPost;
+import com.kgraph.system.service.ISysPostService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 岗位信息操作处理
+ * 
+ */
+@RestController
+@RequestMapping("/system/post")
+public class SysPostController extends BaseController
+{
+    @Autowired
+    private ISysPostService postService;
+
+    /**
+     * 获取岗位列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysPost post)
+    {
+        startPage();
+        List<SysPost> list = postService.selectPostList(post);
+        return getDataTable(list);
+    }
+    
+    @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:post:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysPost post)
+    {
+        List<SysPost> list = postService.selectPostList(post);
+        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
+        util.exportExcel(response, list, "岗位数据");
+    }
+
+    /**
+     * 根据岗位编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:query')")
+    @GetMapping(value = "/{postId}")
+    public AjaxResult getInfo(@PathVariable Long postId)
+    {
+        return success(postService.selectPostById(postId));
+    }
+
+    /**
+     * 新增岗位
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:add')")
+    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysPost post)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setCreateBy(getUsername());
+        return toAjax(postService.insertPost(post));
+    }
+
+    /**
+     * 修改岗位
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:edit')")
+    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysPost post)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
+        {
+            return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
+        {
+            return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
+        }
+        post.setUpdateBy(getUsername());
+        return toAjax(postService.updatePost(post));
+    }
+
+    /**
+     * 删除岗位
+     */
+    @PreAuthorize("@ss.hasPermi('system:post:remove')")
+    @Log(title = "岗位管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{postIds}")
+    public AjaxResult remove(@PathVariable Long[] postIds)
+    {
+        return toAjax(postService.deletePostByIds(postIds));
+    }
+
+    /**
+     * 获取岗位选择框列表
+     */
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        List<SysPost> posts = postService.selectPostAll();
+        return success(posts);
+    }
+}

+ 143 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysProfileController.java

@@ -0,0 +1,143 @@
+package com.kgraph.web.controller.system;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.config.KgraphConfig;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysUser;
+import com.kgraph.common.core.domain.model.LoginUser;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.SecurityUtils;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.file.FileUploadUtils;
+import com.kgraph.common.utils.file.MimeTypeUtils;
+import com.kgraph.framework.web.service.TokenService;
+import com.kgraph.system.service.ISysUserService;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 个人信息 业务处理
+ * 
+ */
+@RestController
+@RequestMapping("/system/user/profile")
+public class SysProfileController extends BaseController
+{
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 个人信息
+     */
+    @GetMapping
+    public AjaxResult profile()
+    {
+        LoginUser loginUser = getLoginUser();
+        SysUser user = loginUser.getUser();
+        AjaxResult ajax = AjaxResult.success(user);
+        ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
+        ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
+        return ajax;
+    }
+
+    /**
+     * 修改用户
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult updateProfile(@RequestBody SysUser user)
+    {
+        LoginUser loginUser = getLoginUser();
+        SysUser sysUser = loginUser.getUser();
+        user.setUserName(sysUser.getUserName());
+        if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+        }
+        if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setUserId(sysUser.getUserId());
+        user.setPassword(null);
+        user.setAvatar(null);
+        user.setDeptId(null);
+        if (userService.updateUserProfile(user) > 0)
+        {
+            // 更新缓存用户信息
+            sysUser.setNickName(user.getNickName());
+            sysUser.setPhonenumber(user.getPhonenumber());
+            sysUser.setEmail(user.getEmail());
+            sysUser.setSex(user.getSex());
+            tokenService.setLoginUser(loginUser);
+            return success();
+        }
+        return error("修改个人信息异常,请联系管理员");
+    }
+
+    /**
+     * 重置密码
+     */
+    @Log(title = "个人信息", businessType = BusinessType.UPDATE)
+    @PutMapping("/updatePwd")
+    public AjaxResult updatePwd(String oldPassword, String newPassword)
+    {
+        LoginUser loginUser = getLoginUser();
+        String userName = loginUser.getUsername();
+        String password = loginUser.getPassword();
+        if (!SecurityUtils.matchesPassword(oldPassword, password))
+        {
+            return error("修改密码失败,旧密码错误");
+        }
+        if (SecurityUtils.matchesPassword(newPassword, password))
+        {
+            return error("新密码不能与旧密码相同");
+        }
+        if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
+        {
+            // 更新缓存用户密码
+            loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
+            tokenService.setLoginUser(loginUser);
+            return success();
+        }
+        return error("修改密码异常,请联系管理员");
+    }
+
+    /**
+     * 头像上传
+     */
+    @Log(title = "用户头像", businessType = BusinessType.UPDATE)
+    @PostMapping("/avatar")
+    public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws Exception
+    {
+        if (!file.isEmpty())
+        {
+            LoginUser loginUser = getLoginUser();
+            String avatar = FileUploadUtils.upload(KgraphConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
+            if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
+            {
+                AjaxResult ajax = AjaxResult.success();
+                ajax.put("imgUrl", avatar);
+                // 更新缓存用户头像
+                loginUser.getUser().setAvatar(avatar);
+                tokenService.setLoginUser(loginUser);
+                return ajax;
+            }
+        }
+        return error("上传图片异常,请联系管理员");
+    }
+}

+ 37 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysRegisterController.java

@@ -0,0 +1,37 @@
+package com.kgraph.web.controller.system;
+
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.model.RegisterBody;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.framework.web.service.SysRegisterService;
+import com.kgraph.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 注册验证
+ * 
+ */
+@RestController
+public class SysRegisterController extends BaseController
+{
+    @Autowired
+    private SysRegisterService registerService;
+
+    @Autowired
+    private ISysConfigService configService;
+
+    @PostMapping("/register")
+    public AjaxResult register(@RequestBody RegisterBody user)
+    {
+        if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
+        {
+            return error("当前系统没有开启注册功能!");
+        }
+        String msg = registerService.register(user);
+        return StringUtils.isEmpty(msg) ? success() : error(msg);
+    }
+}

+ 263 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysRoleController.java

@@ -0,0 +1,263 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysDept;
+import com.kgraph.common.core.domain.entity.SysRole;
+import com.kgraph.common.core.domain.entity.SysUser;
+import com.kgraph.common.core.domain.model.LoginUser;
+import com.kgraph.common.core.page.TableDataInfo;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.poi.ExcelUtil;
+import com.kgraph.framework.web.service.SysPermissionService;
+import com.kgraph.framework.web.service.TokenService;
+import com.kgraph.system.domain.SysUserRole;
+import com.kgraph.system.service.ISysDeptService;
+import com.kgraph.system.service.ISysRoleService;
+import com.kgraph.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 角色信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/role")
+public class SysRoleController extends BaseController
+{
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    @Autowired
+    private SysPermissionService permissionService;
+
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysRole role)
+    {
+        startPage();
+        List<SysRole> list = roleService.selectRoleList(role);
+        return getDataTable(list);
+    }
+
+    @Log(title = "角色管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:role:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysRole role)
+    {
+        List<SysRole> list = roleService.selectRoleList(role);
+        ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
+        util.exportExcel(response, list, "角色数据");
+    }
+
+    /**
+     * 根据角色编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping(value = "/{roleId}")
+    public AjaxResult getInfo(@PathVariable Long roleId)
+    {
+        roleService.checkRoleDataScope(roleId);
+        return success(roleService.selectRoleById(roleId));
+    }
+
+    /**
+     * 新增角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:add')")
+    @Log(title = "角色管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysRole role)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+        {
+            return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+        {
+            return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setCreateBy(getUsername());
+        return toAjax(roleService.insertRole(role));
+
+    }
+
+    /**
+     * 修改保存角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
+        {
+            return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
+        }
+        else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
+        {
+            return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
+        }
+        role.setUpdateBy(getUsername());
+        
+        if (roleService.updateRole(role) > 0)
+        {
+            // 更新缓存用户权限
+            LoginUser loginUser = getLoginUser();
+            if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
+            {
+                loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
+                loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
+                tokenService.setLoginUser(loginUser);
+            }
+            return success();
+        }
+        return error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
+    }
+
+    /**
+     * 修改保存数据权限
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/dataScope")
+    public AjaxResult dataScope(@RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        return toAjax(roleService.authDataScope(role));
+    }
+
+    /**
+     * 状态修改
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysRole role)
+    {
+        roleService.checkRoleAllowed(role);
+        roleService.checkRoleDataScope(role.getRoleId());
+        role.setUpdateBy(getUsername());
+        return toAjax(roleService.updateRoleStatus(role));
+    }
+
+    /**
+     * 删除角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:remove')")
+    @Log(title = "角色管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{roleIds}")
+    public AjaxResult remove(@PathVariable Long[] roleIds)
+    {
+        return toAjax(roleService.deleteRoleByIds(roleIds));
+    }
+
+    /**
+     * 获取角色选择框列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping("/optionselect")
+    public AjaxResult optionselect()
+    {
+        return success(roleService.selectRoleAll());
+    }
+
+    /**
+     * 查询已分配用户角色列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/allocatedList")
+    public TableDataInfo allocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectAllocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询未分配用户角色列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:list')")
+    @GetMapping("/authUser/unallocatedList")
+    public TableDataInfo unallocatedList(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectUnallocatedList(user);
+        return getDataTable(list);
+    }
+
+    /**
+     * 取消授权用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/cancel")
+    public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
+    {
+        return toAjax(roleService.deleteAuthUser(userRole));
+    }
+
+    /**
+     * 批量取消授权用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/cancelAll")
+    public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
+    {
+        return toAjax(roleService.deleteAuthUsers(roleId, userIds));
+    }
+
+    /**
+     * 批量选择用户授权
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:edit')")
+    @Log(title = "角色管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authUser/selectAll")
+    public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
+    {
+        roleService.checkRoleDataScope(roleId);
+        return toAjax(roleService.insertAuthUsers(roleId, userIds));
+    }
+
+    /**
+     * 获取对应角色部门树列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:role:query')")
+    @GetMapping(value = "/deptTree/{roleId}")
+    public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
+        ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));
+        return ajax;
+    }
+}

+ 256 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/system/SysUserController.java

@@ -0,0 +1,256 @@
+package com.kgraph.web.controller.system;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.servlet.http.HttpServletResponse;
+
+import com.kgraph.common.annotation.Log;
+import com.kgraph.common.constant.UserConstants;
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.AjaxResult;
+import com.kgraph.common.core.domain.entity.SysDept;
+import com.kgraph.common.core.domain.entity.SysRole;
+import com.kgraph.common.core.domain.entity.SysUser;
+import com.kgraph.common.core.page.TableDataInfo;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.utils.SecurityUtils;
+import com.kgraph.common.utils.StringUtils;
+import com.kgraph.common.utils.poi.ExcelUtil;
+import com.kgraph.system.service.ISysDeptService;
+import com.kgraph.system.service.ISysPostService;
+import com.kgraph.system.service.ISysRoleService;
+import com.kgraph.system.service.ISysUserService;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 用户信息
+ * 
+ */
+@RestController
+@RequestMapping("/system/user")
+public class SysUserController extends BaseController
+{
+    @Autowired
+    private ISysUserService userService;
+
+    @Autowired
+    private ISysRoleService roleService;
+
+    @Autowired
+    private ISysDeptService deptService;
+
+    @Autowired
+    private ISysPostService postService;
+
+    /**
+     * 获取用户列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysUser user)
+    {
+        startPage();
+        List<SysUser> list = userService.selectUserList(user);
+        return getDataTable(list);
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('system:user:export')")
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysUser user)
+    {
+        List<SysUser> list = userService.selectUserList(user);
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        util.exportExcel(response, list, "用户数据");
+    }
+
+    @Log(title = "用户管理", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('system:user:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        List<SysUser> userList = util.importExcel(file.getInputStream());
+        String operName = getUsername();
+        String message = userService.importUser(userList, updateSupport, operName);
+        return success(message);
+    }
+
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response)
+    {
+        ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
+        util.importTemplateExcel(response, "用户数据");
+    }
+
+    /**
+     * 根据用户编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:query')")
+    @GetMapping(value = { "/", "/{userId}" })
+    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
+    {
+        userService.checkUserDataScope(userId);
+        AjaxResult ajax = AjaxResult.success();
+        List<SysRole> roles = roleService.selectRoleAll();
+        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        ajax.put("posts", postService.selectPostAll());
+        if (StringUtils.isNotNull(userId))
+        {
+            SysUser sysUser = userService.selectUserById(userId);
+            ajax.put(AjaxResult.DATA_TAG, sysUser);
+            ajax.put("postIds", postService.selectPostListByUserId(userId));
+            ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
+        }
+        return ajax;
+    }
+
+    /**
+     * 新增用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:add')")
+    @Log(title = "用户管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody SysUser user)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user)))
+        {
+            return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setCreateBy(getUsername());
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        return toAjax(userService.insertUser(user));
+    }
+
+    /**
+     * 修改用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getPhonenumber())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
+        }
+        else if (StringUtils.isNotEmpty(user.getEmail())
+                && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
+        {
+            return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
+        }
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUser(user));
+    }
+
+    /**
+     * 删除用户
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:remove')")
+    @Log(title = "用户管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{userIds}")
+    public AjaxResult remove(@PathVariable Long[] userIds)
+    {
+        if (ArrayUtils.contains(userIds, getUserId()))
+        {
+            return error("当前用户不能删除");
+        }
+        return toAjax(userService.deleteUserByIds(userIds));
+    }
+
+    /**
+     * 重置密码
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/resetPwd")
+    public AjaxResult resetPwd(@RequestBody SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.resetPwd(user));
+    }
+
+    /**
+     * 状态修改
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public AjaxResult changeStatus(@RequestBody SysUser user)
+    {
+        userService.checkUserAllowed(user);
+        userService.checkUserDataScope(user.getUserId());
+        user.setUpdateBy(getUsername());
+        return toAjax(userService.updateUserStatus(user));
+    }
+
+    /**
+     * 根据用户编号获取授权角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:query')")
+    @GetMapping("/authRole/{userId}")
+    public AjaxResult authRole(@PathVariable("userId") Long userId)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        SysUser user = userService.selectUserById(userId);
+        List<SysRole> roles = roleService.selectRolesByUserId(userId);
+        ajax.put("user", user);
+        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
+        return ajax;
+    }
+
+    /**
+     * 用户授权角色
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:edit')")
+    @Log(title = "用户管理", businessType = BusinessType.GRANT)
+    @PutMapping("/authRole")
+    public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
+    {
+        userService.checkUserDataScope(userId);
+        userService.insertUserAuth(userId, roleIds);
+        return success();
+    }
+
+    /**
+     * 获取部门树列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/deptTree")
+    public AjaxResult deptTree(SysDept dept)
+    {
+        return success(deptService.selectDeptTreeList(dept));
+    }
+}

+ 23 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/tool/SwaggerController.java

@@ -0,0 +1,23 @@
+package com.kgraph.web.controller.tool;
+
+import com.kgraph.common.core.controller.BaseController;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * swagger 接口
+ * 
+ */
+@Controller
+@RequestMapping("/tool/swagger")
+public class SwaggerController extends BaseController
+{
+    @PreAuthorize("@ss.hasPermi('tool:swagger:view')")
+    @GetMapping()
+    public String index()
+    {
+        return redirect("/swagger-ui.html");
+    }
+}

+ 183 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/tool/TestController.java

@@ -0,0 +1,183 @@
+package com.kgraph.web.controller.tool;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.kgraph.common.core.controller.BaseController;
+import com.kgraph.common.core.domain.R;
+import com.kgraph.common.utils.StringUtils;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * swagger 用户测试方法
+ * 
+ */
+@Api("用户信息管理")
+@RestController
+@RequestMapping("/test/user")
+public class TestController extends BaseController
+{
+    private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
+    {
+        users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
+        users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
+    }
+
+    @ApiOperation("获取用户列表")
+    @GetMapping("/list")
+    public R<List<UserEntity>> userList()
+    {
+        List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
+        return R.ok(userList);
+    }
+
+    @ApiOperation("获取用户详细")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @GetMapping("/{userId}")
+    public R<UserEntity> getUser(@PathVariable Integer userId)
+    {
+        if (!users.isEmpty() && users.containsKey(userId))
+        {
+            return R.ok(users.get(userId));
+        }
+        else
+        {
+            return R.fail("用户不存在");
+        }
+    }
+
+    @ApiOperation("新增用户")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
+        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
+        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
+    })
+    @PostMapping("/save")
+    public R<String> save(UserEntity user)
+    {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
+        {
+            return R.fail("用户ID不能为空");
+        }
+        users.put(user.getUserId(), user);
+        return R.ok();
+    }
+
+    @ApiOperation("更新用户")
+    @PutMapping("/update")
+    public R<String> update(@RequestBody UserEntity user)
+    {
+        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
+        {
+            return R.fail("用户ID不能为空");
+        }
+        if (users.isEmpty() || !users.containsKey(user.getUserId()))
+        {
+            return R.fail("用户不存在");
+        }
+        users.remove(user.getUserId());
+        users.put(user.getUserId(), user);
+        return R.ok();
+    }
+
+    @ApiOperation("删除用户信息")
+    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+    @DeleteMapping("/{userId}")
+    public R<String> delete(@PathVariable Integer userId)
+    {
+        if (!users.isEmpty() && users.containsKey(userId))
+        {
+            users.remove(userId);
+            return R.ok();
+        }
+        else
+        {
+            return R.fail("用户不存在");
+        }
+    }
+}
+
+@ApiModel(value = "UserEntity", description = "用户实体")
+class UserEntity
+{
+    @ApiModelProperty("用户ID")
+    private Integer userId;
+
+    @ApiModelProperty("用户名称")
+    private String username;
+
+    @ApiModelProperty("用户密码")
+    private String password;
+
+    @ApiModelProperty("用户手机")
+    private String mobile;
+
+    public UserEntity()
+    {
+
+    }
+
+    public UserEntity(Integer userId, String username, String password, String mobile)
+    {
+        this.userId = userId;
+        this.username = username;
+        this.password = password;
+        this.mobile = mobile;
+    }
+
+    public Integer getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(Integer userId)
+    {
+        this.userId = userId;
+    }
+
+    public String getUsername()
+    {
+        return username;
+    }
+
+    public void setUsername(String username)
+    {
+        this.username = username;
+    }
+
+    public String getPassword()
+    {
+        return password;
+    }
+
+    public void setPassword(String password)
+    {
+        this.password = password;
+    }
+
+    public String getMobile()
+    {
+        return mobile;
+    }
+
+    public void setMobile(String mobile)
+    {
+        this.mobile = mobile;
+    }
+}

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/typeDictController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.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.web.domain.typeDict;
+import com.kgraph.web.service.ItypeDictService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 用做存储类型,枚举类数据存储,Controller
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@RestController
+@RequestMapping("/common/typeDict")
+public class typeDictController extends BaseController
+{
+    @Autowired
+    private ItypeDictService typeDictService;
+
+    /**
+     * 查询用做存储类型,枚举类数据存储,列表
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(typeDict typeDict)
+    {
+        startPage();
+        List<typeDict> list = typeDictService.selecttypeDictList(typeDict);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出用做存储类型,枚举类数据存储,列表
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:export')")
+    @Log(title = "用做存储类型,枚举类数据存储,", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, typeDict typeDict)
+    {
+        List<typeDict> list = typeDictService.selecttypeDictList(typeDict);
+        ExcelUtil<typeDict> util = new ExcelUtil<typeDict>(typeDict.class);
+        util.exportExcel(response, list, "用做存储类型,枚举类数据存储,数据");
+    }
+
+    /**
+     * 获取用做存储类型,枚举类数据存储,详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(typeDictService.selecttypeDictById(id));
+    }
+
+    /**
+     * 新增用做存储类型,枚举类数据存储,
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:add')")
+    @Log(title = "用做存储类型,枚举类数据存储,", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody typeDict typeDict)
+    {
+        return toAjax(typeDictService.inserttypeDict(typeDict));
+    }
+
+    /**
+     * 修改用做存储类型,枚举类数据存储,
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:edit')")
+    @Log(title = "用做存储类型,枚举类数据存储,", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody typeDict typeDict)
+    {
+        return toAjax(typeDictService.updatetypeDict(typeDict));
+    }
+
+    /**
+     * 删除用做存储类型,枚举类数据存储,
+     */
+    @PreAuthorize("@ss.hasPermi('common:typeDict:remove')")
+    @Log(title = "用做存储类型,枚举类数据存储,", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(typeDictService.deletetypeDictByIds(ids));
+    }
+}

+ 125 - 0
kgraph-admin/src/main/java/com/kgraph/web/core/config/SwaggerConfig.java

@@ -0,0 +1,125 @@
+package com.kgraph.web.core.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.kgraph.common.config.KgraphConfig;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.ApiKey;
+import springfox.documentation.service.AuthorizationScope;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.SecurityReference;
+import springfox.documentation.service.SecurityScheme;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+
+/**
+ * Swagger2的接口配置
+ * 
+ */
+@Configuration
+public class SwaggerConfig
+{
+    /** 系统基础配置 */
+    @Autowired
+    private KgraphConfig kgraphConfig;
+
+    /** 是否开启swagger */
+    @Value("${swagger.enabled}")
+    private boolean enabled;
+
+    /** 设置请求的统一前缀 */
+    @Value("${swagger.pathMapping}")
+    private String pathMapping;
+
+    /**
+     * 创建API
+     */
+    @Bean
+    public Docket createRestApi()
+    {
+        return new Docket(DocumentationType.OAS_30)
+                // 是否启用Swagger
+                .enable(enabled)
+                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+                .apiInfo(apiInfo())
+                // 设置哪些接口暴露给Swagger展示
+                .select()
+                // 扫描所有有注解的api,用这种方式更灵活
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                // 扫描指定包中的swagger注解
+                // .apis(RequestHandlerSelectors.basePackage("com.kgraph.project.tool.swagger"))
+                // 扫描所有 .apis(RequestHandlerSelectors.any())
+                .paths(PathSelectors.any())
+                .build()
+                /* 设置安全模式,swagger可以设置访问token */
+                .securitySchemes(securitySchemes())
+                .securityContexts(securityContexts())
+                .pathMapping(pathMapping);
+    }
+
+    /**
+     * 安全模式,这里指定token通过Authorization头请求头传递
+     */
+    private List<SecurityScheme> securitySchemes()
+    {
+        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
+        apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
+        return apiKeyList;
+    }
+
+    /**
+     * 安全上下文
+     */
+    private List<SecurityContext> securityContexts()
+    {
+        List<SecurityContext> securityContexts = new ArrayList<>();
+        securityContexts.add(
+                SecurityContext.builder()
+                        .securityReferences(defaultAuth())
+                        .operationSelector(o -> o.requestMappingPattern().matches("/.*"))
+                        .build());
+        return securityContexts;
+    }
+
+    /**
+     * 默认的安全上引用
+     */
+    private List<SecurityReference> defaultAuth()
+    {
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        List<SecurityReference> securityReferences = new ArrayList<>();
+        securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
+        return securityReferences;
+    }
+
+    /**
+     * 添加摘要信息
+     */
+    private ApiInfo apiInfo()
+    {
+        // 用ApiInfoBuilder进行定制
+        return new ApiInfoBuilder()
+                // 设置标题
+                .title("标题:知识图谱系统_接口文档")
+                // 描述
+                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
+                // 作者信息
+                .contact(new Contact(kgraphConfig.getName(), null, null))
+                // 版本
+                .version("版本号:" + kgraphConfig.getVersion())
+                .build();
+    }
+}

+ 237 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/DataFile.java

@@ -0,0 +1,237 @@
+package com.kgraph.web.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_file
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class DataFile extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 文件名 */
+    @Excel(name = "文件名")
+    private String fileName;
+
+    /** 文件类型 */
+    @Excel(name = "文件类型")
+    private Long fileType;
+
+    /** 文件后缀名 */
+    @Excel(name = "文件后缀名")
+    private String typeName;
+
+    /** 装备型号 */
+    @Excel(name = "装备型号")
+    private String equipType;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 系统id */
+    @Excel(name = "系统id")
+    private Long sysId;
+
+    /** 专业id */
+    @Excel(name = "专业id")
+    private Long majorId;
+
+    /** 专业名 */
+    @Excel(name = "专业名")
+    private String majorName;
+
+    /** 部件ID */
+    @Excel(name = "部件ID")
+    private Long partId;
+
+    /** 部件名 */
+    @Excel(name = "部件名")
+    private String partName;
+
+    /** 导入时间 */
+    @Excel(name = "导入时间")
+    private String uploadTime;
+
+    /** 简介 */
+    @Excel(name = "简介")
+    private String descript;
+
+    /** 版本,期号 */
+    @Excel(name = "版本,期号")
+    private String fileVer;
+
+    /** 存储路径 */
+    @Excel(name = "存储路径")
+    private String filePath;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setFileName(String fileName) 
+    {
+        this.fileName = fileName;
+    }
+
+    public String getFileName() 
+    {
+        return fileName;
+    }
+    public void setFileType(Long fileType) 
+    {
+        this.fileType = fileType;
+    }
+
+    public Long getFileType() 
+    {
+        return fileType;
+    }
+    public void setTypeName(String typeName) 
+    {
+        this.typeName = typeName;
+    }
+
+    public String getTypeName() 
+    {
+        return typeName;
+    }
+    public void setEquipType(String equipType) 
+    {
+        this.equipType = equipType;
+    }
+
+    public String getEquipType() 
+    {
+        return equipType;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setSysId(Long sysId) 
+    {
+        this.sysId = sysId;
+    }
+
+    public Long getSysId() 
+    {
+        return sysId;
+    }
+    public void setMajorId(Long majorId) 
+    {
+        this.majorId = majorId;
+    }
+
+    public Long getMajorId() 
+    {
+        return majorId;
+    }
+    public void setMajorName(String majorName) 
+    {
+        this.majorName = majorName;
+    }
+
+    public String getMajorName() 
+    {
+        return majorName;
+    }
+    public void setPartId(Long partId) 
+    {
+        this.partId = partId;
+    }
+
+    public Long getPartId() 
+    {
+        return partId;
+    }
+    public void setPartName(String partName) 
+    {
+        this.partName = partName;
+    }
+
+    public String getPartName() 
+    {
+        return partName;
+    }
+    public void setUploadTime(String uploadTime) 
+    {
+        this.uploadTime = uploadTime;
+    }
+
+    public String getUploadTime() 
+    {
+        return uploadTime;
+    }
+    public void setDescript(String descript) 
+    {
+        this.descript = descript;
+    }
+
+    public String getDescript() 
+    {
+        return descript;
+    }
+    public void setFileVer(String fileVer) 
+    {
+        this.fileVer = fileVer;
+    }
+
+    public String getFileVer() 
+    {
+        return fileVer;
+    }
+    public void setFilePath(String filePath) 
+    {
+        this.filePath = filePath;
+    }
+
+    public String getFilePath() 
+    {
+        return filePath;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("fileName", getFileName())
+            .append("fileType", getFileType())
+            .append("typeName", getTypeName())
+            .append("equipType", getEquipType())
+            .append("sysName", getSysName())
+            .append("sysId", getSysId())
+            .append("majorId", getMajorId())
+            .append("majorName", getMajorName())
+            .append("partId", getPartId())
+            .append("partName", getPartName())
+            .append("uploadTime", getUploadTime())
+            .append("descript", getDescript())
+            .append("fileVer", getFileVer())
+            .append("filePath", getFilePath())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 181 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/Equip.java

@@ -0,0 +1,181 @@
+package com.kgraph.web.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_equip
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class Equip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 装备名 */
+    @Excel(name = "装备名")
+    private String equipName;
+
+    /** 编号 */
+    @Excel(name = "编号")
+    private String equipNo;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String equipType;
+
+    /** 战区id */
+    @Excel(name = "战区id")
+    private Long deptId;
+
+    /** 战区 */
+    @Excel(name = "战区")
+    private String deptName;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String equipStatus;
+
+    /** 故障累计 */
+    @Excel(name = "故障累计")
+    private Integer faltCnt;
+
+    /** 当月故障累计 */
+    @Excel(name = "当月故障累计")
+    private Integer faltCntCur;
+
+    /** 已修复累计 */
+    @Excel(name = "已修复累计")
+    private Integer faltRepaired;
+
+    /** 当月已修复累计 */
+    @Excel(name = "当月已修复累计")
+    private Integer faltRepairedCur;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setEquipName(String equipName) 
+    {
+        this.equipName = equipName;
+    }
+
+    public String getEquipName() 
+    {
+        return equipName;
+    }
+    public void setEquipNo(String equipNo) 
+    {
+        this.equipNo = equipNo;
+    }
+
+    public String getEquipNo() 
+    {
+        return equipNo;
+    }
+    public void setEquipType(String equipType) 
+    {
+        this.equipType = equipType;
+    }
+
+    public String getEquipType() 
+    {
+        return equipType;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setEquipStatus(String equipStatus) 
+    {
+        this.equipStatus = equipStatus;
+    }
+
+    public String getEquipStatus() 
+    {
+        return equipStatus;
+    }
+    public void setFaltCnt(Integer faltCnt) 
+    {
+        this.faltCnt = faltCnt;
+    }
+
+    public Integer getFaltCnt() 
+    {
+        return faltCnt;
+    }
+    public void setFaltCntCur(Integer faltCntCur) 
+    {
+        this.faltCntCur = faltCntCur;
+    }
+
+    public Integer getFaltCntCur() 
+    {
+        return faltCntCur;
+    }
+    public void setFaltRepaired(Integer faltRepaired) 
+    {
+        this.faltRepaired = faltRepaired;
+    }
+
+    public Integer getFaltRepaired() 
+    {
+        return faltRepaired;
+    }
+    public void setFaltRepairedCur(Integer faltRepairedCur) 
+    {
+        this.faltRepairedCur = faltRepairedCur;
+    }
+
+    public Integer getFaltRepairedCur() 
+    {
+        return faltRepairedCur;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("equipName", getEquipName())
+            .append("equipNo", getEquipNo())
+            .append("equipType", getEquipType())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("equipStatus", getEquipStatus())
+            .append("faltCnt", getFaltCnt())
+            .append("faltCntCur", getFaltCntCur())
+            .append("faltRepaired", getFaltRepaired())
+            .append("faltRepairedCur", getFaltRepairedCur())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 195 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/FaultInfo.java

@@ -0,0 +1,195 @@
+package com.kgraph.web.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_fault
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class FaultInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 故障名 */
+    @Excel(name = "故障名")
+    private String faultName;
+
+    /** 故障类型 */
+    @Excel(name = "故障类型")
+    private String faultType;
+
+    /** 平台 */
+    @Excel(name = "平台")
+    private String platName;
+
+    /** 系统 */
+    @Excel(name = "系统")
+    private Long sysId;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 专业id */
+    @Excel(name = "专业id")
+    private Long majorId;
+
+    /** 专业名 */
+    @Excel(name = "专业名")
+    private String majorName;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String descript;
+
+    /** 原因 */
+    @Excel(name = "原因")
+    private String faultReason;
+
+    /** 信息来源 */
+    @Excel(name = "信息来源")
+    private String faultFrom;
+
+    /** 解决办法 */
+    @Excel(name = "解决办法")
+    private String faultResult;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setFaultName(String faultName) 
+    {
+        this.faultName = faultName;
+    }
+
+    public String getFaultName() 
+    {
+        return faultName;
+    }
+    public void setFaultType(String faultType) 
+    {
+        this.faultType = faultType;
+    }
+
+    public String getFaultType() 
+    {
+        return faultType;
+    }
+    public void setPlatName(String platName) 
+    {
+        this.platName = platName;
+    }
+
+    public String getPlatName() 
+    {
+        return platName;
+    }
+    public void setSysId(Long sysId) 
+    {
+        this.sysId = sysId;
+    }
+
+    public Long getSysId() 
+    {
+        return sysId;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setMajorId(Long majorId) 
+    {
+        this.majorId = majorId;
+    }
+
+    public Long getMajorId() 
+    {
+        return majorId;
+    }
+    public void setMajorName(String majorName) 
+    {
+        this.majorName = majorName;
+    }
+
+    public String getMajorName() 
+    {
+        return majorName;
+    }
+    public void setDescript(String descript) 
+    {
+        this.descript = descript;
+    }
+
+    public String getDescript() 
+    {
+        return descript;
+    }
+    public void setFaultReason(String faultReason) 
+    {
+        this.faultReason = faultReason;
+    }
+
+    public String getFaultReason() 
+    {
+        return faultReason;
+    }
+    public void setFaultFrom(String faultFrom) 
+    {
+        this.faultFrom = faultFrom;
+    }
+
+    public String getFaultFrom() 
+    {
+        return faultFrom;
+    }
+    public void setFaultResult(String faultResult) 
+    {
+        this.faultResult = faultResult;
+    }
+
+    public String getFaultResult() 
+    {
+        return faultResult;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("faultName", getFaultName())
+            .append("faultType", getFaultType())
+            .append("platName", getPlatName())
+            .append("sysId", getSysId())
+            .append("sysName", getSysName())
+            .append("majorId", getMajorId())
+            .append("majorName", getMajorName())
+            .append("descript", getDescript())
+            .append("faultReason", getFaultReason())
+            .append("faultFrom", getFaultFrom())
+            .append("faultResult", getFaultResult())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 362 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/FaultRecord.java

@@ -0,0 +1,362 @@
+package com.kgraph.web.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_fault_record
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class FaultRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String equipType;
+
+    /** 装备编号 */
+    @Excel(name = "装备编号")
+    private String equipNo;
+
+    /** 战区 */
+    @Excel(name = "战区")
+    private String equipDept;
+
+    /** 系统id */
+    @Excel(name = "系统id")
+    private Long sysId;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 部件id */
+    @Excel(name = "部件id")
+    private Long partId;
+
+    /** 部件名 */
+    @Excel(name = "部件名")
+    private String partName;
+
+    /** 替换件id */
+    @Excel(name = "替换件id")
+    private Long replacePartId;
+
+    /** 替换件名 */
+    @Excel(name = "替换件名")
+    private String replacePartName;
+
+    /** 故障类型 */
+    @Excel(name = "故障类型")
+    private String faultType;
+
+    /** 发现时间 */
+    @Excel(name = "发现时间")
+    private String discoverTime;
+
+    /** 发生时间 */
+    @Excel(name = "发生时间")
+    private String occurTime;
+
+    /** 发生时机 */
+    @Excel(name = "发生时机")
+    private String occurOppur;
+
+    /** 发现人 */
+    @Excel(name = "发现人")
+    private String discoverPeople;
+
+    /** 发生地 */
+    @Excel(name = "发生地")
+    private String occurPlace;
+
+    /** 报告部门 */
+    @Excel(name = "报告部门")
+    private String reportDept;
+
+    /** 审核人 */
+    @Excel(name = "审核人")
+    private String reviewer;
+
+    /** 确认方法 */
+    @Excel(name = "确认方法")
+    private String confirmDescript;
+
+    /** 确认人 */
+    @Excel(name = "确认人")
+    private String confirmUser;
+
+    /** 排故人 */
+    @Excel(name = "排故人")
+    private String repairUser;
+
+    /** 排故用时 */
+    @Excel(name = "排故用时")
+    private String repairTimeCnt;
+
+    /** 解决时间 */
+    @Excel(name = "解决时间")
+    private String repairTime;
+
+    /** 排故用人数 */
+    @Excel(name = "排故用人数")
+    private Long repairPeopleCnt;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setEquipType(String equipType) 
+    {
+        this.equipType = equipType;
+    }
+
+    public String getEquipType() 
+    {
+        return equipType;
+    }
+    public void setEquipNo(String equipNo) 
+    {
+        this.equipNo = equipNo;
+    }
+
+    public String getEquipNo() 
+    {
+        return equipNo;
+    }
+    public void setEquipDept(String equipDept) 
+    {
+        this.equipDept = equipDept;
+    }
+
+    public String getEquipDept() 
+    {
+        return equipDept;
+    }
+    public void setSysId(Long sysId) 
+    {
+        this.sysId = sysId;
+    }
+
+    public Long getSysId() 
+    {
+        return sysId;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setPartId(Long partId) 
+    {
+        this.partId = partId;
+    }
+
+    public Long getPartId() 
+    {
+        return partId;
+    }
+    public void setPartName(String partName) 
+    {
+        this.partName = partName;
+    }
+
+    public String getPartName() 
+    {
+        return partName;
+    }
+    public void setReplacePartId(Long replacePartId) 
+    {
+        this.replacePartId = replacePartId;
+    }
+
+    public Long getReplacePartId() 
+    {
+        return replacePartId;
+    }
+    public void setReplacePartName(String replacePartName) 
+    {
+        this.replacePartName = replacePartName;
+    }
+
+    public String getReplacePartName() 
+    {
+        return replacePartName;
+    }
+    public void setFaultType(String faultType) 
+    {
+        this.faultType = faultType;
+    }
+
+    public String getFaultType() 
+    {
+        return faultType;
+    }
+    public void setDiscoverTime(String discoverTime) 
+    {
+        this.discoverTime = discoverTime;
+    }
+
+    public String getDiscoverTime() 
+    {
+        return discoverTime;
+    }
+    public void setOccurTime(String occurTime) 
+    {
+        this.occurTime = occurTime;
+    }
+
+    public String getOccurTime() 
+    {
+        return occurTime;
+    }
+    public void setOccurOppur(String occurOppur) 
+    {
+        this.occurOppur = occurOppur;
+    }
+
+    public String getOccurOppur() 
+    {
+        return occurOppur;
+    }
+    public void setDiscoverPeople(String discoverPeople) 
+    {
+        this.discoverPeople = discoverPeople;
+    }
+
+    public String getDiscoverPeople() 
+    {
+        return discoverPeople;
+    }
+    public void setOccurPlace(String occurPlace) 
+    {
+        this.occurPlace = occurPlace;
+    }
+
+    public String getOccurPlace() 
+    {
+        return occurPlace;
+    }
+    public void setReportDept(String reportDept) 
+    {
+        this.reportDept = reportDept;
+    }
+
+    public String getReportDept() 
+    {
+        return reportDept;
+    }
+    public void setReviewer(String reviewer) 
+    {
+        this.reviewer = reviewer;
+    }
+
+    public String getReviewer() 
+    {
+        return reviewer;
+    }
+    public void setConfirmDescript(String confirmDescript) 
+    {
+        this.confirmDescript = confirmDescript;
+    }
+
+    public String getConfirmDescript() 
+    {
+        return confirmDescript;
+    }
+    public void setConfirmUser(String confirmUser) 
+    {
+        this.confirmUser = confirmUser;
+    }
+
+    public String getConfirmUser() 
+    {
+        return confirmUser;
+    }
+    public void setRepairUser(String repairUser) 
+    {
+        this.repairUser = repairUser;
+    }
+
+    public String getRepairUser() 
+    {
+        return repairUser;
+    }
+    public void setRepairTimeCnt(String repairTimeCnt) 
+    {
+        this.repairTimeCnt = repairTimeCnt;
+    }
+
+    public String getRepairTimeCnt() 
+    {
+        return repairTimeCnt;
+    }
+    public void setRepairTime(String repairTime) 
+    {
+        this.repairTime = repairTime;
+    }
+
+    public String getRepairTime() 
+    {
+        return repairTime;
+    }
+    public void setRepairPeopleCnt(Long repairPeopleCnt) 
+    {
+        this.repairPeopleCnt = repairPeopleCnt;
+    }
+
+    public Long getRepairPeopleCnt() 
+    {
+        return repairPeopleCnt;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("equipType", getEquipType())
+            .append("equipNo", getEquipNo())
+            .append("equipDept", getEquipDept())
+            .append("sysId", getSysId())
+            .append("sysName", getSysName())
+            .append("partId", getPartId())
+            .append("partName", getPartName())
+            .append("replacePartId", getReplacePartId())
+            .append("replacePartName", getReplacePartName())
+            .append("faultType", getFaultType())
+            .append("discoverTime", getDiscoverTime())
+            .append("occurTime", getOccurTime())
+            .append("occurOppur", getOccurOppur())
+            .append("discoverPeople", getDiscoverPeople())
+            .append("occurPlace", getOccurPlace())
+            .append("reportDept", getReportDept())
+            .append("reviewer", getReviewer())
+            .append("confirmDescript", getConfirmDescript())
+            .append("confirmUser", getConfirmUser())
+            .append("repairUser", getRepairUser())
+            .append("repairTimeCnt", getRepairTimeCnt())
+            .append("repairTime", getRepairTime())
+            .append("repairPeopleCnt", getRepairPeopleCnt())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 93 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/Major.java

@@ -0,0 +1,93 @@
+package com.kgraph.web.domain;
+
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 专业对象 t_major
+ * 
+ * @author kgraph
+ * @date 2023-02-14
+ */
+public class Major extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 专业名 */
+    @Excel(name = "专业名")
+    private String majorName;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 系统id */
+    @Excel(name = "系统id")
+    private Long sysId;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String description;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMajorName(String majorName) 
+    {
+        this.majorName = majorName;
+    }
+
+    public String getMajorName() 
+    {
+        return majorName;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setSysId(Long sysId) 
+    {
+        this.sysId = sysId;
+    }
+
+    public Long getSysId() 
+    {
+        return sysId;
+    }
+    public void setDescription(String description) 
+    {
+        this.description = description;
+    }
+
+    public String getDescription() 
+    {
+        return description;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("majorName", getMajorName())
+            .append("sysName", getSysName())
+            .append("sysId", getSysId())
+            .append("description", getDescription())
+            .toString();
+    }
+}

+ 339 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/equipParts.java

@@ -0,0 +1,339 @@
+package com.kgraph.web.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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_parts
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class equipParts extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 部件名 */
+    @Excel(name = "部件名")
+    private String partName;
+
+    /** 所属系统id */
+    @Excel(name = "所属系统id")
+    private Long sysId;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 专业id */
+    @Excel(name = "专业id")
+    private Long majorId;
+
+    /** 专业名 */
+    @Excel(name = "专业名")
+    private String majorName;
+
+    /** 编号 */
+    @Excel(name = "编号")
+    private String partNo;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String partType;
+
+    /** 工厂名 */
+    @Excel(name = "工厂名")
+    private String factory;
+
+    /** 修理厂名 */
+    @Excel(name = "修理厂名")
+    private String factoryRepaired;
+
+    /** 出厂日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date exFacDate;
+
+    /** 维修日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "维修日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date repairDate;
+
+    /** 维修次数 */
+    @Excel(name = "维修次数")
+    private Long repairCnt;
+
+    /** 使用时长 */
+    @Excel(name = "使用时长")
+    private String workedTime;
+
+    /** 此次工作时长 */
+    @Excel(name = "此次工作时长")
+    private String workedTimeCur;
+
+    /** 此次上线时间 */
+    @Excel(name = "此次上线时间")
+    private String workBeginTime;
+
+    /** 简介 */
+    @Excel(name = "简介")
+    private String descprit;
+
+    /** 当前状态 */
+    @Excel(name = "当前状态")
+    private String curStatus;
+
+    /** 故障累计 */
+    @Excel(name = "故障累计")
+    private Integer faltCnt;
+
+    /** 当月故障累计 */
+    @Excel(name = "当月故障累计")
+    private Integer faltCntCur;
+
+    /** 已修复累计 */
+    @Excel(name = "已修复累计")
+    private Integer faltRepaired;
+
+    /** 当月已修复累计 */
+    @Excel(name = "当月已修复累计")
+    private Integer faltRepairedCur;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPartName(String partName) 
+    {
+        this.partName = partName;
+    }
+
+    public String getPartName() 
+    {
+        return partName;
+    }
+    public void setSysId(Long sysId) 
+    {
+        this.sysId = sysId;
+    }
+
+    public Long getSysId() 
+    {
+        return sysId;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setMajorId(Long majorId) 
+    {
+        this.majorId = majorId;
+    }
+
+    public Long getMajorId() 
+    {
+        return majorId;
+    }
+    public void setMajorName(String majorName) 
+    {
+        this.majorName = majorName;
+    }
+
+    public String getMajorName() 
+    {
+        return majorName;
+    }
+    public void setPartNo(String partNo) 
+    {
+        this.partNo = partNo;
+    }
+
+    public String getPartNo() 
+    {
+        return partNo;
+    }
+    public void setPartType(String partType) 
+    {
+        this.partType = partType;
+    }
+
+    public String getPartType() 
+    {
+        return partType;
+    }
+    public void setFactory(String factory) 
+    {
+        this.factory = factory;
+    }
+
+    public String getFactory() 
+    {
+        return factory;
+    }
+    public void setFactoryRepaired(String factoryRepaired) 
+    {
+        this.factoryRepaired = factoryRepaired;
+    }
+
+    public String getFactoryRepaired() 
+    {
+        return factoryRepaired;
+    }
+    public void setExFacDate(Date exFacDate) 
+    {
+        this.exFacDate = exFacDate;
+    }
+
+    public Date getExFacDate() 
+    {
+        return exFacDate;
+    }
+    public void setRepairDate(Date repairDate) 
+    {
+        this.repairDate = repairDate;
+    }
+
+    public Date getRepairDate() 
+    {
+        return repairDate;
+    }
+    public void setRepairCnt(Long repairCnt) 
+    {
+        this.repairCnt = repairCnt;
+    }
+
+    public Long getRepairCnt() 
+    {
+        return repairCnt;
+    }
+    public void setWorkedTime(String workedTime) 
+    {
+        this.workedTime = workedTime;
+    }
+
+    public String getWorkedTime() 
+    {
+        return workedTime;
+    }
+    public void setWorkedTimeCur(String workedTimeCur) 
+    {
+        this.workedTimeCur = workedTimeCur;
+    }
+
+    public String getWorkedTimeCur() 
+    {
+        return workedTimeCur;
+    }
+    public void setWorkBeginTime(String workBeginTime) 
+    {
+        this.workBeginTime = workBeginTime;
+    }
+
+    public String getWorkBeginTime() 
+    {
+        return workBeginTime;
+    }
+    public void setDescprit(String descprit) 
+    {
+        this.descprit = descprit;
+    }
+
+    public String getDescprit() 
+    {
+        return descprit;
+    }
+    public void setCurStatus(String curStatus) 
+    {
+        this.curStatus = curStatus;
+    }
+
+    public String getCurStatus() 
+    {
+        return curStatus;
+    }
+    public void setFaltCnt(Integer faltCnt) 
+    {
+        this.faltCnt = faltCnt;
+    }
+
+    public Integer getFaltCnt() 
+    {
+        return faltCnt;
+    }
+    public void setFaltCntCur(Integer faltCntCur) 
+    {
+        this.faltCntCur = faltCntCur;
+    }
+
+    public Integer getFaltCntCur() 
+    {
+        return faltCntCur;
+    }
+    public void setFaltRepaired(Integer faltRepaired) 
+    {
+        this.faltRepaired = faltRepaired;
+    }
+
+    public Integer getFaltRepaired() 
+    {
+        return faltRepaired;
+    }
+    public void setFaltRepairedCur(Integer faltRepairedCur) 
+    {
+        this.faltRepairedCur = faltRepairedCur;
+    }
+
+    public Integer getFaltRepairedCur() 
+    {
+        return faltRepairedCur;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("partName", getPartName())
+            .append("sysId", getSysId())
+            .append("sysName", getSysName())
+            .append("majorId", getMajorId())
+            .append("majorName", getMajorName())
+            .append("partNo", getPartNo())
+            .append("partType", getPartType())
+            .append("factory", getFactory())
+            .append("factoryRepaired", getFactoryRepaired())
+            .append("exFacDate", getExFacDate())
+            .append("repairDate", getRepairDate())
+            .append("repairCnt", getRepairCnt())
+            .append("workedTime", getWorkedTime())
+            .append("workedTimeCur", getWorkedTimeCur())
+            .append("workBeginTime", getWorkBeginTime())
+            .append("descprit", getDescprit())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("curStatus", getCurStatus())
+            .append("updateTime", getUpdateTime())
+            .append("faltCnt", getFaltCnt())
+            .append("faltCntCur", getFaltCntCur())
+            .append("faltRepaired", getFaltRepaired())
+            .append("faltRepairedCur", getFaltRepairedCur())
+            .toString();
+    }
+}

+ 265 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/equipSys.java

@@ -0,0 +1,265 @@
+package com.kgraph.web.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_sys
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class equipSys extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 系统名 */
+    @Excel(name = "系统名")
+    private String sysName;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String sysType;
+
+    /** 上层系统id */
+    @Excel(name = "上层系统id")
+    private Integer parentId;
+
+    /** 上层系统名 */
+    @Excel(name = "上层系统名")
+    private String parentName;
+
+    /** 子系统数 */
+    @Excel(name = "子系统数")
+    private Long childCnt;
+
+    /** 专业id */
+    @Excel(name = "专业id")
+    private Long majorId;
+
+    /** 专业名 */
+    @Excel(name = "专业名")
+    private String majorName;
+
+    /** 平台id */
+    @Excel(name = "平台id")
+    private Long platId;
+
+    /** 平台名 */
+    @Excel(name = "平台名")
+    private String platName;
+
+    /** 部件数 */
+    @Excel(name = "部件数")
+    private Long partCnt;
+
+    /** 简介 */
+    @Excel(name = "简介")
+    private String descprit;
+
+    /** 当前状态 */
+    @Excel(name = "当前状态")
+    private String curStatus;
+
+    /** 故障累计 */
+    @Excel(name = "故障累计")
+    private Integer faltCnt;
+
+    /** 当月故障累计 */
+    @Excel(name = "当月故障累计")
+    private Integer faltCntCur;
+
+    /** 已修复累计 */
+    @Excel(name = "已修复累计")
+    private Integer faltRepaired;
+
+    /** 当月已修复累计 */
+    @Excel(name = "当月已修复累计")
+    private Integer faltRepairedCur;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSysName(String sysName) 
+    {
+        this.sysName = sysName;
+    }
+
+    public String getSysName() 
+    {
+        return sysName;
+    }
+    public void setSysType(String sysType) 
+    {
+        this.sysType = sysType;
+    }
+
+    public String getSysType() 
+    {
+        return sysType;
+    }
+    public void setParentId(Integer parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Integer getParentId() 
+    {
+        return parentId;
+    }
+    public void setParentName(String parentName) 
+    {
+        this.parentName = parentName;
+    }
+
+    public String getParentName() 
+    {
+        return parentName;
+    }
+    public void setChildCnt(Long childCnt) 
+    {
+        this.childCnt = childCnt;
+    }
+
+    public Long getChildCnt() 
+    {
+        return childCnt;
+    }
+    public void setMajorId(Long majorId) 
+    {
+        this.majorId = majorId;
+    }
+
+    public Long getMajorId() 
+    {
+        return majorId;
+    }
+    public void setMajorName(String majorName) 
+    {
+        this.majorName = majorName;
+    }
+
+    public String getMajorName() 
+    {
+        return majorName;
+    }
+    public void setPlatId(Long platId) 
+    {
+        this.platId = platId;
+    }
+
+    public Long getPlatId() 
+    {
+        return platId;
+    }
+    public void setPlatName(String platName) 
+    {
+        this.platName = platName;
+    }
+
+    public String getPlatName() 
+    {
+        return platName;
+    }
+    public void setPartCnt(Long partCnt) 
+    {
+        this.partCnt = partCnt;
+    }
+
+    public Long getPartCnt() 
+    {
+        return partCnt;
+    }
+    public void setDescprit(String descprit) 
+    {
+        this.descprit = descprit;
+    }
+
+    public String getDescprit() 
+    {
+        return descprit;
+    }
+    public void setCurStatus(String curStatus) 
+    {
+        this.curStatus = curStatus;
+    }
+
+    public String getCurStatus() 
+    {
+        return curStatus;
+    }
+    public void setFaltCnt(Integer faltCnt) 
+    {
+        this.faltCnt = faltCnt;
+    }
+
+    public Integer getFaltCnt() 
+    {
+        return faltCnt;
+    }
+    public void setFaltCntCur(Integer faltCntCur) 
+    {
+        this.faltCntCur = faltCntCur;
+    }
+
+    public Integer getFaltCntCur() 
+    {
+        return faltCntCur;
+    }
+    public void setFaltRepaired(Integer faltRepaired) 
+    {
+        this.faltRepaired = faltRepaired;
+    }
+
+    public Integer getFaltRepaired() 
+    {
+        return faltRepaired;
+    }
+    public void setFaltRepairedCur(Integer faltRepairedCur) 
+    {
+        this.faltRepairedCur = faltRepairedCur;
+    }
+
+    public Integer getFaltRepairedCur() 
+    {
+        return faltRepairedCur;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("sysName", getSysName())
+            .append("sysType", getSysType())
+            .append("parentId", getParentId())
+            .append("parentName", getParentName())
+            .append("childCnt", getChildCnt())
+            .append("majorId", getMajorId())
+            .append("majorName", getMajorName())
+            .append("platId", getPlatId())
+            .append("platName", getPlatName())
+            .append("partCnt", getPartCnt())
+            .append("descprit", getDescprit())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("curStatus", getCurStatus())
+            .append("faltCnt", getFaltCnt())
+            .append("faltCntCur", getFaltCntCur())
+            .append("faltRepaired", getFaltRepaired())
+            .append("faltRepairedCur", getFaltRepairedCur())
+            .toString();
+    }
+}

+ 97 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/platform.java

@@ -0,0 +1,97 @@
+package com.kgraph.web.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_platform
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class platform extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 平台名 */
+    @Excel(name = "平台名")
+    private String platName;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String platType;
+
+    /** 版本 */
+    @Excel(name = "版本")
+    private String platVer;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String descript;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPlatName(String platName) 
+    {
+        this.platName = platName;
+    }
+
+    public String getPlatName() 
+    {
+        return platName;
+    }
+    public void setPlatType(String platType) 
+    {
+        this.platType = platType;
+    }
+
+    public String getPlatType() 
+    {
+        return platType;
+    }
+    public void setPlatVer(String platVer) 
+    {
+        this.platVer = platVer;
+    }
+
+    public String getPlatVer() 
+    {
+        return platVer;
+    }
+    public void setDescript(String descript) 
+    {
+        this.descript = descript;
+    }
+
+    public String getDescript() 
+    {
+        return descript;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("platName", getPlatName())
+            .append("platType", getPlatType())
+            .append("platVer", getPlatVer())
+            .append("descript", getDescript())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 83 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/typeDict.java

@@ -0,0 +1,83 @@
+package com.kgraph.web.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_type_dict
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public class typeDict extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 类型名 */
+    @Excel(name = "类型名")
+    private String typeName;
+
+    /** 父类型id */
+    @Excel(name = "父类型id")
+    private Integer parentId;
+
+    /** 父类型名 */
+    @Excel(name = "父类型名")
+    private String parentName;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setTypeName(String typeName) 
+    {
+        this.typeName = typeName;
+    }
+
+    public String getTypeName() 
+    {
+        return typeName;
+    }
+    public void setParentId(Integer parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Integer getParentId() 
+    {
+        return parentId;
+    }
+    public void setParentName(String parentName) 
+    {
+        this.parentName = parentName;
+    }
+
+    public String getParentName() 
+    {
+        return parentName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("typeName", getTypeName())
+            .append("parentId", getParentId())
+            .append("parentName", getParentName())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/DataFileMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.DataFile;
+
+/**
+ * 文件管理Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface DataFileMapper 
+{
+    /**
+     * 查询文件管理
+     * 
+     * @param id 文件管理主键
+     * @return 文件管理
+     */
+    public DataFile selectDataFileById(Long id);
+
+    /**
+     * 查询文件管理列表
+     * 
+     * @param dataFile 文件管理
+     * @return 文件管理集合
+     */
+    public List<DataFile> selectDataFileList(DataFile dataFile);
+
+    /**
+     * 新增文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    public int insertDataFile(DataFile dataFile);
+
+    /**
+     * 修改文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    public int updateDataFile(DataFile dataFile);
+
+    /**
+     * 删除文件管理
+     * 
+     * @param id 文件管理主键
+     * @return 结果
+     */
+    public int deleteDataFileById(Long id);
+
+    /**
+     * 批量删除文件管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDataFileByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/EquipMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.Equip;
+
+/**
+ * 装备Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface EquipMapper 
+{
+    /**
+     * 查询装备
+     * 
+     * @param id 装备主键
+     * @return 装备
+     */
+    public Equip selectEquipById(Long id);
+
+    /**
+     * 查询装备列表
+     * 
+     * @param equip 装备
+     * @return 装备集合
+     */
+    public List<Equip> selectEquipList(Equip equip);
+
+    /**
+     * 新增装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    public int insertEquip(Equip equip);
+
+    /**
+     * 修改装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    public int updateEquip(Equip equip);
+
+    /**
+     * 删除装备
+     * 
+     * @param id 装备主键
+     * @return 结果
+     */
+    public int deleteEquipById(Long id);
+
+    /**
+     * 批量删除装备
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteEquipByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/FaultInfoMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.FaultInfo;
+
+/**
+ * 故障缺陷Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface FaultInfoMapper 
+{
+    /**
+     * 查询故障缺陷
+     * 
+     * @param id 故障缺陷主键
+     * @return 故障缺陷
+     */
+    public FaultInfo selectFaultInfoById(Long id);
+
+    /**
+     * 查询故障缺陷列表
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 故障缺陷集合
+     */
+    public List<FaultInfo> selectFaultInfoList(FaultInfo faultInfo);
+
+    /**
+     * 新增故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    public int insertFaultInfo(FaultInfo faultInfo);
+
+    /**
+     * 修改故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    public int updateFaultInfo(FaultInfo faultInfo);
+
+    /**
+     * 删除故障缺陷
+     * 
+     * @param id 故障缺陷主键
+     * @return 结果
+     */
+    public int deleteFaultInfoById(Long id);
+
+    /**
+     * 批量删除故障缺陷
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteFaultInfoByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/FaultRecordMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.FaultRecord;
+
+/**
+ * 故障记录Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface FaultRecordMapper 
+{
+    /**
+     * 查询故障记录
+     * 
+     * @param id 故障记录主键
+     * @return 故障记录
+     */
+    public FaultRecord selectFaultRecordById(Long id);
+
+    /**
+     * 查询故障记录列表
+     * 
+     * @param faultRecord 故障记录
+     * @return 故障记录集合
+     */
+    public List<FaultRecord> selectFaultRecordList(FaultRecord faultRecord);
+
+    /**
+     * 新增故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    public int insertFaultRecord(FaultRecord faultRecord);
+
+    /**
+     * 修改故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    public int updateFaultRecord(FaultRecord faultRecord);
+
+    /**
+     * 删除故障记录
+     * 
+     * @param id 故障记录主键
+     * @return 结果
+     */
+    public int deleteFaultRecordById(Long id);
+
+    /**
+     * 批量删除故障记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteFaultRecordByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/MajorMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.Major;
+
+/**
+ * 专业Mapper接口
+ * 
+ * @author kgraph
+ * @date 2023-02-14
+ */
+public interface MajorMapper 
+{
+    /**
+     * 查询专业
+     * 
+     * @param id 专业主键
+     * @return 专业
+     */
+    public Major selectMajorById(Long id);
+
+    /**
+     * 查询专业列表
+     * 
+     * @param major 专业
+     * @return 专业集合
+     */
+    public List<Major> selectMajorList(Major major);
+
+    /**
+     * 新增专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    public int insertMajor(Major major);
+
+    /**
+     * 修改专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    public int updateMajor(Major major);
+
+    /**
+     * 删除专业
+     * 
+     * @param id 专业主键
+     * @return 结果
+     */
+    public int deleteMajorById(Long id);
+
+    /**
+     * 批量删除专业
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMajorByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/equipPartsMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.equipParts;
+
+/**
+ * 部件管理Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface equipPartsMapper 
+{
+    /**
+     * 查询部件管理
+     * 
+     * @param id 部件管理主键
+     * @return 部件管理
+     */
+    public equipParts selectequipPartsById(Long id);
+
+    /**
+     * 查询部件管理列表
+     * 
+     * @param equipParts 部件管理
+     * @return 部件管理集合
+     */
+    public List<equipParts> selectequipPartsList(equipParts equipParts);
+
+    /**
+     * 新增部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    public int insertequipParts(equipParts equipParts);
+
+    /**
+     * 修改部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    public int updateequipParts(equipParts equipParts);
+
+    /**
+     * 删除部件管理
+     * 
+     * @param id 部件管理主键
+     * @return 结果
+     */
+    public int deleteequipPartsById(Long id);
+
+    /**
+     * 批量删除部件管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteequipPartsByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/equipSysMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.equipSys;
+
+/**
+ * 系统与子系统Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface equipSysMapper 
+{
+    /**
+     * 查询系统与子系统
+     * 
+     * @param id 系统与子系统主键
+     * @return 系统与子系统
+     */
+    public equipSys selectequipSysById(Long id);
+
+    /**
+     * 查询系统与子系统列表
+     * 
+     * @param equipSys 系统与子系统
+     * @return 系统与子系统集合
+     */
+    public List<equipSys> selectequipSysList(equipSys equipSys);
+
+    /**
+     * 新增系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    public int insertequipSys(equipSys equipSys);
+
+    /**
+     * 修改系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    public int updateequipSys(equipSys equipSys);
+
+    /**
+     * 删除系统与子系统
+     * 
+     * @param id 系统与子系统主键
+     * @return 结果
+     */
+    public int deleteequipSysById(Long id);
+
+    /**
+     * 批量删除系统与子系统
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteequipSysByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/platformMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.platform;
+
+/**
+ * 平台管理Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface platformMapper 
+{
+    /**
+     * 查询平台管理
+     * 
+     * @param id 平台管理主键
+     * @return 平台管理
+     */
+    public platform selectplatformById(Long id);
+
+    /**
+     * 查询平台管理列表
+     * 
+     * @param platform 平台管理
+     * @return 平台管理集合
+     */
+    public List<platform> selectplatformList(platform platform);
+
+    /**
+     * 新增平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    public int insertplatform(platform platform);
+
+    /**
+     * 修改平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    public int updateplatform(platform platform);
+
+    /**
+     * 删除平台管理
+     * 
+     * @param id 平台管理主键
+     * @return 结果
+     */
+    public int deleteplatformById(Long id);
+
+    /**
+     * 批量删除平台管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteplatformByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/typeDictMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.typeDict;
+
+/**
+ * 用做存储类型,枚举类数据存储,Mapper接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface typeDictMapper 
+{
+    /**
+     * 查询用做存储类型,枚举类数据存储,
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 用做存储类型,枚举类数据存储,
+     */
+    public typeDict selecttypeDictById(Long id);
+
+    /**
+     * 查询用做存储类型,枚举类数据存储,列表
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 用做存储类型,枚举类数据存储,集合
+     */
+    public List<typeDict> selecttypeDictList(typeDict typeDict);
+
+    /**
+     * 新增用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    public int inserttypeDict(typeDict typeDict);
+
+    /**
+     * 修改用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    public int updatetypeDict(typeDict typeDict);
+
+    /**
+     * 删除用做存储类型,枚举类数据存储,
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 结果
+     */
+    public int deletetypeDictById(Long id);
+
+    /**
+     * 批量删除用做存储类型,枚举类数据存储,
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletetypeDictByIds(Long[] ids);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IDataFileService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.DataFile;
+
+/**
+ * 文件管理Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IDataFileService 
+{
+    /**
+     * 查询文件管理
+     * 
+     * @param id 文件管理主键
+     * @return 文件管理
+     */
+    public DataFile selectDataFileById(Long id);
+
+    /**
+     * 查询文件管理列表
+     * 
+     * @param dataFile 文件管理
+     * @return 文件管理集合
+     */
+    public List<DataFile> selectDataFileList(DataFile dataFile);
+
+    /**
+     * 新增文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    public int insertDataFile(DataFile dataFile);
+
+    /**
+     * 修改文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    public int updateDataFile(DataFile dataFile);
+
+    /**
+     * 批量删除文件管理
+     * 
+     * @param ids 需要删除的文件管理主键集合
+     * @return 结果
+     */
+    public int deleteDataFileByIds(Long[] ids);
+
+    /**
+     * 删除文件管理信息
+     * 
+     * @param id 文件管理主键
+     * @return 结果
+     */
+    public int deleteDataFileById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IEquipService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.Equip;
+
+/**
+ * 装备Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IEquipService 
+{
+    /**
+     * 查询装备
+     * 
+     * @param id 装备主键
+     * @return 装备
+     */
+    public Equip selectEquipById(Long id);
+
+    /**
+     * 查询装备列表
+     * 
+     * @param equip 装备
+     * @return 装备集合
+     */
+    public List<Equip> selectEquipList(Equip equip);
+
+    /**
+     * 新增装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    public int insertEquip(Equip equip);
+
+    /**
+     * 修改装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    public int updateEquip(Equip equip);
+
+    /**
+     * 批量删除装备
+     * 
+     * @param ids 需要删除的装备主键集合
+     * @return 结果
+     */
+    public int deleteEquipByIds(Long[] ids);
+
+    /**
+     * 删除装备信息
+     * 
+     * @param id 装备主键
+     * @return 结果
+     */
+    public int deleteEquipById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IFaultInfoService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.FaultInfo;
+
+/**
+ * 故障缺陷Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IFaultInfoService 
+{
+    /**
+     * 查询故障缺陷
+     * 
+     * @param id 故障缺陷主键
+     * @return 故障缺陷
+     */
+    public FaultInfo selectFaultInfoById(Long id);
+
+    /**
+     * 查询故障缺陷列表
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 故障缺陷集合
+     */
+    public List<FaultInfo> selectFaultInfoList(FaultInfo faultInfo);
+
+    /**
+     * 新增故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    public int insertFaultInfo(FaultInfo faultInfo);
+
+    /**
+     * 修改故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    public int updateFaultInfo(FaultInfo faultInfo);
+
+    /**
+     * 批量删除故障缺陷
+     * 
+     * @param ids 需要删除的故障缺陷主键集合
+     * @return 结果
+     */
+    public int deleteFaultInfoByIds(Long[] ids);
+
+    /**
+     * 删除故障缺陷信息
+     * 
+     * @param id 故障缺陷主键
+     * @return 结果
+     */
+    public int deleteFaultInfoById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IFaultRecordService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.FaultRecord;
+
+/**
+ * 故障记录Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IFaultRecordService 
+{
+    /**
+     * 查询故障记录
+     * 
+     * @param id 故障记录主键
+     * @return 故障记录
+     */
+    public FaultRecord selectFaultRecordById(Long id);
+
+    /**
+     * 查询故障记录列表
+     * 
+     * @param faultRecord 故障记录
+     * @return 故障记录集合
+     */
+    public List<FaultRecord> selectFaultRecordList(FaultRecord faultRecord);
+
+    /**
+     * 新增故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    public int insertFaultRecord(FaultRecord faultRecord);
+
+    /**
+     * 修改故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    public int updateFaultRecord(FaultRecord faultRecord);
+
+    /**
+     * 批量删除故障记录
+     * 
+     * @param ids 需要删除的故障记录主键集合
+     * @return 结果
+     */
+    public int deleteFaultRecordByIds(Long[] ids);
+
+    /**
+     * 删除故障记录信息
+     * 
+     * @param id 故障记录主键
+     * @return 结果
+     */
+    public int deleteFaultRecordById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IMajorService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.Major;
+
+/**
+ * 专业Service接口
+ * 
+ * @author kgraph
+ * @date 2023-02-14
+ */
+public interface IMajorService 
+{
+    /**
+     * 查询专业
+     * 
+     * @param id 专业主键
+     * @return 专业
+     */
+    public Major selectMajorById(Long id);
+
+    /**
+     * 查询专业列表
+     * 
+     * @param major 专业
+     * @return 专业集合
+     */
+    public List<Major> selectMajorList(Major major);
+
+    /**
+     * 新增专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    public int insertMajor(Major major);
+
+    /**
+     * 修改专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    public int updateMajor(Major major);
+
+    /**
+     * 批量删除专业
+     * 
+     * @param ids 需要删除的专业主键集合
+     * @return 结果
+     */
+    public int deleteMajorByIds(Long[] ids);
+
+    /**
+     * 删除专业信息
+     * 
+     * @param id 专业主键
+     * @return 结果
+     */
+    public int deleteMajorById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IequipPartsService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.equipParts;
+
+/**
+ * 部件管理Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IequipPartsService 
+{
+    /**
+     * 查询部件管理
+     * 
+     * @param id 部件管理主键
+     * @return 部件管理
+     */
+    public equipParts selectequipPartsById(Long id);
+
+    /**
+     * 查询部件管理列表
+     * 
+     * @param equipParts 部件管理
+     * @return 部件管理集合
+     */
+    public List<equipParts> selectequipPartsList(equipParts equipParts);
+
+    /**
+     * 新增部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    public int insertequipParts(equipParts equipParts);
+
+    /**
+     * 修改部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    public int updateequipParts(equipParts equipParts);
+
+    /**
+     * 批量删除部件管理
+     * 
+     * @param ids 需要删除的部件管理主键集合
+     * @return 结果
+     */
+    public int deleteequipPartsByIds(Long[] ids);
+
+    /**
+     * 删除部件管理信息
+     * 
+     * @param id 部件管理主键
+     * @return 结果
+     */
+    public int deleteequipPartsById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IequipSysService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.equipSys;
+
+/**
+ * 系统与子系统Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IequipSysService 
+{
+    /**
+     * 查询系统与子系统
+     * 
+     * @param id 系统与子系统主键
+     * @return 系统与子系统
+     */
+    public equipSys selectequipSysById(Long id);
+
+    /**
+     * 查询系统与子系统列表
+     * 
+     * @param equipSys 系统与子系统
+     * @return 系统与子系统集合
+     */
+    public List<equipSys> selectequipSysList(equipSys equipSys);
+
+    /**
+     * 新增系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    public int insertequipSys(equipSys equipSys);
+
+    /**
+     * 修改系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    public int updateequipSys(equipSys equipSys);
+
+    /**
+     * 批量删除系统与子系统
+     * 
+     * @param ids 需要删除的系统与子系统主键集合
+     * @return 结果
+     */
+    public int deleteequipSysByIds(Long[] ids);
+
+    /**
+     * 删除系统与子系统信息
+     * 
+     * @param id 系统与子系统主键
+     * @return 结果
+     */
+    public int deleteequipSysById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IplatformService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.platform;
+
+/**
+ * 平台管理Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface IplatformService 
+{
+    /**
+     * 查询平台管理
+     * 
+     * @param id 平台管理主键
+     * @return 平台管理
+     */
+    public platform selectplatformById(Long id);
+
+    /**
+     * 查询平台管理列表
+     * 
+     * @param platform 平台管理
+     * @return 平台管理集合
+     */
+    public List<platform> selectplatformList(platform platform);
+
+    /**
+     * 新增平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    public int insertplatform(platform platform);
+
+    /**
+     * 修改平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    public int updateplatform(platform platform);
+
+    /**
+     * 批量删除平台管理
+     * 
+     * @param ids 需要删除的平台管理主键集合
+     * @return 结果
+     */
+    public int deleteplatformByIds(Long[] ids);
+
+    /**
+     * 删除平台管理信息
+     * 
+     * @param id 平台管理主键
+     * @return 结果
+     */
+    public int deleteplatformById(Long id);
+}

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/ItypeDictService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.typeDict;
+
+/**
+ * 用做存储类型,枚举类数据存储,Service接口
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+public interface ItypeDictService 
+{
+    /**
+     * 查询用做存储类型,枚举类数据存储,
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 用做存储类型,枚举类数据存储,
+     */
+    public typeDict selecttypeDictById(Long id);
+
+    /**
+     * 查询用做存储类型,枚举类数据存储,列表
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 用做存储类型,枚举类数据存储,集合
+     */
+    public List<typeDict> selecttypeDictList(typeDict typeDict);
+
+    /**
+     * 新增用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    public int inserttypeDict(typeDict typeDict);
+
+    /**
+     * 修改用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    public int updatetypeDict(typeDict typeDict);
+
+    /**
+     * 批量删除用做存储类型,枚举类数据存储,
+     * 
+     * @param ids 需要删除的用做存储类型,枚举类数据存储,主键集合
+     * @return 结果
+     */
+    public int deletetypeDictByIds(Long[] ids);
+
+    /**
+     * 删除用做存储类型,枚举类数据存储,信息
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 结果
+     */
+    public int deletetypeDictById(Long id);
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/DataFileServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.DataFileMapper;
+import com.kgraph.web.domain.DataFile;
+import com.kgraph.web.service.IDataFileService;
+
+/**
+ * 文件管理Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class DataFileServiceImpl implements IDataFileService 
+{
+    @Autowired
+    private DataFileMapper dataFileMapper;
+
+    /**
+     * 查询文件管理
+     * 
+     * @param id 文件管理主键
+     * @return 文件管理
+     */
+    @Override
+    public DataFile selectDataFileById(Long id)
+    {
+        return dataFileMapper.selectDataFileById(id);
+    }
+
+    /**
+     * 查询文件管理列表
+     * 
+     * @param dataFile 文件管理
+     * @return 文件管理
+     */
+    @Override
+    public List<DataFile> selectDataFileList(DataFile dataFile)
+    {
+        return dataFileMapper.selectDataFileList(dataFile);
+    }
+
+    /**
+     * 新增文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    @Override
+    public int insertDataFile(DataFile dataFile)
+    {
+        dataFile.setCreateTime(DateUtils.getNowDate());
+        return dataFileMapper.insertDataFile(dataFile);
+    }
+
+    /**
+     * 修改文件管理
+     * 
+     * @param dataFile 文件管理
+     * @return 结果
+     */
+    @Override
+    public int updateDataFile(DataFile dataFile)
+    {
+        dataFile.setUpdateTime(DateUtils.getNowDate());
+        return dataFileMapper.updateDataFile(dataFile);
+    }
+
+    /**
+     * 批量删除文件管理
+     * 
+     * @param ids 需要删除的文件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDataFileByIds(Long[] ids)
+    {
+        return dataFileMapper.deleteDataFileByIds(ids);
+    }
+
+    /**
+     * 删除文件管理信息
+     * 
+     * @param id 文件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDataFileById(Long id)
+    {
+        return dataFileMapper.deleteDataFileById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/EquipServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.EquipMapper;
+import com.kgraph.web.domain.Equip;
+import com.kgraph.web.service.IEquipService;
+
+/**
+ * 装备Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class EquipServiceImpl implements IEquipService 
+{
+    @Autowired
+    private EquipMapper equipMapper;
+
+    /**
+     * 查询装备
+     * 
+     * @param id 装备主键
+     * @return 装备
+     */
+    @Override
+    public Equip selectEquipById(Long id)
+    {
+        return equipMapper.selectEquipById(id);
+    }
+
+    /**
+     * 查询装备列表
+     * 
+     * @param equip 装备
+     * @return 装备
+     */
+    @Override
+    public List<Equip> selectEquipList(Equip equip)
+    {
+        return equipMapper.selectEquipList(equip);
+    }
+
+    /**
+     * 新增装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    @Override
+    public int insertEquip(Equip equip)
+    {
+        equip.setCreateTime(DateUtils.getNowDate());
+        return equipMapper.insertEquip(equip);
+    }
+
+    /**
+     * 修改装备
+     * 
+     * @param equip 装备
+     * @return 结果
+     */
+    @Override
+    public int updateEquip(Equip equip)
+    {
+        equip.setUpdateTime(DateUtils.getNowDate());
+        return equipMapper.updateEquip(equip);
+    }
+
+    /**
+     * 批量删除装备
+     * 
+     * @param ids 需要删除的装备主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEquipByIds(Long[] ids)
+    {
+        return equipMapper.deleteEquipByIds(ids);
+    }
+
+    /**
+     * 删除装备信息
+     * 
+     * @param id 装备主键
+     * @return 结果
+     */
+    @Override
+    public int deleteEquipById(Long id)
+    {
+        return equipMapper.deleteEquipById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/FaultInfoServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.FaultInfoMapper;
+import com.kgraph.web.domain.FaultInfo;
+import com.kgraph.web.service.IFaultInfoService;
+
+/**
+ * 故障缺陷Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class FaultInfoServiceImpl implements IFaultInfoService 
+{
+    @Autowired
+    private FaultInfoMapper faultInfoMapper;
+
+    /**
+     * 查询故障缺陷
+     * 
+     * @param id 故障缺陷主键
+     * @return 故障缺陷
+     */
+    @Override
+    public FaultInfo selectFaultInfoById(Long id)
+    {
+        return faultInfoMapper.selectFaultInfoById(id);
+    }
+
+    /**
+     * 查询故障缺陷列表
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 故障缺陷
+     */
+    @Override
+    public List<FaultInfo> selectFaultInfoList(FaultInfo faultInfo)
+    {
+        return faultInfoMapper.selectFaultInfoList(faultInfo);
+    }
+
+    /**
+     * 新增故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    @Override
+    public int insertFaultInfo(FaultInfo faultInfo)
+    {
+        faultInfo.setCreateTime(DateUtils.getNowDate());
+        return faultInfoMapper.insertFaultInfo(faultInfo);
+    }
+
+    /**
+     * 修改故障缺陷
+     * 
+     * @param faultInfo 故障缺陷
+     * @return 结果
+     */
+    @Override
+    public int updateFaultInfo(FaultInfo faultInfo)
+    {
+        faultInfo.setUpdateTime(DateUtils.getNowDate());
+        return faultInfoMapper.updateFaultInfo(faultInfo);
+    }
+
+    /**
+     * 批量删除故障缺陷
+     * 
+     * @param ids 需要删除的故障缺陷主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFaultInfoByIds(Long[] ids)
+    {
+        return faultInfoMapper.deleteFaultInfoByIds(ids);
+    }
+
+    /**
+     * 删除故障缺陷信息
+     * 
+     * @param id 故障缺陷主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFaultInfoById(Long id)
+    {
+        return faultInfoMapper.deleteFaultInfoById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/FaultRecordServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.FaultRecordMapper;
+import com.kgraph.web.domain.FaultRecord;
+import com.kgraph.web.service.IFaultRecordService;
+
+/**
+ * 故障记录Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class FaultRecordServiceImpl implements IFaultRecordService 
+{
+    @Autowired
+    private FaultRecordMapper faultRecordMapper;
+
+    /**
+     * 查询故障记录
+     * 
+     * @param id 故障记录主键
+     * @return 故障记录
+     */
+    @Override
+    public FaultRecord selectFaultRecordById(Long id)
+    {
+        return faultRecordMapper.selectFaultRecordById(id);
+    }
+
+    /**
+     * 查询故障记录列表
+     * 
+     * @param faultRecord 故障记录
+     * @return 故障记录
+     */
+    @Override
+    public List<FaultRecord> selectFaultRecordList(FaultRecord faultRecord)
+    {
+        return faultRecordMapper.selectFaultRecordList(faultRecord);
+    }
+
+    /**
+     * 新增故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    @Override
+    public int insertFaultRecord(FaultRecord faultRecord)
+    {
+        faultRecord.setCreateTime(DateUtils.getNowDate());
+        return faultRecordMapper.insertFaultRecord(faultRecord);
+    }
+
+    /**
+     * 修改故障记录
+     * 
+     * @param faultRecord 故障记录
+     * @return 结果
+     */
+    @Override
+    public int updateFaultRecord(FaultRecord faultRecord)
+    {
+        faultRecord.setUpdateTime(DateUtils.getNowDate());
+        return faultRecordMapper.updateFaultRecord(faultRecord);
+    }
+
+    /**
+     * 批量删除故障记录
+     * 
+     * @param ids 需要删除的故障记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFaultRecordByIds(Long[] ids)
+    {
+        return faultRecordMapper.deleteFaultRecordByIds(ids);
+    }
+
+    /**
+     * 删除故障记录信息
+     * 
+     * @param id 故障记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFaultRecordById(Long id)
+    {
+        return faultRecordMapper.deleteFaultRecordById(id);
+    }
+}

+ 93 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/MajorServiceImpl.java

@@ -0,0 +1,93 @@
+package com.kgraph.web.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.web.mapper.MajorMapper;
+import com.kgraph.web.domain.Major;
+import com.kgraph.web.service.IMajorService;
+
+/**
+ * 专业Service业务层处理
+ * 
+ * @author kgraph
+ * @date 2023-02-14
+ */
+@Service
+public class MajorServiceImpl implements IMajorService 
+{
+    @Autowired
+    private MajorMapper majorMapper;
+
+    /**
+     * 查询专业
+     * 
+     * @param id 专业主键
+     * @return 专业
+     */
+    @Override
+    public Major selectMajorById(Long id)
+    {
+        return majorMapper.selectMajorById(id);
+    }
+
+    /**
+     * 查询专业列表
+     * 
+     * @param major 专业
+     * @return 专业
+     */
+    @Override
+    public List<Major> selectMajorList(Major major)
+    {
+        return majorMapper.selectMajorList(major);
+    }
+
+    /**
+     * 新增专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    @Override
+    public int insertMajor(Major major)
+    {
+        return majorMapper.insertMajor(major);
+    }
+
+    /**
+     * 修改专业
+     * 
+     * @param major 专业
+     * @return 结果
+     */
+    @Override
+    public int updateMajor(Major major)
+    {
+        return majorMapper.updateMajor(major);
+    }
+
+    /**
+     * 批量删除专业
+     * 
+     * @param ids 需要删除的专业主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMajorByIds(Long[] ids)
+    {
+        return majorMapper.deleteMajorByIds(ids);
+    }
+
+    /**
+     * 删除专业信息
+     * 
+     * @param id 专业主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMajorById(Long id)
+    {
+        return majorMapper.deleteMajorById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/equipPartsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.equipPartsMapper;
+import com.kgraph.web.domain.equipParts;
+import com.kgraph.web.service.IequipPartsService;
+
+/**
+ * 部件管理Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class equipPartsServiceImpl implements IequipPartsService 
+{
+    @Autowired
+    private equipPartsMapper equipPartsMapper;
+
+    /**
+     * 查询部件管理
+     * 
+     * @param id 部件管理主键
+     * @return 部件管理
+     */
+    @Override
+    public equipParts selectequipPartsById(Long id)
+    {
+        return equipPartsMapper.selectequipPartsById(id);
+    }
+
+    /**
+     * 查询部件管理列表
+     * 
+     * @param equipParts 部件管理
+     * @return 部件管理
+     */
+    @Override
+    public List<equipParts> selectequipPartsList(equipParts equipParts)
+    {
+        return equipPartsMapper.selectequipPartsList(equipParts);
+    }
+
+    /**
+     * 新增部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    @Override
+    public int insertequipParts(equipParts equipParts)
+    {
+        equipParts.setCreateTime(DateUtils.getNowDate());
+        return equipPartsMapper.insertequipParts(equipParts);
+    }
+
+    /**
+     * 修改部件管理
+     * 
+     * @param equipParts 部件管理
+     * @return 结果
+     */
+    @Override
+    public int updateequipParts(equipParts equipParts)
+    {
+        equipParts.setUpdateTime(DateUtils.getNowDate());
+        return equipPartsMapper.updateequipParts(equipParts);
+    }
+
+    /**
+     * 批量删除部件管理
+     * 
+     * @param ids 需要删除的部件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteequipPartsByIds(Long[] ids)
+    {
+        return equipPartsMapper.deleteequipPartsByIds(ids);
+    }
+
+    /**
+     * 删除部件管理信息
+     * 
+     * @param id 部件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteequipPartsById(Long id)
+    {
+        return equipPartsMapper.deleteequipPartsById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/equipSysServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.equipSysMapper;
+import com.kgraph.web.domain.equipSys;
+import com.kgraph.web.service.IequipSysService;
+
+/**
+ * 系统与子系统Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class equipSysServiceImpl implements IequipSysService 
+{
+    @Autowired
+    private equipSysMapper equipSysMapper;
+
+    /**
+     * 查询系统与子系统
+     * 
+     * @param id 系统与子系统主键
+     * @return 系统与子系统
+     */
+    @Override
+    public equipSys selectequipSysById(Long id)
+    {
+        return equipSysMapper.selectequipSysById(id);
+    }
+
+    /**
+     * 查询系统与子系统列表
+     * 
+     * @param equipSys 系统与子系统
+     * @return 系统与子系统
+     */
+    @Override
+    public List<equipSys> selectequipSysList(equipSys equipSys)
+    {
+        return equipSysMapper.selectequipSysList(equipSys);
+    }
+
+    /**
+     * 新增系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    @Override
+    public int insertequipSys(equipSys equipSys)
+    {
+        equipSys.setCreateTime(DateUtils.getNowDate());
+        return equipSysMapper.insertequipSys(equipSys);
+    }
+
+    /**
+     * 修改系统与子系统
+     * 
+     * @param equipSys 系统与子系统
+     * @return 结果
+     */
+    @Override
+    public int updateequipSys(equipSys equipSys)
+    {
+        equipSys.setUpdateTime(DateUtils.getNowDate());
+        return equipSysMapper.updateequipSys(equipSys);
+    }
+
+    /**
+     * 批量删除系统与子系统
+     * 
+     * @param ids 需要删除的系统与子系统主键
+     * @return 结果
+     */
+    @Override
+    public int deleteequipSysByIds(Long[] ids)
+    {
+        return equipSysMapper.deleteequipSysByIds(ids);
+    }
+
+    /**
+     * 删除系统与子系统信息
+     * 
+     * @param id 系统与子系统主键
+     * @return 结果
+     */
+    @Override
+    public int deleteequipSysById(Long id)
+    {
+        return equipSysMapper.deleteequipSysById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/platformServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.platformMapper;
+import com.kgraph.web.domain.platform;
+import com.kgraph.web.service.IplatformService;
+
+/**
+ * 平台管理Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class platformServiceImpl implements IplatformService 
+{
+    @Autowired
+    private platformMapper platformMapper;
+
+    /**
+     * 查询平台管理
+     * 
+     * @param id 平台管理主键
+     * @return 平台管理
+     */
+    @Override
+    public platform selectplatformById(Long id)
+    {
+        return platformMapper.selectplatformById(id);
+    }
+
+    /**
+     * 查询平台管理列表
+     * 
+     * @param platform 平台管理
+     * @return 平台管理
+     */
+    @Override
+    public List<platform> selectplatformList(platform platform)
+    {
+        return platformMapper.selectplatformList(platform);
+    }
+
+    /**
+     * 新增平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    @Override
+    public int insertplatform(platform platform)
+    {
+        platform.setCreateTime(DateUtils.getNowDate());
+        return platformMapper.insertplatform(platform);
+    }
+
+    /**
+     * 修改平台管理
+     * 
+     * @param platform 平台管理
+     * @return 结果
+     */
+    @Override
+    public int updateplatform(platform platform)
+    {
+        platform.setUpdateTime(DateUtils.getNowDate());
+        return platformMapper.updateplatform(platform);
+    }
+
+    /**
+     * 批量删除平台管理
+     * 
+     * @param ids 需要删除的平台管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteplatformByIds(Long[] ids)
+    {
+        return platformMapper.deleteplatformByIds(ids);
+    }
+
+    /**
+     * 删除平台管理信息
+     * 
+     * @param id 平台管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteplatformById(Long id)
+    {
+        return platformMapper.deleteplatformById(id);
+    }
+}

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/typeDictServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.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.web.mapper.typeDictMapper;
+import com.kgraph.web.domain.typeDict;
+import com.kgraph.web.service.ItypeDictService;
+
+/**
+ * 用做存储类型,枚举类数据存储,Service业务层处理
+ * 
+ * @author wcf
+ * @date 2023-02-13
+ */
+@Service
+public class typeDictServiceImpl implements ItypeDictService 
+{
+    @Autowired
+    private typeDictMapper typeDictMapper;
+
+    /**
+     * 查询用做存储类型,枚举类数据存储,
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 用做存储类型,枚举类数据存储,
+     */
+    @Override
+    public typeDict selecttypeDictById(Long id)
+    {
+        return typeDictMapper.selecttypeDictById(id);
+    }
+
+    /**
+     * 查询用做存储类型,枚举类数据存储,列表
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 用做存储类型,枚举类数据存储,
+     */
+    @Override
+    public List<typeDict> selecttypeDictList(typeDict typeDict)
+    {
+        return typeDictMapper.selecttypeDictList(typeDict);
+    }
+
+    /**
+     * 新增用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    @Override
+    public int inserttypeDict(typeDict typeDict)
+    {
+        typeDict.setCreateTime(DateUtils.getNowDate());
+        return typeDictMapper.inserttypeDict(typeDict);
+    }
+
+    /**
+     * 修改用做存储类型,枚举类数据存储,
+     * 
+     * @param typeDict 用做存储类型,枚举类数据存储,
+     * @return 结果
+     */
+    @Override
+    public int updatetypeDict(typeDict typeDict)
+    {
+        typeDict.setUpdateTime(DateUtils.getNowDate());
+        return typeDictMapper.updatetypeDict(typeDict);
+    }
+
+    /**
+     * 批量删除用做存储类型,枚举类数据存储,
+     * 
+     * @param ids 需要删除的用做存储类型,枚举类数据存储,主键
+     * @return 结果
+     */
+    @Override
+    public int deletetypeDictByIds(Long[] ids)
+    {
+        return typeDictMapper.deletetypeDictByIds(ids);
+    }
+
+    /**
+     * 删除用做存储类型,枚举类数据存储,信息
+     * 
+     * @param id 用做存储类型,枚举类数据存储,主键
+     * @return 结果
+     */
+    @Override
+    public int deletetypeDictById(Long id)
+    {
+        return typeDictMapper.deletetypeDictById(id);
+    }
+}

+ 1 - 0
kgraph-admin/src/main/resources/META-INF/spring-devtools.properties

@@ -0,0 +1 @@
+restart.include.json=/com.alibaba.fastjson.*.jar

+ 57 - 0
kgraph-admin/src/main/resources/application-druid.yml

@@ -0,0 +1,57 @@
+# 数据源配置
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 主库数据源
+            master:
+                url: jdbc:mysql://47.108.150.237:3306/kgraph2?userUnicode=ture&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false#
+                username: root
+                password: w.cf123321
+            # 从库数据源
+            slave:
+                # 从数据源开关/默认关闭
+                enabled: false
+                url: 
+                username: 
+                password: 
+            # 初始连接数
+            initialSize: 5
+            # 最小连接池数量
+            minIdle: 10
+            # 最大连接池数量
+            maxActive: 20
+            # 配置获取连接等待超时的时间
+            maxWait: 60000
+            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+            timeBetweenEvictionRunsMillis: 60000
+            # 配置一个连接在池中最小生存的时间,单位是毫秒
+            minEvictableIdleTimeMillis: 300000
+            # 配置一个连接在池中最大生存的时间,单位是毫秒
+            maxEvictableIdleTimeMillis: 900000
+            # 配置检测连接是否有效
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter: 
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 设置白名单,不填则允许所有访问
+                allow:
+                url-pattern: /druid/*
+                # 控制台管理用户名和密码
+                login-username: admin
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 慢SQL记录
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true

+ 136 - 0
kgraph-admin/src/main/resources/application.yml

@@ -0,0 +1,136 @@
+# 项目相关配置
+kgraph:
+  # 名称
+  name: Kgraph
+  # 版本
+  version: 1.0.2
+  # 版权年份
+  copyrightYear: 2022
+  # 实例演示开关
+  demoEnabled: true
+  # 文件路径 示例( Windows配置D:/kgraph/uploadPath,Linux配置 /home/kgraph/uploadPath)
+  profile: /home/kgraph/uploadPath
+  # 获取ip地址开关
+  addressEnabled: false
+  # 验证码类型 math 数组计算 char 字符验证
+  captchaType: math
+
+# 开发环境配置
+server:
+  # 服务器的HTTP端口,默认为8080
+  port: 11082
+  servlet:
+    # 应用的访问路径
+    context-path: /
+  tomcat:
+    # tomcat的URI编码
+    uri-encoding: UTF-8
+    # 连接数满后的排队数,默认为100
+    accept-count: 1000
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值10
+      min-spare: 100
+
+# 日志配置
+logging:
+  level:
+    com.kgraph: debug
+    org.springframework: warn
+
+# 用户配置
+user:
+  password:
+    # 密码最大错误次数
+    maxRetryCount: 5
+    # 密码锁定时间(默认10分钟)
+    lockTime: 10
+
+# Spring配置
+spring:
+  # 资源信息
+  messages:
+    # 国际化资源文件路径
+    basename: i18n/messages
+  profiles:
+    active: druid
+  # 文件上传
+  servlet:
+    multipart:
+      # 单个文件大小
+      max-file-size:  10MB
+      # 设置总上传的文件大小
+      max-request-size:  20MB
+  # 服务模块
+  devtools:
+    restart:
+      # 热部署开关
+      enabled: true
+  # redis 配置
+  redis:
+    # 地址
+    host: 47.108.150.237
+    # 端口,默认为6379
+    port: 4406
+    # 数据库索引
+    database: 0
+    # 密码
+    password: w.cf123321
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms
+  data:
+    neo4j:
+      uri: bolt://47.108.150.237:10087
+      username: neo4j
+      password: neo4j
+
+# token配置
+token:
+  # 令牌自定义标识
+  header: Authorization
+  # 令牌密钥
+  secret: abcdefghijklmnopqrstuvwxyz
+  # 令牌有效期(默认30分钟)
+  expireTime: 30
+
+# MyBatis配置
+mybatis:
+  # 搜索指定包别名
+  typeAliasesPackage: com.kgraph.**.domain
+  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
+  # 加载全局的配置文件
+  configLocation: classpath:mybatis/mybatis-config.xml
+
+# PageHelper分页插件
+pagehelper:
+  helperDialect: mysql
+  supportMethodsArguments: true
+  params: count=countSql
+
+# Swagger配置
+swagger:
+  # 是否开启swagger
+  enabled: true
+  # 请求前缀
+  pathMapping: /dev-api
+
+# 防止XSS攻击
+xss:
+  # 过滤开关
+  enabled: true
+  # 排除链接(多个用逗号分隔)
+  excludes: /system/notice
+  # 匹配链接
+  urlPatterns: /system/*,/monitor/*,/tool/*

+ 24 - 0
kgraph-admin/src/main/resources/banner.txt

@@ -0,0 +1,24 @@
+Application Version: ${kgraph.version}
+Spring Boot Version: ${spring-boot.version}
+////////////////////////////////////////////////////////////////////
+//                          _ooOoo_                               //
+//                         o8888888o                              //
+//                         88" . "88                              //
+//                         (| ^_^ |)                              //
+//                         O\  =  /O                              //
+//                      ____/`---'\____                           //
+//                    .'  \\|     |//  `.                         //
+//                   /  \\|||  :  |||//  \                        //
+//                  /  _||||| -:- |||||-  \                       //
+//                  |   | \\\  -  /// |   |                       //
+//                  | \_|  ''\---/''  |   |                       //
+//                  \  .-\__  `-`  ___/-. /                       //
+//                ___`. .'  /--.--\  `. . ___                     //
+//              ."" '<  `.___\_<|>_/___.'  >'"".                  //
+//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
+//            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
+//      ========`-.____`-.___\_____/___.-`____.-'========         //
+//                           `=---='                              //
+//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
+//             佛祖保佑       永不宕机      永无BUG               //
+////////////////////////////////////////////////////////////////////

+ 37 - 0
kgraph-admin/src/main/resources/i18n/messages.properties

@@ -0,0 +1,37 @@
+#错误消息
+not.null=* 必须填写
+user.jcaptcha.error=验证码错误
+user.jcaptcha.expire=验证码已失效
+user.not.exists=用户不存在/密码错误
+user.password.not.match=用户不存在/密码错误
+user.password.retry.limit.count=密码输入错误{0}次
+user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟
+user.password.delete=对不起,您的账号已被删除
+user.blocked=用户已封禁,请联系管理员
+role.blocked=角色已封禁,请联系管理员
+user.logout.success=退出成功
+
+length.not.valid=长度必须在{min}到{max}个字符之间
+
+user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
+user.password.not.valid=* 5-50个字符
+ 
+user.email.not.valid=邮箱格式错误
+user.mobile.phone.number.not.valid=手机号格式错误
+user.login.success=登录成功
+user.register.success=注册成功
+user.notfound=请重新登录
+user.forcelogout=管理员强制退出,请重新登录
+user.unknown.error=未知错误,请重新登录
+
+##文件上传消息
+upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
+upload.filename.exceed.length=上传的文件名最长{0}个字符
+
+##权限
+no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
+no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
+no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
+no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
+no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
+no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]

+ 93 - 0
kgraph-admin/src/main/resources/logback.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <!-- 日志存放路径 -->
+	<property name="log.path" value="/home/kgraph/logs" />
+    <!-- 日志输出格式 -->
+	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+
+	<!-- 控制台输出 -->
+	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+	</appender>
+	
+	<!-- 系统日志输出 -->
+	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-info.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+		</rollingPolicy>
+		<encoder>
+			<pattern>${log.pattern}</pattern>
+		</encoder>
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>INFO</level>
+            <!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+            <!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+	</appender>
+	
+	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+	    <file>${log.path}/sys-error.log</file>
+        <!-- 循环政策:基于时间创建日志文件 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志文件名格式 -->
+            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
+			<!-- 日志最大的历史 60天 -->
+			<maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <!-- 过滤的级别 -->
+            <level>ERROR</level>
+			<!-- 匹配时的操作:接收(记录) -->
+            <onMatch>ACCEPT</onMatch>
+			<!-- 不匹配时的操作:拒绝(不记录) -->
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+	
+	<!-- 用户访问日志输出  -->
+    <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${log.path}/sys-user.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 按天回滚 daily -->
+            <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <!-- 日志最大的历史 60天 -->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+    </appender>
+	
+	<!-- 系统模块日志级别控制  -->
+	<logger name="com.kgraph" level="info" />
+	<!-- Spring日志级别控制  -->
+	<logger name="org.springframework" level="warn" />
+
+	<root level="info">
+		<appender-ref ref="console" />
+	</root>
+	
+	<!--系统操作日志-->
+    <root level="info">
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_error" />
+    </root>
+	
+	<!--系统用户操作日志-->
+    <logger name="sys-user" level="info">
+        <appender-ref ref="sys-user"/>
+    </logger>
+</configuration> 

+ 84 - 0
kgraph-admin/src/main/resources/mapper/common/typeDictMapper.xml

@@ -0,0 +1,84 @@
+<?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.web.mapper.typeDictMapper">
+    
+    <resultMap type="typeDict" id="typeDictResult">
+        <result property="id"    column="id"    />
+        <result property="typeName"    column="type_name"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="parentName"    column="parent_name"    />
+        <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="selecttypeDictVo">
+        select id, type_name, parent_id, parent_name, create_by, create_time, update_by, update_time from t_type_dict
+    </sql>
+
+    <select id="selecttypeDictList" parameterType="typeDict" resultMap="typeDictResult">
+        <include refid="selecttypeDictVo"/>
+        <where>  
+            <if test="typeName != null  and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="parentName != null  and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selecttypeDictById" parameterType="Long" resultMap="typeDictResult">
+        <include refid="selecttypeDictVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="inserttypeDict" parameterType="typeDict">
+        insert into t_type_dict
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="typeName != null">type_name,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="parentName != null">parent_name,</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="id != null">#{id},</if>
+            <if test="typeName != null">#{typeName},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="parentName != null">#{parentName},</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="updatetypeDict" parameterType="typeDict">
+        update t_type_dict
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="typeName != null">type_name = #{typeName},</if>
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="parentName != null">parent_name = #{parentName},</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="deletetypeDictById" parameterType="Long">
+        delete from t_type_dict where id = #{id}
+    </delete>
+
+    <delete id="deletetypeDictByIds" parameterType="String">
+        delete from t_type_dict where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 137 - 0
kgraph-admin/src/main/resources/mapper/dataCenter/DataFileMapper.xml

@@ -0,0 +1,137 @@
+<?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.web.mapper.DataFileMapper">
+    
+    <resultMap type="DataFile" id="DataFileResult">
+        <result property="id"    column="id"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileType"    column="file_type"    />
+        <result property="typeName"    column="type_name"    />
+        <result property="equipType"    column="equip_type"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="sysId"    column="sys_id"    />
+        <result property="majorId"    column="major_id"    />
+        <result property="majorName"    column="major_name"    />
+        <result property="partId"    column="part_id"    />
+        <result property="partName"    column="part_name"    />
+        <result property="uploadTime"    column="upload_time"    />
+        <result property="descript"    column="descript"    />
+        <result property="fileVer"    column="file_ver"    />
+        <result property="filePath"    column="file_path"    />
+        <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="selectDataFileVo">
+        select id, file_name, file_type, type_name, equip_type, sys_name, sys_id, major_id, major_name, part_id, part_name, upload_time, descript, file_ver, file_path, create_by, create_time, update_by, update_time from t_file
+    </sql>
+
+    <select id="selectDataFileList" parameterType="DataFile" resultMap="DataFileResult">
+        <include refid="selectDataFileVo"/>
+        <where>  
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="fileType != null "> and file_type = #{fileType}</if>
+            <if test="typeName != null  and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
+            <if test="equipType != null  and equipType != ''"> and equip_type = #{equipType}</if>
+            <if test="sysName != null  and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
+            <if test="sysId != null "> and sys_id = #{sysId}</if>
+            <if test="majorId != null "> and major_id = #{majorId}</if>
+            <if test="majorName != null  and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
+            <if test="partId != null "> and part_id = #{partId}</if>
+            <if test="partName != null  and partName != ''"> and part_name like concat('%', #{partName}, '%')</if>
+            <if test="uploadTime != null  and uploadTime != ''"> and upload_time = #{uploadTime}</if>
+            <if test="descript != null  and descript != ''"> and descript = #{descript}</if>
+            <if test="fileVer != null  and fileVer != ''"> and file_ver = #{fileVer}</if>
+            <if test="filePath != null  and filePath != ''"> and file_path = #{filePath}</if>
+        </where>
+    </select>
+    
+    <select id="selectDataFileById" parameterType="Long" resultMap="DataFileResult">
+        <include refid="selectDataFileVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertDataFile" parameterType="DataFile" useGeneratedKeys="true" keyProperty="id">
+        insert into t_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fileName != null">file_name,</if>
+            <if test="fileType != null">file_type,</if>
+            <if test="typeName != null">type_name,</if>
+            <if test="equipType != null">equip_type,</if>
+            <if test="sysName != null">sys_name,</if>
+            <if test="sysId != null">sys_id,</if>
+            <if test="majorId != null">major_id,</if>
+            <if test="majorName != null">major_name,</if>
+            <if test="partId != null">part_id,</if>
+            <if test="partName != null">part_name,</if>
+            <if test="uploadTime != null">upload_time,</if>
+            <if test="descript != null">descript,</if>
+            <if test="fileVer != null">file_ver,</if>
+            <if test="filePath != null">file_path,</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="fileName != null">#{fileName},</if>
+            <if test="fileType != null">#{fileType},</if>
+            <if test="typeName != null">#{typeName},</if>
+            <if test="equipType != null">#{equipType},</if>
+            <if test="sysName != null">#{sysName},</if>
+            <if test="sysId != null">#{sysId},</if>
+            <if test="majorId != null">#{majorId},</if>
+            <if test="majorName != null">#{majorName},</if>
+            <if test="partId != null">#{partId},</if>
+            <if test="partName != null">#{partName},</if>
+            <if test="uploadTime != null">#{uploadTime},</if>
+            <if test="descript != null">#{descript},</if>
+            <if test="fileVer != null">#{fileVer},</if>
+            <if test="filePath != null">#{filePath},</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="updateDataFile" parameterType="DataFile">
+        update t_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fileName != null">file_name = #{fileName},</if>
+            <if test="fileType != null">file_type = #{fileType},</if>
+            <if test="typeName != null">type_name = #{typeName},</if>
+            <if test="equipType != null">equip_type = #{equipType},</if>
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="sysId != null">sys_id = #{sysId},</if>
+            <if test="majorId != null">major_id = #{majorId},</if>
+            <if test="majorName != null">major_name = #{majorName},</if>
+            <if test="partId != null">part_id = #{partId},</if>
+            <if test="partName != null">part_name = #{partName},</if>
+            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+            <if test="descript != null">descript = #{descript},</if>
+            <if test="fileVer != null">file_ver = #{fileVer},</if>
+            <if test="filePath != null">file_path = #{filePath},</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="deleteDataFileById" parameterType="Long">
+        delete from t_file where id = #{id}
+    </delete>
+
+    <delete id="deleteDataFileByIds" parameterType="String">
+        delete from t_file where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 117 - 0
kgraph-admin/src/main/resources/mapper/ledger/EquipMapper.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.web.mapper.EquipMapper">
+    
+    <resultMap type="Equip" id="EquipResult">
+        <result property="id"    column="id"    />
+        <result property="equipName"    column="equip_name"    />
+        <result property="equipNo"    column="equip_no"    />
+        <result property="equipType"    column="equip_type"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="equipStatus"    column="equip_status"    />
+        <result property="faltCnt"    column="falt_cnt"    />
+        <result property="faltCntCur"    column="falt_cnt_cur"    />
+        <result property="faltRepaired"    column="falt_repaired"    />
+        <result property="faltRepairedCur"    column="falt_repaired_cur"    />
+        <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="selectEquipVo">
+        select id, equip_name, equip_no, equip_type, dept_id, dept_name, equip_status, falt_cnt, falt_cnt_cur, falt_repaired, falt_repaired_cur, create_by, create_time, update_by, update_time from t_equip
+    </sql>
+
+    <select id="selectEquipList" parameterType="Equip" resultMap="EquipResult">
+        <include refid="selectEquipVo"/>
+        <where>  
+            <if test="equipName != null  and equipName != ''"> and equip_name = #{equipName}</if>
+            <if test="equipNo != null  and equipNo != ''"> and equip_no = #{equipNo}</if>
+            <if test="equipType != null  and equipType != ''"> and equip_type = #{equipType}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name = #{deptName}</if>
+            <if test="equipStatus != null  and equipStatus != ''"> and equip_status = #{equipStatus}</if>
+            <if test="faltCnt != null "> and falt_cnt = #{faltCnt}</if>
+            <if test="faltCntCur != null "> and falt_cnt_cur = #{faltCntCur}</if>
+            <if test="faltRepaired != null "> and falt_repaired = #{faltRepaired}</if>
+            <if test="faltRepairedCur != null "> and falt_repaired_cur = #{faltRepairedCur}</if>
+        </where>
+    </select>
+    
+    <select id="selectEquipById" parameterType="Long" resultMap="EquipResult">
+        <include refid="selectEquipVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertEquip" parameterType="Equip" useGeneratedKeys="true" keyProperty="id">
+        insert into t_equip
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="equipName != null">equip_name,</if>
+            <if test="equipNo != null">equip_no,</if>
+            <if test="equipType != null">equip_type,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="equipStatus != null">equip_status,</if>
+            <if test="faltCnt != null">falt_cnt,</if>
+            <if test="faltCntCur != null">falt_cnt_cur,</if>
+            <if test="faltRepaired != null">falt_repaired,</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur,</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="equipName != null">#{equipName},</if>
+            <if test="equipNo != null">#{equipNo},</if>
+            <if test="equipType != null">#{equipType},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="equipStatus != null">#{equipStatus},</if>
+            <if test="faltCnt != null">#{faltCnt},</if>
+            <if test="faltCntCur != null">#{faltCntCur},</if>
+            <if test="faltRepaired != null">#{faltRepaired},</if>
+            <if test="faltRepairedCur != null">#{faltRepairedCur},</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="updateEquip" parameterType="Equip">
+        update t_equip
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="equipName != null">equip_name = #{equipName},</if>
+            <if test="equipNo != null">equip_no = #{equipNo},</if>
+            <if test="equipType != null">equip_type = #{equipType},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="equipStatus != null">equip_status = #{equipStatus},</if>
+            <if test="faltCnt != null">falt_cnt = #{faltCnt},</if>
+            <if test="faltCntCur != null">falt_cnt_cur = #{faltCntCur},</if>
+            <if test="faltRepaired != null">falt_repaired = #{faltRepaired},</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur = #{faltRepairedCur},</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="deleteEquipById" parameterType="Long">
+        delete from t_equip where id = #{id}
+    </delete>
+
+    <delete id="deleteEquipByIds" parameterType="String">
+        delete from t_equip where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 73 - 0
kgraph-admin/src/main/resources/mapper/ledger/MajorMapper.xml

@@ -0,0 +1,73 @@
+<?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.web.mapper.MajorMapper">
+    
+    <resultMap type="Major" id="MajorResult">
+        <result property="id"    column="id"    />
+        <result property="majorName"    column="major_name"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="sysId"    column="sys_id"    />
+        <result property="description"    column="description"    />
+    </resultMap>
+
+    <sql id="selectMajorVo">
+        select id, major_name, sys_name, sys_id, description from t_major
+    </sql>
+
+    <select id="selectMajorList" parameterType="Major" resultMap="MajorResult">
+        <include refid="selectMajorVo"/>
+        <where>  
+            <if test="majorName != null  and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
+            <if test="sysName != null  and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
+            <if test="sysId != null "> and sys_id = #{sysId}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+        </where>
+    </select>
+    
+    <select id="selectMajorById" parameterType="Long" resultMap="MajorResult">
+        <include refid="selectMajorVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertMajor" parameterType="Major">
+        insert into t_major
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="majorName != null">major_name,</if>
+            <if test="sysName != null">sys_name,</if>
+            <if test="sysId != null">sys_id,</if>
+            <if test="description != null">description,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="majorName != null">#{majorName},</if>
+            <if test="sysName != null">#{sysName},</if>
+            <if test="sysId != null">#{sysId},</if>
+            <if test="description != null">#{description},</if>
+         </trim>
+    </insert>
+
+    <update id="updateMajor" parameterType="Major">
+        update t_major
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="majorName != null">major_name = #{majorName},</if>
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="sysId != null">sys_id = #{sysId},</if>
+            <if test="description != null">description = #{description},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteMajorById" parameterType="Long">
+        delete from t_major where id = #{id}
+    </delete>
+
+    <delete id="deleteMajorByIds" parameterType="String">
+        delete from t_major where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 172 - 0
kgraph-admin/src/main/resources/mapper/ledger/equipPartsMapper.xml

@@ -0,0 +1,172 @@
+<?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.web.mapper.equipPartsMapper">
+    
+    <resultMap type="equipParts" id="equipPartsResult">
+        <result property="id"    column="id"    />
+        <result property="partName"    column="part_name"    />
+        <result property="sysId"    column="sys_id"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="majorId"    column="major_id"    />
+        <result property="majorName"    column="major_name"    />
+        <result property="partNo"    column="part_no"    />
+        <result property="partType"    column="part_type"    />
+        <result property="factory"    column="factory"    />
+        <result property="factoryRepaired"    column="factory_repaired"    />
+        <result property="exFacDate"    column="ex_fac_date"    />
+        <result property="repairDate"    column="repair_date"    />
+        <result property="repairCnt"    column="repair_cnt"    />
+        <result property="workedTime"    column="worked_time"    />
+        <result property="workedTimeCur"    column="worked_time_cur"    />
+        <result property="workBeginTime"    column="work_begin_time"    />
+        <result property="descprit"    column="descprit"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="curStatus"    column="cur_status"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="faltCnt"    column="falt_cnt"    />
+        <result property="faltCntCur"    column="falt_cnt_cur"    />
+        <result property="faltRepaired"    column="falt_repaired"    />
+        <result property="faltRepairedCur"    column="falt_repaired_cur"    />
+    </resultMap>
+
+    <sql id="selectequipPartsVo">
+        select id, part_name, sys_id, sys_name, major_id, major_name, part_no, part_type, factory, factory_repaired, ex_fac_date, repair_date, repair_cnt, worked_time, worked_time_cur, work_begin_time, descprit, create_by, create_time, update_by, cur_status, update_time, falt_cnt, falt_cnt_cur, falt_repaired, falt_repaired_cur from t_parts
+    </sql>
+
+    <select id="selectequipPartsList" parameterType="equipParts" resultMap="equipPartsResult">
+        <include refid="selectequipPartsVo"/>
+        <where>  
+            <if test="partName != null  and partName != ''"> and part_name like concat('%', #{partName}, '%')</if>
+            <if test="sysId != null "> and sys_id = #{sysId}</if>
+            <if test="sysName != null  and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
+            <if test="majorId != null "> and major_id = #{majorId}</if>
+            <if test="majorName != null  and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
+            <if test="partNo != null  and partNo != ''"> and part_no = #{partNo}</if>
+            <if test="partType != null  and partType != ''"> and part_type = #{partType}</if>
+            <if test="factory != null  and factory != ''"> and factory = #{factory}</if>
+            <if test="factoryRepaired != null  and factoryRepaired != ''"> and factory_repaired = #{factoryRepaired}</if>
+            <if test="exFacDate != null "> and ex_fac_date = #{exFacDate}</if>
+            <if test="repairDate != null "> and repair_date = #{repairDate}</if>
+            <if test="repairCnt != null "> and repair_cnt = #{repairCnt}</if>
+            <if test="workedTime != null  and workedTime != ''"> and worked_time = #{workedTime}</if>
+            <if test="workedTimeCur != null  and workedTimeCur != ''"> and worked_time_cur = #{workedTimeCur}</if>
+            <if test="workBeginTime != null  and workBeginTime != ''"> and work_begin_time = #{workBeginTime}</if>
+            <if test="descprit != null  and descprit != ''"> and descprit = #{descprit}</if>
+            <if test="curStatus != null  and curStatus != ''"> and cur_status = #{curStatus}</if>
+            <if test="faltCnt != null "> and falt_cnt = #{faltCnt}</if>
+            <if test="faltCntCur != null "> and falt_cnt_cur = #{faltCntCur}</if>
+            <if test="faltRepaired != null "> and falt_repaired = #{faltRepaired}</if>
+            <if test="faltRepairedCur != null "> and falt_repaired_cur = #{faltRepairedCur}</if>
+        </where>
+    </select>
+    
+    <select id="selectequipPartsById" parameterType="Long" resultMap="equipPartsResult">
+        <include refid="selectequipPartsVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertequipParts" parameterType="equipParts" useGeneratedKeys="true" keyProperty="id">
+        insert into t_parts
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="partName != null">part_name,</if>
+            <if test="sysId != null">sys_id,</if>
+            <if test="sysName != null">sys_name,</if>
+            <if test="majorId != null">major_id,</if>
+            <if test="majorName != null">major_name,</if>
+            <if test="partNo != null">part_no,</if>
+            <if test="partType != null">part_type,</if>
+            <if test="factory != null">factory,</if>
+            <if test="factoryRepaired != null">factory_repaired,</if>
+            <if test="exFacDate != null">ex_fac_date,</if>
+            <if test="repairDate != null">repair_date,</if>
+            <if test="repairCnt != null">repair_cnt,</if>
+            <if test="workedTime != null">worked_time,</if>
+            <if test="workedTimeCur != null">worked_time_cur,</if>
+            <if test="workBeginTime != null">work_begin_time,</if>
+            <if test="descprit != null">descprit,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="curStatus != null">cur_status,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="faltCnt != null">falt_cnt,</if>
+            <if test="faltCntCur != null">falt_cnt_cur,</if>
+            <if test="faltRepaired != null">falt_repaired,</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="partName != null">#{partName},</if>
+            <if test="sysId != null">#{sysId},</if>
+            <if test="sysName != null">#{sysName},</if>
+            <if test="majorId != null">#{majorId},</if>
+            <if test="majorName != null">#{majorName},</if>
+            <if test="partNo != null">#{partNo},</if>
+            <if test="partType != null">#{partType},</if>
+            <if test="factory != null">#{factory},</if>
+            <if test="factoryRepaired != null">#{factoryRepaired},</if>
+            <if test="exFacDate != null">#{exFacDate},</if>
+            <if test="repairDate != null">#{repairDate},</if>
+            <if test="repairCnt != null">#{repairCnt},</if>
+            <if test="workedTime != null">#{workedTime},</if>
+            <if test="workedTimeCur != null">#{workedTimeCur},</if>
+            <if test="workBeginTime != null">#{workBeginTime},</if>
+            <if test="descprit != null">#{descprit},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="curStatus != null">#{curStatus},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="faltCnt != null">#{faltCnt},</if>
+            <if test="faltCntCur != null">#{faltCntCur},</if>
+            <if test="faltRepaired != null">#{faltRepaired},</if>
+            <if test="faltRepairedCur != null">#{faltRepairedCur},</if>
+         </trim>
+    </insert>
+
+    <update id="updateequipParts" parameterType="equipParts">
+        update t_parts
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="partName != null">part_name = #{partName},</if>
+            <if test="sysId != null">sys_id = #{sysId},</if>
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="majorId != null">major_id = #{majorId},</if>
+            <if test="majorName != null">major_name = #{majorName},</if>
+            <if test="partNo != null">part_no = #{partNo},</if>
+            <if test="partType != null">part_type = #{partType},</if>
+            <if test="factory != null">factory = #{factory},</if>
+            <if test="factoryRepaired != null">factory_repaired = #{factoryRepaired},</if>
+            <if test="exFacDate != null">ex_fac_date = #{exFacDate},</if>
+            <if test="repairDate != null">repair_date = #{repairDate},</if>
+            <if test="repairCnt != null">repair_cnt = #{repairCnt},</if>
+            <if test="workedTime != null">worked_time = #{workedTime},</if>
+            <if test="workedTimeCur != null">worked_time_cur = #{workedTimeCur},</if>
+            <if test="workBeginTime != null">work_begin_time = #{workBeginTime},</if>
+            <if test="descprit != null">descprit = #{descprit},</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="curStatus != null">cur_status = #{curStatus},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="faltCnt != null">falt_cnt = #{faltCnt},</if>
+            <if test="faltCntCur != null">falt_cnt_cur = #{faltCntCur},</if>
+            <if test="faltRepaired != null">falt_repaired = #{faltRepaired},</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur = #{faltRepairedCur},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteequipPartsById" parameterType="Long">
+        delete from t_parts where id = #{id}
+    </delete>
+
+    <delete id="deleteequipPartsByIds" parameterType="String">
+        delete from t_parts where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 147 - 0
kgraph-admin/src/main/resources/mapper/ledger/equipSysMapper.xml

@@ -0,0 +1,147 @@
+<?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.web.mapper.equipSysMapper">
+    
+    <resultMap type="equipSys" id="equipSysResult">
+        <result property="id"    column="id"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="sysType"    column="sys_type"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="parentName"    column="parent_name"    />
+        <result property="childCnt"    column="child_cnt"    />
+        <result property="majorId"    column="major_id"    />
+        <result property="majorName"    column="major_name"    />
+        <result property="platId"    column="plat_id"    />
+        <result property="platName"    column="plat_name"    />
+        <result property="partCnt"    column="part_cnt"    />
+        <result property="descprit"    column="descprit"    />
+        <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="curStatus"    column="cur_status"    />
+        <result property="faltCnt"    column="falt_cnt"    />
+        <result property="faltCntCur"    column="falt_cnt_cur"    />
+        <result property="faltRepaired"    column="falt_repaired"    />
+        <result property="faltRepairedCur"    column="falt_repaired_cur"    />
+    </resultMap>
+
+    <sql id="selectequipSysVo">
+        select id, sys_name, sys_type, parent_id, parent_name, child_cnt, major_id, major_name, plat_id, plat_name, part_cnt, descprit, create_by, create_time, update_by, update_time, cur_status, falt_cnt, falt_cnt_cur, falt_repaired, falt_repaired_cur from t_sys
+    </sql>
+
+    <select id="selectequipSysList" parameterType="equipSys" resultMap="equipSysResult">
+        <include refid="selectequipSysVo"/>
+        <where>  
+            <if test="sysName != null  and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
+            <if test="sysType != null  and sysType != ''"> and sys_type = #{sysType}</if>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="parentName != null  and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
+            <if test="childCnt != null "> and child_cnt = #{childCnt}</if>
+            <if test="majorId != null "> and major_id = #{majorId}</if>
+            <if test="majorName != null  and majorName != ''"> and major_name like concat('%', #{majorName}, '%')</if>
+            <if test="platId != null "> and plat_id = #{platId}</if>
+            <if test="platName != null  and platName != ''"> and plat_name like concat('%', #{platName}, '%')</if>
+            <if test="partCnt != null "> and part_cnt = #{partCnt}</if>
+            <if test="descprit != null  and descprit != ''"> and descprit = #{descprit}</if>
+            <if test="curStatus != null  and curStatus != ''"> and cur_status = #{curStatus}</if>
+            <if test="faltCnt != null "> and falt_cnt = #{faltCnt}</if>
+            <if test="faltCntCur != null "> and falt_cnt_cur = #{faltCntCur}</if>
+            <if test="faltRepaired != null "> and falt_repaired = #{faltRepaired}</if>
+            <if test="faltRepairedCur != null "> and falt_repaired_cur = #{faltRepairedCur}</if>
+        </where>
+    </select>
+    
+    <select id="selectequipSysById" parameterType="Long" resultMap="equipSysResult">
+        <include refid="selectequipSysVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertequipSys" parameterType="equipSys" useGeneratedKeys="true" keyProperty="id">
+        insert into t_sys
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sysName != null">sys_name,</if>
+            <if test="sysType != null">sys_type,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="parentName != null">parent_name,</if>
+            <if test="childCnt != null">child_cnt,</if>
+            <if test="majorId != null">major_id,</if>
+            <if test="majorName != null">major_name,</if>
+            <if test="platId != null">plat_id,</if>
+            <if test="platName != null">plat_name,</if>
+            <if test="partCnt != null">part_cnt,</if>
+            <if test="descprit != null">descprit,</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="curStatus != null">cur_status,</if>
+            <if test="faltCnt != null">falt_cnt,</if>
+            <if test="faltCntCur != null">falt_cnt_cur,</if>
+            <if test="faltRepaired != null">falt_repaired,</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sysName != null">#{sysName},</if>
+            <if test="sysType != null">#{sysType},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="parentName != null">#{parentName},</if>
+            <if test="childCnt != null">#{childCnt},</if>
+            <if test="majorId != null">#{majorId},</if>
+            <if test="majorName != null">#{majorName},</if>
+            <if test="platId != null">#{platId},</if>
+            <if test="platName != null">#{platName},</if>
+            <if test="partCnt != null">#{partCnt},</if>
+            <if test="descprit != null">#{descprit},</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="curStatus != null">#{curStatus},</if>
+            <if test="faltCnt != null">#{faltCnt},</if>
+            <if test="faltCntCur != null">#{faltCntCur},</if>
+            <if test="faltRepaired != null">#{faltRepaired},</if>
+            <if test="faltRepairedCur != null">#{faltRepairedCur},</if>
+         </trim>
+    </insert>
+
+    <update id="updateequipSys" parameterType="equipSys">
+        update t_sys
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="sysType != null">sys_type = #{sysType},</if>
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="parentName != null">parent_name = #{parentName},</if>
+            <if test="childCnt != null">child_cnt = #{childCnt},</if>
+            <if test="majorId != null">major_id = #{majorId},</if>
+            <if test="majorName != null">major_name = #{majorName},</if>
+            <if test="platId != null">plat_id = #{platId},</if>
+            <if test="platName != null">plat_name = #{platName},</if>
+            <if test="partCnt != null">part_cnt = #{partCnt},</if>
+            <if test="descprit != null">descprit = #{descprit},</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="curStatus != null">cur_status = #{curStatus},</if>
+            <if test="faltCnt != null">falt_cnt = #{faltCnt},</if>
+            <if test="faltCntCur != null">falt_cnt_cur = #{faltCntCur},</if>
+            <if test="faltRepaired != null">falt_repaired = #{faltRepaired},</if>
+            <if test="faltRepairedCur != null">falt_repaired_cur = #{faltRepairedCur},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteequipSysById" parameterType="Long">
+        delete from t_sys where id = #{id}
+    </delete>
+
+    <delete id="deleteequipSysByIds" parameterType="String">
+        delete from t_sys where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 87 - 0
kgraph-admin/src/main/resources/mapper/ledger/platformMapper.xml

@@ -0,0 +1,87 @@
+<?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.web.mapper.platformMapper">
+    
+    <resultMap type="platform" id="platformResult">
+        <result property="id"    column="id"    />
+        <result property="platName"    column="plat_name"    />
+        <result property="platType"    column="plat_type"    />
+        <result property="platVer"    column="plat_ver"    />
+        <result property="descript"    column="descript"    />
+        <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="selectplatformVo">
+        select id, plat_name, plat_type, plat_ver, descript, create_by, create_time, update_by, update_time from t_platform
+    </sql>
+
+    <select id="selectplatformList" parameterType="platform" resultMap="platformResult">
+        <include refid="selectplatformVo"/>
+        <where>  
+            <if test="platName != null  and platName != ''"> and plat_name like concat('%', #{platName}, '%')</if>
+            <if test="platType != null  and platType != ''"> and plat_type = #{platType}</if>
+            <if test="platVer != null  and platVer != ''"> and plat_ver = #{platVer}</if>
+            <if test="descript != null  and descript != ''"> and descript = #{descript}</if>
+        </where>
+    </select>
+    
+    <select id="selectplatformById" parameterType="Long" resultMap="platformResult">
+        <include refid="selectplatformVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertplatform" parameterType="platform" useGeneratedKeys="true" keyProperty="id">
+        insert into t_platform
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="platName != null">plat_name,</if>
+            <if test="platType != null">plat_type,</if>
+            <if test="platVer != null">plat_ver,</if>
+            <if test="descript != null">descript,</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="platName != null">#{platName},</if>
+            <if test="platType != null">#{platType},</if>
+            <if test="platVer != null">#{platVer},</if>
+            <if test="descript != null">#{descript},</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="updateplatform" parameterType="platform">
+        update t_platform
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="platName != null">plat_name = #{platName},</if>
+            <if test="platType != null">plat_type = #{platType},</if>
+            <if test="platVer != null">plat_ver = #{platVer},</if>
+            <if test="descript != null">descript = #{descript},</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="deleteplatformById" parameterType="Long">
+        delete from t_platform where id = #{id}
+    </delete>
+
+    <delete id="deleteplatformByIds" parameterType="String">
+        delete from t_platform where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 122 - 0
kgraph-admin/src/main/resources/mapper/maintenance/FaultInfoMapper.xml

@@ -0,0 +1,122 @@
+<?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.web.mapper.FaultInfoMapper">
+    
+    <resultMap type="FaultInfo" id="FaultInfoResult">
+        <result property="id"    column="id"    />
+        <result property="faultName"    column="fault_name"    />
+        <result property="faultType"    column="fault_type"    />
+        <result property="platName"    column="plat_name"    />
+        <result property="sysId"    column="sys_id"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="majorId"    column="major_id"    />
+        <result property="majorName"    column="major_name"    />
+        <result property="descript"    column="descript"    />
+        <result property="faultReason"    column="fault_reason"    />
+        <result property="faultFrom"    column="fault_from"    />
+        <result property="faultResult"    column="fault_result"    />
+        <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="selectFaultInfoVo">
+        select id, fault_name, fault_type, plat_name, sys_id, sys_name, major_id, major_name, descript, fault_reason, fault_from, fault_result, create_by, create_time, update_by, update_time from t_fault
+    </sql>
+
+    <select id="selectFaultInfoList" parameterType="FaultInfo" resultMap="FaultInfoResult">
+        <include refid="selectFaultInfoVo"/>
+        <where>  
+            <if test="faultName != null  and faultName != ''"> and fault_name = #{faultName}</if>
+            <if test="faultType != null  and faultType != ''"> and fault_type = #{faultType}</if>
+            <if test="platName != null  and platName != ''"> and plat_name = #{platName}</if>
+            <if test="sysId != null "> and sys_id = #{sysId}</if>
+            <if test="sysName != null  and sysName != ''"> and sys_name = #{sysName}</if>
+            <if test="majorId != null "> and major_id = #{majorId}</if>
+            <if test="majorName != null  and majorName != ''"> and major_name = #{majorName}</if>
+            <if test="descript != null  and descript != ''"> and descript = #{descript}</if>
+            <if test="faultReason != null  and faultReason != ''"> and fault_reason = #{faultReason}</if>
+            <if test="faultFrom != null  and faultFrom != ''"> and fault_from = #{faultFrom}</if>
+            <if test="faultResult != null  and faultResult != ''"> and fault_result = #{faultResult}</if>
+        </where>
+    </select>
+    
+    <select id="selectFaultInfoById" parameterType="Long" resultMap="FaultInfoResult">
+        <include refid="selectFaultInfoVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFaultInfo" parameterType="FaultInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into t_fault
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="faultName != null">fault_name,</if>
+            <if test="faultType != null">fault_type,</if>
+            <if test="platName != null">plat_name,</if>
+            <if test="sysId != null">sys_id,</if>
+            <if test="sysName != null">sys_name,</if>
+            <if test="majorId != null">major_id,</if>
+            <if test="majorName != null">major_name,</if>
+            <if test="descript != null">descript,</if>
+            <if test="faultReason != null">fault_reason,</if>
+            <if test="faultFrom != null">fault_from,</if>
+            <if test="faultResult != null">fault_result,</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="faultName != null">#{faultName},</if>
+            <if test="faultType != null">#{faultType},</if>
+            <if test="platName != null">#{platName},</if>
+            <if test="sysId != null">#{sysId},</if>
+            <if test="sysName != null">#{sysName},</if>
+            <if test="majorId != null">#{majorId},</if>
+            <if test="majorName != null">#{majorName},</if>
+            <if test="descript != null">#{descript},</if>
+            <if test="faultReason != null">#{faultReason},</if>
+            <if test="faultFrom != null">#{faultFrom},</if>
+            <if test="faultResult != null">#{faultResult},</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="updateFaultInfo" parameterType="FaultInfo">
+        update t_fault
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="faultName != null">fault_name = #{faultName},</if>
+            <if test="faultType != null">fault_type = #{faultType},</if>
+            <if test="platName != null">plat_name = #{platName},</if>
+            <if test="sysId != null">sys_id = #{sysId},</if>
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="majorId != null">major_id = #{majorId},</if>
+            <if test="majorName != null">major_name = #{majorName},</if>
+            <if test="descript != null">descript = #{descript},</if>
+            <if test="faultReason != null">fault_reason = #{faultReason},</if>
+            <if test="faultFrom != null">fault_from = #{faultFrom},</if>
+            <if test="faultResult != null">fault_result = #{faultResult},</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="deleteFaultInfoById" parameterType="Long">
+        delete from t_fault where id = #{id}
+    </delete>
+
+    <delete id="deleteFaultInfoByIds" parameterType="String">
+        delete from t_fault where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 182 - 0
kgraph-admin/src/main/resources/mapper/maintenance/FaultRecordMapper.xml

@@ -0,0 +1,182 @@
+<?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.web.mapper.FaultRecordMapper">
+    
+    <resultMap type="FaultRecord" id="FaultRecordResult">
+        <result property="id"    column="id"    />
+        <result property="equipType"    column="equip_type"    />
+        <result property="equipNo"    column="equip_no"    />
+        <result property="equipDept"    column="equip_dept"    />
+        <result property="sysId"    column="sys_id"    />
+        <result property="sysName"    column="sys_name"    />
+        <result property="partId"    column="part_id"    />
+        <result property="partName"    column="part_name"    />
+        <result property="replacePartId"    column="replace_part_id"    />
+        <result property="replacePartName"    column="replace_part_name"    />
+        <result property="faultType"    column="fault_type"    />
+        <result property="discoverTime"    column="discover_time"    />
+        <result property="occurTime"    column="occur_time"    />
+        <result property="occurOppur"    column="occur_oppur"    />
+        <result property="discoverPeople"    column="discover_people"    />
+        <result property="occurPlace"    column="occur_place"    />
+        <result property="reportDept"    column="report_dept"    />
+        <result property="reviewer"    column="reviewer"    />
+        <result property="confirmDescript"    column="confirm_descript"    />
+        <result property="confirmUser"    column="confirm_user"    />
+        <result property="repairUser"    column="repair_user"    />
+        <result property="repairTimeCnt"    column="repair_time_cnt"    />
+        <result property="repairTime"    column="repair_time"    />
+        <result property="repairPeopleCnt"    column="repair_people_cnt"    />
+        <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="selectFaultRecordVo">
+        select id, equip_type, equip_no, equip_dept, sys_id, sys_name, part_id, part_name, replace_part_id, replace_part_name, fault_type, discover_time, occur_time, occur_oppur, discover_people, occur_place, report_dept, reviewer, confirm_descript, confirm_user, repair_user, repair_time_cnt, repair_time, repair_people_cnt, create_by, create_time, update_by, update_time from t_fault_record
+    </sql>
+
+    <select id="selectFaultRecordList" parameterType="FaultRecord" resultMap="FaultRecordResult">
+        <include refid="selectFaultRecordVo"/>
+        <where>  
+            <if test="equipType != null  and equipType != ''"> and equip_type = #{equipType}</if>
+            <if test="equipNo != null  and equipNo != ''"> and equip_no = #{equipNo}</if>
+            <if test="equipDept != null  and equipDept != ''"> and equip_dept = #{equipDept}</if>
+            <if test="sysId != null "> and sys_id = #{sysId}</if>
+            <if test="sysName != null  and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
+            <if test="partId != null "> and part_id = #{partId}</if>
+            <if test="partName != null  and partName != ''"> and part_name like concat('%', #{partName}, '%')</if>
+            <if test="replacePartId != null "> and replace_part_id = #{replacePartId}</if>
+            <if test="replacePartName != null  and replacePartName != ''"> and replace_part_name like concat('%', #{replacePartName}, '%')</if>
+            <if test="faultType != null  and faultType != ''"> and fault_type = #{faultType}</if>
+            <if test="discoverTime != null  and discoverTime != ''"> and discover_time = #{discoverTime}</if>
+            <if test="occurTime != null  and occurTime != ''"> and occur_time = #{occurTime}</if>
+            <if test="occurOppur != null  and occurOppur != ''"> and occur_oppur = #{occurOppur}</if>
+            <if test="discoverPeople != null  and discoverPeople != ''"> and discover_people = #{discoverPeople}</if>
+            <if test="occurPlace != null  and occurPlace != ''"> and occur_place = #{occurPlace}</if>
+            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
+            <if test="reviewer != null  and reviewer != ''"> and reviewer = #{reviewer}</if>
+            <if test="confirmDescript != null  and confirmDescript != ''"> and confirm_descript = #{confirmDescript}</if>
+            <if test="confirmUser != null  and confirmUser != ''"> and confirm_user = #{confirmUser}</if>
+            <if test="repairUser != null  and repairUser != ''"> and repair_user = #{repairUser}</if>
+            <if test="repairTimeCnt != null  and repairTimeCnt != ''"> and repair_time_cnt = #{repairTimeCnt}</if>
+            <if test="repairTime != null  and repairTime != ''"> and repair_time = #{repairTime}</if>
+            <if test="repairPeopleCnt != null "> and repair_people_cnt = #{repairPeopleCnt}</if>
+        </where>
+    </select>
+    
+    <select id="selectFaultRecordById" parameterType="Long" resultMap="FaultRecordResult">
+        <include refid="selectFaultRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFaultRecord" parameterType="FaultRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into t_fault_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="equipType != null">equip_type,</if>
+            <if test="equipNo != null">equip_no,</if>
+            <if test="equipDept != null">equip_dept,</if>
+            <if test="sysId != null">sys_id,</if>
+            <if test="sysName != null">sys_name,</if>
+            <if test="partId != null">part_id,</if>
+            <if test="partName != null">part_name,</if>
+            <if test="replacePartId != null">replace_part_id,</if>
+            <if test="replacePartName != null">replace_part_name,</if>
+            <if test="faultType != null">fault_type,</if>
+            <if test="discoverTime != null">discover_time,</if>
+            <if test="occurTime != null">occur_time,</if>
+            <if test="occurOppur != null">occur_oppur,</if>
+            <if test="discoverPeople != null">discover_people,</if>
+            <if test="occurPlace != null">occur_place,</if>
+            <if test="reportDept != null">report_dept,</if>
+            <if test="reviewer != null">reviewer,</if>
+            <if test="confirmDescript != null">confirm_descript,</if>
+            <if test="confirmUser != null">confirm_user,</if>
+            <if test="repairUser != null">repair_user,</if>
+            <if test="repairTimeCnt != null">repair_time_cnt,</if>
+            <if test="repairTime != null">repair_time,</if>
+            <if test="repairPeopleCnt != null">repair_people_cnt,</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="equipType != null">#{equipType},</if>
+            <if test="equipNo != null">#{equipNo},</if>
+            <if test="equipDept != null">#{equipDept},</if>
+            <if test="sysId != null">#{sysId},</if>
+            <if test="sysName != null">#{sysName},</if>
+            <if test="partId != null">#{partId},</if>
+            <if test="partName != null">#{partName},</if>
+            <if test="replacePartId != null">#{replacePartId},</if>
+            <if test="replacePartName != null">#{replacePartName},</if>
+            <if test="faultType != null">#{faultType},</if>
+            <if test="discoverTime != null">#{discoverTime},</if>
+            <if test="occurTime != null">#{occurTime},</if>
+            <if test="occurOppur != null">#{occurOppur},</if>
+            <if test="discoverPeople != null">#{discoverPeople},</if>
+            <if test="occurPlace != null">#{occurPlace},</if>
+            <if test="reportDept != null">#{reportDept},</if>
+            <if test="reviewer != null">#{reviewer},</if>
+            <if test="confirmDescript != null">#{confirmDescript},</if>
+            <if test="confirmUser != null">#{confirmUser},</if>
+            <if test="repairUser != null">#{repairUser},</if>
+            <if test="repairTimeCnt != null">#{repairTimeCnt},</if>
+            <if test="repairTime != null">#{repairTime},</if>
+            <if test="repairPeopleCnt != null">#{repairPeopleCnt},</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="updateFaultRecord" parameterType="FaultRecord">
+        update t_fault_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="equipType != null">equip_type = #{equipType},</if>
+            <if test="equipNo != null">equip_no = #{equipNo},</if>
+            <if test="equipDept != null">equip_dept = #{equipDept},</if>
+            <if test="sysId != null">sys_id = #{sysId},</if>
+            <if test="sysName != null">sys_name = #{sysName},</if>
+            <if test="partId != null">part_id = #{partId},</if>
+            <if test="partName != null">part_name = #{partName},</if>
+            <if test="replacePartId != null">replace_part_id = #{replacePartId},</if>
+            <if test="replacePartName != null">replace_part_name = #{replacePartName},</if>
+            <if test="faultType != null">fault_type = #{faultType},</if>
+            <if test="discoverTime != null">discover_time = #{discoverTime},</if>
+            <if test="occurTime != null">occur_time = #{occurTime},</if>
+            <if test="occurOppur != null">occur_oppur = #{occurOppur},</if>
+            <if test="discoverPeople != null">discover_people = #{discoverPeople},</if>
+            <if test="occurPlace != null">occur_place = #{occurPlace},</if>
+            <if test="reportDept != null">report_dept = #{reportDept},</if>
+            <if test="reviewer != null">reviewer = #{reviewer},</if>
+            <if test="confirmDescript != null">confirm_descript = #{confirmDescript},</if>
+            <if test="confirmUser != null">confirm_user = #{confirmUser},</if>
+            <if test="repairUser != null">repair_user = #{repairUser},</if>
+            <if test="repairTimeCnt != null">repair_time_cnt = #{repairTimeCnt},</if>
+            <if test="repairTime != null">repair_time = #{repairTime},</if>
+            <if test="repairPeopleCnt != null">repair_people_cnt = #{repairPeopleCnt},</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="deleteFaultRecordById" parameterType="Long">
+        delete from t_fault_record where id = #{id}
+    </delete>
+
+    <delete id="deleteFaultRecordByIds" parameterType="String">
+        delete from t_fault_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 20 - 0
kgraph-admin/src/main/resources/mybatis/mybatis-config.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <!-- 全局参数 -->
+    <settings>
+        <!-- 使全局的映射器启用或禁用缓存 -->
+        <setting name="cacheEnabled"             value="true"   />
+        <!-- 允许JDBC 支持自动生成主键 -->
+        <setting name="useGeneratedKeys"         value="true"   />
+        <!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
+        <setting name="defaultExecutorType"      value="SIMPLE" />
+		<!-- 指定 MyBatis 所用日志的具体实现 -->
+        <setting name="logImpl"                  value="SLF4J"  />
+        <!-- 使用驼峰命名法转换字段 -->
+		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+	</settings>
+	
+</configuration>

+ 130 - 0
kgraph-common/pom.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>kgraph</artifactId>
+        <groupId>com.kgraph</groupId>
+        <version>1.0.2</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>kgraph-common</artifactId>
+
+    <description>
+        common通用工具
+    </description>
+
+    <dependencies>
+
+        <!-- Spring框架基本的核心工具 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+
+        <!-- SpringWeb模块 -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+
+        <!-- spring security 安全认证 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+
+        <!-- pagehelper 分页插件 -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 自定义验证注解 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <!--常用工具类 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+  
+        <!-- JSON工具类 -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+
+        <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+        </dependency>
+
+        <!-- io常用工具类 -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+
+        <!-- 文件上传工具类 -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+        </dependency>
+
+        <!-- excel工具 -->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+        </dependency>
+
+        <!-- yml解析器 -->
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+        </dependency>
+
+        <!-- Token生成与解析-->
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+        </dependency>
+
+        <!-- Jaxb -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+
+        <!-- redis 缓存操作 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <!-- pool 对象池 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+
+        <!-- 解析客户端操作系统、浏览器等 -->
+        <dependency>
+            <groupId>eu.bitwalker</groupId>
+            <artifactId>UserAgentUtils</artifactId>
+        </dependency>
+
+        <!-- servlet包 -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 19 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/Anonymous.java

@@ -0,0 +1,19 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 匿名访问不鉴权注解
+ * 
+ * @author xxx
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Anonymous
+{
+}

+ 33 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/DataScope.java

@@ -0,0 +1,33 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 数据权限过滤注解
+ * 
+ * @author xxx
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataScope
+{
+    /**
+     * 部门表的别名
+     */
+    public String deptAlias() default "";
+
+    /**
+     * 用户表的别名
+     */
+    public String userAlias() default "";
+
+    /**
+     * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来
+     */
+    public String permission() default "";
+}

+ 28 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/DataSource.java

@@ -0,0 +1,28 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import com.kgraph.common.enums.DataSourceType;
+
+/**
+ * 自定义多数据源切换注解
+ *
+ * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
+ *
+ * @author xxx
+ */
+@Target({ ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface DataSource
+{
+    /**
+     * 切换数据源名称
+     */
+    public DataSourceType value() default DataSourceType.MASTER;
+}

+ 188 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/Excel.java

@@ -0,0 +1,188 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.math.BigDecimal;
+
+import com.kgraph.common.utils.poi.ExcelHandlerAdapter;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.IndexedColors;
+
+/**
+ * 自定义导出Excel数据注解
+ * 
+ * @author xxx
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface Excel
+{
+    /**
+     * 导出时在excel中排序
+     */
+    public int sort() default Integer.MAX_VALUE;
+
+    /**
+     * 导出到Excel中的名字.
+     */
+    public String name() default "";
+
+    /**
+     * 日期格式, 如: yyyy-MM-dd
+     */
+    public String dateFormat() default "";
+
+    /**
+     * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
+     */
+    public String dictType() default "";
+
+    /**
+     * 读取内容转表达式 (如: 0=男,1=女,2=未知)
+     */
+    public String readConverterExp() default "";
+
+    /**
+     * 分隔符,读取字符串组内容
+     */
+    public String separator() default ",";
+
+    /**
+     * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
+     */
+    public int scale() default -1;
+
+    /**
+     * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
+     */
+    public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
+
+    /**
+     * 导出时在excel中每个列的高度 单位为字符
+     */
+    public double height() default 14;
+
+    /**
+     * 导出时在excel中每个列的宽 单位为字符
+     */
+    public double width() default 16;
+
+    /**
+     * 文字后缀,如% 90 变成90%
+     */
+    public String suffix() default "";
+
+    /**
+     * 当值为空时,字段的默认值
+     */
+    public String defaultValue() default "";
+
+    /**
+     * 提示信息
+     */
+    public String prompt() default "";
+
+    /**
+     * 设置只能选择不能输入的列内容.
+     */
+    public String[] combo() default {};
+
+    /**
+     * 是否需要纵向合并单元格,应对需求:含有list集合单元格)
+     */
+    public boolean needMerge() default false;
+
+    /**
+     * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
+     */
+    public boolean isExport() default true;
+
+    /**
+     * 另一个类中的属性名称,支持多级获取,以小数点隔开
+     */
+    public String targetAttr() default "";
+
+    /**
+     * 是否自动统计数据,在最后追加一行统计数据总和
+     */
+    public boolean isStatistics() default false;
+
+    /**
+     * 导出类型(0数字 1字符串 2图片)
+     */
+    public ColumnType cellType() default ColumnType.STRING;
+
+    /**
+     * 导出列头背景色
+     */
+    public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
+
+    /**
+     * 导出列头字体颜色
+     */
+    public IndexedColors headerColor() default IndexedColors.WHITE;
+
+    /**
+     * 导出单元格背景色
+     */
+    public IndexedColors backgroundColor() default IndexedColors.WHITE;
+
+    /**
+     * 导出单元格字体颜色
+     */
+    public IndexedColors color() default IndexedColors.BLACK;
+
+    /**
+     * 导出字段对齐方式
+     */
+    public HorizontalAlignment align() default HorizontalAlignment.CENTER;
+
+    /**
+     * 自定义数据处理器
+     */
+    public Class<?> handler() default ExcelHandlerAdapter.class;
+
+    /**
+     * 自定义数据处理器参数
+     */
+    public String[] args() default {};
+
+    /**
+     * 字段类型(0:导出导入;1:仅导出;2:仅导入)
+     */
+    Type type() default Type.ALL;
+
+    public enum Type
+    {
+        ALL(0), EXPORT(1), IMPORT(2);
+        private final int value;
+
+        Type(int value)
+        {
+            this.value = value;
+        }
+
+        public int value()
+        {
+            return this.value;
+        }
+    }
+
+    public enum ColumnType
+    {
+        NUMERIC(0), STRING(1), IMAGE(2);
+        private final int value;
+
+        ColumnType(int value)
+        {
+            this.value = value;
+        }
+
+        public int value()
+        {
+            return this.value;
+        }
+    }
+}

+ 18 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/Excels.java

@@ -0,0 +1,18 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Excel注解集
+ * 
+ * @author xxx
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Excels
+{
+    public Excel[] value();
+}

+ 45 - 0
kgraph-common/src/main/java/com/kgraph/common/annotation/Log.java

@@ -0,0 +1,45 @@
+package com.kgraph.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import com.kgraph.common.enums.BusinessType;
+import com.kgraph.common.enums.OperatorType;
+
+/**
+ * 自定义操作日志记录注解
+ * 
+ *
+ */
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Log
+{
+    /**
+     * 模块 
+     */
+    public String title() default "";
+
+    /**
+     * 功能
+     */
+    public BusinessType businessType() default BusinessType.OTHER;
+
+    /**
+     * 操作人类别
+     */
+    public OperatorType operatorType() default OperatorType.MANAGE;
+
+    /**
+     * 是否保存请求的参数
+     */
+    public boolean isSaveRequestData() default true;
+
+    /**
+     * 是否保存响应的参数
+     */
+    public boolean isSaveResponseData() default true;
+}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików