zsf 2 years ago
commit
4f481a921c
100 changed files with 10740 additions and 0 deletions
  1. 20 0
      .gitignore
  2. 3 0
      README.md
  3. 150 0
      build.gradle
  4. 234 0
      gradlew
  5. 89 0
      gradlew.bat
  6. 1 0
      settings.gradle
  7. 196 0
      src/main/java/com/rf/youth/TestPush.java
  8. 67 0
      src/main/java/com/rf/youth/YouthStationApplication.java
  9. 46 0
      src/main/java/com/rf/youth/base/model/BaseEntity.java
  10. 4 0
      src/main/java/com/rf/youth/base/package-info.java
  11. 18 0
      src/main/java/com/rf/youth/base/repository/BaseRepository.java
  12. 76 0
      src/main/java/com/rf/youth/base/rest/BaseController.java
  13. 46 0
      src/main/java/com/rf/youth/config/CorsConfig.java
  14. 24 0
      src/main/java/com/rf/youth/config/Properties.java
  15. 105 0
      src/main/java/com/rf/youth/config/RedisConfig.java
  16. 54 0
      src/main/java/com/rf/youth/config/Swagger2Config.java
  17. 18 0
      src/main/java/com/rf/youth/dao/dto/JpaDto.java
  18. 99 0
      src/main/java/com/rf/youth/dao/dto/JpaDtoConfig.java
  19. 21 0
      src/main/java/com/rf/youth/dao/dto/ProgressDto.java
  20. 49 0
      src/main/java/com/rf/youth/dao/dto/UserRecordsDto.java
  21. 2 0
      src/main/java/com/rf/youth/dao/lombok.config
  22. 35 0
      src/main/java/com/rf/youth/dao/repository/SysLogRepository.java
  23. 49 0
      src/main/java/com/rf/youth/enums/OrderStatus.java
  24. 24 0
      src/main/java/com/rf/youth/enums/PayType.java
  25. 40 0
      src/main/java/com/rf/youth/enums/UserRole.java
  26. 28 0
      src/main/java/com/rf/youth/enums/UserStatus.java
  27. 72 0
      src/main/java/com/rf/youth/file/excel/ExcelBean.java
  28. 283 0
      src/main/java/com/rf/youth/file/excel/ExcelClass.java
  29. 4 0
      src/main/java/com/rf/youth/file/package-info.java
  30. 65 0
      src/main/java/com/rf/youth/filter/JWTInterceptor.java
  31. 76 0
      src/main/java/com/rf/youth/filter/JWTInterceptorConfig.java
  32. 56 0
      src/main/java/com/rf/youth/filter/UserCheckInterceptor.java
  33. 24 0
      src/main/java/com/rf/youth/menu/dao/dto/RoleMenuEntryDTO.java
  34. 47 0
      src/main/java/com/rf/youth/menu/dao/model/MenuEntry.java
  35. 32 0
      src/main/java/com/rf/youth/menu/dao/model/RoleMenuEntry.java
  36. 8 0
      src/main/java/com/rf/youth/menu/dao/repository/MenuRepository.java
  37. 20 0
      src/main/java/com/rf/youth/menu/dao/repository/RoleMenuRepository.java
  38. 116 0
      src/main/java/com/rf/youth/menu/rest/MenuController.java
  39. 25 0
      src/main/java/com/rf/youth/menu/service/MenuService.java
  40. 26 0
      src/main/java/com/rf/youth/menu/service/RoleMenuService.java
  41. 71 0
      src/main/java/com/rf/youth/menu/service/impl/MenuServiceImpl.java
  42. 52 0
      src/main/java/com/rf/youth/menu/service/impl/RoleMenuServiceImpl.java
  43. 16 0
      src/main/java/com/rf/youth/opLog/annotation/OperationLogAnnotation.java
  44. 164 0
      src/main/java/com/rf/youth/opLog/aspect/UserLogAspect.java
  45. 63 0
      src/main/java/com/rf/youth/opLog/dao/SysLogEntity.java
  46. 77 0
      src/main/java/com/rf/youth/opLog/rest/SysLogController.java
  47. 20 0
      src/main/java/com/rf/youth/opLog/service/SysLogService.java
  48. 52 0
      src/main/java/com/rf/youth/opLog/service/impl/SysLogServiceImpl.java
  49. 40 0
      src/main/java/com/rf/youth/order/controller/TalentApplyInfoController.java
  50. 52 0
      src/main/java/com/rf/youth/order/model/TalentApplyInfo.java
  51. 12 0
      src/main/java/com/rf/youth/order/repository/TalentApplyInfoRepository.java
  52. 20 0
      src/main/java/com/rf/youth/order/service/TalentApplyInfoService.java
  53. 43 0
      src/main/java/com/rf/youth/order/service/impl/TalentApplyInfoServiceImpl.java
  54. 32 0
      src/main/java/com/rf/youth/param/dao/model/ParamEntry.java
  55. 10 0
      src/main/java/com/rf/youth/param/dao/repository/ParamRepository.java
  56. 4 0
      src/main/java/com/rf/youth/param/package-info.java
  57. 43 0
      src/main/java/com/rf/youth/param/rest/ParamController.java
  58. 21 0
      src/main/java/com/rf/youth/param/service/ParamService.java
  59. 47 0
      src/main/java/com/rf/youth/param/service/impl/ParamServiceImpl.java
  60. 34 0
      src/main/java/com/rf/youth/schedule/StaticScheduleTask.java
  61. 92 0
      src/main/java/com/rf/youth/security/AesEncryptUtils.java
  62. 175 0
      src/main/java/com/rf/youth/security/DESede.java
  63. 116 0
      src/main/java/com/rf/youth/security/DecodeRequestBodyAdvice.java
  64. 54 0
      src/main/java/com/rf/youth/security/EncodeResponseBodyAdvice.java
  65. 41 0
      src/main/java/com/rf/youth/security/EncryptDecodeConverter.java
  66. 70 0
      src/main/java/com/rf/youth/security/SSLConfig.java
  67. 24 0
      src/main/java/com/rf/youth/security/SafetyProcess.java
  68. 57 0
      src/main/java/com/rf/youth/threadpool/ThreadPool.java
  69. 26 0
      src/main/java/com/rf/youth/threadpool/ThreadTask.java
  70. 43 0
      src/main/java/com/rf/youth/user/dao/model/UserEntity.java
  71. 26 0
      src/main/java/com/rf/youth/user/dao/repository/UserRepository.java
  72. 240 0
      src/main/java/com/rf/youth/user/rest/SystemController.java
  73. 67 0
      src/main/java/com/rf/youth/user/rest/UserController.java
  74. 11 0
      src/main/java/com/rf/youth/user/service/SystemService.java
  75. 32 0
      src/main/java/com/rf/youth/user/service/UserService.java
  76. 18 0
      src/main/java/com/rf/youth/user/service/impl/SystemServiceImpl.java
  77. 41 0
      src/main/java/com/rf/youth/user/service/impl/UserServiceImpl.java
  78. 58 0
      src/main/java/com/rf/youth/utils/AgeUtil.java
  79. 324 0
      src/main/java/com/rf/youth/utils/AssertUtils.java
  80. 48 0
      src/main/java/com/rf/youth/utils/CPUSerial.java
  81. 1510 0
      src/main/java/com/rf/youth/utils/Constant.java
  82. 170 0
      src/main/java/com/rf/youth/utils/Data.java
  83. 1228 0
      src/main/java/com/rf/youth/utils/DateUtil.java
  84. 786 0
      src/main/java/com/rf/youth/utils/ExcelUtil.java
  85. 37 0
      src/main/java/com/rf/youth/utils/HttpStatus.java
  86. 40 0
      src/main/java/com/rf/youth/utils/IPUtiles.java
  87. 58 0
      src/main/java/com/rf/youth/utils/JWTUtil.java
  88. 131 0
      src/main/java/com/rf/youth/utils/OSUtil.java
  89. 17 0
      src/main/java/com/rf/youth/utils/PageRequestUtil.java
  90. 431 0
      src/main/java/com/rf/youth/utils/RandomUtil.java
  91. 62 0
      src/main/java/com/rf/youth/utils/Result.java
  92. 727 0
      src/main/java/com/rf/youth/utils/ScaleResultBusinessMap.java
  93. 23 0
      src/main/java/com/rf/youth/utils/ScaleScoringVersion.java
  94. 23 0
      src/main/java/com/rf/youth/utils/ScaleUtil.java
  95. 117 0
      src/main/java/com/rf/youth/utils/SendMessageUtil.java
  96. 36 0
      src/main/java/com/rf/youth/utils/ServerUtil.java
  97. 23 0
      src/main/java/com/rf/youth/utils/StringUtils.java
  98. 192 0
      src/main/java/com/rf/youth/utils/Utils.java
  99. 140 0
      src/main/java/com/rf/youth/utils/ZipUtils.java
  100. 201 0
      src/main/java/com/softkey/jsyunew3.java

+ 20 - 0
.gitignore

@@ -0,0 +1,20 @@
+# ---> Java
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+/.gradle/
+/build/
+/src/main/resources/static/
+/logs/
+/gradle/
+/.idea/

+ 3 - 0
README.md

@@ -0,0 +1,3 @@
+# psychological_camera
+
+review code

+ 150 - 0
build.gradle

@@ -0,0 +1,150 @@
+buildscript {
+	ext {
+		queryDslVersion = '4.2.1'
+		lombokVersion = '1.18.12'
+	}
+}
+plugins {
+	id 'org.springframework.boot' version '2.4.2'
+	id 'io.spring.dependency-management' version '1.0.11.RELEASE'
+	id 'java'
+}
+
+group = 'com.rf'
+version = 'v1.1-'+getNewVersion()
+sourceCompatibility = '8'
+
+configurations {
+	compileOnly {
+		extendsFrom annotationProcessor
+	}
+}
+
+repositories {
+	maven {
+		url 'https://maven.aliyun.com/repository/public'
+	}
+	maven {
+		credentials {
+			username '0p07qf'
+			password 'z1XwdFEf4M'
+		}
+		url 'https://repo.rdc.aliyun.com/repository/107260-release-GqdtcU/'
+	}
+	maven {
+		credentials {
+			username '0p07qf'
+			password 'z1XwdFEf4M'
+		}
+		url 'https://repo.rdc.aliyun.com/repository/107260-snapshot-C6ziam/'
+	}
+	maven {
+		url "https://plugins.gradle.org/m2/"
+	}
+	mavenLocal()
+}
+
+dependencies {
+	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
+	implementation 'org.springframework.boot:spring-boot-starter-web'
+	compileOnly 'org.projectlombok:lombok'
+	annotationProcessor 'org.projectlombok:lombok'
+//	testImplementation 'org.springframework.boot:spring-boot-starter-test'
+////	classpath "gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10"
+//	// https://mvnrepository.com/artifact/com.querydsl/querydsl-apt
+//	compile group: 'com.querydsl', name: 'querydsl-apt', version: '4.2.1'
+	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation
+	implementation 'org.springframework.boot:spring-boot-starter-validation:2.6.3'
+
+//	// https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons
+//	compile group: 'org.springframework.data', name: 'spring-data-commons', version: '2.4.1'
+	// https://mvnrepository.com/artifact/mysql/mysql-connector-java
+	implementation 'mysql:mysql-connector-java:8.0.21'
+
+//	compile group: 'com.querydsl', name: 'querydsl-jpa', version: '4.2.1'
+//	compile group: 'com.querydsl', name: 'querydsl-apt', version: '4.2.1'
+	// QueryDSL
+	implementation("com.querydsl:querydsl-core:${queryDslVersion}")
+	implementation("com.querydsl:querydsl-jpa:${queryDslVersion}")
+	//关键地方(记得开启annotationProcessor)
+	annotationProcessor("com.querydsl:querydsl-apt:${queryDslVersion}:jpa",
+			"org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final",
+			"javax.annotation:javax.annotation-api:1.3.2",
+			"org.projectlombok:lombok")
+
+	// Lombok(记得安装IDEA插件)
+	compileOnly "org.projectlombok:lombok:${lombokVersion}"
+	annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
+	implementation("org.projectlombok:lombok:${lombokVersion}")
+	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test
+	testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.3'
+
+	// https://mvnrepository.com/artifact/com.alibaba/fastjson
+	implementation 'com.alibaba:fastjson:1.2.75'
+	// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
+	implementation 'org.apache.poi:poi-ooxml:3.17'
+
+	// https://mvnrepository.com/artifact/commons-lang/commons-lang
+	implementation 'commons-lang:commons-lang:2.6'
+
+	// https://mvnrepository.com/artifact/io.springfox/springfox-swagger2
+	implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
+	// https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
+	implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
+	// https://mvnrepository.com/artifact/io.swagger/swagger-annotations
+	implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.5.22'
+	implementation group: 'io.swagger', name: 'swagger-models', version: '1.5.22'
+
+	// https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload
+	implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
+	// https://mvnrepository.com/artifact/com.github.qcloudsms/qcloudsms
+	implementation group: 'com.github.qcloudsms', name: 'qcloudsms', version: '1.0.6'
+	// https://mvnrepository.com/artifact/cn.keking.project/kk-anti-reptile
+	implementation group: 'cn.keking.project', name: 'kk-anti-reptile', version: '1.0.0-RELEASE'
+	// https://mvnrepository.com/artifact/com.belerweb/pinyin4j
+	implementation group: 'com.belerweb', name: 'pinyin4j', version: '2.5.1'
+	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-websocket
+	implementation 'org.springframework.boot:spring-boot-starter-websocket:2.5.5'
+	//https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket
+	//implementation 'org.java-websocket:Java-WebSocket:1.3.0'
+	// https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket
+	implementation 'org.java-websocket:Java-WebSocket:1.5.1'
+	//https://github.com/auth0/java-jwt
+	// 添加jwt
+	implementation 'com.auth0:java-jwt:3.18.2'
+	// https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter
+	implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.9'
+	// https://mvnrepository.com/artifact/junit/junit
+	testImplementation group: 'junit', name: 'junit', version: '4.13.2'
+
+
+	//wxpay
+	// https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk
+	//implementation group: 'com.github.wxpay', name: 'wxpay-sdk', version: '0.0.3'
+
+	implementation 'com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.4.7'
+
+	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor
+	implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.6.8'
+
+	// https://mvnrepository.com/artifact/com.google.code.gson/gson
+	implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
+
+	// https://mvnrepository.com/artifact/cn.hutool/hutool-all
+	implementation group: 'cn.hutool', name: 'hutool-all', version: '5.7.18'
+
+	//redis
+	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis
+	implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '2.6.3'
+
+
+
+}
+
+test {
+	useJUnitPlatform()
+}
+
+def getNewVersion(){
+	return new Date().format("yyyyMMddHHmmss",TimeZone.getTimeZone("GMT+08:00"))
+}

+ 234 - 0
gradlew

@@ -0,0 +1,234 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed 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.
+#
+
+##############################################################################
+#
+#   Gradle start up script for POSIX generated by Gradle.
+#
+#   Important for running:
+#
+#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+#       noncompliant, but you have some other compliant shell such as ksh or
+#       bash, then to run this script, type that shell name before the whole
+#       command line, like:
+#
+#           ksh Gradle
+#
+#       Busybox and similar reduced shells will NOT work, because this script
+#       requires all of these POSIX shell features:
+#         * functions;
+#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+#         * compound commands having a testable exit status, especially «case»;
+#         * various built-in commands including «command», «set», and «ulimit».
+#
+#   Important for patching:
+#
+#   (2) This script targets any POSIX shell, so it avoids extensions provided
+#       by Bash, Ksh, etc; in particular arrays are avoided.
+#
+#       The "traditional" practice of packing multiple parameters into a
+#       space-separated string is a well documented source of bugs and security
+#       problems, so this is (mostly) avoided, by progressively accumulating
+#       options in "$@", and eventually passing that to Java.
+#
+#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+#       see the in-line comments for details.
+#
+#       There are tweaks for specific operating systems such as AIX, CygWin,
+#       Darwin, MinGW, and NonStop.
+#
+#   (3) This script is generated from the Groovy template
+#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       within the Gradle project.
+#
+#       You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
+    [ -h "$app_path" ]
+do
+    ls=$( ls -ld "$app_path" )
+    link=${ls#*' -> '}
+    case $link in             #(
+      /*)   app_path=$link ;; #(
+      *)    app_path=$APP_HOME$link ;;
+    esac
+done
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+
+APP_NAME="Gradle"
+APP_BASE_NAME=${0##*/}
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+    echo "$*"
+} >&2
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in                #(
+  CYGWIN* )         cygwin=true  ;; #(
+  Darwin* )         darwin=true  ;; #(
+  MSYS* | MINGW* )  msys=true    ;; #(
+  NONSTOP* )        nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+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
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD=java
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+    case $MAX_FD in #(
+      max*)
+        MAX_FD=$( ulimit -H -n ) ||
+            warn "Could not query maximum file descriptor limit"
+    esac
+    case $MAX_FD in  #(
+      '' | soft) :;; #(
+      *)
+        ulimit -n "$MAX_FD" ||
+            warn "Could not set maximum file descriptor limit to $MAX_FD"
+    esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+#   * args from the command line
+#   * the main class name
+#   * -classpath
+#   * -D...appname settings
+#   * --module-path (only if needed)
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+    JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    for arg do
+        if
+            case $arg in                                #(
+              -*)   false ;;                            # don't mess with options #(
+              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
+                    [ -e "$t" ] ;;                      #(
+              *)    false ;;
+            esac
+        then
+            arg=$( cygpath --path --ignore --mixed "$arg" )
+        fi
+        # Roll the args list around exactly as many times as the number of
+        # args, so each arg winds up back in the position where it started, but
+        # possibly modified.
+        #
+        # NB: a `for` loop captures its iteration list before it begins, so
+        # changing the positional parameters here affects neither the number of
+        # iterations, nor the values presented in `arg`.
+        shift                   # remove old arg
+        set -- "$@" "$arg"      # push replacement arg
+    done
+fi
+
+# Collect all arguments for the java command;
+#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+#     shell script including quotes and variable substitutions, so put them in
+#     double quotes to make sure that they get re-expanded; and
+#   * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+        "-Dorg.gradle.appname=$APP_BASE_NAME" \
+        -classpath "$CLASSPATH" \
+        org.gradle.wrapper.GradleWrapperMain \
+        "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+#   set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+        xargs -n1 |
+        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+        tr '\n' ' '
+    )" '"$@"'
+
+exec "$JAVACMD" "$@"

+ 89 - 0
gradlew.bat

@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem 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, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 1 - 0
settings.gradle

@@ -0,0 +1 @@
+rootProject.name = 'youth_station'

+ 196 - 0
src/main/java/com/rf/youth/TestPush.java

@@ -0,0 +1,196 @@
+package com.rf.youth;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.rf.youth.security.AesEncryptUtils;
+import com.rf.youth.utils.ExcelUtil;
+import lombok.SneakyThrows;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.protocol.HTTP;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * 压力测试
+ * @author Administrator
+ *
+ */
+public class TestPush {
+	
+	
+	public static void main(String[] args)throws Exception {
+		
+		File file = new File("C:/Users/Administrator/Desktop/弹型导入模板.xlsx");
+		String fileName = "弹型导入模板.xlsx";
+        FileInputStream fileInputStream = new FileInputStream(file);
+		List<List<List<Object>>> datas = ExcelUtil.getBankListByExcelSheet(fileInputStream, fileName);
+        //获取题目信息并入库
+        List<List<Object>> sheet0 = datas.get(0);
+        List<JSONObject> jsonObjects = new ArrayList<>();
+        for (int i = 0;i <sheet0.size();i++){
+            List<Object> scales = sheet0.get(i);
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put("institutionNo",scales.get(0));
+            jsonObject.put("phone",scales.get(1));
+            jsonObject.put("password", "205db300b8a350ba594747ff58fa94f1");
+            JSONObject jsonObject2 = new JSONObject();
+            jsonObject2.put("data", AesEncryptUtils.encrypt(jsonObject.toJSONString()));
+            jsonObjects.add(jsonObject2);
+        }
+
+        /*for (JSONObject obj:jsonObjects) {
+        //创建线程登录
+            MyThread t = new MyThread(obj);
+            t.start();
+        }*/
+		//登录
+    	/*String loginUrl = "https://www.jue-ming.com:8848/user/login";
+    	JSONObject jsonObject = new JSONObject();
+    	//{"phone":"test","password":"e10adc3949ba59abbe56e057f20f883e","institutionNo":"10000"}
+    	jsonObject.put("phone", "test");
+    	jsonObject.put("password", "96e79218965eb72c92a549dd5a330112");
+    	jsonObject.put("institutionNo", "10000");
+    	JSONObject jsonObject2 = new JSONObject();
+    	jsonObject2.put("data",AesEncryptUtils.encrypt(jsonObject.toJSONString()));
+
+
+
+		String response = sendPost(jsonObject2, loginUrl);
+		System.out.println(response);
+		String respStringDecrypt = AesEncryptUtils.decrypt(response.substring(1, response.length()-2));
+		System.out.println(respStringDecrypt);
+		JSONObject jsonObject3 = JSONObject.parseObject(respStringDecrypt);
+		String token = jsonObject3.getJSONObject("data").getString("token");
+		System.out.println(token);
+		System.out.println("-------------------------------------------------");
+		String url = "https://www.jue-ming.com:8848/category/getCategoryList?institutionNo=10000&gId=0";
+		String getResponse = sendRequest("Bearer "+token,url,"GET");
+		System.out.println(getResponse);*/
+	}
+	
+	
+	
+	/**
+	 * 发送POST请求
+	 * @param json
+	 * @param URL
+	 * @return
+	 */
+    public static String sendPost(JSONObject json,String URL) {
+        CloseableHttpClient client = HttpClients.createDefault();
+        HttpPost post = new HttpPost(URL);
+        post.setHeader("Content-Type", "application/json");
+        post.addHeader("Authorization", "Basic YWRtaW46");
+        String result = "";
+        try {
+            StringEntity s = new StringEntity(json.toString(), "utf-8");
+            s.setContentType(new BasicHeader(HTTP.CONTENT_TYPE,
+                    "application/json"));
+            post.setEntity(s);
+            // ��������
+            HttpResponse httpResponse = client.execute(post);
+            // ��ȡ��Ӧ������
+            InputStream inStream = httpResponse.getEntity().getContent();
+            BufferedReader reader = new BufferedReader(new InputStreamReader(
+                    inStream, "utf-8"));
+            StringBuilder strber = new StringBuilder();
+            String line;
+            while ((line = reader.readLine()) != null) {
+                strber.append(line + "\n");
+            }
+            inStream.close();
+            result = strber.toString();
+            if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+                System.out.println("---------------------");
+            } else {
+                System.out.println("---------------------------");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+    /**
+     * 发送GET请求
+     * @param urlParam
+     * @param requestType
+     * @return
+     */
+    public static String sendRequest(String cookie ,String urlParam,String requestType) {
+
+        HttpURLConnection con = null;  
+
+        BufferedReader buffer = null; 
+        StringBuffer resultBuffer = null;  
+//        String cookie = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwZXROYW1lIjoi5rWL6K-V5Lq65ZGYIiwidXNlclBob25lIjoidGVzdCIsImdyb3VwSWQiOiIwIiwidHlwZSI6InVzZXIiLCJleHAiOjE2NTMyODUyMzMsInVzZXJJZCI6ImZmODA4MTgxN2M2ZDNkODYwMTdjNmQ0NzE2YjMwMDAxIiwiaW5zdGl0dXRpb25ObyI6IjEwMDAwIn0.xyNl0_6VTB6d7edTFPwHucK7VQiHwxx20kpbgG2MWRM";
+        try {
+            URL url = new URL(urlParam); 
+            //�õ����Ӷ���
+            con = (HttpURLConnection) url.openConnection();
+            con.addRequestProperty("Authorization", cookie);
+            //������������
+            con.setRequestMethod(requestType);  
+            //����������Ҫ���ص��������ͺ��ַ�������
+            con.setRequestProperty("Content-Type", "application/json;charset=utf-8");  
+            //�����
+            con.setDoOutput(true);
+            //�������
+            con.setDoInput(true);
+            //��ʹ�û���
+            con.setUseCaches(false);
+            //�õ���Ӧ��
+            int responseCode = con.getResponseCode();
+
+            if(responseCode == HttpURLConnection.HTTP_OK){
+                //�õ���Ӧ��
+                InputStream inputStream = con.getInputStream();
+                //����Ӧ��ת�����ַ���
+                resultBuffer = new StringBuffer();
+                String line;
+                buffer = new BufferedReader(new InputStreamReader(inputStream, "utf-8"));
+                while ((line = buffer.readLine()) != null) {
+                    resultBuffer.append(line);
+                }
+                return resultBuffer.toString();
+            }
+
+        }catch(Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+    
+    static class MyThread extends Thread{
+        JSONObject jsonObject2;
+        public MyThread(JSONObject jsonObject2){
+            this.jsonObject2 = jsonObject2;
+        }
+    	@SneakyThrows
+        @Override
+    	public void run() {
+    		// TODO Auto-generated method stub
+    		super.run();
+            String loginUrl = "https://www.jue-ming.com:8848/user/login";
+            String response = sendPost(jsonObject2, loginUrl);
+            String respStringDecrypt = AesEncryptUtils.decrypt(response.substring(1, response.length()-2));
+            JSONObject jsonObject3 = JSONObject.parseObject(respStringDecrypt);
+            String token = jsonObject3.getJSONObject("data").getString("token");
+            System.out.println(token);
+            System.out.println("-------------------------------------------------");
+            String url = "https://www.jue-ming.com:8848/category/getCategoryList?institutionNo=10000&gId=0";
+            String getResponse = sendRequest("Bearer "+token,url,"GET");
+            System.out.println(AesEncryptUtils.decrypt(getResponse));
+    	}
+    }
+
+}

+ 67 - 0
src/main/java/com/rf/youth/YouthStationApplication.java

@@ -0,0 +1,67 @@
+package com.rf.youth;
+
+import com.querydsl.jpa.impl.JPAQueryFactory;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.core.env.Environment;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManager;
+
+/**
+ * @author zzf
+ */
+//@EnableCaching
+@EnableJpaRepositories(basePackages = {"com.rf.youth"})
+@SpringBootApplication(scanBasePackages = {"com.rf.youth"})
+@EnableJpaAuditing
+@EnableTransactionManagement
+@EnableScheduling
+@Slf4j
+//@EnableSwagger2
+public class YouthStationApplication {
+
+    static Logger logger = LoggerFactory.getLogger(YouthStationApplication.class);
+    @Autowired
+    static Environment environment;
+    @Value("${spring.profiles.active}")
+    static String profile;
+
+
+    public static void main(String[] args) {
+        //检查环境
+        //System.out.println("profile--"+profile);
+        //System.out.println("env--"+environment.getActiveProfiles()[0]);
+
+
+        SpringApplication.run(YouthStationApplication.class, args);
+
+		/*if (CPUSerial.getCPUSerial().equals("BFEBFBFF000906EA1")){
+		}else {
+			System.out.println("无权限启动");
+		}*/
+    }
+
+
+    /**
+     * 让Spring管理JPAQueryFactory
+     *
+     * @param entityManager
+     * @return
+     */
+    @Bean
+    public JPAQueryFactory jpaQueryFactory(EntityManager entityManager) {
+        return new JPAQueryFactory(entityManager);
+    }
+
+
+}

+ 46 - 0
src/main/java/com/rf/youth/base/model/BaseEntity.java

@@ -0,0 +1,46 @@
+package com.rf.youth.base.model;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.hibernate.annotations.GenericGenerator;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/18 19:13
+ */
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@EntityListeners({AuditingEntityListener.class})
+@MappedSuperclass
+public class BaseEntity implements Serializable {
+    @Getter
+    @Id
+    @GenericGenerator(name = "jpa-uuid", strategy = "uuid")
+    @GeneratedValue(generator = "jpa-uuid")
+    @Column(name = "id", columnDefinition = "varchar(36) COMMENT '数据ID'")
+    @NotNull(groups = Update.class)
+    private String id;
+
+    @Column(name = "create_time", columnDefinition = "varchar(36) COMMENT '创建时间'")
+    private String createTime;
+
+
+    @Column(name = "update_time", columnDefinition = "varchar(36) COMMENT '更新时间'")
+    private String updateTime;
+
+
+
+    public @interface Update {
+    }
+}

+ 4 - 0
src/main/java/com/rf/youth/base/package-info.java

@@ -0,0 +1,4 @@
+package com.rf.youth.base;
+/**
+ * 基础信息
+ */

+ 18 - 0
src/main/java/com/rf/youth/base/repository/BaseRepository.java

@@ -0,0 +1,18 @@
+package com.rf.youth.base.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.querydsl.QuerydslPredicateExecutor;
+import org.springframework.data.repository.NoRepositoryBean;
+
+import java.io.Serializable;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/18 19:17
+ */
+@NoRepositoryBean
+public interface BaseRepository<T, PK extends Serializable> extends JpaRepository<T, PK>, JpaSpecificationExecutor, QuerydslPredicateExecutor<T> {
+
+}

+ 76 - 0
src/main/java/com/rf/youth/base/rest/BaseController.java

@@ -0,0 +1,76 @@
+package com.rf.youth.base.rest;
+
+import com.rf.youth.utils.HttpStatus;
+import com.rf.youth.utils.Result;
+
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/18 19:20
+ */
+public class BaseController {
+    protected static final String PAGE_NUM = "pageNum";
+
+    protected static final String PAGE_SIZE = "pageSize";
+
+    protected Result success() {
+        return success(null, "成功");
+    }
+
+    protected static <T> Result<T> success(T data) {
+        return success(data, "成功");
+    }
+
+    protected static <T> Result<T> success(T data, String message) {
+        if (null == data) {
+            return new Result<>(HttpStatus.SUCCESS, message);
+        }
+        return new Result<>(HttpStatus.SUCCESS, message, data);
+    }
+
+    protected static <T> Result<T> success(String code,T data, String message) {
+        if (null == data) {
+            return new Result<>(code, message);
+        }
+        return new Result<>(code, message, data);
+    }
+
+    protected Result fail() {
+        return fail(null, "失败");
+    }
+
+    protected static <T> Result<T> fail(T data) {
+        return fail(data, "失败");
+    }
+
+    protected static <T> Result<T> fail(String message) {
+        return new Result<>(HttpStatus.RUNTIME_EXCEPTION, message);
+    }
+
+    protected static <T> Result<T> fail(String code ,T data ,String message){
+        if(data == null)
+            return new Result<>(code,message);
+        else
+            return new Result<>(code,message,data);
+    }
+
+    protected static <T> Result<T> fail(T data, String message) {
+        if (null == data) {
+            return new Result<>(HttpStatus.RUNTIME_EXCEPTION, message);
+        }
+        return new Result<>(HttpStatus.RUNTIME_EXCEPTION, message, data);
+    }
+
+    protected Result failBadRequest() {
+        return failBadRequest(null, "参数异常");
+    }
+
+    protected static <T> Result<T> failBadRequest(T data) {
+        return failBadRequest(null, "参数异常");
+    }
+
+    protected static <T> Result<T> failBadRequest(T data, String message) {
+        return new Result<>(org.springframework.http.HttpStatus.BAD_REQUEST.value() + "", message, data);
+    }
+}

+ 46 - 0
src/main/java/com/rf/youth/config/CorsConfig.java

@@ -0,0 +1,46 @@
+package com.rf.youth.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+@Configuration
+public class CorsConfig {
+
+    private CorsConfiguration buildConfig() {
+
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.setAllowCredentials(true);
+        /*corsConfiguration.addAllowedOrigin("http://localhost:8080"); // 允许任何域名使用
+        corsConfiguration.addAllowedOrigin("http://10.113.233.26:8080");
+        corsConfiguration.addAllowedOrigin("http://192.168.42.21:8080");
+        corsConfiguration.addAllowedOrigin("http://cognitive.wistcm.com/");*/
+//        corsConfiguration.addAllowedOrigin("*");
+        corsConfiguration.addAllowedOriginPattern("*");
+        corsConfiguration.addAllowedHeader("*"); // 允许任何头
+        corsConfiguration.addAllowedMethod("*"); // 允许任何方法(post、get等)
+        return corsConfiguration;
+
+        /*CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.setAllowCredentials(true);
+        // 设置setAllowCredentials = true后就不能设置为*了,要设置具体的
+        corsConfiguration.addAllowedOrigin("http://10.113.233.26:8080");
+        corsConfiguration.addAllowedOrigin("http://localhost:8080");
+        // 允许任何头
+        corsConfiguration.addAllowedHeader("*");
+        // 允许任何方法(post、get等)
+        corsConfiguration.addAllowedMethod("*");
+        return corsConfiguration;*/
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        // 对接口配置跨域设置
+        source.registerCorsConfiguration("/**", buildConfig());
+        return new CorsFilter(source);
+    }
+
+}

+ 24 - 0
src/main/java/com/rf/youth/config/Properties.java

@@ -0,0 +1,24 @@
+package com.rf.youth.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.time.Duration;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/5:18:15
+ * @Description:
+ */
+@Component
+@ConfigurationProperties(prefix = "redis-config")
+
+public class Properties {
+    private final Map<String, Duration> initCaches = new HashMap<>();
+    public Map<String ,Duration> getInitCache(){
+
+        return initCaches;
+    }
+}

+ 105 - 0
src/main/java/com/rf/youth/config/RedisConfig.java

@@ -0,0 +1,105 @@
+package com.rf.youth.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.cache.RedisCacheWriter;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import java.time.Duration;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * @Description:Redis缓存时间、序列化、反序列化等配置
+ * @Author: zsf
+ * @Date: 2022/7/1
+ */
+@Configuration
+@EnableCaching
+@Slf4j
+public class RedisConfig extends CachingConfigurerSupport {
+    @Autowired
+    private Properties properties;
+
+    @Bean
+    public CacheManager cacheManager(RedisConnectionFactory factory) {
+        RedisCacheConfiguration cacheConfiguration = RedisCacheConfiguration
+                .defaultCacheConfig()
+                .entryTtl(Duration.ofDays(30))
+                .disableCachingNullValues()//不允许缓存空值
+                .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer()));
+        RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(factory);
+        Set<String> cacheNames = new HashSet<>();
+        ConcurrentHashMap<String, RedisCacheConfiguration> cacheConfig = new ConcurrentHashMap<>();
+
+        properties.getInitCache().forEach((key, value) -> {
+            cacheNames.add(key);
+            cacheConfig.put(key,cacheConfiguration.entryTtl(value));
+        });
+        /*return RedisCacheManager
+                .builder(RedisCacheWriter.nonLockingRedisCacheWriter(factory))
+                .cacheDefaults(cacheConfiguration)
+                .transactionAware()
+                .build();*/
+        return RedisCacheManager.builder(redisCacheWriter)
+                .cacheDefaults(cacheConfiguration)
+                .initialCacheNames(cacheNames)
+                .withInitialCacheConfigurations(cacheConfig)
+                .build();
+    }
+
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(redisConnectionFactory);
+        // 用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值
+        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer());
+
+        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+        // 使用StringRedisSerializer来序列化和反序列化redis的key值
+        redisTemplate.setKeySerializer(stringRedisSerializer);
+
+        // hash的key也采用String的序列化方式
+        redisTemplate.setHashKeySerializer(stringRedisSerializer);
+        // hash的value序列化方式采用jackson
+        redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer());
+        redisTemplate.afterPropertiesSet();
+        return redisTemplate;
+    }
+
+    /**
+     * 配置Jackson2JsonRedisSerializer序列化策略
+     */
+    @Bean
+    public Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer() {
+        // 使用Jackson2JsonRedisSerializer来序列化和反序列化redis的value值
+        Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
+        ObjectMapper objectMapper = new ObjectMapper();
+
+        // 指定要序列化的域,field,get和set,以及修饰符范围,ANY是都有包括private和public
+        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+
+        // 指定序列化输入的类型,类必须是非final修饰的,final修饰的类,比如String,Integer等会跑出异常
+        objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL);
+
+        jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
+        return jackson2JsonRedisSerializer;
+    }
+}

+ 54 - 0
src/main/java/com/rf/youth/config/Swagger2Config.java

@@ -0,0 +1,54 @@
+package com.rf.youth.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author lpf
+ * @description:swagger 配置
+ * @date 2022/3/14 19:25
+ */
+@Configuration
+@EnableSwagger2
+@Profile({"test","lan"})
+public class Swagger2Config {
+
+    @Bean
+    public Docket createRestApi() {
+        //添加head参数配置start
+        ParameterBuilder tokenPar = new ParameterBuilder();
+        List<Parameter> pars = new ArrayList<>();
+        // Authorization,可以自定义名称-->token
+        tokenPar.name("Authorization").description("token令牌,格式为Bearer Token(可从/test/token接口处获取临时测试token)").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
+        pars.add(tokenPar.build());
+        //添加head参数配置end
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.rf.youth"))
+                .paths(PathSelectors.any())
+                .build()
+                .globalOperationParameters(pars);//注意这里
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("机构版后台接口")
+                .version("1.1")
+                .build();
+    }
+}

+ 18 - 0
src/main/java/com/rf/youth/dao/dto/JpaDto.java

@@ -0,0 +1,18 @@
+package com.rf.youth.dao.dto;
+
+import org.springframework.stereotype.Component;
+
+import java.lang.annotation.*;
+
+/**
+ * @author lpf
+ * @description: 自定义注解类,加载dto上表示这是个JpaDto类,解决jpa原生不能返回dto的问题
+ * @date 2022/4/6 21:08
+ */
+
+@Documented
+@Component
+@Target(value = {ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface JpaDto {
+}

+ 99 - 0
src/main/java/com/rf/youth/dao/dto/JpaDtoConfig.java

@@ -0,0 +1,99 @@
+package com.rf.youth.dao.dto;
+
+import com.rf.youth.security.DESede;
+import com.rf.youth.security.EncryptDecodeConverter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.FatalBeanException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.support.DefaultConversionService;
+import org.springframework.core.convert.support.GenericConversionService;
+
+import javax.annotation.PostConstruct;
+import javax.persistence.Convert;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Map;
+
+/**
+ * @author lpf
+ * @description: 对加有@JpaDto的类注解的类进行实现converter方法
+ * @date 2022/4/6 21:12
+ */
+@Slf4j
+@Configuration
+public class JpaDtoConfig {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    /**
+     * 初始化注入@JpaDto对应的Converter
+     */
+    @PostConstruct
+    public void init() {
+        Map<String, Object> map = applicationContext.getBeansWithAnnotation(JpaDto.class);
+        for (Object o : map.values()) {
+            Class c = o.getClass();
+            log.info("Jpa添加Converter,class={}", c.getName());
+            GenericConversionService genericConversionService = ((GenericConversionService) DefaultConversionService.getSharedInstance());
+            genericConversionService.addConverter(Map.class, c, m -> {
+                try {
+                    Object obj = c.newInstance();
+                    // 这里可以扩展,注入的converter,实现sql查询出的结果为数据库中带下划线的字段,通过程序转为驼峰命名再设置到实体中
+                    // 也可以做类型转换判断,这里未做类型判断,直接copy到dto中,类型不匹配的时候可能会出错
+                    return copyMapToObj(m, obj);
+                } catch (Exception e) {
+                    throw new FatalBeanException("Jpa结果转换出错,class=" + c.getName(), e);
+                }
+            });
+        }
+    }
+
+    /**
+     * 将map中的值copy到bean中对应的字段上
+     *
+     * @param map
+     * @param target
+     * @return
+     */
+    private Object copyMapToObj(Map<String, Object> map, Object target) {
+        if (map == null || target == null || map.isEmpty()) {
+            return target;
+        }
+        Class<?> actualEditable = target.getClass();
+        PropertyDescriptor[] targetPds = BeanUtils.getPropertyDescriptors(actualEditable);
+        for (PropertyDescriptor targetPd : targetPds) {
+            if (targetPd.getWriteMethod() == null) {
+                continue;
+            }
+            try {
+                String key = targetPd.getName();
+                Object value = map.get(key);
+                if (value == null) {
+                    continue;
+                }
+                //对需要进行解密的字段进行解密处理
+                Field field = actualEditable.getDeclaredField(key);
+                Convert annotation = field.getAnnotation(Convert.class);
+                if (annotation != null) {
+                    if (annotation.converter() == EncryptDecodeConverter.class) {
+                        value = DESede.decryptString((String) value);
+                    }
+                }
+                Method writeMethod = targetPd.getWriteMethod();
+                if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers())) {
+                    writeMethod.setAccessible(true);
+                }
+                writeMethod.invoke(target, value);
+            } catch (Exception ex) {
+                throw new FatalBeanException("Could not copy properties from source to target", ex);
+            }
+        }
+        return target;
+    }
+}

+ 21 - 0
src/main/java/com/rf/youth/dao/dto/ProgressDto.java

@@ -0,0 +1,21 @@
+package com.rf.youth.dao.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2022/5/5 18:02
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ProgressDto {
+
+    private long maxNum;
+
+    private long havingDoNum;
+
+}

+ 49 - 0
src/main/java/com/rf/youth/dao/dto/UserRecordsDto.java

@@ -0,0 +1,49 @@
+package com.rf.youth.dao.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author lpf
+ * @description: 用户测试记录界面返回参数(去除返回参数中的答题参数testRecord,testResults(老的数据格式)减少传参大小)
+ * @date 2022/5/12 15:39
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UserRecordsDto {
+
+    private String id;
+
+    private String phone;
+
+
+    private String institutionNo;
+
+
+    private String flag;
+
+
+    private String name;
+
+
+    private String testDate;
+
+
+    private String testResult;
+
+
+
+    private String fileName;
+
+
+    private String img;
+
+
+    private String type;
+
+
+    private String testPlanId;
+
+}

+ 2 - 0
src/main/java/com/rf/youth/dao/lombok.config

@@ -0,0 +1,2 @@
+config.stopbubbling=true
+lombok.equalsandhashcode.callsuper=call

+ 35 - 0
src/main/java/com/rf/youth/dao/repository/SysLogRepository.java

@@ -0,0 +1,35 @@
+package com.rf.youth.dao.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.opLog.dao.SysLogEntity;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description: 操作日志表
+ * @date 2022/1/12 12:42
+ */
+public interface SysLogRepository extends BaseRepository<SysLogEntity, String> {
+
+    @Transactional
+    @Modifying(clearAutomatically = true)
+    void deleteById(String id);
+
+    @Query(value = "select id, create_time, ip, method, operation, user_id, user_name, institution_no,result,type,url,response_time from t_sys_log\n" +
+            "where institution_no=?1 and if(?2 is not null and ?2 !='',t_sys_log.operation like CONCAT('%',?2,'%') ,1=1)\n" +
+            "and  if(?3 is not null and ?3 !='',t_sys_log.create_time>?3 ,1=1)  and if(?4 is not null and ?4 !='', t_sys_log.create_time<?4 ,1=1) " +
+            "and  if(?5 is not null and ?5 !='',user_name = ?5 ,1=1) " +
+            "and  if(?6 is not null and ?6 !='',type = ?6 ,1=1) order by create_time desc",
+            countQuery = "select count(*) from t_sys_log\n" +
+                    "where institution_no=?1 and if(?2 is not null and ?2 !='',t_sys_log.operation like CONCAT('%',?2,'%') ,1=1)\n" +
+                    "and  if(?3 is not null and ?3 !='',t_sys_log.create_time>?3 ,1=1)  and if(?4 is not null and ?4 !='', t_sys_log.create_time<?4 ,1=1) " +
+                    "and  if(?5 is not null and ?5 !='',user_name = ?5 ,1=1) and if(?6 is not null and ?6 !='',type = ?6 ,1=1) ",
+            nativeQuery = true)
+    Page<SysLogEntity> findByInstitutionNo(String institutionNo, String searchKey, Date beginTime, Date endTime, String searchUserName, String type, Pageable pageable);
+}

+ 49 - 0
src/main/java/com/rf/youth/enums/OrderStatus.java

@@ -0,0 +1,49 @@
+package com.rf.youth.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum OrderStatus {
+    /**
+     * 未支付
+     */
+    NOTPAY("未支付"),
+
+
+    /**
+     * 支付成功
+     */
+    SUCCESS("支付成功"),
+
+    /**
+     * 已关闭
+     */
+    CLOSED("超时已关闭"),
+
+    /**
+     * 已取消
+     */
+    CANCEL("用户已取消"),
+
+    /**
+     * 退款中
+     */
+    REFUND_PROCESSING("退款中"),
+
+    /**
+     * 已退款
+     */
+    REFUND_SUCCESS("已退款"),
+
+    /**
+     * 退款异常
+     */
+    REFUND_ABNORMAL("退款异常");
+
+    /**
+     * 类型
+     */
+    private final String type;
+}

+ 24 - 0
src/main/java/com/rf/youth/enums/PayType.java

@@ -0,0 +1,24 @@
+package com.rf.youth.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum PayType {
+    /**
+     * 微信
+     */
+    WXPAY("微信"),
+
+
+    /**
+     * 支付宝
+     */
+    ALIPAY("支付宝");
+
+    /**
+     * 类型
+     */
+    private final String type;
+}

+ 40 - 0
src/main/java/com/rf/youth/enums/UserRole.java

@@ -0,0 +1,40 @@
+package com.rf.youth.enums;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum UserRole {
+
+    /**
+     * 系统管理员决明 10006
+     */
+//    SYSTEMADMIN("3","系统管理员"),
+
+    /**
+     * 机构超级管理员
+     */
+    SUPERADMIN("3","机构超级管理员"),
+
+    /**
+     * 机构管理员
+     */
+    ADMIN("2","机构管理员"),
+
+    /**
+     * 普通用户
+     */
+    COMMON("1","普通用户");
+
+    /**
+     * 类型
+     */
+    private final String type;
+
+    /**
+     * 名称
+     */
+    private final String name;
+}

+ 28 - 0
src/main/java/com/rf/youth/enums/UserStatus.java

@@ -0,0 +1,28 @@
+package com.rf.youth.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum UserStatus {
+    /**
+     * 待审核
+     */
+    AUDIT("1"),
+
+    /**
+     * 审核通过
+     */
+    PASS("2"),
+
+    /**
+     * 重置密码状态
+     */
+    UPDATE("3");
+
+    /**
+     * 类型
+     */
+    private final String type;
+}

+ 72 - 0
src/main/java/com/rf/youth/file/excel/ExcelBean.java

@@ -0,0 +1,72 @@
+package com.rf.youth.file.excel;
+
+import org.apache.poi.xssf.usermodel.XSSFCellStyle;
+
+/**
+ * @author zzf
+ * @description:excel导出类
+ * @date 2021/1/27 9:23
+ */
+
+public class ExcelBean {
+    /**
+     * 列头(标题)名
+     */
+    public String headTextName;
+    /**
+     * 对应字段名
+     */
+    public String propertyName;
+    /**
+     * 合并单元格数
+     */
+    public Integer cols;
+    public XSSFCellStyle cellStyle;
+
+    public ExcelBean() {
+    }
+
+    public ExcelBean(String headTextName, String propertyName) {
+        this.headTextName = headTextName;
+        this.propertyName = propertyName;
+    }
+
+    public ExcelBean(String headTextName, String propertyName, Integer cols) {
+        super();
+        this.headTextName = headTextName;
+        this.propertyName = propertyName;
+        this.cols = cols;
+    }
+
+    public String getHeadTextName() {
+        return headTextName;
+    }
+
+    public void setHeadTextName(String headTextName) {
+        this.headTextName = headTextName;
+    }
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+    public void setPropertyName(String propertyName) {
+        this.propertyName = propertyName;
+    }
+
+    public Integer getCols() {
+        return cols;
+    }
+
+    public void setCols(Integer cols) {
+        this.cols = cols;
+    }
+
+    public XSSFCellStyle getCellStyle() {
+        return cellStyle;
+    }
+
+    public void setCellStyle(XSSFCellStyle cellStyle) {
+        this.cellStyle = cellStyle;
+    }
+}

+ 283 - 0
src/main/java/com/rf/youth/file/excel/ExcelClass.java

@@ -0,0 +1,283 @@
+package com.rf.youth.file.excel;
+
+import com.rf.youth.utils.Constant;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zzf
+ * @description:Excel导出辅助类,自定义表头和字段英文值
+ * @date 2021/1/27 9:21
+ */
+public class ExcelClass {
+
+
+    /**
+     * 全量导出,自定义flag
+     *
+     * @param flag
+     * @return
+     */
+    public Map<Integer, List<ExcelBean>> contentExcel(String flag) {
+        List<ExcelBean> excel = new ArrayList<>();
+        Map<Integer, List<ExcelBean>> map = new LinkedHashMap<>();
+        //设置标题栏
+        if (Constant.QUEST_TYPE_ASK.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("量表", "scale", 0));
+            excel.add(new ExcelBean("选择项", "checkItems", 0));
+            excel.add(new ExcelBean("计分方向", "type", 0));
+        } else if (Constant.QUEST_TYPE_PSQI.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("选项", "checkItems", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+        } else if (Constant.QUEST_TYPE_POMS.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+            excel.add(new ExcelBean("分量", "type", 0));
+        } else if (Constant.QUEST_TYPE_SCL.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("量表", "type", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+        } else if (Constant.QUEST_TYPE_AVAI.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("得分", "checked", 0));
+        } else if (Constant.QUEST_TYPE_SUPP.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("选项", "checkItems", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+        } else if (Constant.QUEST_TYPE_DEPR.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("量表", "type", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+        } else if (Constant.QUEST_TYPE_MOOD.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("情绪方向", "type", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+        } else if (Constant.QUEST_TYPE_STATUS.equals(flag)) {
+            excel.add(new ExcelBean("题号", "no", 0));
+            excel.add(new ExcelBean("题目", "content", 0));
+            excel.add(new ExcelBean("选择项", "checked", 0));
+            excel.add(new ExcelBean("计分方向", "type", 0));
+        } else if (Constant.QUEST_TYPE_RIVEN.equals(flag) || Constant.QUEST_TYPE_CDT.equals(flag)) {
+            excel.add(new ExcelBean("题号", "key", 0));
+            excel.add(new ExcelBean("选择项", "value", 0));
+        } else if (Constant.QUEST_TYPE_MOCA.equals(flag) || Constant.QUEST_TYPE_MMSE.equals(flag)) {
+            excel.add(new ExcelBean("题号", "key", 0));
+            excel.add(new ExcelBean("得分", "value", 0));
+        } else if (Constant.QUEST_TYPE_GO_NO_GO.equals(flag)) {
+            //excel.add(new ExcelBean("轮次","circle",0));
+            excel.add(new ExcelBean("信号颜色", "color", 0));
+            //excel.add(new ExcelBean("本轮出现次数","times",0));
+            excel.add(new ExcelBean("响应时间", "rspTime", 0));
+        } else if (Constant.QUEST_TYPE_ALERTNESS.equals(flag)) {
+            excel.add(new ExcelBean("刺激次数", "key", 0));
+            excel.add(new ExcelBean("反映时长(ms)", "value", 0));
+        } else if (Constant.QUEST_TYPE_ADDITION.equals(flag)) {
+            excel.add(new ExcelBean("数字个数", "key", 0));
+            excel.add(new ExcelBean("正确次数", "value", 0));
+        } else if (Constant.QUEST_TYPE_MEMORY.equals(flag)) {
+            excel.add(new ExcelBean("难度等级", "diffLevel", 0));
+            excel.add(new ExcelBean("是否需要点击", "ifNeedClick", 0));
+            excel.add(new ExcelBean("用户是否点击", "ifUserClick", 0));
+            excel.add(new ExcelBean("字符", "letter", 0));
+            excel.add(new ExcelBean("响应时长(毫秒)", "userResponseTime", 0));
+        } else if (Constant.QUEST_TYPE_LIFE.equals(flag)) {
+            excel.add(new ExcelBean("生活事件", "content", 0));
+            excel.add(new ExcelBean("发生次数", "checked", 0));
+            excel.add(new ExcelBean("单次分值", "score", 0));
+        } else if (Constant.QUEST_TYPE_RTC.equals(flag) || Constant.QUEST_TYPE_MTH.equals(flag)) {
+            excel.add(new ExcelBean("描述", "key", 0));
+            excel.add(new ExcelBean("分值", "value", 0));
+        } else if (Constant.QUEST_TYPE_MOVEMENT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("难度系数", "diff", 0));
+            excel.add(new ExcelBean("运动方向", "direction", 0));
+            excel.add(new ExcelBean("用户反应方向", "userResponse", 0));
+            excel.add(new ExcelBean("反应时间", "responseTime", 0));
+        } else if (Constant.QUEST_TYPE_RHYTHM.equals(flag)) {
+            excel.add(new ExcelBean("题号", "questionNo", 0));
+            excel.add(new ExcelBean("模式类型", "subType", 0));
+            excel.add(new ExcelBean("节拍间隔", "interval", 0));
+            excel.add(new ExcelBean("持续时间", "duration", 0));
+            excel.add(new ExcelBean("总分", "score", 0));
+        } else if (Constant.QUEST_TYPE_ANT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("展示类型", "type", 0));
+            excel.add(new ExcelBean("展示箭头的方向", "currentDir", 0));
+            excel.add(new ExcelBean("用户反馈的方向", "userClickDir", 0));
+            excel.add(new ExcelBean("反应时间", "responseTime", 0));
+            excel.add(new ExcelBean("是否为一致性", "consistency", 0));
+        } else if (Constant.QUEST_TYPE_SHAPE.equals(flag) || Constant.QUEST_TYPE_SHAPE2.equals(flag) || Constant.QUEST_TYPE_BIC.equals(flag) || Constant.QUEST_TYPE_MEMORYT.equals(flag) || Constant.QUEST_TYPE_REM.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("正确性", "rightOrWrong", 0));
+            excel.add(new ExcelBean("反应时间(毫秒)", "responseTime", 0));
+            excel.add(new ExcelBean("难度指数", "diff", 0));
+        } else if (Constant.QUEST_TYPE_GTCT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("难度等级", "diff", 0));
+            excel.add(new ExcelBean("运动速度(秒)", "velocity", 0));
+            excel.add(new ExcelBean("运动时长", "duration", 0));
+            excel.add(new ExcelBean("追踪目标数", "targetNum", 0));
+            excel.add(new ExcelBean("正确率(%)", "raghtRate", 0));
+        } else if (Constant.QUEST_TYPE_GO_NO_GO2.equals(flag)) {
+            excel.add(new ExcelBean("信号颜色", "color", 0));
+            excel.add(new ExcelBean("箭头朝向", "arrowDirection", 0));
+            excel.add(new ExcelBean("是否需要反应", "needResponse", 0));
+            excel.add(new ExcelBean("用户点击方向", "userDirection", 0));
+            excel.add(new ExcelBean("反应是否正确", "responseTrue", 0));
+            excel.add(new ExcelBean("用户反应时间", "responseTime", 0));
+        } else if (Constant.QUEST_TYPE_RDT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("本轮得分", "currentEarn", 0));
+            excel.add(new ExcelBean("点击次数", "numberPumps", 0));
+        } else if (Constant.QUEST_TYPE_SC.equals(flag)) {
+            excel.add(new ExcelBean("序号", "imgIndex", 0));
+            excel.add(new ExcelBean("小球运动速度", "speed", 0));
+            excel.add(new ExcelBean("方块长度", "length", 0));
+            excel.add(new ExcelBean("误差", "error", 0));
+        } else if (Constant.QUEST_TYPE_GBE.equals(flag)) {
+            excel.add(new ExcelBean("关卡", "level", 0));
+            excel.add(new ExcelBean("是否通过", "isPassed", 0));
+            excel.add(new ExcelBean("反应时间", "responseTimeDanger1", 0));
+            excel.add(new ExcelBean("反应时间", "responseTimeDanger2", 0));
+            excel.add(new ExcelBean("反应时间", "responseTimeDanger3", 0));
+            excel.add(new ExcelBean("反应时间", "responseTimeDanger4", 0));
+            excel.add(new ExcelBean("得分", "score", 0));
+            excel.add(new ExcelBean("错误个数", "errorNum", 0));
+            excel.add(new ExcelBean("道路个数", "roadNum", 0));
+        } else if (Constant.QUEST_TYPE_XJWL.equals(flag)) {
+            excel.add(new ExcelBean("关卡", "nanNan", 0));
+            excel.add(new ExcelBean("正确率", "zhengQue", 0));
+            excel.add(new ExcelBean("得分", "fenFen", 0));
+            excel.add(new ExcelBean("正确个数", "zhengZheng", 0));
+            excel.add(new ExcelBean("错误个数", "cuo", 0));
+        } else if (Constant.QUEST_TYPE_TKHL.equals(flag) || Constant.SHEET_NAME_HKJZ.equals(flag)) {
+            excel.add(new ExcelBean("关卡", "levelNum", 0));
+            excel.add(new ExcelBean("反应时间", "everyReactionTimes", 0));
+            excel.add(new ExcelBean("平均反应时间", "averageSlideTimes", 0));
+            excel.add(new ExcelBean("得分", "scores", 0));
+            excel.add(new ExcelBean("正确率", "correctRate", 0));
+        } else if (Constant.QUEST_TYPE_XYZC.equals(flag)) {
+            excel.add(new ExcelBean("关卡", "levelNum", 0));
+            excel.add(new ExcelBean("滑动反应", "everySlideTimes", 0));
+            excel.add(new ExcelBean("平均反应时间", "averageSlideTimes", 0));
+            excel.add(new ExcelBean("得分", "scores", 0));
+        } else if (Constant.QUEST_TYPE_STTA.equals(flag) || Constant.QUEST_TYPE_STTB.equals(flag)) {
+            excel.add(new ExcelBean("练习测试时间", "exerciseTime", 0));
+            excel.add(new ExcelBean("正式测试时间", "realTime", 0));
+            excel.add(new ExcelBean("总时间", "totalTime", 0));
+        } else if (Constant.QUEST_TYPE_DST.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("难度等级", "diff", 0));
+            excel.add(new ExcelBean("类型", "type", 0));
+            excel.add(new ExcelBean("字母序列", "qNumberSequence", 0));
+            excel.add(new ExcelBean("用户反应字母序列", "userResponseSequence", 0));
+            excel.add(new ExcelBean("反应正确性", "rightOrWrong", 0));
+            excel.add(new ExcelBean("反应时间", "responseTime", 0));
+        } else if (Constant.QUEST_TYPE_BSNTask.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("图片名", "picName", 0));
+            excel.add(new ExcelBean("用户选择", "picChoice", 0));
+        } else if (Constant.QUEST_TYPE_AMWSTask.equals(flag) || Constant.QUEST_TYPE_EREC.equals(flag)) {
+            excel.add(new ExcelBean("类型", "key", 0));
+            excel.add(new ExcelBean("类型值", "value", 0));
+        } else if (Constant.QUEST_TYPE_ETB01.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("情绪类型", "emoType", 0));
+            excel.add(new ExcelBean("类型值", "emoAmp", 0));
+            excel.add(new ExcelBean("选择的情绪类型", "userSelectEmoType", 0));
+            excel.add(new ExcelBean("反应时(ms)", "responseTime", 0));
+            excel.add(new ExcelBean("正确率", "correct", 0));
+        } else if (Constant.QUEST_TYPE_ECAT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("情绪类型", "wordType", 0));
+            excel.add(new ExcelBean("选择的情绪类型", "userSelectWordType", 0));
+            excel.add(new ExcelBean("反应时(ms)", "responseTime", 0));
+        } else if (Constant.QUEST_TYPE_EMEM.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("情绪类型", "wordType", 0));
+            excel.add(new ExcelBean("是否出现过", "appearedOrNot", 0));
+            excel.add(new ExcelBean("反应时(ms)", "responseTime", 0));
+            excel.add(new ExcelBean("正确性", "correct", 0));
+        } else if (Constant.QUEST_TYPE_FDOT.equals(flag)) {
+            excel.add(new ExcelBean("序号", "index", 0));
+            excel.add(new ExcelBean("情绪类型", "emoType", 0));
+            excel.add(new ExcelBean("点出点的位置", "dotPos", 0));
+            excel.add(new ExcelBean("反应时(ms)", "responseTime", 0));
+            excel.add(new ExcelBean("正确性", "correct", 0));
+            excel.add(new ExcelBean("类型", "type", 0));
+        }
+        map.put(0, excel);
+        return map;
+    }
+
+    /**
+     * 全量导出,自定义flag
+     *
+     * @param
+     * @return
+     */
+    public Map<Integer, List<ExcelBean>> contentExcel() {
+        List<ExcelBean> excel = new ArrayList<>();
+        Map<Integer, List<ExcelBean>> map = new LinkedHashMap<>();
+        //设置标题栏
+        excel.add(new ExcelBean("题号", "questionNo", 0));
+        excel.add(new ExcelBean("题目", "answer", 0));
+        excel.add(new ExcelBean("选择项", "checkItems", 0));
+        excel.add(new ExcelBean("类型", "questionType", 0));
+        excel.add(new ExcelBean("计分方向", "scoreDirection", 0));
+        map.put(0, excel);
+        return map;
+    }
+
+    public Map<Integer, List<ExcelBean>> userExportExcel() {
+        List<ExcelBean> excel = new ArrayList<>();
+        Map<Integer, List<ExcelBean>> map = new LinkedHashMap<>();
+        //设置标题栏
+        excel.add(new ExcelBean("机构名称", "institutionName", 0));
+        excel.add(new ExcelBean("机构编号", "institutionNo", 0));
+        excel.add(new ExcelBean("姓名", "petName", 0));
+        excel.add(new ExcelBean("性别", "gender", 0));
+        excel.add(new ExcelBean("出生年月", "birthday", 0));
+        excel.add(new ExcelBean("职业", "profession", 0));
+        excel.add(new ExcelBean("附加信息", "additionInfo", 0));
+        excel.add(new ExcelBean("账号", "phone", 0));
+        excel.add(new ExcelBean("密码", "password", 0));
+        map.put(0, excel);
+        return map;
+    }
+            /*excel.add(new ExcelBean("任务","backCount",0));
+            excel.add(new ExcelBean("组块","groupCount",0));
+            excel.add(new ExcelBean("字符次序","charShowCount",0));
+            excel.add(new ExcelBean("字符","charStr",0));
+            excel.add(new ExcelBean("响应时长(毫秒)","time",0));*/
+
+    /**
+     * 自定义导出
+     *
+     * @param entryMap key:中文表头  value 英文字段,与实体类一一对应
+     * @return
+     */
+    public Map<Integer, List<ExcelBean>> contentExcel(Map<String, String> entryMap) {
+        List<ExcelBean> excel = new ArrayList<>();
+        Map<Integer, List<ExcelBean>> map = new LinkedHashMap<>();
+        //设置标题栏
+        for (Map.Entry<String, String> entry : entryMap.entrySet()) {
+            excel.add(new ExcelBean(entry.getValue(), entry.getKey(), 0));
+            map.put(0, excel);
+        }
+        return map;
+    }
+}

+ 4 - 0
src/main/java/com/rf/youth/file/package-info.java

@@ -0,0 +1,4 @@
+package com.rf.youth.file;
+/**
+ * 文件相关
+ */

+ 65 - 0
src/main/java/com/rf/youth/filter/JWTInterceptor.java

@@ -0,0 +1,65 @@
+package com.rf.youth.filter;
+
+import com.alibaba.fastjson.JSON;
+import com.auth0.jwt.exceptions.AlgorithmMismatchException;
+import com.auth0.jwt.exceptions.SignatureVerificationException;
+import com.rf.youth.utils.JWTUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2821:48
+ */
+@Slf4j
+@Component
+public class JWTInterceptor implements HandlerInterceptor {
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        HashMap<String, Object> resultJson = new HashMap<>();
+        String uri = request.getRequestURI();
+        log.info("请求uri:" + uri);
+        //获取请求头token
+        try {
+            String token = request.getHeader("Authorization");
+            if(StringUtils.isEmpty(token)) {
+                resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+                resultJson.put("msg", "无效签名信息");
+            }
+            String[] len = token.split(" ");
+            if (len.length >=1){
+                token = len[1];//以空格划分Bearer token,获取token
+                JWTUtil.verify(token);//验证令牌
+                return true; //放行
+            }else {
+                resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+                resultJson.put("msg", "无效签名信息");
+            }
+
+        } catch (SignatureVerificationException e) {
+            e.printStackTrace();
+            resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+            resultJson.put("msg", "无效签名信息");
+        } catch (AlgorithmMismatchException e) {
+            e.printStackTrace();
+            resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+            resultJson.put("msg", "token算法不一致");
+        } catch (Exception e) {
+            e.printStackTrace();
+            resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+            resultJson.put("msg", "登录状态失效,请重新登录");
+        }
+        String s = JSON.toJSONString(resultJson);
+        response.setContentType("application/json;charset=UTF-8");
+        response.getWriter().println(s);
+        return false;
+    }
+}

+ 76 - 0
src/main/java/com/rf/youth/filter/JWTInterceptorConfig.java

@@ -0,0 +1,76 @@
+package com.rf.youth.filter;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2822:06
+ */
+@Configuration
+@Profile("!public")
+public class JWTInterceptorConfig implements WebMvcConfigurer {
+
+    @Autowired
+    private UserCheckInterceptor userCheckInterceptor;
+
+    @Autowired
+    private JWTInterceptor jwtInterceptor;
+
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        //定义排除swagger访问的路径配置
+        String[] swaggerExcludes = new String[]{"/swagger-ui.html", "/swagger-resources/**", "/csrf", "/webjars/**"};
+        String[] webLogin = new String[]{"/user/authCode", "/user/saveUser", "/user/webLogin", "/user/webUpdatePassword", "/user/*/checkUser"};
+        String[] systemApi = new String[]{"/system/login","/system/forgotPassword","/system/registerUser","/apply/push"};
+        registry.addInterceptor(jwtInterceptor)
+                .addPathPatterns("/**")
+                .excludePathPatterns("/", "/index**", "/error")
+                .excludePathPatterns(systemApi)
+                .excludePathPatterns("/user/saveUserV2", "/institution/saveUser")
+                .excludePathPatterns(webLogin)
+                .excludePathPatterns("/user/LANSaveUserInfo", "/user/LANLogin", "/user/LANUpdatePassword")
+                .excludePathPatterns("/file/**", "/result/download/**")
+                .excludePathPatterns("/download/**")
+                .excludePathPatterns("/apk/**")
+                .excludePathPatterns("/device/**")
+                .excludePathPatterns("/param/**")
+                .excludePathPatterns("/userImport")
+                .excludePathPatterns("/test/token")
+                .excludePathPatterns(swaggerExcludes)
+                .excludePathPatterns("/favicon.ico")
+                .excludePathPatterns("/druid/**")
+                .excludePathPatterns("/static/**");//排除静态资源
+        registry.addInterceptor(userCheckInterceptor)
+                .addPathPatterns("/**")
+                .excludePathPatterns("/", "/index.html", "/error")
+                .excludePathPatterns(systemApi)
+                .excludePathPatterns("/user/saveUserV2", "/institution/saveUser")
+                .excludePathPatterns(webLogin)
+                .excludePathPatterns("/user/LANSaveUserInfo", "/user/LANLogin", "/user/LANUpdatePassword")
+                .excludePathPatterns("/file/**", "/result/download/**")
+                .excludePathPatterns("/download/**")
+                .excludePathPatterns("/apk/**")
+                .excludePathPatterns("/device/**")
+                .excludePathPatterns("/param/**")
+                .excludePathPatterns("/userImport")
+                .excludePathPatterns("/test/token")
+                .excludePathPatterns(swaggerExcludes)
+                .excludePathPatterns("/favicon.ico")
+                .excludePathPatterns("/druid/**")
+                .excludePathPatterns("/static/**");//排除静态资源
+
+    }
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/static/**")
+                .addResourceLocations("classpath:/static/");
+    }
+}

+ 56 - 0
src/main/java/com/rf/youth/filter/UserCheckInterceptor.java

@@ -0,0 +1,56 @@
+package com.rf.youth.filter;
+
+import com.alibaba.fastjson.JSON;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import com.rf.youth.enums.UserRole;
+import com.rf.youth.enums.UserStatus;
+import com.rf.youth.user.service.UserService;
+import com.rf.youth.user.dao.model.UserEntity;
+import com.rf.youth.utils.JWTUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/01/20 16:54
+ */
+@Slf4j
+@Component
+public class UserCheckInterceptor implements HandlerInterceptor {
+    @Autowired
+    private UserService userService;
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        HashMap<String, Object> resultJson = new HashMap<>();
+        String uri = request.getRequestURI();
+        //获取请求头token
+        String token = request.getHeader("Authorization");
+        token = token.split(" ")[1];//以空格划分Bearer token,获取token
+        JWTUtil.verify(token);//验证令牌
+        //从请求头中获取token
+        DecodedJWT verify = JWTUtil.verify(token);
+        String userId = verify.getClaim("userId").asString();
+        //获取此时操作的用户类型,分别是user,admin,superAdmin
+        String type = verify.getClaim("type").asString();
+        if (UserRole.COMMON.getType().equals(type) || UserRole.ADMIN.getType().equals(type)) {
+            UserEntity one = userService.findUserById(userId);
+            if (one == null) {
+                resultJson.put("code", HttpServletResponse.SC_UNAUTHORIZED);
+                resultJson.put("msg", "账户已被删除,请联系管理员");
+                String s = JSON.toJSONString(resultJson);
+                response.setContentType("application/json;charset=UTF-8");
+                response.getWriter().println(s);
+                return false;
+            }
+
+        }
+        return true; //放行
+    }
+}

+ 24 - 0
src/main/java/com/rf/youth/menu/dao/dto/RoleMenuEntryDTO.java

@@ -0,0 +1,24 @@
+package com.rf.youth.menu.dao.dto;
+
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/11:17:37
+ * @Description:
+ */
+@Setter
+@Getter
+public class RoleMenuEntryDTO extends RoleMenuEntry {
+    private String roleName;
+
+    private String menuName;
+
+    public RoleMenuEntryDTO (RoleMenuEntry entry){
+        this.setId(entry.getId());
+        this.setRole(entry.getRole());
+        this.setMenuNo(entry.getMenuNo());
+    }
+}

+ 47 - 0
src/main/java/com/rf/youth/menu/dao/model/MenuEntry.java

@@ -0,0 +1,47 @@
+package com.rf.youth.menu.dao.model;
+
+import com.rf.youth.base.model.BaseEntity;
+import lombok.*;
+
+import javax.persistence.*;
+import java.util.List;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/6:17:25
+ * @Description: 菜单
+ */
+
+@EqualsAndHashCode(callSuper = true)
+@Entity
+@Data
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Table(name = "t_menu_info" )
+@org.hibernate.annotations.Table(appliesTo = "t_menu_info", comment = "菜单表")
+public class MenuEntry extends BaseEntity {
+
+    @Column(name = "menu_no",columnDefinition = "varchar(20) unique not null  comment '菜单编号'")
+    private String menuNo;
+
+    @Column(name = "menu_path",columnDefinition = "varchar(200)  comment '菜单路由'")
+    private String menuPath;
+
+    @Column(name = "menu_name",columnDefinition = "varchar(20) not null comment '菜单名'")
+    private String menuName;
+
+    @Column(name = "parent_menu",columnDefinition = "varchar(20) not null default '0' comment '上级菜单:0表示最顶层菜单'")
+    private String parentMenu;
+
+    @Column(name = "menu_order",columnDefinition = "smallint not null default 0 comment '菜单序号'")
+    private int menuOrder;
+
+    @Column(name = "menu_status",columnDefinition = "smallint not null default 0 comment '菜单状态:0不可用;1可用;默认不可用'")
+    private int menuStatus;
+
+    @Transient
+    private List<MenuEntry> childMenuList;
+
+}

+ 32 - 0
src/main/java/com/rf/youth/menu/dao/model/RoleMenuEntry.java

@@ -0,0 +1,32 @@
+package com.rf.youth.menu.dao.model;
+
+import com.rf.youth.base.model.BaseEntity;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/7:14:52
+ * @Description:菜单角色关联信息
+ */
+@Entity
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@EqualsAndHashCode(callSuper=false)
+@Table(name = "t_role_menu")
+@org.hibernate.annotations.Table(appliesTo = "t_role_menu", comment = "角色菜单关联表")
+@DynamicUpdate
+public class RoleMenuEntry extends BaseEntity {
+    @Column(name = "role",columnDefinition = "varchar(2) not null comment '角色'")
+    private String role;
+    @Column(name = "menu_no",columnDefinition = "varchar(20) not null comment '菜单编号'")
+    private String menuNo;
+}

+ 8 - 0
src/main/java/com/rf/youth/menu/dao/repository/MenuRepository.java

@@ -0,0 +1,8 @@
+package com.rf.youth.menu.dao.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.menu.dao.model.MenuEntry;
+
+public interface MenuRepository extends BaseRepository<MenuEntry,String> {
+    MenuEntry findByMenuNo(String menuNo);
+}

+ 20 - 0
src/main/java/com/rf/youth/menu/dao/repository/RoleMenuRepository.java

@@ -0,0 +1,20 @@
+package com.rf.youth.menu.dao.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+import org.springframework.data.repository.query.Param;
+
+import javax.transaction.Transactional;
+import java.util.List;
+
+public interface RoleMenuRepository extends BaseRepository<RoleMenuEntry,String> {
+
+    List<RoleMenuEntry> findByRole(String role);
+
+    List<RoleMenuEntry> findByMenuNo(String menuNo);
+
+    @Transactional
+//    @Modifying
+//    @Query(value = "delete from t_role_menu where role = :roleNo",nativeQuery = true)
+    void deleteByRole(@Param("roleNo") String roleNo);
+}

+ 116 - 0
src/main/java/com/rf/youth/menu/rest/MenuController.java

@@ -0,0 +1,116 @@
+package com.rf.youth.menu.rest;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.user.dao.model.UserEntity;
+import com.rf.youth.menu.dao.dto.RoleMenuEntryDTO;
+import com.rf.youth.menu.dao.model.MenuEntry;
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+import com.rf.youth.menu.service.MenuService;
+import com.rf.youth.menu.service.RoleMenuService;
+import com.rf.youth.security.AesEncryptUtils;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.user.service.UserService;
+import com.rf.youth.utils.HttpStatus;
+import com.rf.youth.utils.Result;
+import com.rf.youth.utils.Utils;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/6:17:59
+ * @Description:
+ */
+@RestController
+@Slf4j
+@RequestMapping("/menu")
+public class MenuController extends BaseController {
+
+    @Autowired
+    private MenuService menuService;
+
+    @Autowired
+    private UserService userService;
+
+    @Autowired
+    private RoleMenuService roleMenuService;
+
+    /**
+     * 查询顶级菜单
+     * @return
+     */
+    @ApiOperation(value = "查询用户菜单权限——顶级菜单")
+    @SafetyProcess
+    @GetMapping("/find/user/{userId}")
+    public Result find(@PathVariable String userId){
+        return getResult(userId, null);
+    }
+
+
+
+    @ApiOperation(value = "查询用户菜单权限——下级菜单")
+    @SafetyProcess
+    @GetMapping("/find/user/{userId}/{menuNo}")
+    public Result find(@PathVariable String userId,@PathVariable String menuNo){
+        return getResult(userId, menuNo);
+    }
+
+    @ApiOperation(value = "查询菜单-角色关联关系")
+    @SafetyProcess
+    @GetMapping("/find/roleMenu/{menuNo}")
+    public Result findRoleMenu(@PathVariable String menuNo){
+        List<RoleMenuEntry> list = this.roleMenuService.findByMenuNo(menuNo);
+        List<RoleMenuEntryDTO> roleMenuEntryDTOS = new ArrayList<>();
+        if(list != null && list.size()>0){
+            list.forEach(roleMenuEntry -> {
+                RoleMenuEntryDTO entry = new RoleMenuEntryDTO(roleMenuEntry);
+                MenuEntry menuEntry = this.menuService.findByMenuNo(menuNo);
+                if(menuEntry == null) return;
+                entry.setMenuName(menuEntry.getMenuName());
+                entry.setRoleName(Utils.roleType2roleName(roleMenuEntry.getRole()));
+                roleMenuEntryDTOS.add(entry);
+            });
+        }
+        return success(roleMenuEntryDTOS);
+    }
+
+    @PostMapping("/roleMenu/{roleNo}")
+    @ApiOperation("维护角色菜单关联关系")
+    @SafetyProcess
+    public Result updateRoleManu(@RequestBody String json, @PathVariable String roleNo) throws Exception {
+        JSONArray jsonArray = JSONArray.parseArray(AesEncryptUtils.decrypt(JSONObject.parseObject(json).getString("data")));
+        List<String> menuNos = jsonArray.toJavaList(String.class);
+        List<RoleMenuEntry> roleMenuEntryList = new ArrayList<>();
+        if(menuNos != null && menuNos.size()>0){
+            menuNos.forEach(menuNo -> {
+                RoleMenuEntry roleMenuEntry = new RoleMenuEntry();
+                roleMenuEntry.setRole(roleNo);
+                roleMenuEntry.setMenuNo(menuNo);
+                roleMenuEntryList.add(roleMenuEntry);
+            });
+        }
+        if(roleMenuEntryList.size()>0){
+            this.roleMenuService.deleteByRoleNo(roleNo);
+            this.roleMenuService.saveBatch(roleMenuEntryList);
+        }
+        return success();
+    }
+
+    private Result getResult(@PathVariable String userId, String menuNo) {
+        UserEntity user = this.userService.findUserById(userId);
+        if(user == null){
+            return fail(HttpStatus.PARAMETER_ISNULL,null,"用户不存在");
+        }
+        String role = user.getRoleType();
+        List<RoleMenuEntry> roleMenuEntryList = this.roleMenuService.findByRole(role);
+        if(roleMenuEntryList==null || roleMenuEntryList.size() == 0) return success();
+        List<MenuEntry> menuEntryList = this.menuService.findAll(roleMenuEntryList, menuNo);
+        return success(menuEntryList);
+    }
+}

+ 25 - 0
src/main/java/com/rf/youth/menu/service/MenuService.java

@@ -0,0 +1,25 @@
+package com.rf.youth.menu.service;
+
+import com.rf.youth.menu.dao.model.MenuEntry;
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+
+import java.util.List;
+
+public interface MenuService {
+
+    /**
+     * 查询一级菜单
+     *
+     * @param roleMenuEntryList
+     * @param menuNo
+     * @return
+     */
+    List<MenuEntry> findAll(List<RoleMenuEntry> roleMenuEntryList, String menuNo);
+
+    /**
+     * menuNo---menuEntry
+     * @param menuNo
+     * @return
+     */
+    MenuEntry findByMenuNo(String menuNo);
+}

+ 26 - 0
src/main/java/com/rf/youth/menu/service/RoleMenuService.java

@@ -0,0 +1,26 @@
+package com.rf.youth.menu.service;
+
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+
+import java.util.List;
+
+public interface RoleMenuService {
+
+    /**
+     * 查询 角色菜单关联关系
+     * @param role
+     * @return
+     */
+    List<RoleMenuEntry> findByRole(String role);
+
+    /**
+     * 查询菜单下的角色关联信息
+     * @param menuNo
+     * @return
+     */
+    List<RoleMenuEntry> findByMenuNo(String menuNo);
+
+    void deleteByRoleNo(String roleNo);
+
+    void saveBatch(List<RoleMenuEntry> roleMenuEntryList);
+}

+ 71 - 0
src/main/java/com/rf/youth/menu/service/impl/MenuServiceImpl.java

@@ -0,0 +1,71 @@
+package com.rf.youth.menu.service.impl;
+
+import com.rf.youth.menu.dao.model.MenuEntry;
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+import com.rf.youth.menu.dao.repository.MenuRepository;
+import com.rf.youth.menu.service.MenuService;
+import com.rf.youth.utils.Constant;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+import javax.persistence.criteria.Predicate;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/6:18:01
+ * @Description:
+ */
+@Service
+public class MenuServiceImpl implements MenuService {
+
+    @Autowired
+    private MenuRepository menuRepository;
+
+
+
+    /**
+     * 查询一级菜单
+     *
+     * @param roleMenuEntryList
+     * @param menuNo
+     * @return
+     */
+    @Override
+    public List findAll(List<RoleMenuEntry> roleMenuEntryList, String menuNo) {
+        Specification<MenuEntry> specification = (root, query, cb) -> {
+            List<Predicate> predicateList = new ArrayList<>();
+            //状态为可用
+            predicateList.add(cb.equal(root.get("menuStatus"), Constant.MAGIC_NUM_1));
+            //菜单码在集合
+            List<String> menuNos = new ArrayList<>();
+            roleMenuEntryList.forEach(roleMenuEntry -> menuNos.add(roleMenuEntry.getMenuNo()));
+            predicateList.add((root.get("menuNo").in(menuNos)));
+            if(menuNo == null){
+                //顶层菜单
+                predicateList.add(cb.equal(root.get("parentMenu"),Constant.MAGIC_NUM_0));
+            }else{
+                predicateList.add(cb.equal(root.get("menuNo"),menuNo));
+            }
+
+            query.where(cb.and(predicateList.toArray(new Predicate[predicateList.size()])));
+            query.orderBy(cb.asc(root.get("orders")));
+            return query.getRestriction();
+        };
+        return this.menuRepository.findAll(specification);
+    }
+
+    /**
+     * menuNo---menuEntry
+     *
+     * @param menuNo
+     * @return
+     */
+    @Override
+    public MenuEntry findByMenuNo(String menuNo) {
+        return menuRepository.findByMenuNo( menuNo);
+    }
+
+}

+ 52 - 0
src/main/java/com/rf/youth/menu/service/impl/RoleMenuServiceImpl.java

@@ -0,0 +1,52 @@
+package com.rf.youth.menu.service.impl;
+
+import com.rf.youth.menu.dao.model.RoleMenuEntry;
+import com.rf.youth.menu.dao.repository.RoleMenuRepository;
+import com.rf.youth.menu.service.RoleMenuService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/7:15:02
+ * @Description:
+ */
+@Service
+public class RoleMenuServiceImpl implements RoleMenuService {
+
+    @Autowired
+    private RoleMenuRepository roleMenuRepository;
+    /**
+     * 查询 角色菜单关联关系
+     *
+     * @param role
+     * @return
+     */
+    @Override
+    public List<RoleMenuEntry> findByRole(String role) {
+        return this.roleMenuRepository.findByRole(role);
+    }
+
+    /**
+     * 查询菜单下的角色关联信息
+     *
+     * @param menuNo
+     * @return
+     */
+    @Override
+    public List<RoleMenuEntry> findByMenuNo(String menuNo) {
+        return this.roleMenuRepository.findByMenuNo(menuNo);
+    }
+
+    @Override
+    public void deleteByRoleNo(String roleNo) {
+        this.roleMenuRepository.deleteByRole(roleNo);
+    }
+
+    @Override
+    public void saveBatch(List<RoleMenuEntry> roleMenuEntryList) {
+        this.roleMenuRepository.saveAll(roleMenuEntryList);
+    }
+}

+ 16 - 0
src/main/java/com/rf/youth/opLog/annotation/OperationLogAnnotation.java

@@ -0,0 +1,16 @@
+package com.rf.youth.opLog.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2515:18
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface OperationLogAnnotation {
+    String value() default "";
+}

+ 164 - 0
src/main/java/com/rf/youth/opLog/aspect/UserLogAspect.java

@@ -0,0 +1,164 @@
+package com.rf.youth.opLog.aspect;
+
+import com.alibaba.fastjson.JSONObject;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import com.rf.youth.opLog.annotation.OperationLogAnnotation;
+import com.rf.youth.opLog.dao.SysLogEntity;
+import com.rf.youth.opLog.service.SysLogService;
+import com.rf.youth.utils.DateUtil;
+import com.rf.youth.utils.IPUtiles;
+import com.rf.youth.utils.JWTUtil;
+import com.rf.youth.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2515:24
+ */
+@Aspect
+@Component
+public class UserLogAspect {
+
+    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    @Autowired
+    private SysLogService sysLogService;
+
+    @Pointcut("@annotation(com.rf.youth.opLog.annotation.OperationLogAnnotation)")
+    public void logPointCut() {
+    }
+
+    @AfterReturning(returning = "result", value = "logPointCut()")
+    public void saveOpLog(JoinPoint joinPoint, Object result) {
+        // 获取RequestAttributes
+        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
+        // 从获取RequestAttributes中获取HttpServletRequest的信息
+        HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST);
+
+        //从切面织入点处通过反射机制获取织入点处的方法
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        //获得切入点方法
+        Method method = signature.getMethod();
+        //通过方法获取所在类
+        Class<?> aClass = method.getDeclaringClass();
+        Api classAnnotation = aClass.getAnnotation(Api.class);
+//        //获取切入点参数
+//        DefaultParameterNameDiscoverer defaultParameterNameDiscoverer = new DefaultParameterNameDiscoverer();
+//        String[] parameterNames = defaultParameterNameDiscoverer.getParameterNames(method);
+//        Object[] args = joinPoint.getArgs();
+//        HashMap<String, Object> paramMap = new HashMap<>();
+//        for (int i = 0; i < parameterNames.length; i++) {
+//            paramMap.put(parameterNames[i], args[i]);
+//        }
+//        paramMap.forEach((key, value) -> {
+//            System.out.println(key + ":" + value);
+//        });
+        Result returnResult = (Result) result;
+        String value;
+        OperationLogAnnotation opLogAnnotation = method.getAnnotation(OperationLogAnnotation.class);
+        ApiOperation apiAnnotation = method.getAnnotation(ApiOperation.class);
+        if (!opLogAnnotation.value().equals("")) {
+            System.out.println("opLogAnnotation.value() :" + opLogAnnotation.value());
+            value = opLogAnnotation.value();
+        } else {
+            System.out.println("spAnnotation :" + apiAnnotation.value());
+            value = apiAnnotation.value();
+        }
+        //获取类上apiOperation的数据
+        //如果所在类的注解上有值则将此值与方法上的名称在一起组成,例如“用户操作-登录”
+        if (!Arrays.toString(classAnnotation.tags()).equals("")) {
+            value = Arrays.toString(classAnnotation.tags()) + "-" + value;
+        }
+        //获取方法名字
+        String methodName = method.getName();
+        //开始时间
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String beginTime = df.format(new Date());
+        //获取ip
+        String realIp = IPUtiles.getRealIp(request);
+        System.out.println("realIp:" + realIp);
+        //获取请求url
+        String requestURI = request.getRequestURI();
+        String userPhone = "";
+        String userId = "";
+        String petName = "";
+        String institutionNo = "";
+        String type = "";
+        Boolean flag = false;
+        //获取用户
+        //如果是为登录操作,因为没有token所以不从token中获取
+        if (!(requestURI.equals("/user/login") || requestURI.equals("/admin/login") || requestURI.equals("/institution/loginV2"))) {
+            String token = request.getHeader("Authorization");
+            token = token.split(" ")[1];//以空格划分Bearer token,获取token
+            System.out.println("-------------------------token-----------------------");
+            System.out.println(token);
+            //从请求头中获取token
+            DecodedJWT verify = JWTUtil.verify(token);
+            userPhone = verify.getClaim("userPhone").asString();
+            userId = verify.getClaim("userId").asString();
+            petName = verify.getClaim("petName").asString();
+            institutionNo = verify.getClaim("institutionNo").asString();
+            //获取此时操作的用户类型,分别是user,admin,superAdmin
+            type = verify.getClaim("type").asString();
+            flag = true;
+        } else {
+            //登录成功时候从返回值中获取,登录有问题不进行存储
+            System.out.println(returnResult.getData());
+            if (!returnResult.getData().equals("")) {
+                JSONObject returnData = (JSONObject) returnResult.getData();
+                if (requestURI.equals("/user/login")) {
+                    userId = returnData.get("userId").toString();
+                    petName = returnData.get("petName").toString();
+                    institutionNo = returnData.get("institutionNo").toString();
+                    type = returnData.getString("type").toString();
+                } else if (requestURI.equals("/admin/login")) {
+                    System.out.println((JSONObject) returnResult.getData());
+
+                } else {
+                    JSONObject institutionEntity = returnData.getJSONObject("institutionEntity");
+
+                    type = returnData.getString("type").toString();
+                }
+                flag = true;
+            }
+        }
+        if (flag) {
+            //获取当前时间
+            String endTime = df.format(new Date());
+            SysLogEntity sysLogEntity = new SysLogEntity();
+            sysLogEntity.setIp(realIp);
+            sysLogEntity.setCreateTime(beginTime);
+            sysLogEntity.setUserId(userId);
+            sysLogEntity.setMethod(methodName);
+            sysLogEntity.setOperation(value);
+            sysLogEntity.setUserName(petName);
+            sysLogEntity.setInstitutionNo(institutionNo);
+            sysLogEntity.setType(type);
+            sysLogEntity.setUrl(requestURI);
+            sysLogEntity.setResponseTime(DateUtil.getDistanceTime(beginTime,endTime));
+            sysLogEntity.setResult(returnResult.getCode() + "/" + returnResult.getMsg());
+            sysLogService.save(sysLogEntity);
+        }
+        System.out.println("result:  " + ((Result) result).getCode());
+        System.out.println("result:  " + ((Result) result).getMsg());
+        System.out.println("result:  " + ((Result) result).getData());
+    }
+}

+ 63 - 0
src/main/java/com/rf/youth/opLog/dao/SysLogEntity.java

@@ -0,0 +1,63 @@
+package com.rf.youth.opLog.dao;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.rf.youth.base.model.BaseEntity;
+import lombok.*;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Index;
+import javax.persistence.Table;
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2022/1/1211:08
+ */
+@Entity
+@ToString
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Table(name = "t_sys_log", indexes = {
+        @Index(columnList = "id", unique = true),
+        @Index(columnList = "user_id"),
+        @Index(columnList = "institution_no")
+})
+@org.hibernate.annotations.Table(appliesTo = "t_sys_log", comment = "操作日志")
+public class SysLogEntity extends BaseEntity {
+
+    @Column(name = "user_id", columnDefinition = "varchar(36) not null comment '操作用户id'")
+    private String userId;
+
+    @Column(name = "user_name", columnDefinition = "varchar(50) not null comment '操作用户名'")
+    private String userName;
+
+    @Column(name = "institution_no", columnDefinition = "varchar(50) not null comment '机构编号'")
+    private String institutionNo;
+
+    @Column(name = "type", columnDefinition = "varchar(10) null comment '用户类别'")
+    private String type;
+
+    @Column(name = "operation", columnDefinition = "varchar(100) null comment '用户操作'")
+    private String operation;
+
+    @Column(name = "method", columnDefinition = "varchar(100) null comment '操作方法'")
+    private String method;
+
+    @Column(name = "url", columnDefinition = "varchar(100) null comment '请求url'")
+    private String url;
+
+    @Column(name = "ip", columnDefinition = "varchar(100) null comment '操作ip'")
+    private String ip;
+
+    @Column(name = "result", columnDefinition = "varchar(250) null comment '操作结果'")
+    private String result;
+
+
+    @Column(name = "response_time", columnDefinition = "varchar(250) null comment '响应时长'")
+    private String responseTime;
+
+}

+ 77 - 0
src/main/java/com/rf/youth/opLog/rest/SysLogController.java

@@ -0,0 +1,77 @@
+package com.rf.youth.opLog.rest;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.opLog.dao.SysLogEntity;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.opLog.service.SysLogService;
+import com.rf.youth.utils.Constant;
+import com.rf.youth.utils.HttpStatus;
+import com.rf.youth.utils.Result;
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.utils.Utils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.ParseException;
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2022/1/1310:50
+ */
+@Slf4j
+@RestController
+@RequestMapping("/syslog")
+@Api(tags = "操作日志管理")
+public class SysLogController extends BaseController {
+
+    @Autowired
+    private SysLogService sysLogService;
+
+
+    /**
+     *
+     * @param institutionNo 机构编号
+     * @param searchKey 操作名称
+     * @param beginTime 开始时间,格式yyyy-MM-dd
+     * @param endTime 结束时间,格式yyyy-MM-dd
+     * @param searchUserName 操作者姓名
+     * @param type 0---表示普通用户,1--表示管理员,2--表示超级管理员,""空时表示查机构下的所有操作
+     * @param beginNum 起始页
+     * @param pageSize 每页显示个数
+     * @return
+     */
+    @SafetyProcess
+    @GetMapping("/find")
+    @ApiOperation("查看操作日志")
+    public Result getSysLog(String institutionNo, String searchKey, String beginTime, String endTime, String searchUserName, String type, int beginNum, int pageSize){
+        if (pageSize == 0) {
+            pageSize = 10;
+        }
+        Date beginDate, endDate;
+        try {
+
+            beginDate = Utils.date2time(beginTime, Constant.DATE_TRANS_FLAG_START);
+            endDate = Utils.date2time(endTime,Constant.DATE_TRANS_FLAG_END);
+        } catch (ParseException e) {
+            log.error("日期格式转换错误:"+e.getLocalizedMessage());
+            e.printStackTrace();
+            return fail(HttpStatus.SERVER_EXCEPTION,null,"服务器内部错误");
+        }
+
+        Page<SysLogEntity> byInstitutionNo = sysLogService.findByInstitutionNo(institutionNo, searchKey, beginDate, endDate, searchUserName, type, beginNum, pageSize);
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("sysLogEntities", byInstitutionNo.getContent());
+        jsonObject.put("num", byInstitutionNo.getTotalElements());
+        return success(jsonObject);
+    }
+
+
+}

+ 20 - 0
src/main/java/com/rf/youth/opLog/service/SysLogService.java

@@ -0,0 +1,20 @@
+package com.rf.youth.opLog.service;
+
+import com.rf.youth.opLog.dao.SysLogEntity;
+import org.springframework.data.domain.Page;
+
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2022/1/614:35
+ */
+public interface SysLogService {
+
+    void deleteById(String id);
+
+    SysLogEntity save(SysLogEntity sysLogEntity);
+
+    Page<SysLogEntity> findByInstitutionNo(String institutionNo, String searchKey, Date beginTime, Date endTime, String searchUserName, String type, int beginNum, int pageSize);
+}

+ 52 - 0
src/main/java/com/rf/youth/opLog/service/impl/SysLogServiceImpl.java

@@ -0,0 +1,52 @@
+package com.rf.youth.opLog.service.impl;
+
+import com.rf.youth.dao.repository.SysLogRepository;
+import com.rf.youth.opLog.dao.SysLogEntity;
+import com.rf.youth.opLog.service.SysLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2022/1/614:35
+ */
+@Service
+public class SysLogServiceImpl implements SysLogService {
+
+    @Autowired
+    private SysLogRepository sysLogRepository;
+
+    @Override
+    public SysLogEntity save(SysLogEntity sysLogEntity) {
+        return sysLogRepository.save(sysLogEntity);
+    }
+
+    @Override
+    public void deleteById(String id) {
+        sysLogRepository.deleteById(id);
+    }
+
+    @Override
+    public Page<SysLogEntity> findByInstitutionNo(String institutionNo, String searchKey, Date beginTime, Date endTime, String searchUserName, String type, int beginNum, int pageSize) {
+        switch (type) {
+            case "0":
+                type = "user";
+                break;
+            case "1":
+                type = "admin";
+                break;
+            case "2":
+                type = "superAdmin";
+                break;
+            default:
+                type = "";
+                break;
+        }
+        return sysLogRepository.findByInstitutionNo(institutionNo, searchKey, beginTime, endTime, searchUserName, type, PageRequest.of(beginNum - 1, pageSize));
+    }
+}

+ 40 - 0
src/main/java/com/rf/youth/order/controller/TalentApplyInfoController.java

@@ -0,0 +1,40 @@
+package com.rf.youth.order.controller;
+
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.order.model.TalentApplyInfo;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * @Description:待入住人员处理信息
+ * @Author: zsf
+ * @Date: 2022/8/4
+ */
+@RestController
+@RequestMapping("/apply")
+@Api(tags = "待入住人员管理")
+@Slf4j
+public class TalentApplyInfoController extends BaseController {
+
+    @SafetyProcess
+    @ApiOperation(value = "系统登录接口",notes = "data参数包括:phone:账号, password:密码,institutionNo:机构编号,roleType:用户角色")
+    @PostMapping("/push")
+    public Result login( @RequestBody TalentApplyInfo applyInfo){
+        try {
+                log.info(applyInfo.toString());
+                return success(null,"成功");
+
+        }catch (Exception e){
+            e.printStackTrace();
+            return fail(null,"失败");
+        }
+    }
+}

+ 52 - 0
src/main/java/com/rf/youth/order/model/TalentApplyInfo.java

@@ -0,0 +1,52 @@
+package com.rf.youth.order.model;
+
+import com.rf.youth.base.model.BaseEntity;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @Description:人才申请订单
+ * @Author: zsf
+ * @Date: 2022/8/4
+ */
+@Entity
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Table(name = "t_talent_apply_info")
+@EqualsAndHashCode(callSuper=true)
+@org.hibernate.annotations.Table(appliesTo = "t_talent_apply_info", comment = "人才申请表")
+public class TalentApplyInfo extends BaseEntity {
+
+    @Column(name = "apply_name", columnDefinition = "varchar(50) not null comment '申请人姓名'")
+    private String applyName; //申请人姓名
+
+    @Column(name = "identity_number", columnDefinition = "varchar(18) not null comment '身份证号'")
+    private String identityNumber;
+
+    @Column(name = "phone", columnDefinition = "varchar(11) not null comment '电话'")
+    private String phone;
+
+    @Column(name = "start_time", columnDefinition = "varchar(20) not null comment '预计入住时间'")
+    private String startTime;
+
+    @Column(name = "end_ime", columnDefinition = "varchar(20) not null comment '预计退房时间'")
+    private String endTime;
+
+    @Column(name = "post_station_name", columnDefinition = "varchar(20) not null comment '驿站名称'")
+    private String postStationName;
+
+    @Column(name = "post_station_code", columnDefinition = "varchar(20) not null comment '驿站code'")
+    private String postStationCode;
+
+    @Column(name = "status", columnDefinition = "varchar(10) not null comment '状态:0申请,1续租,2超时未入住'")
+    private String status;
+
+
+}

+ 12 - 0
src/main/java/com/rf/youth/order/repository/TalentApplyInfoRepository.java

@@ -0,0 +1,12 @@
+package com.rf.youth.order.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.order.model.TalentApplyInfo;
+
+/**
+ * @Description:待入住人员信息
+ * @Author: zsf
+ * @Date: 2022/8/4
+ */
+public interface TalentApplyInfoRepository extends BaseRepository<TalentApplyInfo,String> {
+}

+ 20 - 0
src/main/java/com/rf/youth/order/service/TalentApplyInfoService.java

@@ -0,0 +1,20 @@
+package com.rf.youth.order.service;
+
+import com.rf.youth.order.model.TalentApplyInfo;
+
+/**
+ * @Description:待入住用户接口
+ * @Author: zsf
+ * @Date: 2022/8/4
+ */
+public interface TalentApplyInfoService {
+
+    public TalentApplyInfo saveInfo(TalentApplyInfo talentApplyInfo);
+
+
+    /**
+     * 办理申请
+     * @param info
+     */
+    public void handleApply(TalentApplyInfo info);
+}

+ 43 - 0
src/main/java/com/rf/youth/order/service/impl/TalentApplyInfoServiceImpl.java

@@ -0,0 +1,43 @@
+package com.rf.youth.order.service.impl;
+
+import com.rf.youth.order.model.TalentApplyInfo;
+import com.rf.youth.order.repository.TalentApplyInfoRepository;
+import com.rf.youth.order.service.TalentApplyInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description:待入住用户接口
+ * @Author: zsf
+ * @Date: 2022/8/4
+ */
+@Service
+public class TalentApplyInfoServiceImpl implements TalentApplyInfoService {
+
+
+    @Autowired
+    private TalentApplyInfoRepository talentApplyInfoRepository;
+
+
+    /**
+     * 保存入住人员信息
+     * @param talentApplyInfo 信息
+     * @return
+     */
+    @Override
+    public TalentApplyInfo saveInfo(TalentApplyInfo talentApplyInfo) {
+        TalentApplyInfo info = null;
+        try {
+            info = talentApplyInfoRepository.save(talentApplyInfo);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return info;
+    }
+
+    @Override
+    public void handleApply(TalentApplyInfo info) {
+        //TODO
+        //改变状态,生成订单
+    }
+}

+ 32 - 0
src/main/java/com/rf/youth/param/dao/model/ParamEntry.java

@@ -0,0 +1,32 @@
+package com.rf.youth.param.dao.model;
+
+import com.rf.youth.base.model.BaseEntity;
+import lombok.*;
+
+import javax.persistence.*;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/1:17:54
+ * @Description:系统参数
+ */
+@Entity
+@ToString
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+@Setter
+@Table(name = "t_system_param")
+@org.hibernate.annotations.Table(appliesTo = "t_system_param", comment = "系统参数表")
+public class ParamEntry  extends BaseEntity{
+
+    @Column(name = "param_name",columnDefinition = "varchar(50) not null comment '参数名称'")
+    private String paramName ;
+
+    @Column(name = "param_value",columnDefinition = "varchar(50) not null comment '参数值'")
+    private String paramValue ;
+
+    @Column(name = "param_desc",columnDefinition = "varchar(200) comment '参数释义'")
+    private String paramDesc;
+
+}

+ 10 - 0
src/main/java/com/rf/youth/param/dao/repository/ParamRepository.java

@@ -0,0 +1,10 @@
+package com.rf.youth.param.dao.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.param.dao.model.ParamEntry;
+
+public interface ParamRepository extends BaseRepository<ParamEntry,String> {
+
+
+    ParamEntry findByParamName(String paramName);
+}

+ 4 - 0
src/main/java/com/rf/youth/param/package-info.java

@@ -0,0 +1,4 @@
+package com.rf.youth.param;
+/**
+ * 系统参数
+ */

+ 43 - 0
src/main/java/com/rf/youth/param/rest/ParamController.java

@@ -0,0 +1,43 @@
+package com.rf.youth.param.rest;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.param.dao.model.ParamEntry;
+import com.rf.youth.param.service.ParamService;
+import com.rf.youth.security.AesEncryptUtils;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.utils.Result;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/1:18:12
+ * @Description:系统参数控制器
+ */
+@RestController
+@RequestMapping("/param")
+@Api(tags = "系统参数")
+public class ParamController extends BaseController {
+
+    @Autowired
+    private ParamService paramService;
+
+    @PostMapping("/save")
+    @SafetyProcess
+    public Result save(@RequestBody String json) throws Exception {
+        JSONObject jsonObject = JSONObject.parseObject(AesEncryptUtils.decrypt(JSONObject.parseObject(json).getString("data")));
+        ParamEntry paramEntry = jsonObject.toJavaObject(ParamEntry.class);
+        paramEntry = this.paramService.save(paramEntry);
+        return success(paramEntry);
+    }
+
+    @GetMapping("/find/{paramName}")
+    @SafetyProcess
+    public Result find(@PathVariable String paramName){
+        ParamEntry paramEntry = this.paramService.findByParamName(paramName);
+        return success(paramEntry);
+    }
+
+}

+ 21 - 0
src/main/java/com/rf/youth/param/service/ParamService.java

@@ -0,0 +1,21 @@
+package com.rf.youth.param.service;
+
+import com.rf.youth.param.dao.model.ParamEntry;
+import org.springframework.cache.annotation.Cacheable;
+
+public interface ParamService {
+    /**
+     * 保存
+     * @param paramEntry
+     * @return
+     */
+    ParamEntry save(ParamEntry paramEntry);
+
+    /**
+     * 查询,名称
+     * @param paramName
+     * @return
+     */
+    @Cacheable(value = "param", key = "#paramName")
+    ParamEntry findByParamName(String paramName);
+}

+ 47 - 0
src/main/java/com/rf/youth/param/service/impl/ParamServiceImpl.java

@@ -0,0 +1,47 @@
+package com.rf.youth.param.service.impl;
+
+import com.rf.youth.param.dao.model.ParamEntry;
+import com.rf.youth.param.dao.repository.ParamRepository;
+import com.rf.youth.param.service.ParamService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Author:zzf
+ * @Date:2022/7/5:10:53
+ * @Description:系统参数
+ */
+@Service
+
+public class ParamServiceImpl implements ParamService {
+
+    @Autowired
+    private ParamRepository repository;
+
+    @Autowired
+    private RedisTemplate<String,Object> template;
+    /**
+     * 保存
+     *
+     * @param paramEntry
+     * @return
+     */
+    @Override
+    @CachePut(value = "param", key = "#paramEntry.paramName")
+    public ParamEntry save(ParamEntry paramEntry) {
+        return  this.repository.save(paramEntry);
+    }
+
+    /**
+     * 查询,名称
+     *
+     * @param paramName
+     * @return
+     */
+    @Override
+    public ParamEntry findByParamName(String paramName) {
+        return this.repository.findByParamName(paramName);
+    }
+}

+ 34 - 0
src/main/java/com/rf/youth/schedule/StaticScheduleTask.java

@@ -0,0 +1,34 @@
+package com.rf.youth.schedule;
+
+import com.rf.youth.user.service.UserService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+
+/**
+ * @author zzf
+ * @description:定时任务,修复原有的默认分组信息
+ * @date 2022/5/23 18:07
+ */
+//@Configuration
+//@EnableScheduling
+@Slf4j
+public class StaticScheduleTask {
+
+
+    @Autowired
+    private UserService userService;
+
+
+
+    /**
+     *3.添加定时任务
+     * 服务启动完成后 5秒指定第一次任务,之后每当本次任务结束之后5分钟再执行下一次任务
+     */
+    @Scheduled(initialDelay = 5000,fixedDelay = 3000000)
+    private void configureTasks() {
+    }
+
+
+
+}

+ 92 - 0
src/main/java/com/rf/youth/security/AesEncryptUtils.java

@@ -0,0 +1,92 @@
+package com.rf.youth.security;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+import com.alibaba.fastjson.JSONObject;
+import org.apache.commons.codec.binary.Hex;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/8/4 15:27
+ */
+public class AesEncryptUtils {
+
+
+    private static final String KEY = "Sp5biS+gX+#CqAFF";
+
+    private static final String OFFSET = "ud2E8l6wchltwIDA";
+
+    //参数分别代表 算法名称/加密模式/数据填充方式
+    private static final String ALGORITHMSTR = "AES/CBC/PKCS5Padding";
+
+    /**
+     * 加密
+     * @param content 加密的字符串
+     * @param encryptKey key值
+     * @return
+     * @throws Exception
+     */
+    public static String encrypt(String content, String encryptKey) throws Exception {
+
+        Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
+        SecretKeySpec secretKeySpec =  new SecretKeySpec(encryptKey.getBytes(), "AES");
+        IvParameterSpec iv = new IvParameterSpec(OFFSET.getBytes());
+        cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec,iv);
+        byte[] b = cipher.doFinal(content.getBytes("utf-8"));
+        // 采用base64算法进行转码,避免出现中文乱码
+//        return Base64.encodeBase64String(b);
+//        HEX转码
+        return Hex.encodeHexString(b);
+
+
+    }
+
+    /**
+     * 解密
+     * @param encryptStr 解密的字符串
+     * @param decryptKey 解密的key值
+     * @return
+     * @throws Exception
+     */
+    public static String decrypt(String encryptStr, String decryptKey) throws Exception {
+
+        Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
+        SecretKeySpec skeySpec = new SecretKeySpec(KEY.getBytes("ASCII"), "AES");
+        IvParameterSpec iv = new IvParameterSpec(OFFSET.getBytes());
+        cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
+        // 采用base64算法进行转码,避免出现中文乱码
+        // byte[] encryptBytes = Base64.decodeBase64(encryptStr);
+        //        HEX转码
+        byte [] encryptBytes =  Hex.decodeHex(encryptStr);
+        byte[] decryptBytes = cipher.doFinal(encryptBytes);
+        return new String(decryptBytes);
+    }
+
+    public static String encrypt(String content) throws Exception {
+        return encrypt(content, KEY);
+    }
+    public static String decrypt(String encryptStr) throws Exception {
+        return decrypt(encryptStr, KEY);
+    }
+
+
+    public static void main(String[] args) throws Exception {
+        Map map=new HashMap<String,String>();
+        map.put("key","value");
+        map.put("中文","汉字");
+        String content = JSONObject.toJSONString(map);
+        System.out.println("加密前:" + content);
+
+        String encrypt = encrypt(content, KEY);
+        System.out.println("加密后:" + encrypt);
+
+        String decrypt = decrypt(encrypt, KEY);
+        System.out.println("解密后:" + decrypt);
+    }
+}

+ 175 - 0
src/main/java/com/rf/youth/security/DESede.java

@@ -0,0 +1,175 @@
+package com.rf.youth.security;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.SecureRandom;
+import java.util.Base64;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/7/29 9:16
+ */
+public class DESede {
+    private DESede() {
+
+    }
+
+    /**
+     * 加解密使用的字符集
+     */
+    private static final String DESEDE_CHARSET_NAME = "UTF-8";
+
+    /**
+     * 加密算法
+     */
+    private static final String DESEDE = "DESede";
+
+    /**
+     * 算法的转换名称
+     */
+    private static final String DES_CBC = "DESede/CBC/PKCS5Padding";
+
+    /**
+     * 默认密钥
+     */
+    public static final String DEFAULT_KEY = "240262447423713749922240";
+
+    /**
+     * 默认向量值
+     */
+    public static String DEFAULT_DESEDE_IV = "12345678";
+
+    /**
+     * 使用3Des算法进行明文加密
+     *
+     * @param key    24个字符的密钥(3个des密钥)
+     * @param ivByte 8字符的随机向量
+     * @param value  需要进行加密的原明文字节数组
+     * @return 加密后的密文字节数组,如果加密失败,返回null
+     */
+    public static byte[] encrypt(byte[] key, byte[] ivByte, byte[] value) {
+        try {
+
+            SecureRandom sr = new SecureRandom();
+            SecretKey securekey = new SecretKeySpec(key, DESEDE);
+            IvParameterSpec iv = new IvParameterSpec(ivByte);
+            Cipher cipher = Cipher.getInstance(DES_CBC);
+            cipher.init(Cipher.ENCRYPT_MODE, securekey, iv, sr);
+
+            return cipher.doFinal(value);
+
+        } catch (Exception e) {
+
+        }
+        return null;
+    }
+
+    /**
+     * 使用3Des算法进行密文解密
+     *
+     * @param key    24个字符的密钥(3个des密钥)
+     * @param ivByte 8字符的随机向量
+     * @param value  需要进行解密的密文字节数组
+     * @return 返回解密后的明文字节数组, 如果解密失败,返回null
+     */
+    public static byte[] decrypt(byte[] key, byte[] ivByte, byte[] value) {
+        try {
+
+            SecureRandom sr = new SecureRandom();
+            SecretKey securekey = new SecretKeySpec(key, DESEDE);
+            IvParameterSpec iv = new IvParameterSpec(ivByte);
+            Cipher cipher = Cipher.getInstance(DES_CBC);
+            cipher.init(Cipher.DECRYPT_MODE, securekey, iv, sr);
+
+            return cipher.doFinal(value);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return null;
+    }
+
+    /**
+     * 进行Base64编码
+     *
+     * @param src 原字符串
+     * @return 返回经过Base64编码后的字符串
+     */
+    public static String base64Encode(String src) throws Exception {
+        Base64.Encoder encoder = Base64.getEncoder();
+        return encoder.encodeToString(src.getBytes(DESEDE_CHARSET_NAME));
+    }
+
+    /**
+     * 进行Base64编码
+     *
+     * @param buff 原字符串
+     * @return 返回经过Base64编码后的字符串
+     */
+    public static String base64Encode(byte[] buff) throws Exception {
+        Base64.Encoder encoder = Base64.getEncoder();
+        return encoder.encodeToString(buff);
+    }
+
+    /**
+     * 进行Base64解码
+     *
+     * @param src 经Base64编码后的字符串
+     * @return 返回解码后的字符串
+     * @throws Exception
+     */
+    public static String base64Decode(String src) throws Exception {
+        Base64.Decoder decoder = Base64.getDecoder();
+        return new String(decoder.decode(src), DESEDE_CHARSET_NAME);
+    }
+
+    /**
+     * 进行Base64解码
+     *
+     * @param src 经Base64编码后的字符串
+     * @return 返回解码后的字符串
+     * @throws Exception
+     */
+    public static byte[] base64DecodeToBytes(String src) throws Exception {
+        Base64.Decoder decoder = Base64.getDecoder();
+        return decoder.decode(src);
+    }
+
+
+    public static String encryptString(String str) {
+        try {
+            byte[] encrypt = DESede.encrypt(DEFAULT_KEY.getBytes(), DEFAULT_DESEDE_IV.getBytes(), str.getBytes());
+            String enStr = DESede.base64Encode(encrypt);
+            return enStr;
+        } catch (Exception e) {
+            throw new IllegalArgumentException(e.getMessage());
+        }
+    }
+
+    /**
+     * 字符串解密
+     *
+     * @throws Exception
+     */
+    public static String decryptString(String str) {
+        //解密字符串
+        try {
+            byte[] strBytes = DESede.base64DecodeToBytes(str);
+            return new String(DESede.decrypt(DEFAULT_KEY.getBytes(), DEFAULT_DESEDE_IV.getBytes(), strBytes));
+        } catch (Exception e) {
+            throw new IllegalArgumentException(e.getMessage());
+        }
+    }
+
+    public static void main(String[] args) {
+        //System.out.println(encryptString("我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,我通常参加我能参加的各种社会交往。不管是什么社交活动,我一般是能去就去,"));
+
+        //System.out.println("解密后为:" + decryptString("4GjfmTsYhzE="));
+
+        //System.out.println(decryptString("8xoQBn+V0Rh3hS42Dso7yxbmomdNsF96WUb/0MM39S5uwafzoy+jtTDGjA094H0hbfc3O7JHHQKH6zjDJNW/u0i9+4q3hYipPwstQUvwGrmipy1fF3UmTogdGSoMOCJGAYshO78EQthNPtSU2AD/7Ry17IgVBg5nXcWVtj8th7AxOo7kKsWjtTr4z3fcI1pWPMfIe3OFM1GYeLwpEe9Axrx69FOtD629QRTj3dOVY3kMFfTCqi2ElYy9pY3hAl7JNH+bxNxkgeJemTJUEt+Z+QmhfcmGmnt61qAtD9DHs31/fu6AJcnPNPEV0pZbdQlVOT7N2u3zduSohWui6O6iMnG/TNOHh1dLR9gyxWNiAXTseZ32ajKotfoghXw5jU8GdoILzvNEMkkoBVAIwUYsj4gWszbGY3FSxBJSnRfyv/hSbvKdP9NmfzIksK+Jy9JeQbwBLJ+IPat8PNnFBBccVPakqX56zGaHkLolt48K+C4XTaZxtrQaPcgNITvw1c3BP+/paZXOkL8FxxJAr1tx4kwN2YFMlzhmMGyH3iovlI5eJnl/xhz/iUufReDmkmPyc3istdzXkpwCe001+pIK7tYa4e9SnBKXfbh25Sqncy7UALF7ZyOBFocwrTrTuW4o3+eaurB6TWjuL4B0A3iQFmZ61uZgb8rs+Jxo94/WfWpg/0HMu5tyeFlcaHNRgFMg8U42sEDP+1kyVgvot8lfXP+jOzxWrFLhnjxrbI7V2uklUILDCb3VZJy6ITu+ilBGI5kHYcdhRMkJG8rcXfSoF5uUJk9ppvFXD5wxeyZeLfNPmIpKI4HWPahn2uOJ1cXhGkc+jBEws+p7uCMaw8UD/btwHK8To4M7HqQAsOXDJjDnr4w0Qrb4Y6wYfXcSWZW7Q8nsAIyzjFq0Y+3sTQH6zUcHXu/3b94jhqK5CoJ/4xlElHVBcECb095HNGw8DOHkVBloGPZjEB2W7SsSeHm0PuUSRnyhfaryuvF56R88LJmmbrKBxXAeAdQ3pTMwj1o8YyJcEQdIswJN40DaIkFOeWijLSodpcAvvdtv8FKRoHsmIn0lndQHiNoiMpjZQfvutUGNB69cHbkjp/x+CqU2aN2W/pKzya1+gjZ6yhT3W8z3o2I883owgmsD6VPtmVt/tK+NgtGZ7tTnTzgiX7yrc/NScaSYBpiJj+Oc5YAH+4UFzHL+sFmbqosb5e4dTDvhvgxYYeiGy809kVge+opDZwNYWAp79OOS8R3WGizGZrWHqaVnoYfxxcYyiDKY5brJamuibX1C4tc65orQcmKYFXdr8s7zoakMFf1+om1anB0xOhxvvDmFoZnY2va1aI1HXSGs5buKpvTPSvOjmERofQFUWNeudH0iwTot6z0uVYJozxKUu1RgtWLTgXE0JS+AQYlkNAa9Yfyzkwto5dFBtOTJdDo0XGGgzJskevUf2AA="));
+    }
+}

+ 116 - 0
src/main/java/com/rf/youth/security/DecodeRequestBodyAdvice.java

@@ -0,0 +1,116 @@
+package com.rf.youth.security;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.io.IOUtils;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.MethodParameter;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpInputMessage;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/7/30 9:00
+ */
+@Slf4j
+@RestControllerAdvice(basePackages = {"com.rf.psychological.rest","com.rf.psychological.opLog.rest","com.rf.psychological.module"})
+public class DecodeRequestBodyAdvice extends RequestBodyAdviceAdapter {
+    private static final Logger logger = LoggerFactory.getLogger(DecodeRequestBodyAdvice.class);
+
+    @Override
+    public boolean supports(MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
+        return true;
+    }
+
+    @Override
+    public Object handleEmptyBody(Object body, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
+        return body;
+    }
+
+    @Override
+    public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) throws IOException {
+        try {
+            boolean encode = false;
+            if (methodParameter.getMethod().isAnnotationPresent(SafetyProcess.class)) {
+                //获取注解配置的包含和去除字段
+                SafetyProcess serializedField = methodParameter.getMethodAnnotation(SafetyProcess.class);
+                //入参是否需要解密
+                encode = serializedField.decode();
+            }
+            if (encode) {
+                logger.info("对方法method :【" + methodParameter.getMethod().getName() + "】返回数据进行解密");
+                //System.out.println("inputMessage1----"+inputMessage);
+                //System.out.println("inputMessage.getBody()"+inputMessage.getBody());
+                MyHttpInputMessage myHttpInputMessage = new MyHttpInputMessage(inputMessage);
+                //System.out.println("myHttpInputMessage-----------------"+myHttpInputMessage);
+                return myHttpInputMessage;
+            }else{
+                return inputMessage;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error("对方法method :【" + methodParameter.getMethod().getName() + "】返回数据进行解密出现异常:"+e.getMessage());
+            return inputMessage;
+        }
+    }
+
+    @Override
+    public Object afterBodyRead(Object body, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
+        return body;
+    }
+
+    class MyHttpInputMessage implements HttpInputMessage {
+        private HttpHeaders headers;
+
+        private InputStream body;
+
+        public MyHttpInputMessage(HttpInputMessage inputMessage) throws Exception {
+            this.headers = inputMessage.getHeaders();
+            System.out.println("InputMessageBody----"+easpString(IOUtils.toString(inputMessage.getBody(), "UTF-8")));
+            this.body = IOUtils.toInputStream(AesEncryptUtils.decrypt(easpString(IOUtils.toString(inputMessage.getBody(), "UTF-8"))), "UTF-8");
+            System.out.println("this.body==="+this.body);
+        }
+
+        @Override
+        public InputStream getBody() throws IOException {
+            return body;
+        }
+
+        @Override
+        public HttpHeaders getHeaders() {
+            return headers;
+        }
+
+        /**
+         *
+         * @param requestData
+         * @return
+         */
+        public String easpString(String requestData){
+            if(requestData != null && !requestData.equals("")){
+                String s = "{\"requestData\":";
+                if(!requestData.startsWith(s)){
+                    throw new RuntimeException("参数【requestData】缺失异常!");
+                }else{
+                    int closeLen = requestData.length()-1;
+                    int openLen = "{\"requestData\":".length();
+                    String substring = StringUtils.substring(requestData, openLen, closeLen);
+                    return substring;
+                }
+            }
+            return "";
+        }
+    }
+}

+ 54 - 0
src/main/java/com/rf/youth/security/EncodeResponseBodyAdvice.java

@@ -0,0 +1,54 @@
+package com.rf.youth.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.MethodParameter;
+import org.springframework.http.MediaType;
+import org.springframework.http.server.ServerHttpRequest;
+import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
+
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/8/4 13:33
+ */
+@Controller
+@Slf4j
+@RestControllerAdvice(basePackages = {"com.rf.psychological"})
+public class EncodeResponseBodyAdvice implements ResponseBodyAdvice {
+    private final static Logger logger = LoggerFactory.getLogger(EncodeResponseBodyAdvice.class);
+
+    @Override
+    public boolean supports(MethodParameter methodParameter, Class aClass) {
+        return true;
+    }
+
+    @Override
+    public Object beforeBodyWrite(Object body, MethodParameter methodParameter, MediaType mediaType, Class aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
+        boolean encode = false;
+        if (methodParameter.getMethod().isAnnotationPresent(SafetyProcess.class)) {
+            //获取注解配置的包含和去除字段
+            SafetyProcess serializedField = methodParameter.getMethodAnnotation(SafetyProcess.class);
+            //出参是否需要加密
+            encode = serializedField.encode();
+        }
+        if (encode) {
+            logger.info("对方法method :【" + methodParameter.getMethod().getName() + "】返回数据进行加密");
+            ObjectMapper objectMapper = new ObjectMapper();
+            try {
+                String result = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(body);
+                return AesEncryptUtils.encrypt(result);
+            } catch (Exception e) {
+                e.printStackTrace();
+                logger.error("对方法method :【" + methodParameter.getMethod().getName() + "】返回数据进行解密出现异常:" + e.getMessage());
+            }
+        }
+        return body;
+    }
+}

+ 41 - 0
src/main/java/com/rf/youth/security/EncryptDecodeConverter.java

@@ -0,0 +1,41 @@
+package com.rf.youth.security;
+
+import lombok.extern.slf4j.Slf4j;
+
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+
+/**
+ * @author lpf
+ * @description: 属性加密解密转换器, 从String到String进行转换(只做加密解密部分操作)
+ * @date 2022/4/7 9:07
+ */
+@Converter
+@Slf4j
+public class EncryptDecodeConverter implements AttributeConverter<String, String> {
+
+    /**
+     * 入库操作,即对入库属性进行加密
+     *
+     * @param attribute
+     * @return
+     */
+    @Override
+    public String convertToDatabaseColumn(String attribute) {
+        //return attribute;
+        //log.info("原数据:" + attribute);
+        return DESede.encryptString(attribute);
+    }
+
+    /**
+     * 出库查询,即对数据库属性进行解密
+     *
+     * @param dbData
+     * @return
+     */
+    @Override
+    public String convertToEntityAttribute(String dbData) {
+        //log.info("加密数据:" + dbData);
+        return DESede.decryptString(dbData);
+    }
+}

+ 70 - 0
src/main/java/com/rf/youth/security/SSLConfig.java

@@ -0,0 +1,70 @@
+package com.rf.youth.security;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.connector.Connector;
+import org.apache.tomcat.util.descriptor.web.SecurityCollection;
+import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/9/15 14:32
+ */
+@Configuration
+@Profile({"prod", "public"})
+public class SSLConfig {
+
+    @Value("${spring.profiles.active}")
+    private String profile;
+
+    @Bean
+    public TomcatServletWebServerFactory servletContainer() { //springboot2 新变化
+
+        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
+
+            @Override
+            protected void postProcessContext(Context context) {
+
+                SecurityConstraint securityConstraint = new SecurityConstraint();
+                securityConstraint.setUserConstraint("CONFIDENTIAL");
+                SecurityCollection collection = new SecurityCollection();
+                collection.addPattern("/*");
+                securityConstraint.addCollection(collection);
+                context.addConstraint(securityConstraint);
+            }
+        };
+        tomcat.addAdditionalTomcatConnectors(initiateHttpConnector());
+        return tomcat;
+    }
+
+
+    private Connector initiateHttpConnector() {
+        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
+        connector.setScheme("http");
+        connector.setSecure(false);
+        if ("prod".equals(profile)) {
+            //112机构版正式
+            connector.setPort(8082);
+            connector.setRedirectPort(8848);
+        } else if ("public".equals(profile)) {
+            //101心理照相机公网版正式
+            connector.setPort(8081);
+            connector.setRedirectPort(8443);
+        } else {
+            //TODO 待定
+            //112心理照相机
+            connector.setPort(9528);
+            connector.setRedirectPort(8849);
+        }
+
+
+        return connector;
+    }
+
+}

+ 24 - 0
src/main/java/com/rf/youth/security/SafetyProcess.java

@@ -0,0 +1,24 @@
+package com.rf.youth.security;
+
+import java.lang.annotation.*;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/7/29 11:44
+ */
+@Target({ElementType.METHOD,ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface SafetyProcess {
+    /**
+     * 请求参数解密
+     */
+    boolean decode() default false;
+
+    /**
+     * 响应结果加密
+     */
+    boolean encode() default true;
+}

+ 57 - 0
src/main/java/com/rf/youth/threadpool/ThreadPool.java

@@ -0,0 +1,57 @@
+package com.rf.youth.threadpool;
+
+/**
+ * @Author:zzf
+ * @Date:2022/6/22:18:22
+ * @Description:线程池对象
+ */
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+import java.util.concurrent.*;
+
+@Slf4j
+public class ThreadPool {
+
+    int maximumPoolSize ;
+    JSONArray jsonArray ;
+    public ThreadPool(int maximumPoolSize,JSONArray jsonArray){
+        this.maximumPoolSize = maximumPoolSize;
+        this.jsonArray = jsonArray;
+    }
+    private static ThreadPoolExecutor pool;
+    public static void run(int corePoolSize,int maximumPoolSize,JSONArray jsonArray)
+    {
+        //实现自定义接口
+        pool = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, 1000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(5),
+                r -> {
+                    log.info("线程"+r.hashCode()+"创建");
+                    //线程命名
+                    return new Thread(r,"threadPool"+r.hashCode());
+                }, new ThreadPoolExecutor.CallerRunsPolicy()) {
+
+            protected void beforeExecute(Thread t,Runnable r) {
+                log.info("准备执行:"+ ((ThreadTask)r).getTaskName());
+            }
+            protected void afterExecute(Runnable r,Throwable t) {
+                log.info("执行完毕:"+((ThreadTask)r).getTaskName());
+            }
+            protected void terminated() {
+                log.info("线程池退出");
+            }
+        };
+        List<JSONObject> list = jsonArray.toJavaList(JSONObject.class);
+        list.forEach(jsonObject -> {
+            try {
+                Thread.sleep(100);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+            pool.execute(new ThreadTask("msg-task-"+jsonObject.getString("phone"),jsonObject));
+        });
+        pool.shutdown();
+    }
+
+}

+ 26 - 0
src/main/java/com/rf/youth/threadpool/ThreadTask.java

@@ -0,0 +1,26 @@
+package com.rf.youth.threadpool;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.utils.SendMessageUtil;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Author:zzf
+ * @Date:2022/6/22:18:23
+ * @Description:
+ */
+@Getter
+@Setter
+public class ThreadTask implements Runnable{
+    private String taskName;
+    private JSONObject jsonObject;
+    public ThreadTask(String name,JSONObject jsonObject) {
+        this.taskName = name;
+        this.jsonObject = jsonObject;
+    }
+    public void run() {
+        //输出执行线程的名称
+        SendMessageUtil.planMessage(jsonObject);
+    }
+}

+ 43 - 0
src/main/java/com/rf/youth/user/dao/model/UserEntity.java

@@ -0,0 +1,43 @@
+package com.rf.youth.user.dao.model;
+
+import com.rf.youth.base.model.BaseEntity;
+import lombok.*;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Index;
+import javax.persistence.Table;
+
+/**
+ * @author zsy
+ * @description:用户信息表
+ * @date 2021/6/17 15:55
+ */
+@Entity
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Table(name = "t_user_info")
+@EqualsAndHashCode(callSuper=true)
+@org.hibernate.annotations.Table(appliesTo = "t_user_info", comment = "用户信息表")
+public class UserEntity extends BaseEntity {
+
+    @Column(name = "username", columnDefinition = "varchar(50) not null comment '登录账号'")
+    private String username;
+
+    @Column(name = "phone", columnDefinition = "varchar(11) default 0  comment '用户手机号'")
+    private String phone;
+
+    @Column(name = "pet_name", columnDefinition = "varchar(10) not null comment '昵称'")
+    private String petName;
+
+    @Column(name = "password", columnDefinition = "varchar(32) not null comment '密码'")
+    private String password;
+
+    @Column(name = "addition_info", columnDefinition = "varchar(500) comment '附加信息'")
+    private String additionInfo;
+
+    @Column(name = "role_type", columnDefinition = "varchar(2) default '0' comment  '角色(默认为1 1驿站管理员、2 税务员、3机构超级管理员)'")
+    private String roleType;
+
+}

+ 26 - 0
src/main/java/com/rf/youth/user/dao/repository/UserRepository.java

@@ -0,0 +1,26 @@
+package com.rf.youth.user.dao.repository;
+
+import com.rf.youth.base.repository.BaseRepository;
+import com.rf.youth.user.dao.model.UserEntity;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * @author zsy
+ * @description:登录认证
+ * @date 2021/6/17 15:55
+ */
+public interface UserRepository extends BaseRepository<UserEntity, String> {
+
+
+    UserEntity findByUsername(String username);
+
+    UserEntity findByUsernameAndPassword(String username,String password);
+}

+ 240 - 0
src/main/java/com/rf/youth/user/rest/SystemController.java

@@ -0,0 +1,240 @@
+package com.rf.youth.user.rest;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.security.AesEncryptUtils;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.user.dao.model.UserEntity;
+import com.rf.youth.user.service.SystemService;
+import com.rf.youth.user.service.UserService;
+import com.rf.youth.utils.JWTUtil;
+import com.rf.youth.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Description: 后台首页、登录、版本等接口
+ * @Author: zsf
+ * @Date: 2022/7/4
+ */
+@RestController
+@RequestMapping("/system")
+@Api(tags = "后台首页、登录、版本等接口")
+public class SystemController extends BaseController {
+
+    @Autowired
+    private SystemService systemService;
+
+    @Autowired
+    private UserService userService;
+
+
+
+
+    @Value("${spring.profiles.active}")
+    private String profileValue;
+
+
+    @GetMapping("/getVersion")
+    @SafetyProcess
+    public Result getSystemVersion(){
+        return success(systemService.getSystemVersion(),profileValue);
+    }
+
+
+//    /**
+//     * 注册用户
+//     * @param jsonParam
+//     * @return
+//     */
+//    @PostMapping("/registerUser")
+//    @ApiOperation(value = "用户注册",notes = "json字符串形式传参(加密),data参数包括:data:注册用户基本信息《birthday:生日,gender:性别,password:密码,roleType:角色,institutionNo:机构编号,phone:账号或电话》,authCode:验证码(公网版必填)," +
+//            "verification:验证信息《beginTime:时间,authCode:验证码,phone:电话》")
+//    @SafetyProcess
+//    public Result registerUser(@RequestBody String jsonParam){
+//        try {
+//            String data = AesEncryptUtils.decrypt(JSONObject.parseObject(jsonParam).getString("data"));
+//            JSONObject jsonData = JSONObject.parseObject(data);
+//            JSONObject jsonUserEntity =jsonData.getJSONObject("data");
+//            UserEntity userEntity = jsonUserEntity.toJavaObject(UserEntity.class);
+//            userEntity.setModelPhone(Constant.DEFAULT_VALUE_ZERO);
+//            String institutionNo = userEntity.getInstitutionNo();
+//            if (StringUtils.isEmpty(institutionNo)){
+//                return fail("","机构编号不能为空");
+//            }
+//            //判断机构编号是否存在
+//            InstitutionEntity institutionEntity = this.institutionService.findByInstitutionNo(institutionNo);
+//            if (institutionEntity == null) {
+//                return fail("", "机构编号不存在!");
+//            }
+//            userEntity.setInstitutionName(institutionEntity.getInstitutionName());
+//            if (UserRole.COMMON.getType().equals(userEntity.getRoleType())){
+//
+//            }
+//            //区分是否需要验证码
+//            if (Constant.WEB_INSTITUTION_CODE.equals(userEntity.getInstitutionNo())){
+//                String authCode = jsonData.getString("authCode");
+//                JSONObject jsonVerification = jsonData.getJSONObject("verification");
+//                String jsonPhone = jsonVerification.getString("phone");
+//                String jsonAuthCode = jsonVerification.getString("authCode");
+//                String jsonBeginTime = jsonVerification.getString("beginTime");
+//                if (StringUtils.isEmpty(jsonBeginTime)  || StringUtils.isEmpty(jsonAuthCode) ) {
+//                    return fail("", "请重新获取验证码");
+//                }
+//                //计算时间差---分钟
+//                //int diff = DateUtil.getDistanceByUnit(DateUtil.parseDate(jsonBeginTime,DateUtil.ACCURACY_PATTERN_MINUTE), DateUtil.getCurrentDate(), 2);
+//                long diff = DateUtil.between(DateUtil.date(), DateUtil.parse(jsonBeginTime,PURE_DATETIME_PATTERN), DateUnit.MINUTE);
+//                if (diff < 0 || diff > 5) {
+//                    return fail("", "验证码已失效");
+//                }
+//                if (!jsonAuthCode.equals(authCode) || !jsonPhone.equals(userEntity.getPhone()) ) {
+//                    return fail("", "验证码错误");
+//                }
+//                userEntity.setUserStatus(UserStatus.PASS.getType());
+//            }
+//            UserEntity userInfo = this.userService.findPhoneAndInstitutionNoAndRoleType(userEntity.getPhone(), userEntity.getInstitutionNo(),userEntity.getRoleType());
+//            if (userInfo == null) {
+//                userEntity.setPassword(DigestUtils.md5DigestAsHex(userEntity.getPassword().getBytes()));
+//                this.userService.save(userEntity);
+//                return success();
+//            } else {
+//                return fail("", "账号已注册");
+//            }
+//        }catch (Exception e){
+//            e.printStackTrace();
+//            return fail();
+//        }
+//    }
+    @SafetyProcess
+    @ApiOperation(value = "系统登录接口",notes = "data参数包括:phone:账号, password:密码,institutionNo:机构编号,roleType:用户角色")
+    @PostMapping("/login")
+    public Result login(HttpServletRequest request, @RequestBody String jsonParams){
+        try {
+            JSONObject jsonObject =JSONObject.parseObject( AesEncryptUtils.decrypt(JSONObject.parseObject(jsonParams).getString("data")));
+            if (!jsonObject.containsKey("phone") || !jsonObject.containsKey("password") || !jsonObject.containsKey("institutionNo")|| !jsonObject.containsKey("roleType")) {
+                return fail("", "账号或密码或所属机构不能为空");
+            }
+            String password = jsonObject.getString("password");
+            String username = jsonObject.getString("username");
+            if (StringUtils.isEmpty(password) || StringUtils.isEmpty( username )) {
+                return fail("", "账号或密码不能为空");
+            }
+            UserEntity userEntity = this.userService.findUserByName(username);
+            if (userEntity == null) {
+                return fail(null, "用户不存在");
+            }
+            if (userEntity.getPassword().equals(password)) {
+                //生成token
+                userEntity.setPassword(null);
+                String token = JWTUtil.getTokenByUserInfo(userEntity);
+                // 创建返回的json对象
+                JSONObject resultJson = new JSONObject();
+                resultJson.put("user", userEntity);
+                resultJson.put("token", token);
+                request.getSession().setAttribute("user", userEntity);
+                return success(resultJson);
+            } else {
+                return fail(null, "密码错误");
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            return fail();
+        }
+    }
+
+
+//    /**
+//     * 忘记密码
+//     * @param jsonParam 参数
+//     * @desc 局域网和公网版 区别:公网版需要验证码参数
+//     * @return
+//     */
+//    @SafetyProcess
+//    @ApiOperation(value = "忘记密码",notes = "json字符串形式传参(加密),data参数包括:password:新密码,institutionNo:机构编号,phone:账号或电话,roleType:用户角色,authCode:验证码(公网版必填)," +
+//            "verification:验证信息《beginTime:时间,authCode:验证码,phone:电话》")
+//    @PostMapping("/forgotPassword")
+//    public Result forgotPassword(@RequestBody String jsonParam){
+//        try {
+//            JSONObject dataParam = JSONObject.parseObject(AesEncryptUtils.decrypt(JSONObject.parseObject(jsonParam).getString("data")));
+//            String phone = dataParam.getString("phone");
+//            String password = dataParam.getString("password");
+//            String institutionNo = dataParam.getString("institutionNo");
+//            String roleType = dataParam.getString("roleType");
+//            if ( StringUtils.isEmpty( phone)  || StringUtils.isEmpty( password )  || StringUtils.isEmpty( institutionNo ) ) {
+//                return fail("", "请按要求填写所需信息");
+//            }
+//            UserEntity userEntity = this.userService.findPhoneAndInstitutionNoAndRoleType(phone,institutionNo,roleType);
+//            if (userEntity == null) {
+//                return fail("", "请先注册");
+//            }
+//            userEntity.setPassword(password);
+//            //区分公网版和非公网版
+//            if (Constant.WEB_INSTITUTION_CODE.equals(institutionNo)){
+//                String authCode = dataParam.getString("authCode");
+//                JSONObject jsonVerification = dataParam.getJSONObject("verification");
+//                String jsonPhone = jsonVerification.getString("phone");
+//                String jsonAuthCode = jsonVerification.getString("authCode");
+//                String jsonBeginTime = jsonVerification.getString("beginTime");
+//                if (StringUtils.isEmpty(jsonBeginTime ) || StringUtils.isEmpty(jsonAuthCode) ) {
+//                    return fail("", "请重新获取验证码");
+//                }
+//                //计算时间差---分钟
+//                //int diff = DateUtil.getDistanceByUnit(DateUtil.parseDate(jsonBeginTime), DateUtil.getCurrentDate(), 2);
+//                long diff = DateUtil.between(DateUtil.date(), DateUtil.parse(jsonBeginTime,PURE_DATETIME_PATTERN), DateUnit.MINUTE);
+//                if (diff < 0 || diff > 5) {
+//                    return fail("", "验证码已失效");
+//                }
+//                if (jsonAuthCode.equals(authCode) && jsonPhone.equals(phone)) {
+//                   // this.userService.updatePassword(phone, password, institutionNo,roleType);
+//                    this.userService.save(userEntity);
+//                } else {
+//                    return fail("", "验证码错误");
+//                }
+//            }else {
+//                this.userService.save(userEntity);
+//               // this.userService.updatePassword(phone, password, institutionNo,roleType);
+//            }
+//            return success();
+//        }catch (Exception e){
+//            e.printStackTrace();
+//            return fail();
+//        }
+//    }
+
+    /**
+     * 修改密码
+     * @param jsonParam 待修改用户密码参数
+     * @return
+     */
+    @SafetyProcess
+    @ApiOperation(value = "修改密码",notes = "data参数包括:id:用户id,password:新密码,oldPassword:旧密码")
+    @PostMapping("/updatePassword")
+    public Result updatePassword(@RequestBody String jsonParam){
+        try {
+            JSONObject jsonObject = JSONObject.parseObject(AesEncryptUtils.decrypt(JSONObject.parseObject(jsonParam).getString("data")));
+            if(!jsonObject.containsKey("id")|| StringUtils.isEmpty(jsonObject.getString("id")))
+                return failBadRequest(null,"用户id不能为空!");
+            if(!jsonObject.containsKey("password")|| StringUtils.isEmpty(jsonObject.getString("password")))
+                return failBadRequest(null,"登录密码不能为空!");
+            String password =  jsonObject.getString("password");
+            String oldPassword = jsonObject.getString("oldPassword");
+            String id = jsonObject.getString("id");
+            UserEntity userEntity = userService.findUserById(id);
+            if (!userEntity.getPassword().equals(oldPassword)) {
+                return fail("", "旧密码有误");
+            }
+            userEntity.setPassword(password);
+            this.userService.saveUser(userEntity);
+            return success();
+        }catch (Exception e){
+            e.printStackTrace();
+            return fail();
+        }
+    }
+}

+ 67 - 0
src/main/java/com/rf/youth/user/rest/UserController.java

@@ -0,0 +1,67 @@
+package com.rf.youth.user.rest;
+
+import com.rf.youth.base.rest.BaseController;
+import com.rf.youth.opLog.annotation.OperationLogAnnotation;
+import com.rf.youth.security.SafetyProcess;
+import com.rf.youth.user.dao.model.UserEntity;
+import com.rf.youth.user.service.UserService;
+import com.rf.youth.utils.Constant;
+import com.rf.youth.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.DigestUtils;
+import org.springframework.web.bind.annotation.*;
+import java.nio.charset.StandardCharsets;
+
+
+/**
+ * @author zsy
+ * @description:登录认证
+ * @date 2021/6/17 15:55
+ */
+@Slf4j
+@RestController
+@RequestMapping("/user")
+@Api(tags = "用户操作")
+public class UserController extends BaseController {
+
+    @Autowired
+    private UserService userService;
+
+
+
+
+    /**
+     * 重置密码
+     * @return
+     */
+    @SafetyProcess
+    @PostMapping("/resetPassword/{userId}")
+    @OperationLogAnnotation
+    @ApiOperation("用户重置密码")
+    public Result resetPassword( @PathVariable String userId) throws Exception {
+
+        if (StringUtils.isEmpty(userId) ) {
+            return fail("", "用户id不能为空");
+        }
+        UserEntity userEntity = this.userService.findUserById(userId);
+        if (userEntity == null) {
+            return fail("", "请先注册");
+        } else {
+            userEntity.setPassword(DigestUtils.md5DigestAsHex(Constant.DEFAULT_PASSWORD.getBytes(StandardCharsets.UTF_8)));
+            userService.saveUser(userEntity);
+
+            return success();
+        }
+    }
+
+
+
+
+
+
+
+}

+ 11 - 0
src/main/java/com/rf/youth/user/service/SystemService.java

@@ -0,0 +1,11 @@
+package com.rf.youth.user.service;
+
+/**
+ * @Description:后台首页,登录,版本等接口
+ * @Author: zsf
+ * @Date: 2022/7/7
+ */
+public interface SystemService {
+
+    public String getSystemVersion();
+}

+ 32 - 0
src/main/java/com/rf/youth/user/service/UserService.java

@@ -0,0 +1,32 @@
+package com.rf.youth.user.service;
+
+import com.rf.youth.user.dao.model.UserEntity;
+
+/**
+ * @author zsy
+ * @description:登录认证
+ * @date 2021/6/17 15:55
+ */
+public interface UserService {
+
+
+    /**
+     * 根据用户名称获取用户
+     * @param username 用户名
+     * @return
+     */
+    UserEntity findUserByName(String username);
+
+    /**
+     * 获取用户
+     * @param username 用户名
+     * @param password 密码
+     * @return
+     */
+    UserEntity findUserByNameAndPassword(String username, String password);
+
+
+    UserEntity findUserById(String id);
+
+    UserEntity saveUser(UserEntity userEntity);
+}

+ 18 - 0
src/main/java/com/rf/youth/user/service/impl/SystemServiceImpl.java

@@ -0,0 +1,18 @@
+package com.rf.youth.user.service.impl;
+
+import com.rf.youth.user.service.SystemService;
+import com.rf.youth.utils.Constant;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description:后台首页,登录,版本等接口
+ * @Author: zsf
+ * @Date: 2022/7/7
+ */
+@Service
+public class SystemServiceImpl implements SystemService {
+    @Override
+    public String getSystemVersion() {
+        return Constant.SYSTEM_VERSION;
+    }
+}

+ 41 - 0
src/main/java/com/rf/youth/user/service/impl/UserServiceImpl.java

@@ -0,0 +1,41 @@
+package com.rf.youth.user.service.impl;
+
+
+import com.rf.youth.user.dao.model.UserEntity;
+import com.rf.youth.user.dao.repository.UserRepository;
+import com.rf.youth.user.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author zsy
+ * @description:登录认证
+ * @date 2021/6/17 15:55
+ */
+@Service
+public class UserServiceImpl implements UserService {
+
+    @Autowired
+    private UserRepository userRepository;
+
+
+    @Override
+    public UserEntity findUserByName(String username) {
+        return userRepository.findByUsername(username);
+    }
+
+    @Override
+    public UserEntity findUserByNameAndPassword(String username, String password) {
+        return userRepository.findByUsernameAndPassword(username,password);
+    }
+
+    @Override
+    public UserEntity findUserById(String id) {
+        return userRepository.getOne(id);
+    }
+
+    @Override
+    public UserEntity saveUser(UserEntity userEntity) {
+        return userRepository.save(userEntity);
+    }
+}

+ 58 - 0
src/main/java/com/rf/youth/utils/AgeUtil.java

@@ -0,0 +1,58 @@
+package com.rf.youth.utils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+public class AgeUtil {
+
+    public static  Date parse(String strDate) throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        return sdf.parse(strDate);
+    }
+    //由出生日期获得年龄
+    public static  double getAge(String Birthday) throws Exception {
+        Date birthDay = parse(Birthday);
+        Calendar cal = Calendar.getInstance();
+        if (cal.before(birthDay)) { //出生日期晚于当前时间,无法计算
+            throw new IllegalArgumentException(
+                    "The birthDay is before Now.It's unbelievable!");
+        }
+        int yearNow = cal.get(Calendar.YEAR);  //当前年份
+        int monthNow = cal.get(Calendar.MONTH);  //当前月份
+        int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH); //当前日期
+        cal.setTime(birthDay);
+        int yearBirth = cal.get(Calendar.YEAR);
+        int monthBirth = cal.get(Calendar.MONTH);
+        int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
+        double age = yearNow - yearBirth;   //计算整岁数
+        if (monthNow < monthBirth) {
+            age -= 0.5;
+        }else if (monthNow > monthBirth){
+            age += 0.5;
+        }
+        /*if (monthNow <= monthBirth) {
+            if (monthNow == monthBirth) {
+                if (dayOfMonthNow < dayOfMonthBirth) age--;//当前日期在生日之前,年龄减一
+            }else{
+                age -= 0.5;//当前月份在生日之前,年龄减一
+            }
+        }*/
+        return age;
+    }
+
+    public static void main(String args[]) {
+        try {
+            double  age = getAge("2001-07-21");
+            System.out.println("age=="+age);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+
+    }
+}
+

+ 324 - 0
src/main/java/com/rf/youth/utils/AssertUtils.java

@@ -0,0 +1,324 @@
+package com.rf.youth.utils;
+
+import java.util.*;
+
+/**
+ * @Author:zzf
+ * @Date:2022/6/15:10:58
+ * @Description:断言,取代代码中错综复杂的if-else条件控制语句
+ */
+
+public class AssertUtils {
+    /**
+     * 功能描述:
+     * 〈判断数组是否为空〉
+     */
+    public static <T> boolean isEmpty(T[] obj) {
+        return null == obj || 0 == obj.length;
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断数组是否不为空〉
+     */
+    public static <T> boolean isNotEmpty(T[] obj) {
+        return !isEmpty(obj);
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断对象是否为空〉
+     */
+    public static boolean isEmpty(Object obj) {
+        return null == obj;
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断对象是否不为空〉
+     */
+    public static boolean isNotEmpty(Object obj) {
+        return !isEmpty(obj);
+    }
+
+    /**
+     * 功能描述:
+     * 〈字符串是否为空〉
+     */
+    public static boolean isEmpty(String str) {
+        return null == str || "".equals(str);
+    }
+
+    /**
+     * 功能描述:
+     * 〈字符串是否不为空〉
+     */
+    public static boolean isNotEmpty(String str) {
+        return !isEmpty(str);
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断集合是否为空〉
+     */
+    public static boolean isEmpty(Collection obj) {
+        return null == obj || obj.isEmpty();
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断集合是否不为空〉
+     */
+    public static boolean isNotEmpty(Collection obj) {
+        return !isEmpty(obj);
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断map集合是否为空〉
+     */
+    public static boolean isEmpty(Map obj) {
+        return null == obj || obj.isEmpty();
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断map集合是否不为空〉
+     */
+    public static boolean isNotEmpty(Map obj) {
+        return !isEmpty(obj);
+    }
+
+    /**
+     * 功能描述:
+     * 〈char数值是否是数字〉
+     */
+    public static boolean charIsNumb(int charValue) {
+        return charValue >= 48 && charValue <= 57 || charValue >= 96 && charValue <= 105;
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断字符串是否是纯数字浮点类型〉
+     */
+    public static boolean isFloat(String s) {
+        if(!(s.indexOf(".") > -1)){
+            return false;
+        }
+        char[] chars = s.toCharArray();
+        boolean flag = true;
+        for (char aChar : chars) {
+            if(aChar != 46){
+                if(!(aChar >= 48 && aChar <= 57 || aChar >= 96 && aChar <= 105)){
+                    flag = false;
+                    break;
+                }
+            }
+        }
+        return flag;
+    }
+
+    /**
+     * 功能描述:
+     * 〈非纯数字浮点类型〉
+     */
+    public static boolean isNotFloat(String s) {
+        return !isFloat(s);
+    }
+    /**
+     * 功能描述:
+     * 〈字符串是否是数字〉
+     */
+    public static boolean isNumb(String str) {
+        if (isEmpty((Object)str)) {
+            return false;
+        } else {
+            char[] chr = str.toCharArray();
+
+            for(int i = 0; i < chr.length; ++i) {
+                if (chr[i] < '0' || chr[i] > '9') {
+                    return false;
+                }
+            }
+            return true;
+        }
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断字符串是否不是数字〉
+     */
+    public static boolean isNotNumb(String str) {
+        return !isNumb(str);
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断字符串是否有长度,并自定义异常信息〉
+     */
+    public static void hasLength(String str, String msg) {
+        if (str == null || str.length() < 1) {
+            throw new RuntimeException(msg);
+        }
+    }
+
+    /**
+     * 功能描述:
+     * 〈自定义参数校验异常〉
+     */
+    public static void paramCheck(String msg,Object...obj) {
+        for (Object o : obj) {
+            // 参数异常
+            if(isEmpty(o)){
+                throw new RuntimeException(msg);
+            }
+        }
+    }
+
+    /**
+     * 功能描述:
+     * 〈可变参数,判断是否所有对象都为空〉
+     */
+    public static boolean isAllEmpty(Object... obj) {
+        Object[] var1 = obj;
+        int var2 = obj.length;
+
+        for(int var3 = 0; var3 < var2; ++var3) {
+            Object o = var1[var3];
+            if (!isEmpty(o)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * 功能描述:
+     * 〈可变参数-判断只要有任意一个对象为空,则为true〉
+     */
+    public static boolean isAnyEmpty(Object... obj) {
+        Object[] var1 = obj;
+        int var2 = obj.length;
+
+        for(int var3 = 0; var3 < var2; ++var3) {
+            Object o = var1[var3];
+            if (isEmpty(o)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 功能描述:
+     * 〈可变参数 -判断是否所有参数都不为空〉
+     */
+    public static boolean isAllNotEmpty(Object... obj) {
+        Object[] var1 = obj;
+        int var2 = obj.length;
+
+        for(int var3 = 0; var3 < var2; ++var3) {
+            Object o = var1[var3];
+            if (isEmpty(o)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断是否两个对象相等〉
+     */
+    public static boolean isEqual(Object o1, Object o2) {
+        if (o1 == null) {
+            return o2 == null;
+        } else if (o2 == null) {
+            return false;
+        } else if (o1.getClass().isArray()) {
+            for(int i = 0; i < ((Object[])((Object[])o1)).length; ++i) {
+                if (!isEqual(((Object[])((Object[])o1))[i], ((Object[])((Object[])o2))[i])) {
+                    return false;
+                }
+            }
+            return true;
+        } else if (Collection.class.isAssignableFrom(o1.getClass())) {
+            Iterator i1 = ((Collection)o1).iterator();
+            Iterator i2 = ((Collection)o2).iterator();
+            if (((Collection)o1).size() != ((Collection)o2).size()) {
+                return false;
+            } else {
+                for(int i = 0; i < ((Collection)o1).size(); ++i) {
+                    if (!isEqual(i1.next(), i2.next())) {
+                        return false;
+                    }
+                }
+                return true;
+            }
+        } else if (!Map.class.isAssignableFrom(o1.getClass())) {
+            return o1.equals(o2);
+        } else {
+            Map<Object, Object> m1 = (Map)o1;
+            Map<Object, Object> m2 = (Map)o2;
+            if (m1.size() != m2.size()) {
+                return false;
+            } else if (!isEqual(m1.keySet(), m2.keySet())) {
+                return false;
+            } else {
+                Iterator var4 = m1.entrySet().iterator();
+
+                Map.Entry o;
+                do {
+                    if (!var4.hasNext()) {
+                        return true;
+                    }
+
+                    o = (Map.Entry)var4.next();
+                } while(m2.containsKey(o.getKey()) && isEqual(o.getValue(), m2.get(o.getKey())));
+
+                return false;
+            }
+        }
+    }
+
+    /**
+     * 功能描述:
+     * 〈判断两个对象是否不相等〉
+     */
+    public static boolean isNotEqual(Object o1, Object o2) {
+        return !isEqual(o1,o2);
+    }
+
+    /**
+     * 功能描述:
+     * 〈比较两个集合是否相等〉
+     */
+    public static boolean compare(List<Comparable> l1, List<Comparable> l2) {
+        if (l1 != null && !l1.isEmpty()) {
+            if (l2 != null && !l2.isEmpty()) {
+                Collections.sort(l1);
+                Collections.sort(l2);
+                if (l1.size() != l2.size()) {
+                    return false;
+                } else {
+                    for(int i = 0; i < l1.size(); ++i) {
+                        if (((Comparable)l1.get(i)).compareTo(l2.get(i)) != 0) {
+                            return false;
+                        }
+                    }
+
+                    return true;
+                }
+            } else {
+                return false;
+            }
+        } else {
+            return l2 == null || l2.isEmpty();
+        }
+    }
+
+
+
+}
+
+

+ 48 - 0
src/main/java/com/rf/youth/utils/CPUSerial.java

@@ -0,0 +1,48 @@
+package com.rf.youth.utils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStreamReader;
+
+public class CPUSerial {
+
+    /**获取本机CPU信息
+     */
+    public static String getCPUSerial() {
+        String result = "";
+        try {
+            File file = File.createTempFile("tmp", ".vbs");//创建临时文件,路径为C:\Documents and Settings\Administrator\Local Settings\Temp
+            file.deleteOnExit();
+            FileWriter fw = new java.io.FileWriter(file);
+            //是有vbs脚本语言,获取CPU唯一ID
+            //表示程序出现运行时错误时,会继续运行,不中断
+            StringBuilder sb = new StringBuilder("On Error Resume Next \r\n\r\n");
+            //表示本机
+            sb.append("strComputer = \".\"  \r\n");
+            //使用GetObject函数获取本机信息赋值给objWMIService
+            sb.append("Set objWMIService = GetObject(\"winmgmts:\" _ \r\n");
+            sb.append("    & \"{impersonationLevel=impersonate}!\\\\\" & strComputer & \"\\root\\cimv2\") \r\n");
+            sb.append("Set colItems = objWMIService.ExecQuery(\"Select * from Win32_Processor\")  \r\n ");
+            //使用for循环取出CPU信息
+            sb.append("For Each objItem in colItems\r\n " + "    Wscript.Echo objItem.ProcessorId  \r\n ");
+            sb.append("    exit for  ' do the first cpu only! \r\n");
+            sb.append("Next");
+
+            fw.write(sb.toString());
+            fw.close();
+            Process p = Runtime.getRuntime().exec("cscript //NoLogo //T:10 " + file.getPath());
+            BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            String line;
+            while ((line = input.readLine()) != null) {
+                result += line;
+            }
+            input.close();
+            file.delete();
+        } catch (Exception e) {
+            e.fillInStackTrace();
+        }
+        return result;
+    }
+
+}

+ 1510 - 0
src/main/java/com/rf/youth/utils/Constant.java

@@ -0,0 +1,1510 @@
+package com.rf.youth.utils;
+
+/**
+ * @author zzf
+ * @description:静态类
+ * @date 2021/1/19 16:45
+ */
+public class Constant {
+
+
+    /**
+     *系统版本
+     */
+    public static final String SYSTEM_VERSION ="1.1";
+
+    /**
+     * 认知任务返回版本报告
+     */
+    public static final String COGNITION_RESULT_VERSION ="2.0.1";
+
+    /**
+     * 公网版机构编号
+     */
+    public static final String WEB_INSTITUTION_CODE ="PUB001";
+
+    /**
+     * 公网版机构名称
+     */
+    public static final String WEB_INSTITUTION_NAME ="公网版机构";
+
+    /**
+     * 局域网版机构编号
+     */
+    public static final String LAN_INSTITUTION_CODE ="LAN001";
+
+    /**
+     * 局域网版机构名称
+     */
+    public static final String LAN_INSTITUTION_NAME ="局域网版机构";
+
+    /**
+     * 部分字段默认值
+     */
+    public static final String DEFAULT_VALUE_ZERO ="0";
+
+    /**
+     * 公网版配置文件名称
+     */
+    public static final String PROFILE_PUBLIC = "public";
+
+
+    /**
+     * 游客固定用户id
+     */
+    public static final String PUBLIC_VISITOR_ID = "pub001-visitor";
+
+
+    /**
+     * 安装包名称
+     **/
+    public static final String APK_NAME = "app-release.apk";
+
+    /**
+     * 测试计划状态  测试状态:0--已关闭,1---手动关闭,2----未开始,3---进行中
+     */
+    public static final int TEST_PLAN_STATUS_END = 0;
+    public static final int TEST_PLAN_STATUS_STOP = 1;
+    public static final int TEST_PLAN_STATUS_UNSTART = 2;
+    public static final int TEST_PLAN_STATUS_RUNNING = 3;
+
+    /**
+     * 生理信号内容
+     * 类型:1为脉搏;2为心电;3为脑电
+     */
+    public static final String PLUSE = "1";
+    public static final String ECG = "2";
+    public static final String EEG = "3";
+
+    /**
+     * 测试计划--用户状态
+     */
+    public static final String TEST_PLAN_USER_STATUS_UNCOMPLETE = "0";
+    public static final String TEST_PLAN_USER_STATUS_COMPLETED = "9";
+
+    /**
+     * 用户状态 1-待审核 2-审核通过 3--密码被重置需要重新登录
+     */
+    public static final String USER_STATUS_NORMAL = "2";
+
+    /**
+     * 短信相关
+     */
+    public static int appId = 1400555402;
+    public static String appKey = "197596018c4565ad023c2b145f4069a1";
+    public static String smsSign = "北京决明科技";
+    /** 默认分组的名称  **/
+    public static final String DEFAULT_GROUP_NAME = "默认分组";
+
+    /**
+     * 默认密码
+     */
+    public static final String DEFAULT_PASSWORD = "123456";
+/**测试类型 匹茨堡睡眠质量指数**/
+//public static final String QUEST_TYPE_PSQI="PSQI";
+/**测试类型 心境状态量表POMS**/
+//public static final String QUEST_TYPE_POMS = "POMS";
+    /**
+     * 测试类型症状自评量表(SCL-90)
+     **/
+    public static final String QUEST_TYPE_SCL = "SCL";
+    /**
+     * 艾森克人格量表
+     **/
+    public static final String QUEST_TYPE_ASK = "ASK";
+    /**
+     * 汉化版美国航空航天局任务负荷指数量表
+     **/
+    public static final String QUEST_TYPE_AVAI = "AVIA";
+    /**
+     * 社会支持评定量表
+     **/
+    public static final String QUEST_TYPE_SUPP = "SUPP";
+    /**
+     * 抑郁焦虑压力量表
+     **/
+    public static final String QUEST_TYPE_DEPR = "DEPR";
+    /**
+     * 正性负性情绪量表
+     **/
+    public static final String QUEST_TYPE_MOOD = "MOOD";
+    /**
+     * 状态-特质焦虑量表
+     **/
+    public static final String QUEST_TYPE_STATUS = "STATUS";
+    /**
+     * 生活事件量表
+     **/
+    public static final String QUEST_TYPE_LIFE = "LIFE";
+    /**
+     * 瑞文智力测试
+     **/
+    public static final String QUEST_TYPE_RIVEN = "RIVEN";
+    /**
+     * GO-NO-GO反应抑制测试
+     **/
+    public static final String QUEST_TYPE_GO_NO_GO = "GO_NO-GO";
+    /**
+     * 工作记忆能力测试(字母记忆)
+     **/
+    public static final String QUEST_TYPE_MEMORY = "MEMORY";
+    /**
+     * 游戏3
+     **/
+    public static final String QUEST_TYPE_MEMORY_YATAI = "MEMORY_YATAI";
+    /**
+     * 精神运动警觉度测试
+     **/
+    public static final String QUEST_TYPE_ALERTNESS = "ALERTNESS";
+    /**
+     * 游戏4
+     **/
+    public static final String QUEST_TYPE_ALERTNESS_YATAI = "ALERTNESS_YATAI";
+    /**
+     * 连续加法测试
+     **/
+    public static final String QUEST_TYPE_ADDITION = "ADDITION";
+    /**
+     * 节奏诊断
+     **/
+    public static final String QUEST_TYPE_RHYTHM = "RHYTHM";
+    /**
+     * 形状知觉测试(自上而下)
+     **/
+    public static final String QUEST_TYPE_SHAPE = "SHAPE";
+
+    /**
+     * 形状知觉测试(自伤而下)儿童版
+     */
+    public static final String QUEST_TYPE_SHARP_CHILD = "SHARP_CHILD";
+    /**
+     * 游戏2
+     **/
+    public static final String QUEST_TYPE_SHAPE_YATAI = "SHAPE_YATAI";
+    /**
+     * 形状知觉测试(自下而上)
+     **/
+    public static final String QUEST_TYPE_SHAPE2 = "SHAPE2";
+    /**
+     * 不确定信息决策
+     **/
+    public static final String QUEST_TYPE_UNCERTAIN = "UNCERTAIN";
+    /**
+     * 运动知觉测试
+     **/
+    public static final String QUEST_TYPE_MOVEMENT = "MOVEMENT";
+    /**
+     * 注意力网络测试
+     **/
+    public static final String QUEST_TYPE_ANT = "ANT";
+    /**
+     * 游戏1
+     **/
+    public static final String QUEST_TYPE_ANT_YATAI = "ANT_YATAI";
+    /**
+     * 游戏5
+     **/
+    public static final String QUEST_TYPE_ANT_FISH_YATAI = "ANTFISH_YATAI";
+    /**
+     * 注意力网络测试(儿童版)
+     **/
+    public static final String QUEST_TYPE_ANT_FISH = "ANTFISH";
+    /**
+     * 画钟测试
+     **/
+    public static final String QUEST_TYPE_CDT = "CDT";
+    /**
+     * 蒙特利尔认知测试
+     **/
+    public static final String QUEST_TYPE_MOCA = "MOCA";
+    /**
+     * 简易精神状态测试
+     **/
+    public static final String QUEST_TYPE_MMSE = "MMSE";
+    /**
+     * 听觉测试
+     **/
+    public static final String QUEST_TYPE_BIC = "BIC";
+    /**
+     * 综合记忆能力测试
+     **/
+    public static final String QUEST_TYPE_RTC = "RTC";
+    /**
+     * 工作记忆能力测试(空间记忆)
+     **/
+    public static final String QUEST_TYPE_MEMORYT = "MemoryTest";
+    /**
+     * 目标追踪测试
+     **/
+    public static final String QUEST_TYPE_GTCT = "GTCT";
+
+    /**
+     * 目标追踪测试
+     */
+    public static final String QUEST_TYPEGTCT_CHILD = "CHILD";
+
+    /**
+     * Go-No-go冲动抑制测试(高级版)
+     **/
+    public static final String QUEST_TYPE_GO_NO_GO2 = "GO_NO-GO2";
+    /**
+     * 风险决策能力测试
+     **/
+    public static final String QUEST_TYPE_RDT = "RDT";
+    /**
+     * 时间知觉能力测试
+     **/
+    public static final String QUEST_TYPE_SC = "speedCognitive";
+    /**
+     * 空间记忆能力测试
+     **/
+    public static final String QUEST_TYPE_REM = "REM";
+    /**
+     * 悬旌万里
+     **/
+    public static final String QUEST_TYPE_XJWL = "xuanjingwanli";
+
+    /**
+     *
+     **/
+    public static final String QUEST_TYPE_CATTELL = "CATTELL";
+    /**
+     * 枪林弹雨
+     **/
+    public static final String QUEST_TYPE_GBE = "GUNSBULLETS";
+    /**
+     * 坦克洪流
+     **/
+    public static final String QUEST_TYPE_TKHL = "tanKeHongLiu";
+    /**
+     * 海空激战
+     **/
+    public static final String QUEST_TYPE_HKJZ = "haiKongJiZhan";
+    /**
+     * 雄鹰展翅
+     **/
+    public static final String QUEST_TYPE_XYZC = "xiongYingZhanChi";
+    /**
+     * 形状连线测试A
+     **/
+    public static final String QUEST_TYPE_STTA = "STTA";
+    /**
+     * 形状连线测试B
+     **/
+    public static final String QUEST_TYPE_STTB = "STTB";
+    /**
+     * 数字广度测验(DST)
+     **/
+    public static final String QUEST_TYPE_DST = "DST";
+    /**
+     * 华山版听觉词语学习
+     **/
+    public static final String QUEST_TYPE_MTH = "MTH";
+    /**
+     * Boston命名测验
+     **/
+    public static final String QUEST_TYPE_BSNTask = "BSNTask";
+    /**
+     * 动物词语流畅性测试
+     **/
+    public static final String QUEST_TYPE_AMWSTask = "AMWSTask";
+    /**
+     * etb1:面部表情识别任务
+     **/
+    public static final String QUEST_TYPE_ETB01 = "ETB01";
+    /**
+     * ECAT::情绪分类任务
+     **/
+    public static final String QUEST_TYPE_ECAT = "ECAT";
+    /**
+     * EREC
+     **/
+    public static final String QUEST_TYPE_EREC = "EREC";
+    /**
+     * EMEM情绪识别记忆任务
+     **/
+    public static final String QUEST_TYPE_EMEM = "EMEM";
+    /**
+     * 情绪测试3:词汇测试-词汇分类
+     * 情绪测试3:词汇测试-词汇回忆
+     * 情绪测试3:词汇测试-词汇识别
+     * 三个总和
+     **/
+    public static final String QUEST_TYPE_EALL = "EALL";
+    /**
+     * Faces Dot Probe Task (FDOT)
+     **/
+    public static final String QUEST_TYPE_FDOT = "FDOT";
+    /**
+     * 征冰心理健康测评
+     **/
+    public static final String QUEST_TYPE_ZBMHA = "ZBMHA";
+
+    /**
+     * 视觉模拟渴求
+     **/
+    public static final String QUEST_TYPE_VAS= "VAS";
+
+    /**
+     * Stroop试验
+     **/
+    public static final String QUEST_TYPE_STROOP= "STROOP";
+
+    /**
+     * 数字符号转换测验
+     **/
+    public static final String QUEST_TYPE_DSST= "DSST";
+
+
+    /**
+     * 量表类型
+     **/
+    public static final String SCALE_TYPE_E = "E";
+    public static final String SCALE_TYPE_N = "N";
+    public static final String SCALE_TYPE_P = "P";
+    public static final String SCALE_TYPE_L = "L";
+
+    public static final String NO = "no";
+    public static final String YES = "yes";
+
+
+    public static final String SPLIT_CHAR = "-";
+
+    /**
+     * 量表测试文件SHEET名
+     **/
+    public static final String SHEET_NAME_ASK = "艾森克人格量表";
+    //public static final String SHEET_NAME_PSQI = "匹兹堡睡眠质量指数";
+//public static final String SHEET_NAME_POMS = "心境状态量表";
+    public static final String SHEET_NAME_SCL = "症状自评量表(SCL-90)";
+    public static final String SHEET_NAME_AVAI = "汉化版美国航空航天局任务负荷指数量表";
+    public static final String SHEET_NAME_SUPP = "社会支持评定量表";
+    public static final String SHEET_NAME_DEPR = "抑郁焦虑压力表";
+    public static final String SHEET_NAME_MOOD = "正性负性情绪量表";
+    public static final String SHEET_NAME_STATUS = "状态-特质焦虑量表";
+    /**
+     * 认知任务测试
+     **/
+    public static final String SHEET_NAME_RIVEN = "瑞文智力测试";
+    public static final String SHEET_NAME_GO_NO_GO = "GO-NO-GO反应抑制测试";
+    public static final String SHEET_NAME_LIFE = "生活事件量表";
+    public static final String SHEET_NAME_ALERTNESS = "精神运动警觉度测试";
+    public static final String SHEET_NAME_ALERTNESS_YATAI = "游戏4";
+    public static final String SHEET_NAME_ADDITION = "连续加法测试";
+    public static final String SHEET_NAME_CATTELL = "卡氏十六种人格因素量表";
+    public static final String SHEET_NAME_MEMORY = "工作记忆能力测试(字母记忆)";
+    public static final String SHEET_NAME_MEMORY_YATAI = "游戏3";
+    public static final String SHEET_NAME_RHYTHM = "节奏诊断";
+    public static final String SHEET_NAME_SHAPE = "形状知觉测试(自上而下)";
+    public static final String SHEET_NAME_SHAPE_YATAI = "游戏2";
+    public static final String SHEET_NAME_SHAPE2 = "形状知觉测试(自下而上)";
+    public static final String SHEET_NAME_UNCERTAIN = "不确定信息决策";
+    public static final String SHEET_NAME_MOVEMENT = "运动知觉测试";
+    public static final String SHEET_NAME_ANT = "注意力网络测试";
+    public static final String SHEET_NAME_ANT_YATAI = "游戏1";
+    public static final String SHEET_NAME_ANT_FISH_YATAI = "游戏5";
+    public static final String SHEET_NAME_ANT_FISH = "注意力网络测试(儿童版)";
+    public static final String SHEET_NAME_CDT = "画钟测试";
+    public static final String SHEET_NAME_MOCA = "蒙特利尔认知测试";
+    public static final String SHEET_NAME_MMSE = "简易精神状态测试";
+    public static final String SHEET_NAME_BIC = "听觉测试";
+    public static final String SHEET_NAME_RTC = "综合记忆能力测试";
+    public static final String SHEET_NAME_MEMORYT = "工作记忆能力测试(空间记忆)";
+    public static final String SHEET_NAME_GTCT = "目标追踪测试";
+    public static final String SHEET_NAME_GO_NO_GO2 = "Go-No-go冲动抑制测试(高级版)";
+    public static final String SHEET_NAME_RDT = "风险决策能力测试";
+    public static final String SHEET_NAME_SC = "时间知觉能力测试";
+    public static final String SHEET_NAME_GBE = "枪林弹雨";
+    public static final String SHEET_NAME_REM = "空间记忆能力测试";
+    public static final String SHEET_NAME_XJWL = "悬旌万里";
+    public static final String SHEET_NAMEE_TKHL = "坦克洪流";
+    public static final String SHEET_NAME_HKJZ = "海空激战";
+    public static final String SHEET_NAME_XYZC = "雄鹰展翅";
+    public static final String SHEET_NAME_STTA = "形状连线测试A";
+    public static final String SHEET_NAME_STTB = "形状连线测试B";
+    public static final String SHEET_NAME_DST = "数字广度测验";
+    public static final String SHEET_NAME_MTH = "华山版听觉词语学习";
+    public static final String SHEET_NAME_BSNTask = "Boston命名测验";
+    public static final String SHEET_NAME_AMWSTask = "动物词语流畅性测试";
+    public static final String SHEET_NAME_ETB01 = "人脸表情识别任务";
+    public static final String SHEET_NAME_ECAT = "情绪分类任务";
+    public static final String SHEET_NAME_EREC = "EREC";
+    public static final String SHEET_NAME_EMEM = "情绪识别记忆任务";
+    public static final String SHEET_NAME_EALL = "情绪测试3-词汇测试";
+    public static final String SHEET_NAME_FDOT = "FDOT";
+    public static final String SHEET_NAME_ZBMHA = "征冰心理健康测评";
+    public static final String SHEET_NAME_VAS= "视觉模拟渴求";
+    public static final String SHEET_NAME_STROOP= "Stroop试验";
+    public static final String SHEET_NAME_DSST= "数字符号转换测验";
+
+
+/** 基础常量 工作记忆能力测试 **/
+    /**
+     * 每种任务的组块数
+     **/
+    public static int GROUP_COUNT = 6;
+    /**
+     * 每个组块的字母个数
+     **/
+    public static int CHAR_COUNT = 18;
+
+
+    /**
+     * 魔法数
+     **/
+
+    /*public static String MAGIC_NUM_0 = "0";
+    public static String MAGIC_NUM_1 = "1";
+    public static String MAGIC_NUM_2 = "2";
+    public static String MAGIC_NUM_MINUS_1 = "-1";*/
+    /**
+     * 题目类型:单选题
+     */
+    public static final String MAGIC_NUM_0 = "0";
+    /**
+     * 题目类型:多选题
+     * 计分方向:正向
+     */
+    public static final String MAGIC_NUM_1 = "1";
+    /**
+     * 题目类型:填空题
+     */
+    public static final String MAGIC_NUM_2 = "2";
+    /**
+     * 题目类型:复杂类型  单选,填空
+     */
+    public static final String MAGIC_NUM_02 = "02";
+    /**
+     * 题目类型:复杂类型:多选,填空
+     */
+    public static final String MAGIC_NUM_12 = "12";
+    /**
+     * 计分方向:反向
+     */
+    public static String MAGIC_NUM_MINUS_1 = "-1";
+
+
+    /**
+     * Aitken拖延问卷
+     **/
+    public static final String QUEST_FLAG_API = "20210617113742";
+    /**
+     * 社交焦虑量表
+     **/
+    public static final String QUEST_FLAG_LSAS = "20210622215032";
+    /**
+     * 简明精神病量表
+     **/
+    public static final String QUEST_FLAG_BPRS = "20210616235331";
+    /**
+     * 汉密顿焦虑量表
+     **/
+    public static final String QUEST_FLAG_HAMA = "20210617000138";
+    /**
+     * 孤独量表
+     **/
+    public static final String QUEST_FLAG_UCLA = "20210617000232";
+    /**
+     * 焦虑自评量表
+     **/
+    public static final String QUEST_FLAG_SAS = "20210617000853";
+    /**
+     * 密歇根酒精依赖调查表
+     **/
+    public static final String QUEST_FLAG_MAST = "20210628131017";
+    /**
+     * Beck自杀意念量表
+     **/
+    public static final String QUEST_FLAG_BSSI = "20210617013827";
+/** 儿童行为问卷 **/
+//public static final String QUEST_FLAG_CBQ = "20210617014033";
+    /**
+     * 人际信任量表
+     **/
+    public static final String QUEST_FLAG_ITS = "20210617014152";
+    /**
+     * 舒适状况量表
+     **/
+    public static final String QUEST_FLAG_GCQ = "20210617015856";
+    /**
+     * 抑郁自评量表
+     **/
+    public static final String QUEST_FLAG_SDS = "20210617020516";
+    /**
+     * 多伦多述情障碍量表
+     **/
+    public static final String QUEST_FLAG_TAS_26 = "20210617020857";
+    /**
+     * 社会期望量表
+     **/
+    public static final String QUEST_FLAG_MCSD = "20210617100627";
+    /**
+     * 儿童自我意识量表
+     **/
+    public static final String QUEST_FLAG_PHCSS = "20210617101541";
+    /**
+     * 爱德华社会期望量表
+     **/
+    public static final String QUEST_FLAG_SD = "20210617103114";
+    /**
+     * 社交回避及苦恼量表
+     **/
+    public static final String QUEST_FLAG_SAD = "20210617114158";
+    /**
+     * 安全感量表
+     **/
+    public static final String QUEST_FLAG_SQ = "20210617121023";
+    /**
+     * 贝克抑郁自评量表
+     **/
+    public static final String QUEST_FLAG_BDI = "20210617121646";
+    /**
+     * 广泛性焦虑障碍量表
+     **/
+    public static final String QUEST_FLAG_GAD_7 = "20210617122012";
+    /**
+     * 流调中心用抑郁量表
+     **/
+    public static final String QUEST_FLAG_CES_D = "20210617122312";
+    /**
+     * 纽芬兰纪念大学幸福度量表
+     **/
+    public static final String QUEST_FLAG_MUNSH = "20210617122707";
+    /**
+     * 压力知觉量表
+     **/
+    public static final String QUEST_FLAG_PSS = "20210617123132";
+    /**
+     * 医院焦虑抑郁量表
+     **/
+    public static final String QUEST_FLAG_HADS = "20210617123608";
+    /**
+     * 抑郁症筛查量表
+     **/
+    public static final String QUEST_FLAG_PHQ_9 = "20210617124011";
+    /**
+     * 自杀态度问卷
+     **/
+    public static final String QUEST_FLAG_QSA = "20210617124840";
+    /**
+     * 自尊量表
+     **/
+    public static final String QUEST_FLAG_SES = "20210617125947";
+    /**
+     * 明尼苏达多相人格测验矫正量表
+     **/
+    public static final String QUEST_FLAG_MMPI_K = "20210617130956";
+    /**
+     * 明尼苏达多相人格测验说谎L量表
+     **/
+    public static final String QUEST_FLAG_MMPI_L = "20210617131351";
+    /**
+     * 3-7岁儿童气质问卷
+     **/
+    public static final String QUEST_FLAG_NYLS = "20210617132159";
+    /**
+     * 多维度健康状况心理控制源量表(表A)
+     **/
+    public static final String QUEST_FLAG_MHLC_A = "20210617132612";
+    /**
+     * 多维度健康状况心理控制源量表(表B)
+     **/
+    public static final String QUEST_FLAG_MHLC_B = "20210617133012";
+    /**
+     * 儿童感觉统合能力发展评定量表
+     **/
+    public static final String QUEST_FLAG_SIT = "20210617133625";
+    /**
+     * 核心自我评价量表
+     **/
+    public static final String QUEST_FLAG_CSES = "20210617133919";
+    /**
+     * 精神卫生心理控制源量表
+     **/
+    public static final String QUEST_FLAG_MHLC = "20210617134847";
+    /**
+     * 酒精依赖疾患识别测验
+     **/
+    public static final String QUEST_FLAG_AUDIT = "20210617135231";
+    /**
+     * 态度与意见调查中的期望性作答
+     **/
+    public static final String QUEST_FLAG_RD = "20210617135635";
+    /**
+     * 症状自评量表(SCL-90)
+     **/
+    public static final String QUEST_FLAG_SCL_90 = "20210617140713";
+    /**
+     * 简易应对方式问卷
+     **/
+    public static final String QUEST_FLAG_SCSQ = "20210619124953";
+    /**
+     * 交流恐惧自陈量表
+     **/
+    public static final String QUEST_FLAG_PRCA_24 = "20210619130014";
+    /**
+     * 交往焦虑量表
+     **/
+    public static final String QUEST_FLAG_IAS = "20210619131525";
+    /**
+     * 领悟社会支持量表
+     **/
+    public static final String QUEST_FLAG_PSSS = "20210619131920";
+    /**
+     * 青少年病理性互联网使用量表
+     **/
+    public static final String QUEST_FLAG_APIUS = "20210619132131";
+    /**
+     * 羞怯量表
+     **/
+    public static final String QUEST_FLAG_SS = "20210619132538";
+    /**
+     * 自我和谐量表
+     **/
+    public static final String QUEST_FLAG_SCCS = "20210619132917";
+    /**
+     * 情感量表
+     **/
+    public static final String QUEST_FLAG_AS = "20210621125418";
+    /**
+     * 自动思维量表
+     **/
+    public static final String QUEST_FLAG_ATO = "20210621220908";
+    /**
+     * 儿童少年生活质量量表
+     **/
+    public static final String QUEST_FLAG_QLSCA = "20210621221508";
+    /**
+     * 老年抑郁量表
+     **/
+    public static final String QUEST_FLAG_GDS = "20210621221807";
+    /**
+     * Carroll抑郁量表
+     **/
+    public static final String QUEST_FLAG_CRS = "20210622213958";
+    /**
+     * 家庭功能评定
+     **/
+    public static final String QUEST_FLAG_FAD = "20210622214416";
+    /**
+     * 家庭环境量表中文版
+     **/
+    public static final String QUEST_FLAG_FES_CV = "20210622214546";
+    /**
+     * 青少年学生疏离感量表
+     **/
+    public static final String QUEST_FLAG_ASAS = "20210622214744";
+    /**
+     * 情绪-社交孤独问卷
+     **/
+    public static final String QUEST_FLAG_ESLI = "20210622214903";
+    /**
+     * 贝克-拉范森躁狂量表
+     **/
+    public static final String QUEST_FLAG_BRMS = "20210622215152";
+    /**
+     * 多维完美主义问卷
+     **/
+    public static final String QUEST_FLAG_MPS = "20210625181538";
+    /**
+     * 费城老年中心(PGC)信心量表
+     **/
+    public static final String QUEST_FLAG_PGC = "20210625182311";
+    /**
+     * 生活满意度指数A
+     **/
+    public static final String QUEST_FLAG_LSIA = "20210625183328";
+    /**
+     * 思维风格量表
+     **/
+    public static final String QUEST_FLAG_TSI = "20210625183509";
+    /**
+     * 特定人际信任量表
+     **/
+    public static final String QUEST_FLAG_SITS = "20210625183706";
+    /**
+     * 信赖他人量表
+     **/
+    public static final String QUEST_FLAG_FPS = "20210625183826";
+    /**
+     * 信任他人量表
+     **/
+    public static final String QUEST_FLAG_TIP = "20210625183923";
+    /**
+     * 信任量表
+     **/
+    public static final String QUEST_FLAG_TS = "20210625184248";
+    /**
+     * 学龄前儿童活动调查表
+     **/
+    public static final String QUEST_FLAG_PSAI = "20210625184726";
+    /**
+     * 学习障碍儿童筛查量表
+     **/
+    public static final String QUEST_FLAG_PRS = "20210625184948";
+    /**
+     * 抑郁状态问卷
+     **/
+    public static final String QUEST_FLAG_DSI = "20210625191902";
+    /**
+     * 抑郁-焦虑-压力量表
+     **/
+    public static final String QUEST_FLAG_DASS_42 = "20210713155333";
+    /**
+     * 阿森斯失眠量表
+     **/
+    public static final String QUEST_FLAG_AIS = "20210628213837";
+    /**
+     * 爱丁堡利手量表
+     **/
+    public static final String QUEST_FLAG_EHS = "20210628214239";
+    /**
+     * 爱泼沃斯嗜睡量表
+     **/
+    public static final String QUEST_FLAG_ESS = "20210628214628";
+    /**
+     * 气质类型测试
+     **/
+    public static final String QUEST_FLAG_TTT = "20210628214712";
+    /**
+     * 儿童依赖性评估测试(女生版)
+     **/
+    public static final String QUEST_FLAG_CDA = "20210804102135";
+
+    /**
+     * 在婚姻里,你有安全感吗?
+     **/
+    public static final String QUEST_FLAG_MRA_SAFE = "20210714220600";
+    /**
+     * 职业心理年龄测试
+     **/
+    public static final String QUEST_FLAG_OCC_AGE = "20210714221054";
+    /**
+     * 状态一特质焦虑问卷
+     **/
+    public static final String QUEST_FLAG_STAI = "20210714222004";
+    /**
+     * 子女教育心理控制源量表
+     **/
+    public static final String QUEST_FLAG_PLOC = "20210714222726";
+    /**
+     * 自测健康评定量表
+     **/
+    public static final String QUEST_FLAG_SRHMS = "20210714223333";
+    /**
+     * 自信心测试
+     **/
+    public static final String QUEST_FLAG_CFD = "20210714224230";
+    /**
+     * 自尊调查表
+     **/
+    public static final String QUEST_FLAG_SEI = "20210714224910";
+    /**
+     * 总体幸福感量表
+     **/
+    public static final String QUEST_FLAG_GWB = "20210723163240";
+    /**
+     * 舒伯职业价值观量表
+     **/
+    public static final String QUEST_FLAG_WVI = "20210717225226";
+    /**
+     * 双方性调节量表
+     **/
+    public static final String QUEST_FLAG_DSR = "20210717225706";
+    /**
+     * 双相情感障碍自评量表
+     **/
+    public static final String QUEST_FLAG_BDQ = "20210717230329";
+    /**
+     * 特质应对方式问卷
+     **/
+    public static final String QUEST_FLAG_TCSQ = "20210717230742";
+    /**
+     * 同学关系测验问卷
+     **/
+    public static final String QUEST_FLAG_STUR = "20210717231632";
+    /**
+     * 威廉斯创造力倾向测评量表
+     **/
+    public static final String QUEST_FLAG_WILL = "20210717232552";
+    /**
+     * 演说者信心自评量表
+     **/
+    public static final String QUEST_FLAG_PRCS = "20210718162607";
+    /**
+     * 医学应对问卷
+     **/
+    public static final String QUEST_FLAG_MCMQ = "20210718163433";
+    /**
+     * 抑郁形容词检查表
+     **/
+    public static final String QUEST_FLAG_DACL = "20210718164422";
+    /**
+     * 性向测试问卷
+     **/
+    public static final String QUEST_FLAG_PER = "20210718165237";
+    /**
+     * 艾森克人格量表
+     **/
+    public static final String QUEST_FLAG_EPQ = "20210721224753";
+    /**
+     * Sarason考试焦虑量表
+     **/
+    public static final String QUEST_FLAG_TAS = "20210722101531";
+    /**
+     * 人际关系综合诊断量表
+     **/
+    public static final String QUEST_FLAG_PRT = "20210722102600";
+    /**
+     * 人性的哲学修订量表
+     **/
+    public static final String QUEST_FLAG_PLP = "20210722103456";
+    /**
+     * 容纳他人量表
+     **/
+    public static final String QUEST_FLAG_AOO = "20210722103940";
+    /**
+     * 社会适应能力诊断量表
+     **/
+    public static final String QUEST_FLAG_SADS = "20210722105045";
+    /**
+     * 生活满意度指数B
+     **/
+    public static final String QUEST_FLAG_LSIB = "20210722111253";
+    /**
+     * 癫痫抑郁量表
+     **/
+    public static final String QUEST_FLAG_NDDI_E = "20210723164206";
+    /**
+     * 癫痫患者自我管理量表
+     **/
+    public static final String QUEST_FLAG_ESM = "20210723164426";
+    /**
+     * 儿童睡眠习惯问卷
+     **/
+    public static final String QUEST_FLAG_CSHQ = "20210725090145";
+    /**
+     * 马斯洛安全感-不安全感问卷
+     **/
+    public static final String QUEST_FLAG_MSIQ = "20210725091021";
+    /**
+     * 内控性、有势力的他人及机遇量表
+     **/
+    public static final String QUEST_FLAG_IPC = "20210725091833";
+    /**
+     * 内在—外在心理控制源量表
+     **/
+    public static final String QUEST_FLAG_IELCS = "20210725092332";
+    /**
+     * 你到底“几斤几两”——测测你的自我价值
+     **/
+    public static final String QUEST_FLAG_YSV = "20210725093159";
+    /**
+     * 你对另一半满意吗?
+     **/
+    public static final String QUEST_FLAG_YSP = "20210725093549";
+    /**
+     * 你给人的第一印象如何?
+     **/
+    public static final String QUEST_FLAG_YFI = "20210725094150";
+    /**
+     * 你拖延到什么程度了?
+     **/
+    public static final String QUEST_FLAG_WHD = "20210725094642";
+    /**
+     * 亲子关系问卷量表
+     **/
+    public static final String QUEST_FLAG_PCR = "20210725095324";
+    /**
+     * 情绪一社交孤独问卷
+     **/
+    public static final String QUEST_FLAG_ESLIS = "20210725100021";
+    /**
+     * DISC性格测试题
+     **/
+    public static final String QUEST_FLAG_DISC = "20210727214334";
+    /**
+     * 成人依恋量表
+     **/
+    public static final String QUEST_FLAG_AAS = "20210727214911";
+    /**
+     * 儿童行为问卷(父母用)
+     **/
+    public static final String QUEST_FLAG_CCSAS = "20210727215449";
+    /**
+     * 亲密关系经历量表
+     **/
+    public static final String QUEST_FLAG_ECR = "20210727221159";
+    /**
+     * 中国大学生适应量表
+     **/
+    public static final String QUEST_FLAG_CCSAS2 = "20210727224129";
+    /**
+     * 青少年癫痫患者生活质量评定量表(QOLIE-AD-48) 青少年(6-18岁)
+     **/
+    public static final String QUEST_FLAG_QOLIE = "20210730164451";
+    /**
+     * A型、B型性格测试
+     **/
+    public static final String QUEST_FLAG_ABT = "20210802210827";
+    /**
+     * 儿童自闭症评量量表
+     **/
+    public static final String QUEST_FLAG_CARS = "20210802215306";
+    /**
+     * 孤独症儿童行为量表
+     **/
+    public static final String QUEST_FLAG_ABC = "20210802223536";
+    /**
+     * 克氏行为量表
+     **/
+    public static final String QUEST_FLAG_CABS = "20210802223845";
+    /**
+     * 青少年忧郁情绪自我检视表
+     **/
+    public static final String QUEST_FLAG_ADSC = "20210802224305";
+    /**
+     * 痛苦表露指数
+     **/
+    public static final String QUEST_FLAG_DDI = "20210802224543";
+    /**
+     * 心理测试:你应对职场动荡的能力
+     **/
+    public static final String QUEST_FLAG_DWTA = "20210802224734";
+    /**
+     * Toronto医院警觉测试
+     **/
+    public static final String QUEST_FLAG_THAT = "20210807095612";
+    /**
+     * Zung氏焦虑自评量表
+     **/
+    public static final String QUEST_FLAG_ZAS = "20210807100155";
+    /**
+     * 心理压力测一测
+     **/
+    public static final String QUEST_FLAG_PST = "20210802225051";
+    /**
+     * 性格和压力测试
+     **/
+    public static final String QUEST_FLAG_PAST = "20210802225320";
+    /**
+     * CAGE问卷
+     **/
+    public static final String QUEST_FLAG_CAGE = "20210812131145";
+    /**
+     * STOP-Bang量表
+     **/
+    public static final String QUEST_FLAG_STOPB = "20210812131502";
+    /**
+     * Tayside儿童睡眠问卷
+     **/
+    public static final String QUEST_FLAG_TCSQT = "20210812131710";
+    /**
+     * 爱丁堡产后抑郁量表
+     **/
+    public static final String QUEST_FLAG_EPDS = "20210812132236";
+    /**
+     * 儿科日间嗜睡量表
+     **/
+    public static final String QUEST_FLAG_PDSS = "20210812132654";
+    /**
+     * 流调中心儿童抑郁量表
+     **/
+    public static final String QUEST_FLAG_CESDC = "20210812133437";
+    /**
+     * 蒙哥马利抑郁评定量表
+     **/
+    public static final String QUEST_FLAG_MADRS = "20210812135049";
+    /**
+     * 疲劳严重度量表
+     **/
+    public static final String QUEST_FLAG_FSS = "20210807100904";
+    /**
+     * 青少年睡眠-觉醒量表
+     **/
+    public static final String QUEST_FLAG_ASWS = "20210812140140";
+    /**
+     * 耶鲁布朗强迫症状量表
+     **/
+    public static final String QUEST_FLAG_YBOCS = "20210812140722";
+    /**
+     * 阳性与阴性症状量表
+     **/
+    public static final String QUEST_FLAG_PANSS = "20210718163045";
+    /**
+     * 心理适应性量表
+     **/
+    public static final String QUEST_FLAG_MFS = "20210717233329";
+    /**
+     * 儿科睡眠问卷:睡眠相关呼吸障碍分量表
+     **/
+    public static final String QUEST_FLAG_SRBD = "20210807100654";
+    /**
+     * 托兰斯创造性人格自陈量表
+     **/
+    public static final String QUEST_FLAG_TCPSS = "20210717232009";
+    /**
+     * Epworth嗜睡量表
+     **/
+    public static final String QUEST_FLAG_TESS = "20210807094852";
+    /**
+     * 测试:你的心理调节能力过关吗
+     **/
+    public static final String QUEST_FLAG_MAA = "20210802214831";
+    /**
+     * 幸福感指数、总体情感指数
+     **/
+    public static final String QUEST_FLAG_IWBIGA = "20210718164832";
+    /**
+     * 多元认知能力自评量表
+     **/
+    public static final String QUEST_FLAG_MASQ = "20210723170946";
+    /**
+     * 匹兹堡睡眠质量指数
+     **/
+    public static final String QUEST_TYPE_PSQI = "20210725100704";
+    /**
+     * 康奈尔健康问卷(男性用)
+     **/
+    public static final String QUEST_TYPE_CMIM = "20210908122014";
+    /**
+     * 康奈尔健康问卷(女性用)
+     **/
+    public static final String QUEST_TYPE_CMIW = "20210908122321";
+    /**
+     * 心境状态量表
+     **/
+    public static final String QUEST_TYPE_POMS = "20211020113719";
+    /**
+     * 职业性格测试
+     **/
+    public static final String QUEST_TYPE_MBTI = "20211020113914";
+
+
+    /**
+     * 量表测试文件SHEET名
+     **/
+    public static final String SHEET_NAME_API = "Aitken拖延问卷";
+    public static final String SHEET_NAME_LSAS = "社交焦虑量表";
+    public static final String SHEET_NAME_BPRS = "简明精神病量表";
+    public static final String SHEET_NAME_HAMA = "汉密顿焦虑量表";
+    public static final String SHEET_NAME_UCLA = "孤独量表";
+    public static final String SHEET_NAME_SAS = "焦虑自评量表";
+    public static final String SHEET_NAME_MAST = "密歇根酒精依赖调查表";
+    public static final String SHEET_NAME_BSSI = "Beck自杀意念量表";
+    //public static final String SHEET_NAME_CBQ = "儿童行为问卷";
+    public static final String SHEET_NAME_ITS = "人际信任量表";
+    public static final String SHEET_NAME_GCQ = "舒适状况量表";
+    public static final String SHEET_NAME_SDS = "抑郁自评量表";
+    public static final String SHEET_NAME_TAS_26 = "多伦多述情障碍量表";
+    public static final String SHEET_NAME_MCSD = "社会期望量表";
+    public static final String SHEET_NAME_PHCSS = "儿童自我意识量表";
+    public static final String SHEET_NAME_SD = "爱德华社会期望量表";
+    public static final String SHEET_NAME_SAD = "社交回避及苦恼量表";
+    public static final String SHEET_NAME_SQ = "安全感量表";
+    public static final String SHEET_NAME_BDI = "贝克抑郁自评量表";
+    public static final String SHEET_NAME_GAD_7 = "广泛性焦虑障碍量表";
+    public static final String SHEET_NAME_CES_D = "流调中心用抑郁量表";
+    public static final String SHEET_NAME_MUNSH = "纽芬兰纪念大学幸福度量表";
+    public static final String SHEET_NAME_PSS = "压力知觉量表";
+    public static final String SHEET_NAME_HADS = "医院焦虑抑郁量表";
+    public static final String SHEET_NAME_PHQ_9 = "抑郁症筛查量表";
+    public static final String SHEET_NAME_QSA = "自杀态度问卷";
+    public static final String SHEET_NAME_SES = "自尊量表";
+    public static final String SHEET_NAME_MMPI_K = "明尼苏达多相人格测验矫正量表";//开始在数据库添加计分原则
+    public static final String SHEET_NAME_MMPI_L = "明尼苏达多相人格测验说谎L量表";
+    public static final String SHEET_NAME_NYLS = "3-7岁儿童气质问卷";
+    public static final String SHEET_NAME_MHLC_A = "多维度健康状况心理控制源量表(表A)";
+    public static final String SHEET_NAME_MHLC_B = "多维度健康状况心理控制源量表(表B)";
+    public static final String SHEET_NAME_SIT = "儿童感觉统合能力发展评定量表";
+    public static final String SHEET_NAME_CSES = "核心自我评价量表";
+    public static final String SHEET_NAME_MHLC = "精神卫生心理控制源量表";
+    public static final String SHEET_NAME_AUDIT = "酒精依赖疾患识别测验";
+    public static final String SHEET_NAME_RD = "态度与意见调查中的期望性作答";
+    public static final String SHEET_NAME_SCL_90 = "症状自评量表(SCL-90)";
+    public static final String SHEET_NAME_SCSQ = "简易应对方式问卷";
+    public static final String SHEET_NAME_PRCA_24 = "交流恐惧自陈量表";
+    public static final String SHEET_NAME_IAS = "交往焦虑量表";
+    public static final String SHEET_NAME_PSSS = "领悟社会支持量表";
+    public static final String SHEET_NAME_APIUS = "青少年病理性互联网使用量表";
+    public static final String SHEET_NAME_SS = "羞怯量表";
+    public static final String SHEET_NAME_SCCS = "自我和谐量表";
+    public static final String SHEET_NAME_AS = "情感量表";
+    public static final String SHEET_NAME_ATO = "自动思维量表";
+    public static final String SHEET_NAME_QLSCA = "儿童少年生活质量量表";
+    public static final String SHEET_NAME_GDS = "老年抑郁量表";
+    public static final String SHEET_NAME_CRS = "Carroll抑郁量表";
+    public static final String SHEET_NAME_FAD = "家庭功能评定";
+    public static final String SHEET_NAME_FES_CV = "家庭环境量表中文版";
+    public static final String SHEET_NAME_ASAS = "青少年学生疏离感量表";
+    public static final String SHEET_NAME_ESLI = "情绪-社交孤独问卷";
+    public static final String SHEET_NAME_BRMS = "贝克-拉范森躁狂量表";
+    public static final String SHEET_NAME_MPS = "多维完美主义问卷";
+    public static final String SHEET_NAME_PGC = "费城老年中心(PGC)信心量表";
+    public static final String SHEET_NAME_LSIA = "生活满意度指数A";
+    public static final String SHEET_NAME_TSI = "思维风格量表";
+    public static final String SHEET_NAME_SITS = "特定人际信任量表";
+    public static final String SHEET_NAME_FPS = "信赖他人量表";
+    public static final String SHEET_NAME_TIP = "信任他人量表";
+    public static final String SHEET_NAME_TS = "信任量表";
+    public static final String SHEET_NAME_PSAI = "学龄前儿童活动调查表";
+    public static final String SHEET_NAME_PRS = "学习障碍儿童筛查量表";
+    public static final String SHEET_NAME_DSI = "抑郁状态问卷";
+    public static final String SHEET_NAME_DASS_42 = "抑郁-焦虑-压力量表";
+    public static final String SHEET_NAME_AIS = "阿森斯失眠量表";
+    public static final String SHEET_NAME_EHS = "爱丁堡利手量表";
+    public static final String SHEET_NAME_ESS = "爱泼沃斯嗜睡量表";
+    public static final String SHEET_NAME_TTT = "气质类型测试";
+    public static final String SHEET_NAME_CDA = " 儿童依赖性评估测试(女生版)";
+
+    public static final String SHEET_NAME_MRA_SAFE = "在婚姻里,你有安全感吗?";
+    public static final String SHEET_NAME_OCC_AGE = "职业心理年龄测试";
+    public static final String SHEET_NAME_STAI = "状态一特质焦虑问卷";
+    public static final String SHEET_NAME_PLOC = "子女教育心理控制源量表";
+    public static final String SHEET_NAME_SRHMS = "自测健康评定量表";
+    public static final String SHEET_NAME_CFD = "自信心测试";
+    public static final String SHEET_NAME_SEI = "自尊调查表";
+    public static final String SHEET_NAME_GWB = "总体幸福感量表";
+    public static final String SHEET_NAME_WVI = "舒伯职业价值观量表";
+    public static final String SHEET_NAME_DSR = "双方性调节量表";
+    public static final String SHEET_NAME_BDQ = "双相情感障碍自评量表";
+    public static final String SHEET_NAME_TCSQ = "特质应对方式问卷";
+    public static final String SHEET_NAME_STUR = "同学关系测验问卷";
+    public static final String SHEET_NAME_WILL = "威廉斯创造力倾向测评量表";
+    public static final String SHEET_NAME_PRCS = "演说者信心自评量表";
+    public static final String SHEET_NAME_MCMQ = "医学应对问卷";
+    public static final String SHEET_NAME_DACL = "抑郁形容词检查表";
+    public static final String SHEET_NAME_PER = "性向测试问卷";
+    public static final String SHEET_NAME_EPQ = "艾森克人格量表";
+    public static final String SHEET_NAME_TAS = "Sarason考试焦虑量表";
+    public static final String SHEET_NAME_PRT = "人际关系综合诊断量表";
+    public static final String SHEET_NAME_PLP = "人性的哲学修订量表";
+    public static final String SHEET_NAME_AOO = "容纳他人量表";
+    public static final String SHEET_NAME_SADS = "社会适应能力诊断量表";
+    public static final String SHEET_NAME_LSIB = "生活满意度指数B";
+    public static final String SHEET_NAME_NDDI_E = "癫痫抑郁量表";
+    public static final String SHEET_NAME_ESM = "癫痫患者自我管理量表";
+    public static final String SHEET_NAME_CSHQ = "儿童睡眠习惯问卷";
+    public static final String SHEET_NAME_MSIQ = "马斯洛安全感-不安全感问卷";
+    public static final String SHEET_NAME_IPC = "内控性、有势力的他人及机遇量表";
+    public static final String SHEET_NAME_IELCS = "内在—外在心理控制源量表";
+    public static final String SHEET_NAME_YSV = "你到底“几斤几两”——测测你的自我价值";
+    public static final String SHEET_NAME_YSP = "你对另一半满意吗?";
+    public static final String SHEET_NAME_YFI = "你给人的第一印象如何?";
+    public static final String SHEET_NAME_WHD = "你拖延到什么程度了?";
+    public static final String SHEET_NAME_PCR = "亲子关系问卷量表";
+    public static final String SHEET_NAME_ESLIS = "情绪一社交孤独问卷";
+    public static final String SHEET_NAME_DISC = "DISC性格测试题";
+    public static final String SHEET_NAME_AAS = "成人依恋量表";
+    public static final String SHEET_NAME_CCSAS = "儿童行为问卷(父母用)";
+    public static final String SHEET_NAME_ECR = "亲密关系经历量表";
+    public static final String SHEET_NAME_CCSAS2 = "中国大学生适应量表";
+    public static final String SHEET_NAME_QOLIE = "青少年癫痫患者生活质量评定量表(QOLIE-AD-48) 青少年(6-18岁)";
+    public static final String SHEET_NAME_ABT = "A型、B型性格测试";
+    public static final String SHEET_NAME_CARS = "儿童自闭症评量量表";
+    public static final String SHEET_NAME_ABC = "孤独症儿童行为量表";
+    public static final String SHEET_NAME_CABS = "克氏行为量表";
+    public static final String SHEET_NAME_ADSC = "青少年忧郁情绪自我检视表";
+    public static final String SHEET_NAME_DDI = "痛苦表露指数";
+    public static final String SHEET_NAME_DWTA = "心理测试:你应对职场动荡的能力";
+    public static final String SHEET_NAME_THAT = "Toronto医院警觉测试";
+    public static final String SHEET_NAME_ZAS = "Zung氏焦虑自评量表";
+    public static final String SHEET_NAME_PST = "心理压力测一测";
+    public static final String SHEET_NAME_PAST = "性格和压力测试";
+    public static final String SHEET_NAME_CAGE = "CAGE问卷";
+    public static final String SHEET_NAME_STOPB = "STOP-Bang量表";
+    public static final String SHEET_NAME_TCSQT = "Tayside儿童睡眠问卷";
+    public static final String SHEET_NAME_EPDS = "爱丁堡产后抑郁量表";
+    public static final String SHEET_NAME_PDSS = "儿科日间嗜睡量表";
+    public static final String SHEET_NAME_CESDC = "流调中心儿童抑郁量表";
+    public static final String SHEET_NAME_MADRS = "蒙哥马利抑郁评定量表";
+    public static final String SHEET_NAME_FSS = "疲劳严重度量表";
+    public static final String SHEET_NAME_ASWS = "青少年睡眠-觉醒量表";
+    public static final String SHEET_NAME_YBOCS = "耶鲁布朗强迫症状量表";
+    public static final String SHEET_NAME_PANSS = "阳性与阴性症状量表";
+    public static final String SHEET_NAME_MFS = "心理适应性量表";
+    public static final String SHEET_NAME_SRBD = "儿科睡眠问卷:睡眠相关呼吸障碍分量表";
+    public static final String SHEET_NAME_TCPSS = "托兰斯创造性人格自陈量表";
+    public static final String SHEET_NAME_TESS = "Epworth嗜睡量表";
+    public static final String SHEET_NAME_MAA = "测试:你的心理调节能力过关吗";
+    public static final String SHEET_NAME_IWBIGA = "幸福感指数、总体情感指数";
+    public static final String SHEET_NAME_MASQ = "多元认知能力自评量表";
+    public static final String SHEET_NAME_PSQI = "匹兹堡睡眠质量指数";
+    public static final String SHEET_NAME_CMIM = "康奈尔健康问卷(男性用)";
+    public static final String SHEET_NAME_CMIW = "康奈尔健康问卷(女性用)";
+    public static final String SHEET_NAME_POMS = "心境状态量表";
+    public static final String SHEET_NAME_MBTI = "职业性格测试";
+
+
+/** 许博文 **/
+    /**
+     * 知觉压力问卷
+     **/
+    public static final String QUEST_TYPE_PSQ = "20210913093250";
+    public static final String SHEET_NAME_PSQ = "知觉压力问卷";
+    /**
+     * 儿童注意多动缺陷筛查量表
+     **/
+    public static final String QUEST_TYPE_AHDSC = "20210901113320";
+    public static final String SHEET_NAME_AHDSC = "儿童注意多动缺陷筛查量表";
+    /**
+     * 魁北克睡眠问卷
+     **/
+    public static final String QUEST_TYPE_QSQ = "20210913091839";
+    public static final String SHEET_NAME_QSQ = "魁北克睡眠问卷";
+    /**
+     * 总体睡眠障碍量表
+     **/
+    public static final String QUEST_TYPE_GSDS = "20210913093446";
+    public static final String SHEET_NAME_GSDS = "总体睡眠障碍量表";
+    /**
+     * 防御方式问卷
+     **/
+    public static final String QUEST_TYPE_DSQ = "20210916104937";
+    public static final String SHEET_NAME_DSQ = "防御方式问卷";
+    /**
+     * Zung抑郁自我评价量表
+     **/
+    public static final String QUEST_TYPE_ZungDP = "20210918160544";
+    public static final String SHEET_NAME_ZungDP = "Zung抑郁自我评价量表";
+    /**
+     * 成就倾同个体差异问卷
+     **/
+    public static final String QUEST_TYPE_IDIAT = "20210918160745";
+    public static final String SHEET_NAME_IDIAT = "成就倾同个体差异问卷";
+    /**
+     * 国立医院癫痫发作严重程度量表
+     **/
+    public static final String QUEST_TYPE_NHS3 = "20210922130731";
+    public static final String SHEET_NAME_NHS3 = "国立医院癫痫发作严重程度量表";
+    /**
+     * 老年人认知功能减退知情者问卷
+     **/
+    public static final String QUEST_TYPE_IQCODE = "20210922131640";
+    public static final String SHEET_NAME_IQCODE = "老年人认知功能减退知情者问卷";
+    /**
+     * 运动竞赛焦虑测验
+     **/
+    public static final String QUEST_TYPE_SCAT = "20210922222436";
+    public static final String SHEET_NAME_SCAT = "运动竞赛焦虑测验";
+    /**
+     * 驾驶技能自我评估量表
+     **/
+    public static final String QUEST_TYPE_SACDS = "20210923220801";
+    public static final String SHEET_NAME_SACDS = "驾驶技能自我评估量表";
+    /**
+     * 驾驶能力量表
+     **/
+    public static final String QUEST_TYPE_PPDC = "20210923221314";
+    public static final String SHEET_NAME_PPDC = "驾驶能力量表";
+    /**
+     * 竞赛失败应对量表
+     **/
+    public static final String QUEST_TYPE_CCF = "20210923221436";
+    public static final String SHEET_NAME_CCF = "竞赛失败应对量表";
+    /**
+     * 身体自尊量表
+     **/
+    public static final String QUEST_TYPE_BE = "20210923223630";
+    public static final String SHEET_NAME_BE = "身体自尊量表";
+    /**
+     * 优秀运动员意志品质评价量表
+     **/
+    public static final String QUEST_TYPE_EVQEA = "20210922222157";
+    public static final String SHEET_NAME_EVQEA = "优秀运动员意志品质评价量表";
+    /**
+     * 少年儿童身体自尊量表
+     **/
+    public static final String QUEST_TYPE_ABE = "20210923223500";
+    public static final String SHEET_NAME_ABE = "少年儿童身体自尊量表";
+/** 许博文 **/
+
+    /**
+     * 交通安全文化量表
+     **/
+    public static final String QUEST_TYPE_TSCS = "20211003094821";
+    /**
+     * 驾驶行为量表
+     **/
+    public static final String QUEST_TYPE_DBS = "20211003094602";
+    /**
+     * 训练比赛满意感量表
+     **/
+    public static final String QUEST_TYPE_TCS = "20210923230509";
+    /**
+     * 一般决策风格量表
+     **/
+    public static final String QUEST_TYPE_GDMS = "20210923230703";
+    /**
+     * 危险知觉能力自我评估量表
+     **/
+    public static final String QUEST_TYPE_SRHP = "20210924090818";
+    /**
+     * Ross面神经分级系统
+     **/
+    public static final String QUEST_TYPE_RFNGS = "20210929221501";
+    /**
+     * 哥本哈根卒中量表
+     **/
+    public static final String QUEST_TYPE_CS = "20210929222226";
+    /**
+     * SNAP-IV父母及教师评定量表(18项)
+     **/
+    public static final String QUEST_TYPE_SNAPIV = "20211002195132";
+    /**
+     * SNAP-IV父母及教师评定量表(26项)
+     **/
+    public static final String QUEST_TYPE_SNAPIV2 = "20211002195229";
+    /**
+     * Weiss 功能缺陷量表(父母版)
+     **/
+    public static final String QUEST_TYPE_WFIRS = "20211002195607";
+    /**
+     * 道路安全的家庭氛围量表
+     **/
+    public static final String QUEST_TYPE_FCRSS = "20211002213330";
+    /**
+     * 多维度驾驶风格量表
+     **/
+    public static final String QUEST_TYPE_MDSIC = "20211002213446";
+    /**
+     * 多维度交通心理控制源量表
+     **/
+    public static final String QUEST_TYPE_TLOC = "20211002213556";
+    /**
+     * 驾驶安全态度量表
+     **/
+    public static final String QUEST_TYPE_DSA = "20211002214206";
+    /**
+     * 驾驶成本与收益问卷
+     **/
+    public static final String QUEST_TYPE_DCBQ = "20211002214330";
+    /**
+     * 驾驶愤怒量表
+     **/
+    public static final String QUEST_TYPE_DAS = "20211002214527";
+    /**
+     * 教师的压力评估
+     **/
+    public static final String QUEST_TYPE_TSA = "20211003095159";
+    /**
+     * 年轻新手驾驶行为量表
+     **/
+    public static final String QUEST_TYPE_BYNDS = "20211003095446";
+    /**
+     * 亲社会和攻击性驾驶行为量表
+     **/
+    public static final String QUEST_TYPE_PADIC = "20211003095601";
+    /**
+     * 情绪状态量表
+     **/
+    public static final String QUEST_TYPE_DPOMS = "20211003095944";
+    /**
+     * 事故风险问卷
+     **/
+    public static final String QUEST_TYPE_ARQ = "20211003100036";
+    /**
+     * 突发性公共卫生事件心理问卷
+     **/
+    public static final String QUEST_TYPE_PQEEPH = "20211003100227";
+    /**
+     * 危险驾驶行为量表
+     **/
+    public static final String QUEST_TYPE_DDBS = "20211003100421";
+    /**
+     * 危险行为态度量表
+     **/
+    public static final String QUEST_TYPE_SRBA = "20211003100745";
+    /**
+     * 学龄前儿童饮食行为量表
+     **/
+    public static final String QUEST_TYPE_PEBS = "20211003100909";
+    /**
+     * 中学生龋齿简易风险自评问卷
+     **/
+    public static final String QUEST_TYPE_SCRSQ = "20211003101405";
+    /**
+     * 驾驶危险行为量表
+     **/
+    public static final String QUEST_TYPE_DDBS2 = "20211003100636";
+
+    public static final String SHEET_NAME_DDBS = "危险驾驶行为量表";
+    public static final String SHEET_NAME_PQEEPH = "突发性公共卫生事件心理问卷";
+    public static final String SHEET_NAME_ARQ = "事故风险问卷";
+    public static final String SHEET_NAME_DPOMS = "情绪状态量表";
+    public static final String SHEET_NAME_PADIC = "亲社会和攻击性驾驶行为量表";
+    public static final String SHEET_NAME_BYNDS = "年轻新手驾驶行为量表";
+    public static final String SHEET_NAME_TSA = "教师的压力评估";
+    public static final String SHEET_NAME_DAS = "驾驶愤怒量表";
+    public static final String SHEET_NAME_DCBQ = "驾驶成本与收益问卷";
+    public static final String SHEET_NAME_DSA = "驾驶安全态度量表";
+    public static final String SHEET_NAME_TLOC = "多维度交通心理控制源量表";
+    public static final String SHEET_NAME_MDSIC = "多维度驾驶风格量表";
+    public static final String SHEET_NAME_FCRSS = "道路安全的家庭氛围量表";
+    public static final String SHEET_NAME_WFIRS = "Weiss 功能缺陷量表(父母版)";
+    public static final String SHEET_NAME_SNAPIV2 = "SNAP-IV父母及教师评定量表(26项)";
+    public static final String SHEET_NAME_SNAPIV = "SNAP-IV父母及教师评定量表(18项)";
+    public static final String SHEET_NAME_CS = "哥本哈根卒中量表";
+    public static final String SHEET_NAME_RFNGS = "Ross面神经分级系统";
+    public static final String SHEET_NAME_SRHP = "危险知觉能力自我评估量表";
+    public static final String SHEET_NAME_GDMS = "一般决策风格量表";
+    public static final String SHEET_NAME_TCS = "训练比赛满意感量表";
+    public static final String SHEET_NAME_DBS = "驾驶行为量表";
+    public static final String SHEET_NAME_TSCS = "交通安全文化量表";
+    public static final String SHEET_NAME_DDBS2 = "危险驾驶行为量表";
+    public static final String SHEET_NAME_SCRSQ = "中学生龋齿简易风险自评问卷";
+    public static final String SHEET_NAME_PEBS = "学龄前儿童饮食行为量表";
+    public static final String SHEET_NAME_SRBA = "危险行为态度量表";
+
+/** 20220310 lpf **/
+    /**
+     * 巴瑞特冲动性人格问卷
+     **/
+    public static final String QUEST_TYPE_BRT = "20220227165514";
+    public static final String SHEET_NAME_BRT = "巴瑞特冲动性人格问卷";
+    /**
+     * 大学生恋爱心理压力源量表
+     **/
+    public static final String QUEST_TYPE_DXSLA = "20220126170829";
+    public static final String SHEET_NAME_DXSLA = "大学生恋爱心理压力源量表";
+    /**
+     * 霍兰德职业兴趣测试
+     **/
+    public static final String QUEST_TYPE_HLD = "20220218094735";
+    public static final String SHEET_NAME_HLD = "霍兰德职业兴趣测试";
+    /**
+     * 军人心理应激自评问卷
+     **/
+    public static final String QUEST_TYPE_JRXLYJ = "20220302195619";
+    public static final String SHEET_NAME_JRXLYJ = "军人心理应激自评问卷";
+    /**
+     * 中国中学生心理健康量表
+     **/
+    public static final String QUEST_TYPE_STUHEA = "20220228164442";
+    public static final String SHEET_NAME_STUHEA = "中国中学生心理健康量表";
+    /**
+     * 中学生自我导向学习倾向性量表 SDLRS
+     **/
+    public static final String QUEST_TYPE_SDLRS = "20220126171621";
+    public static final String SHEET_NAME_SDLRS = "中学生自我导向学习倾向性量表 SDLRS";
+    /**
+     * Russell吸烟原因问卷
+     **/
+    public static final String QUEST_TYPE_Russell = "20220307104830";
+    public static final String SHEET_NAME_Russell = "Russell吸烟原因问卷";
+    /**
+     * 运动认知特质焦虑量表
+     **/
+    public static final String QUEST_TYPE_YDRZ = "20220307110757";
+    public static final String SHEET_NAME_YDRZ = "运动认知特质焦虑量表";
+/** END **/
+
+    /** 日期转换标志:start转换为当天0时0分0秒  end转换为第二天0时0分0秒 **/
+    public static final String DATE_TRANS_FLAG_START = "start";
+    public static final String DATE_TRANS_FLAG_END = "end";
+    /** 用户测试计划完成状态  0:未完成  9 已完成 **/
+    public static final String USER_PLAN_STATUS_UNCOMPLETED = "0";
+    public static final String USER_PLAN_STATUS_COMPLETED = "9";
+
+    public static final String EXCLUDE_PACKAGE_NAME = "wxpay";
+}

+ 170 - 0
src/main/java/com/rf/youth/utils/Data.java

@@ -0,0 +1,170 @@
+package com.rf.youth.utils;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.sql.*;
+
+@Slf4j
+public class Data {
+	
+
+	public static void main(String[] args) throws InterruptedException, SQLException {
+
+        String className = "com.mysql.jdbc.Driver";
+        String url = "jdbc:mysql://49.232.26.44:3306/psychological_112";
+        String userName = "root";
+        String password = "Mysql@.2020";
+        Connection con = null;
+
+        log.info("初始化数据库连接");
+        try{
+            Class.forName(className);
+            con = DriverManager.getConnection(url,userName,password);
+        } catch (ClassNotFoundException | SQLException e) {
+            log.error("初始化数据库连接出错:");
+            e.printStackTrace();
+            return;
+        }
+        log.info("初始化数据库完成");
+        Thread.sleep(3000);
+        log.info("step1:修改表结构——开始");
+        PreparedStatement stat = null;
+        try{
+
+            //        修改表结构 增加角色字段
+            String alterTable = "alter table t_user_info add column role_type varchar(2) default '1' comment '用户角色 1、普通用户 2、机构管理员 3、机构超级管理员'";
+            stat = con.prepareStatement(alterTable);
+            stat.execute();
+        } catch (SQLException e) {
+            log.error("step1:修改表结构——失败");
+            e.printStackTrace();
+            return;
+        }finally {
+            if(stat != null){
+                stat.close();
+            }
+        }
+        log.info("step1:修改表结构——完成");
+
+        log.info("机构管理员合并");
+        PreparedStatement stat1 = null;
+        ResultSet rs = null;
+        try{
+            String institution_user_sql = "select * from t_institution_user ";
+            stat1 = con.prepareStatement(institution_user_sql);
+            rs = stat1.executeQuery();
+            while (rs.next()){
+                try {
+                    System.out.println("id  " + rs.getString("id"));
+                    System.out.println("institution_name  " + rs.getString("institution_name"));
+                    System.out.println("institution_no  " + rs.getString("institution_no"));
+                    System.out.println("password  " + rs.getString("password"));
+                    System.out.println("gender  " + rs.getString("gender"));
+                    System.out.println("pet_name  " + rs.getString("pet_name"));
+                    System.out.println("phone  " + rs.getString("phone"));
+                    System.out.println("birthday" + rs.getString("birthday"));
+                    System.out.println("profession" + rs.getString("profession"));
+                    System.out.println("addition_info" + rs.getString("addition_info"));
+                    System.out.println("user_status" + rs.getString("user_status"));
+
+                    String insertSql = "INSERT INTO t_user_info (id, gender, password, pet_name, phone, birthday, profession, addition_info, institution_name, institution_no, user_status, g_id, model_phone, role_type) \r\n"
+                            + "VALUES \r\n"
+                            + "(?, ?, ?,?, ?, ?, ?,?, ?, ?, ?,?, ?, ?)\r\n";
+                    PreparedStatement statement = con.prepareStatement(insertSql);
+                    statement.setString(1, rs.getString("id"));
+                    statement.setString(2,  rs.getString("gender"));
+                    statement.setString(3, rs.getString("password"));
+                    statement.setString(4, rs.getString("pet_name"));
+                    statement.setString(5, rs.getString("phone"));
+                    statement.setString(6, rs.getString("birthday"));
+                    statement.setString(7, rs.getString("profession"));
+                    statement.setString(8, rs.getString("addition_info"));
+                    statement.setString(9, rs.getString("institution_name"));
+                    statement.setString(10, rs.getString("institution_no"));
+                    statement.setString(11, rs.getString("user_status"));
+                    statement.setString(12, "");
+                    statement.setString(13, "0");
+                    statement.setString(14, "2");
+
+                    int i = statement.executeUpdate();
+                    statement.close();
+                    System.out.println("---------"+i+"----------");
+                }catch (Exception e){
+                    System.out.println(rs.getString("institution_no")+"----------i---------"+rs.getString("phone"));
+                }
+
+            }
+        } catch (SQLException e) {
+            log.error("机构管理员合并——失败");
+            e.printStackTrace();
+        }finally {
+            if(rs != null){
+                rs.close();
+            }
+            if(stat1 != null ){
+                stat1.close();
+            }
+        }
+
+
+//        机构超级管理员
+        log.info("机构超级管理员合并");
+        PreparedStatement stat2  = null;
+        ResultSet rs2 = null;
+        try{
+            String sql = "select * from t_institution_info ";
+            stat2 = con.prepareStatement(sql);
+            rs2  = stat2.executeQuery();
+            while (rs2.next()){
+                try {
+                    System.out.println("id  " + rs2.getString("id"));
+                    System.out.println("institution_name  " + rs2.getString("institution_name"));
+                    System.out.println("institution_no  " + rs2.getString("institution_no"));
+                    System.out.println("password  " + rs2.getString("password"));
+                    System.out.println("login_name  " + rs2.getString("login_name"));
+                    String insertSql = "INSERT INTO t_user_info (id, gender, password, pet_name, phone, birthday, profession, addition_info, institution_name, institution_no, user_status, g_id, model_phone, role_type) \r\n"
+                            + "VALUES \r\n"
+                            + "(?, ?, ?,?, ?, ?, ?,?, ?, ?, ?,?, ?, ?)\r\n";
+                    PreparedStatement statement = con.prepareStatement(insertSql);
+                    statement.setString(1, rs2.getString("id"));
+                    statement.setString(2,  "0");
+                    statement.setString(3, rs2.getString("password"));
+                    statement.setString(4, rs2.getString("institution_name"));
+                    statement.setString(5, rs2.getString("login_name"));
+                    statement.setString(6, "");
+                    statement.setString(7, "");
+                    statement.setString(8, "");
+                    statement.setString(9, rs2.getString("institution_name"));
+                    statement.setString(10, rs2.getString("institution_no"));
+                    statement.setString(11, "2");
+                    statement.setString(12, "");
+                    statement.setString(13, "0");
+                    statement.setString(14, "3");
+
+                    int i = statement.executeUpdate();
+                    System.out.println();
+                    statement.close();
+                    System.out.println("----------i---------");
+                }catch (Exception e ){
+                    System.out.println(rs2.getString("institution_no")+"----------i---------"+rs2.getString("login_name"));
+                }
+
+            }
+        } catch (SQLException e) {
+            log.error("机构超级管理员合并失败");
+            e.printStackTrace();
+        }finally {
+            if(rs2 != null){
+                rs2.close();
+            }
+            if(stat2 != null){
+                stat2.close();
+            }
+        }
+        log.error("机构超级管理员合并完成");
+
+        Thread.sleep(1000);
+        log.error("用户合并完成");
+
+    }
+}

+ 1228 - 0
src/main/java/com/rf/youth/utils/DateUtil.java

@@ -0,0 +1,1228 @@
+package com.rf.youth.utils;
+
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+public class DateUtil {
+	/**
+	 * 默认的日期格式组合,用来将字符串转化为日期用
+	 * 
+	 */
+	public static final String[] DATE_PARSE_PATTERNS = { "yyyy/MM/dd",
+			"yyyy-MM-dd", "yyyy年MM月dd日" };
+	/**
+	 * 获取当前系统时间格式
+	 * 
+	 */
+	public static final String DEFAULT_DATE = "yyyy-MM-dd HH:mm:ss";
+	/**
+	 * 特殊日期格式
+	 */
+	public static final String DEFAULT_DATE_T = "yyyy-MM-dd:HH:mm";
+	
+	/**
+	 * 特殊日期格式2
+	 */
+	public static final String DEFAULT_DATE_T2 = "yyyy-MM-dd HH:mm";
+	/**
+	 * 默认的时间格式
+	 */
+	public static final String DEFAULT_TIME_PATTERN = "HH:mm:ss";
+
+	/**
+	 * 默认的日期格式
+	 */
+	public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd";
+	
+	/**
+	 * 获取当前系统时间格式
+	 * 用于生成文件名
+	 */
+	public static final String DEFAULT_FILE_DATE = "yyyyMMddHHmmss";
+	
+
+	/**
+	 * 日期代码,周日
+	 */
+	public static final int SUNDAY = 1;
+
+	/**
+	 * 日期代码,周一
+	 */
+	public static final int MONDAY = 2;
+
+	/**
+	 * 日期代码,周二
+	 */
+	public static final int TUESDAY = 3;
+
+	/**
+	 * 日期代码,周三
+	 */
+	public static final int WEDNESDAY = 4;
+
+	/**
+	 * 日期代码,周四
+	 */
+	public static final int THURSDAY = 5;
+
+	/**
+	 * 日期代码,周五
+	 */
+	public static final int FRIDAY = 6;
+
+	/**
+	 * 日期代码,周六
+	 */
+	public static final int SATURDAY = 7;
+
+	/**
+	 * 日期精度,秒
+	 */
+	public static final int ACCURACY_SECOND = 1;
+
+	/**
+	 * 日期精度,分
+	 */
+	public static final int ACCURACY_MINUTE = 2;
+
+	/**
+	 * 日期精度,小时
+	 */
+	public static final int ACCURACY_HOUR = 3;
+
+	/**
+	 * 日期精度,天
+	 */
+	public static final int ACCURACY_DAY = 4;
+
+	/**
+	 * 日期精度,月
+	 */
+	public static final int ACCURACY_MONTH = 5;
+
+	/**
+	 * 日期精度,年
+	 */
+	public static final int ACCURACY_YEAR = 6;
+
+	/**
+	 * 比较用日期格式,精度为年
+	 */
+	public static final String ACCURACY_PATTERN_YEAR = "yyyy";
+
+	/**
+	 * 比较用日期格式,精度为月
+	 */
+	public static final String ACCURACY_PATTERN_MONTH = "yyyyMM";
+
+	/**
+	 * 比较用日期格式,精度为日
+	 */
+	public static final String ACCURACY_PATTERN_DAY = "yyyyMMdd";
+
+	/**
+	 * 比较用日期格式,精度为时
+	 */
+	public static final String ACCURACY_PATTERN_HOUR = "yyyyMMddHH";
+
+	/**
+	 * 比较用日期格式,精度为分
+	 */
+	public static final String ACCURACY_PATTERN_MINUTE = "yyyyMMddHHmm";
+
+	/**
+	 * 比较用日期格式,精度为秒
+	 */
+	public static final String ACCURACY_PATTERN_SECOND = "yyyyMMddHHmmss";
+
+	/**
+	 * 单一属性格式,时
+	 */
+	public static final String SINGLE_YEAR = "yyyy";
+
+	/**
+	 * 单一属性格式,时
+	 */
+	public static final String SINGLE_MONTH = "M";
+
+	/**
+	 * 单一属性格式,时
+	 */
+	public static final String SINGLE_DAY = "d";
+
+	/**
+	 * 单一属性格式,时
+	 */
+	public static final String SINGLE_HOUR = "H";
+
+	/**
+	 * 单一属性格式,分
+	 */
+	public static final String SINGLE_MINUTE = "m";
+
+	/**
+	 * 单一属性格式,秒
+	 */
+	public static final String SINGLE_SECOND = "s";
+
+	/**
+     * 
+     */
+	public static final long MILLISECONDS_PER_SECOND = 1000;
+
+	/**
+     * 
+     */
+	public static final long MILLISECONDS_PER_MINUTE = 1000 * 60;
+
+	/**
+     * 
+     */
+	public static final long MILLISECONDS_PER_HOUR = 1000 * 60 * 60;
+
+	/**
+     * 
+     */
+	public static final long MILLISECONDS_PER_DAY = 1000 * 60 * 60 * 24;
+
+	/**
+	 * 将给定的日期字符串,按照预定的日期格式,转化为Date型数据
+	 * 
+	 * @param dateStr
+	 *            日期字符字符串
+	 * @return 日期型结果
+	 */
+	public static Date parseDate(String dateStr) {
+		Date date = null;
+		try {
+			date = org.apache.commons.lang.time.DateUtils.parseDate(dateStr,
+					DATE_PARSE_PATTERNS);
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return date;
+	}
+	
+	/**
+	 * 根据指定格式转化String型日期到Date型
+	 * 
+	 * @param dateStr
+	 *            String型日期
+	 * @param parsePattern
+	 *            指定的格式
+	 * @return Date型日期
+	 */
+	public static Date parseDate(String dateStr, String parsePattern) {
+		Date date = null;
+		try {
+			date = org.apache.commons.lang.time.DateUtils.parseDate(dateStr,
+					new String[] { parsePattern.toString() });
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return date;
+	}
+
+	/**
+	 * 返回系统当前时间(Date型)
+	 * 
+	 * @return 系统当前时间
+	 */
+	public static Date getCurrentDate() {
+		return new Date();
+	}
+
+	/**
+	 * 日期计算,日加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            天数增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addDays(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addDays(date, amount);
+	}
+
+	/**
+	 * 日期计算,周加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            周数增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addWeeks(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addWeeks(date, amount);
+	}
+
+	/**
+	 * 日期计算,月加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            月数增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addMonths(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addMonths(date, amount);
+	}
+
+	/**
+	 * 日期计算,年加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            年数增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addYears(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addYears(date, amount);
+	}
+
+	/**
+	 * 日期计算,小时加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            小时增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addHours(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addHours(date, amount);
+	}
+
+	/**
+	 * 日期计算,分钟加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            分钟增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addMinutes(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addMinutes(date, amount);
+	}
+
+	/**
+	 * 日期计算,秒加减
+	 * 
+	 * @param date
+	 *            初始日期
+	 * @param amount
+	 *            秒增量(负数为减)
+	 * @return 计算后的日期
+	 */
+	public static Date addSeconds(Date date, int amount) {
+		return org.apache.commons.lang.time.DateUtils.addSeconds(date, amount);
+	}
+
+	/**
+	 * 根据指定格式,返回日期时间字符串
+	 * 
+	 * @param date
+	 *            日期变量
+	 * @param pattern
+	 *            日期格式
+	 * @return 日期时间字符串
+	 */
+	public static String getDateStr(Date date, String pattern) {
+		DateFormat df = new SimpleDateFormat(pattern);
+		return df.format(date);
+	}
+
+	/**
+	 * 输出时间String(默认格式)
+	 * 
+	 * @param date
+	 *            日期
+	 * @return 默认格式化的日期
+	 */
+	public static String getTimeStr(Date date) {
+		return getDateStr(date, DEFAULT_TIME_PATTERN);
+	}
+
+	/**
+	 * 取指定日期所在月的第一天的日期
+	 * 
+	 * @param date
+	 *            指定的日期
+	 * @return 指定日期所在月的第一天
+	 */
+	public static Date getFirstDayOfMonth(Date date) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.DATE, 1);
+		return cal.getTime();
+	}
+
+	/**
+	 * 取指定日期所在月的最后一天的日期
+	 * 
+	 * @param date
+	 *            指定的日期
+	 * @return 指定日期所在月的最后一天
+	 */
+	public static Date getLastDayOfMonth(Date date) {
+		Date nextMonth = addMonths(date, 1);
+		Date firstDayOfNextMonth = getFirstDayOfMonth(nextMonth);
+		return addDays(firstDayOfNextMonth, -1);
+	}
+
+	/**
+	 * 取指定日期所在年的第一天的日期
+	 * 
+	 * @param date
+	 *            指定的日期
+	 * @return 指定日期所在年的第一天
+	 */
+	public static Date getFirstDayOfYear(Date date) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.DATE, 1);
+		cal.set(Calendar.MONTH, 0);
+		return cal.getTime();
+	}
+
+	/**
+	 * 取指定日期所在年的最后一天的日期
+	 * 
+	 * @param date
+	 *            指定的日期
+	 * @return 指定日期所在月的最后一天
+	 */
+	public static Date getLastDayOfYear(Date date) {
+		Date nextMonth = addYears(date, 1);
+		Date firstDayOfNextYear = getFirstDayOfYear(nextMonth);
+		return addDays(firstDayOfNextYear, -1);
+	}
+
+	/**
+	 * 取指定日期所在周的指定天的日期
+	 * 
+	 * @param date
+	 *            指定的日期
+	 * @param day
+	 *            指定的天(星期几)
+	 * @param firstDay
+	 *            一星期的起始天
+	 * @return 指定周星期日的日期
+	 */
+	public static Date getDayInWeek(Date date, int day, int firstDay) {
+		Calendar cal = getCalendar(date);
+		cal.setFirstDayOfWeek(firstDay);
+		cal.set(Calendar.DAY_OF_WEEK, day);
+		return cal.getTime();
+	}
+
+	/**
+	 * 根据Date型的日期,取Calendar型的日期
+	 * 
+	 * @param date
+	 *            Date型的日期
+	 * @return Calendar型的日期
+	 */
+	public static Calendar getCalendar(Date date) {
+		Calendar cal = Calendar.getInstance();
+		cal.setTime(date);
+		return cal;
+	}
+
+	/**
+	 * 日期比较(精确到天),date1晚于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @return date1晚于date2,返回true,否则返回false
+	 */
+	public static boolean later(Date date1, Date date2) {
+		boolean result = false;
+		if (1 == compare(date1, date2, ACCURACY_DAY)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 日期比较(精确到天),date1早于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @return date1早于date2,返回true,否则返回false
+	 */
+	public static boolean earlier(Date date1, Date date2) {
+		boolean result = false;
+		if (-1 == compare(date1, date2, ACCURACY_DAY)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 日期比较(精确到天),date1等于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @return date1等于date2,返回true,否则返回false
+	 */
+	public static boolean equal(Date date1, Date date2) {
+		boolean result = false;
+		if (0 == compare(date1, date2, ACCURACY_DAY)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 根据指定规则比较日期,date1晚于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @param accuracy
+	 *            日期精度
+	 * @return date1晚于date2,返回true,否则返回false
+	 */
+	public static boolean later(Date date1, Date date2, int accuracy) {
+		boolean result = false;
+		if (1 == compare(date1, date2, accuracy)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 根据指定规则比较日期,date1早于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @param accuracy
+	 *            日期精度
+	 * @return date1早于date2,返回true,否则返回false
+	 */
+	public static boolean earlier(Date date1, Date date2, int accuracy) {
+		boolean result = false;
+		if (-1 == compare(date1, date2, accuracy)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 根据指定规则比较日期,date1等于date2
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @param accuracy
+	 *            日期精度
+	 * @return date1等于date2,返回true,否则返回false
+	 */
+	public static boolean equal(Date date1, Date date2, int accuracy) {
+		boolean result = false;
+		if (0 == compare(date1, date2, accuracy)) {
+			result = true;
+		}
+		return result;
+	}
+
+	/**
+	 * 根据指定规则,比较日期
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @param accuracy
+	 *            日期精度
+	 * @return int型,date1晚,返回1;date1早,返回-1;相等,返回0
+	 */
+	public static int compare(Date date1, Date date2, int accuracy) {
+		String pattern = DEFAULT_DATE_PATTERN;
+		switch (accuracy) {
+		case ACCURACY_YEAR:
+			pattern = ACCURACY_PATTERN_YEAR;
+			break;
+		case ACCURACY_MONTH:
+			pattern = ACCURACY_PATTERN_MONTH;
+			break;
+		case ACCURACY_DAY:
+			pattern = ACCURACY_PATTERN_DAY;
+			break;
+		case ACCURACY_HOUR:
+			pattern = ACCURACY_PATTERN_HOUR;
+			break;
+		case ACCURACY_MINUTE:
+			pattern = ACCURACY_PATTERN_MINUTE;
+			break;
+		case ACCURACY_SECOND:
+			pattern = ACCURACY_PATTERN_SECOND;
+			break;
+		default:
+			break;
+		}
+		Date formatedDate1 = transDateFormat(date1, pattern);
+		Date formatedDate2 = transDateFormat(date2, pattern);
+		return formatedDate1.compareTo(formatedDate2);
+	}
+	/**
+	 * 根据指定规则,比较日期
+	 * 
+	 * @param date1
+	 *            日期1
+	 * @param date2
+	 *            日期2
+	 * @param accuracy
+	 *            日期精度
+	 * @return int型,date1晚,返回1;date1早,返回-1;相等,返回0
+	 * @throws ParseException 
+	 */
+	public static int compare(String date1, String date2, int accuracy) throws ParseException {
+		String pattern = DEFAULT_DATE_PATTERN;
+		switch (accuracy) {
+		case ACCURACY_YEAR:
+			pattern = ACCURACY_PATTERN_YEAR;
+			break;
+		case ACCURACY_MONTH:
+			pattern = ACCURACY_PATTERN_MONTH;
+			break;
+		case ACCURACY_DAY:
+			pattern = ACCURACY_PATTERN_DAY;
+			break;
+		case ACCURACY_HOUR:
+			pattern = ACCURACY_PATTERN_HOUR;
+			break;
+		case ACCURACY_MINUTE:
+			pattern = ACCURACY_PATTERN_MINUTE;
+			break;
+		case ACCURACY_SECOND:
+			pattern = ACCURACY_PATTERN_SECOND;
+			break;
+		default:
+			break;
+		}
+		SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_DATE);
+		Date formatedDate1 = transDateFormat(sdf.parse(date1), pattern);
+		Date formatedDate2 = transDateFormat(sdf.parse(date2), pattern);
+		return formatedDate1.compareTo(formatedDate2);
+	}
+	/**
+	 * 根据指定规则,转化日期,如只取年、取年月等
+	 * 
+	 * @param date
+	 *            待转化日期
+	 * @param pattern
+	 *            日期格式
+	 * @return 转化后的日期
+	 */
+	public static Date transDateFormat(Date date, String pattern) {
+		String dateStr = getDateStr(date, pattern);
+		return parseDate(dateStr, pattern);
+	}
+
+	/**
+	 * 返回时定时间的年
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的年
+	 */
+	public static String getYear(Date date) {
+		return getDateStr(date, SINGLE_YEAR);
+	}
+
+	/**
+	 * 返回时定时间的月
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的月
+	 */
+	public static String getMonth(Date date) {
+		return getDateStr(date, SINGLE_MONTH);
+	}
+
+	/**
+	 * 返回时定时间的日
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的日
+	 */
+	public static String getDay(Date date) {
+		return getDateStr(date, SINGLE_DAY);
+	}
+
+	/**
+	 * 返回时定时间的小时
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的小时
+	 */
+	public static String getHour(Date date) {
+		return getDateStr(date, SINGLE_HOUR);
+	}
+
+	/**
+	 * 返回时定时间的分
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的分
+	 */
+	public static String getMinute(Date date) {
+		return getDateStr(date, SINGLE_MINUTE);
+	}
+
+	/**
+	 * 返回时定时间的秒
+	 * 
+	 * @param date
+	 *            日期
+	 * @return String型的秒
+	 */
+	public static String getSecond(Date date) {
+		return getDateStr(date, SINGLE_SECOND);
+	}
+
+	/**
+	 * 将时间日期变量的年份变为指定年, 如果日期不存在,则向后一天,如20102月
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定年
+	 * @return 修改后的日期变量
+	 */
+	public static Date setYear(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.YEAR, amount);
+		return cal.getTime();
+	}
+
+	/**
+	 * 将时间日期变量的月份变为指定月
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定月
+	 * @return 修改后的日期变量
+	 */
+	public static Date setMonth(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.MONTH, amount - 1);
+		return cal.getTime();
+	}
+
+	/**
+	 * 将时间日期变量的年份变为指定日
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定日
+	 * @return 修改后的日期变量
+	 */
+	public static Date setDay(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.DAY_OF_MONTH, amount);
+		return cal.getTime();
+	}
+
+	/**
+	 * 将时间日期变量的小时变为指定时
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定时
+	 * @return 修改后的日期变量
+	 */
+	public static Date setHour(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.HOUR_OF_DAY, amount);
+		return cal.getTime();
+	}
+
+	/**
+	 * 将时间日期变量的分钟变为指定分
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定分
+	 * @return 修改后的日期变量
+	 */
+	public static Date setMinute(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.MINUTE, amount);
+		return cal.getTime();
+	}
+
+	/**
+	 * 将时间日期变量的秒变为指定秒
+	 * 
+	 * @param date
+	 *            日期时间变量
+	 * @param amount
+	 *            指定秒
+	 * @return 修改后的日期变量
+	 */
+	public static Date setSecond(Date date, int amount) {
+		Calendar cal = getCalendar(date);
+		cal.set(Calendar.SECOND, amount);
+		return cal.getTime();
+	}
+
+	/**
+	 * 根据制定单位,计算两个日期之间的天数差
+	 * 
+	 * @param a
+	 *            时间点1
+	 * @param b
+	 *            时间点2
+	 * @return 时间差
+	 */
+	public static int getDateDistance(Date a, Date b) {
+		return getDateDistance(a, b, ACCURACY_DAY);
+	}
+
+	/**
+	 * 根据制定单位,计算两个日期之间的差
+	 * 
+	 * @param a
+	 *            时间点1
+	 * @param b
+	 *            时间点2
+	 * @param unit
+	 *            时间单位
+	 * @return 时间差
+	 */
+	public static int getDateDistance(Date a, Date b, int unit) {
+		int result = 0;
+		if (null != a && null != b) {
+			String pattern = null;
+			switch (unit) {
+			case ACCURACY_HOUR: // '\003'
+				pattern = "yyyyMMddHH";
+				break;
+			case ACCURACY_MINUTE: // '\002'
+				pattern = "yyyyMMddHHmm";
+				break;
+			case ACCURACY_SECOND: // '\001'
+				pattern = "yyyyMMddHHmmss";
+				break;
+			default:
+				pattern = "yyyyMMdd";
+			}
+			Date startDate = transDateFormat(1 != a.compareTo(b) ? a : b,
+					pattern);
+			Date endDate = transDateFormat(1 != a.compareTo(b) ? b : a, pattern);
+			if (1 <= unit && 4 >= unit) {
+				result = getDistanceByUnit(startDate, endDate, unit);
+				return result;
+			}
+			GregorianCalendar startCalendar = new GregorianCalendar();
+			startCalendar.setTime(startDate);
+			int startYears = startCalendar.get(Calendar.YEAR);
+			int startMonths = startCalendar.get(Calendar.MONTH);
+			int startDays = startCalendar.get(Calendar.DAY_OF_MONTH);
+
+			GregorianCalendar endCalendar = new GregorianCalendar();
+			endCalendar.setTime(endDate);
+			int endYears = endCalendar.get(Calendar.YEAR);
+			int endMonths = endCalendar.get(Calendar.MONTH);
+			int endDays = endCalendar.get(Calendar.DAY_OF_MONTH);
+
+			int yearBetween = endYears - startYears;
+			int monthBetween = endMonths - startMonths;
+			if (endDays < startDays
+					&& endDays != endCalendar.getActualMaximum(Calendar.DATE)) {
+				monthBetween--;
+			}
+			if (ACCURACY_YEAR == unit) {
+				if (monthBetween < 0) {
+					yearBetween--;
+				}
+				result = yearBetween;
+			}
+			if (ACCURACY_MONTH == unit) {
+				result = (yearBetween * 12 + monthBetween);
+			}
+		}
+		return result;
+
+	}
+
+	/**
+	 * 内部方法,计算时间点的差距
+	 * 
+	 * @param startDate
+	 *            起始时间
+	 * @param endDate
+	 *            终止时间
+	 * @param unit
+	 *            时间单位
+	 * @return 时间差
+	 */
+	public static int getDistanceByUnit(Date startDate, Date endDate, int unit) {
+		int result = 0;
+		long millisecondPerUnit = MILLISECONDS_PER_DAY;
+		switch (unit) {
+		case ACCURACY_HOUR:
+			millisecondPerUnit = MILLISECONDS_PER_HOUR;
+			break;
+		case ACCURACY_MINUTE:
+			millisecondPerUnit = MILLISECONDS_PER_MINUTE;
+			break;
+		case ACCURACY_SECOND:
+			millisecondPerUnit = MILLISECONDS_PER_SECOND;
+			break;
+		default:
+			break;
+		}
+		long start = startDate.getTime();
+		long end = endDate.getTime();
+		long distance = end - start;
+		result = Integer.valueOf((distance / millisecondPerUnit) + "");
+		return result;
+	}
+	
+	/**
+	 * 内部方法,计算时间点的差距toLong
+	 * 
+	 * @param startDate
+	 *            起始时间
+	 * @param endDate
+	 *            终止时间
+	 * @param unit
+	 *            时间单位
+	 * @return 时间差
+	 */
+	public static long getDistanceByUnit_toLong(Date startDate, Date endDate, int unit) {
+		long result = 0;
+		long millisecondPerUnit = MILLISECONDS_PER_DAY;
+		switch (unit) {
+		case ACCURACY_HOUR:
+			millisecondPerUnit = MILLISECONDS_PER_HOUR;
+			break;
+		case ACCURACY_MINUTE:
+			millisecondPerUnit = MILLISECONDS_PER_MINUTE;
+			break;
+		case ACCURACY_SECOND:
+			millisecondPerUnit = MILLISECONDS_PER_SECOND;
+			break;
+		default:
+			break;
+		}
+		long start = startDate.getTime();
+		long end = endDate.getTime();
+		long distance = end - start;
+		result = distance / millisecondPerUnit;
+		return result;
+	}
+	
+	 
+
+	/**
+	 * 返回指定日期是当年的第几周
+	 * 
+	 * @param date
+	 *            指定日期
+	 * @return 周数(从1开始)
+	 */
+	public static int getWeekOfYear(Date date) {
+		return getCalendar(date).get(Calendar.WEEK_OF_YEAR);
+	}
+
+	/**
+	 * 获取指定日期是星期几
+	 * 
+	 * @param date
+	 *            指定日期
+	 * @return 星期日--1; 星期一--2; 星期二--3; 星期三--4; 星期四--5; 星期五--6; 星期六--7;
+	 */
+	public static int getWeekOfDate(Date date) {
+		return getCalendar(date).get(Calendar.DAY_OF_WEEK);
+	}
+
+	/**
+	 * 判断指定年份日期的年份是否为闰年
+	 * 
+	 * @param date
+	 *            日期
+	 * @return 闰年ture,非闰年false
+	 */
+	public static boolean isLeapYear(Date date) {
+		int year = getCalendar(date).get(Calendar.YEAR);
+		return isLeapYear(year);
+	}
+
+	/**
+	 * 判断指定年份日期的年份是否为闰年
+	 * 
+	 * @param year
+	 *            年份数字
+	 * @return 闰年ture,非闰年false
+	 */
+	public static boolean isLeapYear(int year) {
+		if ((year % 400) == 0) {
+			return true;
+		} else if ((year % 4) == 0) {
+			if ((year % 100) == 0) {
+				return false;
+			} else {
+				return true;
+			}
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * 按照strFormat格式输出当前时间
+	 * 
+	 * @param strFormat
+	 *            格式
+	 * @return 指定格式的当前系统日期
+	 */
+	public static String getCurrentDate(String strFormat) {
+		return getDateStr(getCurrentDate(), strFormat);
+	}
+
+	/**
+	 * 校验日期数据(校验输入值是否为指定的日期格式)
+	 * 
+	 * @param strDate
+	 *            要校验的日期
+	 * @param strFormat
+	 *            日期格式
+	 * @return true/false (符合/不符合)
+	 */
+	public static boolean checkDate(String strDate, String strFormat) {
+		Date date = null;
+		if ((strDate != null) && (strDate.trim().length() != 0)) {
+			DateFormat myDateFmt = new SimpleDateFormat(strFormat);
+			try {
+				date = myDateFmt.parse(strDate);
+
+				if (!strDate.equals(myDateFmt.format(date))) {
+					date = null;
+					return false;
+				}
+			} catch (ParseException e) {
+				date = null;
+				return false;
+			}
+		}
+		return true;
+	}
+	/**
+	 * 
+	 * @Description:获取当期系统日期以特定格式显示
+	 * @param 
+	 * @return 格式为"yyyy-MM-dd HH:mm:ss"的时间
+	 * @throws 
+	 * @author baolf
+	 * @date 2016-7-25
+	 */
+	public static String getNowTime(){
+		Date now = new Date();
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_DATE);
+		String date = sd.format(now);
+		return date;
+	}
+	/**
+	 * 
+	 * @Description:获取当期系统两小时后时间   以特定格式显示
+	 * @param 
+	 * @return 格式为"yyyy-MM-dd HH:mm:ss"的时间
+	 * @throws 
+	 * @author wwq
+	 * @date 2018-08-13
+	 */
+	public static String get2HoursLater(){
+		Date twoHours = new Date(System.currentTimeMillis()+120 * 60 * 1000);
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_DATE);
+		String date = sd.format(twoHours);
+		return date;
+	}
+	/**
+	 * 
+	 * @Description:获取当期系统日期以特定格式显示
+	 * @param 
+	 * @return 格式为"yyyy-MM-dd"的时间
+	 * @throws 
+	 * @author
+	 * @date 2016-7-25
+	 */
+	public static String getNowTime1(){
+		Date now = new Date();
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_DATE_PATTERN);
+		String date = sd.format(now);
+		return date;
+	}
+	
+	/**
+	 * 自定义时间格式
+	 * @param strFormat
+	 * @return
+	 */
+	public static String getNowTime(String strFormat){
+		Date now = new Date();
+		SimpleDateFormat sd = new SimpleDateFormat(strFormat);
+		String date = sd.format(now);
+		return date;
+	}
+	
+    /**
+     * 时间串,没有分割符
+     * 用于自动生成文件名用
+     * @return
+     */
+	public static synchronized String getFileNameNowTime(){
+		Date now = new Date();
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_FILE_DATE);
+		String date = sd.format(now);
+		return date;
+	}
+	
+	/**
+	 * 获得几位随机数(正数)
+	 * @param num
+	 * @return
+	 */
+	public static String getRandom(int num)
+	{
+		StringBuffer format = new StringBuffer("0.0");
+		for(int ii=2;ii<=num;ii++)
+		{
+			format.append("0");
+		}
+		DecimalFormat df = new DecimalFormat(format.toString());
+		return df.format(Math.random()).replace("0.","");
+		
+	}
+	public static String getReleaseBatch(){
+		Date now = new Date();
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_DATE_PATTERN);
+		String date = sd.format(now);
+		date = date.replace("-", "");
+		return date;
+	}
+//	public static void main(String[] args) {
+//	}
+	public static String getBeforeNowTime(){
+		long time = 1*60*1000+10000;//1分钟
+		Date now = new Date(new Date().getTime()-time);
+		SimpleDateFormat sd = new SimpleDateFormat(DEFAULT_DATE);
+		String date = sd.format(now);
+		return date;
+	}
+	/**
+	 * 获取秒数  (1970-01-01 08:00:00)
+	 * @Description :
+	 * @param : 
+	 * @throws : 
+	 * @author :
+	 */
+	public static  int getDateInt(String date)
+	{		
+		return getDistanceByUnit( 
+				   parseDate("1970-01-01 08:00:00", DEFAULT_DATE),
+				   parseDate(date, DEFAULT_DATE),1) ;
+	}
+	/**
+	 * 判断字符串是否不为空 空返回false 非空返回true
+	 *
+	 * @param sourceStr
+	 * @return
+	 */
+	public static boolean isNotEmpty(String sourceStr) {
+
+		if (sourceStr == null) {
+			return false;
+		}
+		if (sourceStr.trim().length() > 0) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 统计两个时间的时间差
+	 * 相差几秒几毫秒
+	 */
+	public static String getDistanceTime(String str1, String str2) {
+		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
+		Date one;
+		Date two;
+		long day = 0;//天数差
+		long hour = 0;//小时数差
+		long min = 0;//分钟数差
+		long second=0;//秒数差
+		long diff=0 ;//毫秒差
+		String result = null;
+		try {
+			final Calendar c = Calendar.getInstance();
+			c.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
+			one = df.parse(str1);
+			c.setTime(one);
+			two = df.parse(str2);
+			long time1 = one.getTime();
+			long time2 = two.getTime();
+			diff = time2 - time1;
+			day = diff / (24 * 60 * 60 * 1000);
+			hour = (diff / (60 * 60 * 1000) - day * 24);
+			min = ((diff / (60 * 1000)) - day * 24 * 60 - hour * 60);
+			second = diff/1000;
+			//System.out.println("day="+day+" hour="+hour+" min="+min+" ss="+second%60+" SSS="+diff%1000);
+			result=second%60+"秒"+diff%1000+"毫秒";
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return String.valueOf(diff);
+	}
+
+	/*public static void main(String[] args) {
+		//开始时间
+		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
+		String beginTime = df.format(new Date());
+		String endTime = df.format(new Date());
+		System.out.println("时间差:"+getDistanceTime(beginTime,endTime));
+	}*/
+
+	/*
+	 * 将yyyyMMddHHmmss格式的数据装换成yyyy-MM-dd:HH:mm格式的数据
+	 * */
+	public static String formatDate(String dateStr) throws NullPointerException {
+		//
+		StringBuffer dateBuffer = new StringBuffer();
+		return dateBuffer.append(dateStr.substring(0, 4)).append("-").append(dateStr.substring(4, 6)).append("-").append(dateStr.substring(6, 8))
+				.append(" ").append(dateStr.substring(8, 10)).append(":").append(dateStr.substring(10, 12)).append(":").append(dateStr.substring(12, 14)).toString();
+	}
+	
+}

+ 786 - 0
src/main/java/com/rf/youth/utils/ExcelUtil.java

@@ -0,0 +1,786 @@
+package com.rf.youth.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rf.youth.file.excel.ExcelBean;
+import jodd.util.StringUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.*;
+
+import java.beans.PropertyDescriptor;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zzf
+ * @description:Excel 导出工具了哦
+ * @date 2021/1/27 9:18
+ */
+public class ExcelUtil {
+
+    /**
+     * excel 版本
+     **/
+    private final static String excel2003L = ".xls";
+    private final static String excel2007U = ".xlsx";
+
+    /**
+     * Excel导入
+     */
+    public static List<List<Object>> getBankListByExcel(InputStream in, String fileName) throws Exception {
+        List<List<Object>> list = null;
+        //创建Excel工作薄
+        Workbook work = getWorkbook(in, fileName);
+        if (null == work) {
+            throw new Exception("创建Excel工作薄为空!");
+        }
+        Sheet sheet = null;
+        Row row = null;
+        Cell cell = null;
+        list = new ArrayList<List<Object>>();
+        //遍历Excel中所有的sheet
+        System.out.println("work.getNumberOfSheets():" + work.getNumberOfSheets());
+        for (int i = 0; i < work.getNumberOfSheets() - 1; i++) {
+            sheet = work.getSheetAt(i);
+            if (sheet == null) {
+                continue;
+            }
+            int sheetSize = 0;
+            //遍历当前sheet中的所有行
+            //包涵头部,所以要小于等于最后一列数,这里也可以在初始值加上头部行数,以便跳过头部
+            for (int j = sheet.getFirstRowNum(); j <= sheet.getLastRowNum(); j++) {
+                //读取一行
+                row = sheet.getRow(j);
+                //去掉空行和表头
+                if (row.getFirstCellNum() == j) {
+                    sheetSize = row.getLastCellNum();
+                }
+                if (row == null || row.getFirstCellNum() == j) {
+                    continue;
+                }
+                //遍历所有的列
+                List<Object> li = new ArrayList<Object>();
+                for (int y = row.getFirstCellNum(); y < sheetSize; y++) {
+                    cell = row.getCell(y);
+                    li.add(cell != null ? getCellValue(cell) : null);
+                }
+                list.add(li);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * Excel分sheet导入
+     */
+    public static List<List<List<Object>>> getBankListByExcelSheet(InputStream in, String fileName) throws Exception {
+        List<List<List<Object>>> list = null;
+        //创建Excel工作薄
+        Workbook work = getWorkbook(in, fileName);
+        if (null == work) {
+            throw new Exception("创建Excel工作薄为空!");
+        }
+        Sheet sheet = null;
+        Row row = null;
+        Cell cell = null;
+        list = new ArrayList<List<List<Object>>>();
+        //遍历Excel中所有的sheet
+        for (int i = 0; i < work.getNumberOfSheets() - 1; i++) {
+            List<List<Object>> sheets = new ArrayList<List<Object>>();
+            sheet = work.getSheetAt(i);
+            if (sheet == null) {
+                continue;
+            }
+            int sheetSize = 0;
+            //遍历当前sheet中的所有行
+            //包涵头部,所以要小于等于最后一列数,这里也可以在初始值加上头部行数,以便跳过头部
+            for (int j = sheet.getFirstRowNum(); j <= sheet.getLastRowNum(); j++) {
+                //读取一行
+                row = sheet.getRow(j);
+                //去掉空行和表头
+                if (row == null || row.getFirstCellNum() == j) {
+                    continue;
+                }
+                if (isAllRowEmpty(row, sheet.getRow(0))) {
+                    continue;
+                }
+                sheetSize = row.getLastCellNum();
+                //遍历所有的列
+                List<Object> li = new ArrayList<Object>();
+                for (int y = row.getFirstCellNum(); y < sheetSize; y++) {
+                    cell = row.getCell(y);
+                    if (cell == null) {
+                        continue;
+                    }
+                    li.add(cell != null ? getCellValue(cell) : null);
+                }
+                sheets.add(li);
+            }
+            list.add(sheets);
+        }
+        return list;
+    }
+
+    /**
+     * 验证excel是否全部为空
+     *
+     * @param row      当前行
+     * @param firstRow 第一行标题行
+     * @return
+     */
+    public static boolean isAllRowEmpty(Row row, Row firstRow) {
+        int count = 0;
+        //单元格数量
+        int rowCount = firstRow.getLastCellNum() - firstRow.getFirstCellNum();
+        //判断多少个单元格为空
+        for (int c = 0; c < rowCount; c++) {
+            Cell cell = row.getCell(c);
+            if (cell == null || cell.getCellType() == Cell.CELL_TYPE_BLANK || StringUtil.isEmpty((cell + "").trim())) {
+                count += 1;
+            }
+        }
+
+        if (count == rowCount) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * 描述:根据文件后缀,自适应上传文件的版本
+     */
+    private static Workbook getWorkbook(InputStream inStr, String fileName) throws Exception {
+        Workbook wb = null;
+        String fileType = fileName.substring(fileName.lastIndexOf("."));
+        if (excel2003L.equals(fileType)) {
+            //2003-
+            wb = new HSSFWorkbook(inStr);
+        } else if (excel2007U.equals(fileType)) {
+            //2007+
+            wb = new XSSFWorkbook(inStr);
+        } else {
+            throw new Exception("解析的文件格式有误!");
+        }
+        return wb;
+    }
+
+    /**
+     * 描述:对表格中数值进行格式化
+     */
+    private static Object getCellValue(Cell cell) {
+        Object value = null;
+        //格式化字符类型的数字
+        DecimalFormat df = new DecimalFormat("0");
+        //日期格式化
+        SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd");
+        //格式化数字
+        DecimalFormat df2 = new DecimalFormat("0.00");
+        switch (cell.getCellType()) {
+
+            case Cell.CELL_TYPE_STRING:
+                value = cell.getRichStringCellValue().getString();
+                break;
+            case Cell.CELL_TYPE_NUMERIC:
+                if ("General".equals(cell.getCellStyle().getDataFormatString())) {
+                    value = df.format(cell.getNumericCellValue());
+                } else if ("m/d/yy".equals(cell.getCellStyle().getDataFormatString())) {
+                    value = sdf.format(cell.getDateCellValue());
+                } else {
+                    value = df2.format(cell.getNumericCellValue());
+                }
+                break;
+            case Cell.CELL_TYPE_BOOLEAN:
+                value = cell.getBooleanCellValue();
+                break;
+            case Cell.CELL_TYPE_BLANK:
+                value = "";
+                break;
+            case Cell.CELL_TYPE_FORMULA: //公式类型
+                try {
+                    if ("General".equals(cell.getCellStyle().getDataFormatString())) {
+                        value = df.format(cell.getNumericCellValue());
+                    } else if ("m/d/yy".equals(cell.getCellStyle().getDataFormatString())) {
+                        value = sdf.format(cell.getDateCellValue());
+                    } else {
+                        value = df2.format(cell.getNumericCellValue());
+                    }
+                } catch (IllegalStateException e) {
+                    value = String.valueOf(cell.getRichStringCellValue());
+                }
+                break;
+            default:
+                break;
+        }
+        return value;
+    }
+
+    /**
+     * @param clazz     数据类
+     * @param objs      导出数据列表
+     * @param resultMap 计算结果,各项得分
+     * @param map       表头
+     * @param fileName  文件名
+     * @param sheetName sheet页命
+     * @return
+     * @throws Exception
+     */
+    public static XSSFWorkbook createExcelFile(Class clazz, List objs, List<Map<String, String>> resultMap, Map<Integer, List<ExcelBean>> map, String fileName, String sheetName) throws Exception {
+        // 创建新的Excel工作簿
+        XSSFWorkbook workbook = new XSSFWorkbook();
+        // 在Excel工作簿中建一工作表,其名为缺省值, 也可以指定Sheet名称
+        XSSFSheet sheet = workbook.createSheet(sheetName);
+        // 以下为excel的字体样式以及excel的标题与内容的创建,下面会具体分析;
+        //字体样式
+        createFont(workbook);
+        //创建标题(头)
+        createTableHeader(sheet, map);
+        //创建内容
+        createTableRows(sheet, map, objs, resultMap, clazz);
+        String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
+//        File file = new File("./"+date+"/"+sheetName+"/"+fileName);
+//        if(!file.exists()){
+////            file.createNewFile();
+//            file.mkdirs();
+//        }
+        FileOutputStream fileOutputStream = null;
+        if (OSUtil.isLinux()) {
+            File file = new File("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName);
+            if (!file.exists()) {
+                //file.createNewFile();
+                file.mkdirs();
+            }
+            fileOutputStream = new FileOutputStream("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName + "/" + fileName);
+        } else {
+            File file = new File("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName);
+            if (!file.exists()) {
+                //file.createNewFile();
+                file.mkdirs();
+            }
+            fileOutputStream = new FileOutputStream("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName + "/" + fileName);
+        }
+//        FileOutputStream  fileOutputStream= new FileOutputStream("./"+date+"/"+sheetName+"/"+fileName);
+//        FileOutputStream  fileOutputStream= new FileOutputStream(file);
+        workbook.write(fileOutputStream);
+        fileOutputStream.close();
+        return workbook;
+    }
+
+    /**
+     * @param clazzs      数据类列表
+     * @param objs        三个情绪识别题目列表
+     * @param resultJson  三个情绪识别的答案
+     * @param tableHeader 三个情绪识别的表头
+     * @param fileName    文件名
+     * @param sheetName   sheet页
+     * @return
+     * @throws Exception
+     */
+    public static void createEALLExcelFile(List<Class> clazzs, Map<String, List> objs, JSONObject resultJson, List<Map<Integer, List<ExcelBean>>> tableHeader, String fileName, String sheetName) throws Exception {
+        // 创建新的Excel工作簿
+        XSSFWorkbook workbook = new XSSFWorkbook();
+        // 在Excel工作簿中建一工作表,其名为缺省值, 也可以指定Sheet名称
+        XSSFSheet sheet = workbook.createSheet(sheetName);
+        // 以下为excel的字体样式以及excel的标题与内容的创建,下面会具体分析;
+        //字体样式
+        createFont(workbook);
+        //创建内容
+        createEALLTableRows(sheet, objs, tableHeader, resultJson, clazzs);
+        FileOutputStream fileOutputStream = null;
+        if (OSUtil.isLinux()) {
+            File file = new File("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName);
+            if (!file.exists()) {
+                file.mkdirs();
+            }
+            fileOutputStream = new FileOutputStream("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName + "/" + fileName);
+        } else {
+            File file = new File("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName);
+            if (!file.exists()) {
+                file.mkdirs();
+            }
+            fileOutputStream = new FileOutputStream("./心理检测/检测结果/" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "/" + sheetName + "/" + fileName);
+        }
+        workbook.write(fileOutputStream);
+        fileOutputStream.close();
+        //return workbook;
+    }
+
+    private static void createEALLTableRows(XSSFSheet sheet, Map<String, List> objsMap, List<Map<Integer, List<ExcelBean>>> tableHeader, JSONObject resultJson, List<Class> clazzs) throws Exception {
+        int rowindex = 0;
+        for (int j = 0; j < tableHeader.size(); j++) {
+            Map<Integer, List<ExcelBean>> map = tableHeader.get(j);
+            Class clazz = clazzs.get(j);
+            List objs = null;
+            Map<String, String> resultMap = null;
+            if (j == 0) {
+                objs = objsMap.get("ECAT");
+                resultMap = (Map<String, String>) resultJson.get("ECAT");
+            } else if (j == 1) {
+                rowindex += 5;
+                objs = objsMap.get("EREC");
+                resultMap = (Map<String, String>) resultJson.get("EREC");
+            } else if (j == 2) {
+                rowindex += 5;
+                objs = objsMap.get("EMEM");
+                resultMap = (Map<String, String>) resultJson.get("EMEM");
+            }
+            //创建标题(头)
+            XSSFRow titleRow1 = sheet.createRow(rowindex);
+            for (Map.Entry<Integer, List<ExcelBean>> entry : map.entrySet()) {
+                List<ExcelBean> excels = entry.getValue();
+                for (int x = 0; x < excels.size(); x++) {
+                    XSSFCell cellTitle = titleRow1.createCell(x);
+                    cellTitle.setCellValue(excels.get(x).headTextName);
+                    cellTitle.setCellStyle(fontStyle);
+                }
+            }
+            rowindex++;
+            int maxKey = 0;
+            List<ExcelBean> ems = new ArrayList<>();
+            for (Map.Entry<Integer, List<ExcelBean>> entry : map.entrySet()) {
+                if (entry.getKey() > maxKey) {
+                    maxKey = entry.getKey();
+                }
+            }
+            ems = map.get(maxKey);
+            List<Integer> widths = new ArrayList<Integer>(ems.size());
+            //渲染答题记录
+            if (objs != null) {
+                for (Object obj : objs) {
+                    XSSFRow row = sheet.createRow(rowindex);
+                    for (int i = 0; i < ems.size(); i++) {
+                        ExcelBean em = (ExcelBean) ems.get(i);
+                        String propertyName = em.getPropertyName();
+                        PropertyDescriptor propertyDescriptor = new PropertyDescriptor(propertyName, clazz);
+                        Method method = propertyDescriptor.getReadMethod();
+                        Object rtn = method.invoke(obj);
+                        String value = "";
+                        // 如果是日期类型进行转换
+                        if (rtn != null) {
+                            if (rtn instanceof Date) {
+                                value = new SimpleDateFormat("yyyy-MM-dd").format(rtn);
+                            } else if (rtn instanceof BigDecimal) {
+                                NumberFormat nf = new DecimalFormat("#,##0.00");
+                                value = nf.format((BigDecimal) rtn).toString();
+                            } else if ((rtn instanceof Integer) && (Integer.valueOf(rtn.toString()) < 0)) {
+                                value = "--";
+                            } else {
+                                value = rtn.toString();
+
+                            }
+                        }
+                        XSSFCell cell = row.createCell(i);
+                        cell.setCellValue(value);
+                        cell.setCellType(XSSFCell.CELL_TYPE_STRING);
+                        cell.setCellStyle(fontStyle2);
+                        // 获得最大列宽
+                        int width = value.getBytes().length * 300;
+                        // 还未设置,设置当前
+                        if (widths.size() <= i) {
+                            widths.add(width);
+                            continue;
+                        }
+                        // 比原来大,更新数据
+                        if (width > widths.get(i)) {
+                            widths.set(i, width);
+                        }
+                    }
+                    rowindex++;
+                }
+            }
+            rowindex += 2;
+            if (resultMap != null && resultMap.size() > 0) {
+                //渲染最终各项得分
+                XSSFRow titleRow = sheet.createRow(rowindex);
+                rowindex += 1;
+                XSSFRow scoreRow = sheet.createRow(rowindex);
+                int i = 0;
+                if (resultMap.size() > 0) {
+                    for (Map.Entry<String, String> entry : resultMap.entrySet()) {
+                        XSSFCell cellTitle = titleRow.createCell(i);
+                        cellTitle.setCellValue(entry.getKey());
+                        cellTitle.setCellType(XSSFCell.CELL_TYPE_STRING);
+                        cellTitle.setCellStyle(fontStyle2);
+                        XSSFCell cellScore = scoreRow.createCell(i);
+                        cellScore.setCellValue(entry.getValue());
+                        cellScore.setCellType(XSSFCell.CELL_TYPE_STRING);
+                        cellScore.setCellStyle(fontStyle2);
+                        i++;
+                    }
+                }
+            }
+
+            // 设置列宽
+            for (int index = 0; index < widths.size(); index++) {
+                Integer width = widths.get(index);
+                width = width < 2500 ? 2500 : width + 300;
+                width = width > 10000 ? 10000 + 300 : width + 300;
+                sheet.setColumnWidth(index, width);
+            }
+        }
+
+    }
+
+    private static void createEALLTableHeader(XSSFSheet sheet, Map<Integer, List<ExcelBean>> map, int rowindex) {
+
+        ////cell起始位置
+        //int startIndex = 0;
+        ////cell终止位置
+        //int endIndex = 0;
+        //for (Map.Entry<Integer, List<ExcelBean>> entry : map.entrySet()) {
+        //    XSSFRow row = sheet.createRow(entry.getKey());
+        //    List<ExcelBean> excels = entry.getValue();
+        //    for (int x = 0; x < excels.size(); x++) {
+        //        //合并单元格
+        //        //if (excels.get(x).getCols() > 1) {
+        //        if (x == 0) {
+        //            endIndex += excels.get(x).getCols() - 1;
+        //            CellRangeAddress range = new CellRangeAddress(rowindex - 1, rowindex - 1, startIndex, endIndex);
+        //            sheet.addMergedRegion(range);
+        //        } else {
+        //            endIndex += excels.get(x).getCols();
+        //            CellRangeAddress range = new CellRangeAddress(rowindex - 1, rowindex - 1, startIndex, endIndex);
+        //            sheet.addMergedRegion(range);
+        //        }
+        //        startIndex += excels.get(x).getCols();
+        //        XSSFCell cell = row.createCell(startIndex - excels.get(x).getCols());
+        //        // 设置内容
+        //        cell.setCellValue(excels.get(x).getHeadTextName());
+        //        if (excels.get(x).getCellStyle() != null) {
+        //            // 设置格式
+        //            cell.setCellStyle(excels.get(x).getCellStyle());
+        //        }
+        //        cell.setCellStyle(fontStyle);
+        //        //} else {
+        //        //    XSSFCell cell = row.createCell(x);
+        //        //    // 设置内容
+        //        //    cell.setCellValue(excels.get(x).getHeadTextName());
+        //        //    if (excels.get(x).getCellStyle() != null) {
+        //        //        // 设置格式
+        //        //        cell.setCellStyle(excels.get(x).getCellStyle());
+        //        //    }
+        //        //    cell.setCellStyle(fontStyle);
+        //        //}
+        //    }
+        //}
+    }
+
+
+    /**
+     * @param clazz
+     * @param objs
+     * @param resultMap
+     * @param map
+     * @param fileName
+     * @return
+     * @throws Exception
+     */
+    public static XSSFWorkbook createExcelFileForPublic(Class clazz, List objs, List<Map<String, String>> resultMap, Map<Integer, List<ExcelBean>> map, String fileName, String filePath) throws Exception {
+        // 创建新的Excel工作簿
+        XSSFWorkbook workbook = new XSSFWorkbook();
+        // 在Excel工作簿中建一工作表,其名为缺省值, 也可以指定Sheet名称
+        XSSFSheet sheet = workbook.createSheet("用户信息");
+        // 以下为excel的字体样式以及excel的标题与内容的创建,下面会具体分析;
+        //字体样式
+        createFont(workbook);
+        //创建标题(头)
+        createTableHeader(sheet, map);
+        //创建内容
+        createTableRows(sheet, map, objs, resultMap, clazz);
+        String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
+        FileOutputStream fileOutputStream = null;
+        File file = new File(filePath);
+        if (!file.exists()) {
+            //file.createNewFile();
+            file.mkdirs();
+        }
+        fileOutputStream = new FileOutputStream(filePath + fileName);
+        workbook.write(fileOutputStream);
+        fileOutputStream.close();
+        return workbook;
+    }
+
+
+    private static XSSFCellStyle fontStyle;
+    private static XSSFCellStyle fontStyle2;
+
+    public static void createFont(XSSFWorkbook workbook) {
+        // 表头
+        fontStyle = workbook.createCellStyle();
+        XSSFFont font1 = workbook.createFont();
+        font1.setBold(true);
+        font1.setFontName("黑体");
+        // 设置字体大小
+        font1.setFontHeightInPoints((short) 14);
+        fontStyle.setFont(font1);
+        // 下边框
+        fontStyle.setBorderBottom(BorderStyle.THIN);
+        // 左边框
+        fontStyle.setBorderLeft(BorderStyle.THIN);
+        // 上边框
+        fontStyle.setBorderTop(BorderStyle.THIN);
+        // 右边框
+        fontStyle.setBorderRight(BorderStyle.THIN);
+        // 居中
+        fontStyle.setAlignment(HorizontalAlignment.CENTER);
+        // 内容
+        fontStyle2 = workbook.createCellStyle();
+        XSSFFont font2 = workbook.createFont();
+        font2.setFontName("宋体");
+        // 设置字体大小
+        font2.setFontHeightInPoints((short) 10);
+        fontStyle2.setFont(font2);
+        // 下边框
+        fontStyle2.setBorderBottom(BorderStyle.THIN);
+        // 左边框
+        fontStyle2.setBorderLeft(BorderStyle.THIN);
+        // 上边框
+        fontStyle2.setBorderTop(BorderStyle.THIN);
+        // 右边框
+        fontStyle2.setBorderRight(BorderStyle.THIN);
+        // 居中
+        fontStyle2.setAlignment(HorizontalAlignment.CENTER);
+    }
+
+    /**
+     * 根据ExcelMapping 生成列头(多行列头)
+     *
+     * @param sheet 工作簿
+     * @param map   每行每个单元格对应的列头信息
+     */
+    private static final void createTableHeader(XSSFSheet sheet, Map<Integer, List<ExcelBean>> map) {
+        //cell起始位置
+        int startIndex = 0;
+        //cell终止位置
+        int endIndex = 0;
+        for (Map.Entry<Integer, List<ExcelBean>> entry : map.entrySet()) {
+            XSSFRow row = sheet.createRow(entry.getKey());
+            List<ExcelBean> excels = entry.getValue();
+            for (int x = 0; x < excels.size(); x++) {
+                //合并单元格
+                if (excels.get(x).getCols() > 1) {
+                    if (x == 0) {
+                        endIndex += excels.get(x).getCols() - 1;
+                        CellRangeAddress range = new CellRangeAddress(0, 0, startIndex, endIndex);
+                        sheet.addMergedRegion(range);
+                    } else {
+                        endIndex += excels.get(x).getCols();
+                        CellRangeAddress range = new CellRangeAddress(0, 0, startIndex, endIndex);
+                        sheet.addMergedRegion(range);
+                    }
+                    startIndex += excels.get(x).getCols();
+                    XSSFCell cell = row.createCell(startIndex - excels.get(x).getCols());
+                    // 设置内容
+                    cell.setCellValue(excels.get(x).getHeadTextName());
+                    if (excels.get(x).getCellStyle() != null) {
+                        // 设置格式
+                        cell.setCellStyle(excels.get(x).getCellStyle());
+                    }
+                    cell.setCellStyle(fontStyle);
+                } else {
+                    XSSFCell cell = row.createCell(x);
+                    // 设置内容
+                    cell.setCellValue(excels.get(x).getHeadTextName());
+                    if (excels.get(x).getCellStyle() != null) {
+                        // 设置格式
+                        cell.setCellStyle(excels.get(x).getCellStyle());
+                    }
+                    cell.setCellStyle(fontStyle);
+                }
+            }
+        }
+    }
+
+    /**
+     * @param sheet     表格sheet页
+     * @param map       表头
+     * @param objs      答题列表
+     * @param clazz     量表实体类
+     * @param resultMap 测试结果得分
+     * @throws Exception
+     */
+    private static void createTableRows(XSSFSheet sheet, Map<Integer, List<ExcelBean>> map, List objs, List<Map<String, String>> resultMap, Class clazz) throws Exception {
+        int rowindex = map.size();
+        int maxKey = 0;
+        List<ExcelBean> ems = new ArrayList<>();
+        for (Map.Entry<Integer, List<ExcelBean>> entry : map.entrySet()) {
+            if (entry.getKey() > maxKey) {
+                maxKey = entry.getKey();
+            }
+        }
+        ems = map.get(maxKey);
+        List<Integer> widths = new ArrayList<Integer>(ems.size());
+        //渲染答题记录
+        if (objs != null) {
+            for (Object obj : objs) {
+                XSSFRow row = sheet.createRow(rowindex);
+                for (int i = 0; i < ems.size(); i++) {
+                    ExcelBean em = (ExcelBean) ems.get(i);
+                    String propertyName = em.getPropertyName();
+                    PropertyDescriptor propertyDescriptor = new PropertyDescriptor(propertyName, clazz);
+                    Method method = propertyDescriptor.getReadMethod();
+                    Object rtn = method.invoke(obj);
+                    String value = "";
+                    // 如果是日期类型进行转换
+                    if (rtn != null) {
+
+                        if (rtn instanceof Date) {
+                            value = new SimpleDateFormat("yyyy-MM-dd").format(rtn);
+                        } else if (rtn instanceof BigDecimal) {
+                            NumberFormat nf = new DecimalFormat("#,##0.00");
+                            value = nf.format((BigDecimal) rtn).toString();
+                        } else if ((rtn instanceof Integer) && (Integer.valueOf(rtn.toString()) < 0)) {
+                            value = "--";
+                        } else {
+                            value = rtn.toString();
+
+
+
+
+
+
+
+
+
+                        }
+                    }
+                    XSSFCell cell = row.createCell(i);
+                    cell.setCellValue(value);
+                    cell.setCellType(XSSFCell.CELL_TYPE_STRING);
+                    cell.setCellStyle(fontStyle2);
+                    // 获得最大列宽
+                    int width = value.getBytes().length * 300;
+                    // 还未设置,设置当前
+                    if (widths.size() <= i) {
+                        widths.add(width);
+                        continue;
+                    }
+                    // 比原来大,更新数据
+                    if (width > widths.get(i)) {
+                        widths.set(i, width);
+                    }
+                }
+                rowindex++;
+            }
+        }
+        rowindex += 2;
+        if (resultMap != null && resultMap.size() > 0) {
+            for (int m = 0; m < resultMap.size(); m++) {
+                Map<String, String> hashMap = resultMap.get(m);
+                if (hashMap != null && hashMap.size() > 0) {
+                    //渲染最终各项得分
+                    XSSFRow titleRow = sheet.createRow(rowindex);
+                    rowindex += 1;
+                    XSSFRow scoreRow = sheet.createRow(rowindex);
+                    int i = 0;
+                    if (resultMap.size() > 0) {
+                        for (Map.Entry<String, String> entry : hashMap.entrySet()) {
+                            XSSFCell cellTitle = titleRow.createCell(i);
+                            cellTitle.setCellValue(entry.getKey());
+                            cellTitle.setCellType(XSSFCell.CELL_TYPE_STRING);
+                            cellTitle.setCellStyle(fontStyle2);
+                            XSSFCell cellScore = scoreRow.createCell(i);
+                            cellScore.setCellValue(entry.getValue());
+                            cellScore.setCellType(XSSFCell.CELL_TYPE_STRING);
+                            cellScore.setCellStyle(fontStyle2);
+                            i++;
+                        }
+                    }
+                }
+                rowindex += 2;
+            }
+        }
+
+        // 设置列宽
+        for (int index = 0; index < widths.size(); index++) {
+            Integer width = widths.get(index);
+            width = width < 2500 ? 2500 : width + 300;
+            width = width > 10000 ? 10000 + 300 : width + 300;
+            sheet.setColumnWidth(index, width);
+        }
+    }
+
+
+    /**
+     * 用户导入
+     *
+     * @param in
+     * @param fileName
+     * @return
+     * @throws Exception
+     */
+    public static List<List<Object>> getBankListByExcelForUserImport(InputStream in, String fileName) throws Exception {
+        List<List<Object>> list = null;
+        //创建Excel工作薄
+        Workbook work = getWorkbook(in, fileName);
+        if (null == work) {
+            throw new Exception("创建Excel工作薄为空!");
+        }
+        Sheet sheet = null;
+        Row row = null;
+        Cell cell = null;
+        list = new ArrayList<List<Object>>();
+        //遍历Excel中所有的sheet
+        System.out.println("work.getNumberOfSheets():" + work.getNumberOfSheets());
+        for (int i = 0; i < work.getNumberOfSheets(); i++) {
+            sheet = work.getSheetAt(i);
+            if (sheet == null) {
+                continue;
+            }
+            int sheetSize = 0;
+            //遍历当前sheet中的所有行
+            //包涵头部,所以要小于等于最后一列数,这里也可以在初始值加上头部行数,以便跳过头部
+            for (int j = sheet.getFirstRowNum(); j <= sheet.getLastRowNum(); j++) {
+                //读取一行
+                row = sheet.getRow(j);
+                //去掉空行和表头
+                if (row == null || row.getFirstCellNum() == j) {
+                    continue;
+                }
+                sheetSize = row.getLastCellNum();
+                //判断当前行是否为空
+                if (isRowEmpty(row)) {
+                    continue;
+                }
+                //遍历所有的列
+                List<Object> li = new ArrayList<Object>();
+                for (int y = row.getFirstCellNum(); y < sheetSize; y++) {
+                    cell = row.getCell(y);
+                    li.add(cell != null ? getCellValue(cell) : null);
+                }
+                list.add(li);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 判断行是否为空
+     *
+     * @param row 行
+     * @return true:空 ;false:非空
+     */
+    public static boolean isRowEmpty(Row row) {
+
+        for (int i = row.getFirstCellNum(); i < row.getLastCellNum(); i++) {
+            Cell cell = row.getCell(i);
+            if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK) {
+                return false;
+            } else {
+                break;
+            }
+        }
+        return true;
+    }
+}

+ 37 - 0
src/main/java/com/rf/youth/utils/HttpStatus.java

@@ -0,0 +1,37 @@
+package com.rf.youth.utils;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/18 19:37
+ */
+/**
+ * 状态码
+ */
+public interface HttpStatus {
+    /**
+     * 返回成功
+     */
+    String SUCCESS = "200";
+    String SUCCESS_PUB = "201";
+
+    /**
+     * 运行时返回异常未查询到相应对象时返回或对象已存在时
+     */
+    String RUNTIME_EXCEPTION = "2001";
+
+    /**
+     * 服务器内部错误
+     */
+    String SERVER_EXCEPTION = "500100";
+
+    /**
+     * 输入参数为空
+     */
+    String PARAMETER_ISNULL = "500101";
+
+    /**
+     * 用户不存在
+     */
+    String USER_NOT_FOUND = "6001";
+}

+ 40 - 0
src/main/java/com/rf/youth/utils/IPUtiles.java

@@ -0,0 +1,40 @@
+package com.rf.youth.utils;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2517:59
+ */
+public class IPUtiles {
+    /**
+     * 获取真实IP
+     *
+     * @param request 请求体
+     * @return 真实IP
+     */
+    public static String getRealIp(HttpServletRequest request) {
+        // 这个一般是Nginx反向代理设置的参数
+        String ip = request.getHeader("X-Real-IP");
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("X-Forwarded-For");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("WL-Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getRemoteAddr();
+        }
+        // 处理多IP的情况(只取第一个IP)
+        if (ip != null && ip.contains(",")) {
+            String[] ipArray = ip.split(",");
+            ip = ipArray[0];
+        }
+        return ip;
+    }
+
+}

+ 58 - 0
src/main/java/com/rf/youth/utils/JWTUtil.java

@@ -0,0 +1,58 @@
+package com.rf.youth.utils;
+
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.JWTCreator;
+import com.auth0.jwt.algorithms.Algorithm;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import com.rf.youth.user.dao.model.UserEntity;
+
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author lpf
+ * @description:
+ * @date 2021/12/2820:18
+ */
+public class JWTUtil {
+
+    //密钥签名
+    private static final String SING = "xVWGEYTPF1hjnFt$HDZ0f^iet^^q@hZv";
+
+    /**
+     * 生成Token header.payload.sing
+     */
+    public static String getToken(Map<String, String> map) {
+
+        Calendar instance = Calendar.getInstance();
+        //5天后过期
+        instance.add(Calendar.DATE, 5);
+        //创建jwtBuilder
+        JWTCreator.Builder builder = JWT.create();
+        //将参数放进去
+        map.forEach(builder::withClaim);
+        String token = builder.withExpiresAt(instance.getTime())//指定过期时间
+                .sign(Algorithm.HMAC256(SING));//添加签名
+        return token;
+    }
+
+    public static String getTokenByUserInfo(UserEntity userEntity){
+        HashMap<String, String> payload = new HashMap<>();
+        payload.put("userPhone", userEntity.getUsername());
+        payload.put("userId", userEntity.getId());
+        payload.put("petName", userEntity.getPetName());
+        payload.put("type", userEntity.getRoleType());
+        return  getToken(payload);
+    }
+
+    /**
+     * 验证token,并获取信息
+     *
+     * @return
+     */
+    public static DecodedJWT verify(String token) {
+        return JWT.require(Algorithm.HMAC256(SING)).build().verify(token);
+    }
+
+}

+ 131 - 0
src/main/java/com/rf/youth/utils/OSUtil.java

@@ -0,0 +1,131 @@
+package com.rf.youth.utils;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/3/5 9:34
+ */
+
+public class OSUtil {
+
+
+    private static String OS = System.getProperty("os.name").toLowerCase();
+
+    private static OSUtil _instance = new OSUtil();
+
+
+    private OSUtil(){}
+
+    public static boolean isLinux(){
+        return OS.indexOf("linux")>=0;
+    }
+
+    public static boolean isMacOS(){
+        return OS.indexOf("mac")>=0&&OS.indexOf("os")>0&&OS.indexOf("x")<0;
+    }
+
+    public static boolean isMacOSX(){
+        return OS.indexOf("mac")>=0&&OS.indexOf("os")>0&&OS.indexOf("x")>0;
+    }
+
+    public static boolean isWindows(){
+        return OS.indexOf("windows")>=0;
+    }
+
+    public static boolean isOS2(){
+        return OS.indexOf("os/2")>=0;
+    }
+
+    public static boolean isSolaris(){
+        return OS.indexOf("solaris")>=0;
+    }
+
+    public static boolean isSunOS(){
+        return OS.indexOf("sunos")>=0;
+    }
+
+    public static boolean isMPEiX(){
+        return OS.indexOf("mpe/ix")>=0;
+    }
+
+    public static boolean isHPUX(){
+        return OS.indexOf("hp-ux")>=0;
+    }
+
+    public static boolean isAix(){
+        return OS.indexOf("aix")>=0;
+    }
+
+    public static boolean isOS390(){
+        return OS.indexOf("os/390")>=0;
+    }
+
+    public static boolean isFreeBSD(){
+        return OS.indexOf("freebsd")>=0;
+    }
+
+    public static boolean isIrix(){
+        return OS.indexOf("irix")>=0;
+    }
+
+    public static boolean isDigitalUnix(){
+        return OS.indexOf("digital")>=0&&OS.indexOf("unix")>0;
+    }
+
+    public static boolean isNetWare(){
+        return OS.indexOf("netware")>=0;
+    }
+
+    public static boolean isOSF1(){
+        return OS.indexOf("osf1")>=0;
+    }
+
+    public static boolean isOpenVMS(){
+        return OS.indexOf("openvms")>=0;
+    }
+
+
+    /**
+     * 获取操作系统名字
+     * @return 操作系统名
+     */
+    public static String getOSname(){
+        if(isAix()){
+            return "AIX";
+        }else if (isDigitalUnix()) {
+            return "Digital Unix";
+        }else if (isFreeBSD()) {
+            return "FreeBSD";
+        }else if (isHPUX()) {
+            return "HP-UX";
+        }else if (isIrix()) {
+            return "Irix";
+        }else if (isLinux()) {
+            return "Linux";
+        }else if (isMacOS()) {
+            return "Mac OS";
+        }else if (isMacOSX()) {
+            return "Mac OS X";
+        }else if (isMPEiX()) {
+            return "MPE/iX";
+        }else if (isNetWare()) {
+            return "NetWare";
+        }else if (isOpenVMS()) {
+            return "OpenVMS";
+        }else if (isOS2()) {
+            return "OS/2";
+        }else if (isOS390()) {
+            return "OS/390";
+        }else if (isOSF1()) {
+            return "OSF1";
+        }else if (isSolaris()) {
+            return "Solaris";
+        }else if (isSunOS()) {
+            return "SunOS";
+        }else if (isWindows()) {
+            return "Windows";
+        }else{
+            return "Others";
+        }
+    }
+}

+ 17 - 0
src/main/java/com/rf/youth/utils/PageRequestUtil.java

@@ -0,0 +1,17 @@
+package com.rf.youth.utils;
+
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+
+/**
+ * @Description:分页工具
+ * @Author: zsf
+ * @Date: 2022/7/5
+ */
+public class PageRequestUtil {
+
+    public static PageRequest of(int page, int size) {
+        if (page <=0){page=0;}else {page = page-1;}
+        return PageRequest.of(page, size, Sort.unsorted());
+    }
+}

+ 431 - 0
src/main/java/com/rf/youth/utils/RandomUtil.java

@@ -0,0 +1,431 @@
+package com.rf.youth.utils;
+
+//import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+/**
+ * 随机数工具类
+ */
+public class RandomUtil {
+
+    /**
+     * 获取两数之间的随机数
+     * @param min 最小数
+     * @param max 最大数
+     * @return
+     */
+    public static int scopeNum(int min,int max){
+        Random random = new Random();
+        return random.nextInt(max)%(max-min+1) + min;
+    }
+
+    /**
+     * 获取两数之间的随机数,排除指定的数据
+     * @param min 最小值
+     * @param max 最大值
+     * @param arr 要排除的集合数据
+     * @return
+     */
+    public static int chooseNum(int min, int max, List arr){
+        //Log.i("集合",arr.toString());
+        if ( arr.size() == 4){
+            return 5;
+        }
+        Random random = new Random();
+        int num = random.nextInt(max)%(max-min+1) + min;
+        if ( arr.contains(num)){
+            return chooseNum(min,max,arr);
+        }else {
+            return num;
+        }
+    }
+
+    /**
+     * 随机生成26位字母
+     * @param size 生成位数
+     * @param flag 大小写
+     * @return
+     */
+    public static String randomChar(int size,char flag){
+        //最终生成的字符串
+        String str = "";
+        for (int i = 0; i < size; i++) {
+            str = str + (char)(Math.random()*26+flag);
+        }
+        return str;
+    }
+
+
+    /**
+     * 获取到记忆量表字符出厂顺序
+     *
+     * @return
+     */
+    public static Map recallChar(){
+        Map map = new HashMap();
+        Map exerciseList = new HashMap();
+        Map examList = new HashMap();
+
+        Map mapChar0 = createBack0();
+        Map mapChar1 = createBack(1);
+        Map mapChar2 = createBack(2);
+        String[] strings0 = new String[18];
+        String[] strings1 = new String[18];
+        String[] strings2 = new String[18];
+        for ( int i = 0 ; i<mapChar0.size() ;i++){
+            Object a = mapChar0.get(i);
+            strings0[i] = a.toString();
+            Object b = mapChar1.get(i);
+            strings1[i] = b.toString();
+            Object c = mapChar2.get(i);
+            strings2[i] = c.toString();
+        }
+        exerciseList.put("back0",strings0);
+        exerciseList.put("back1",strings1);
+        exerciseList.put("back2",strings2);
+
+        String[][] stringsa = new String[6][18];
+        String[][] stringsb = new String[6][18];
+        String[][] stringsc = new String[6][18];
+        for ( int j = 0 ; j<6 ;j++){
+            Map mapChar01 = createBack0();
+            Map mapChar11 = createBack(1);
+            Map mapChar21 = createBack(2);
+            String[] strings01 = new String[18];
+            String[] strings11 = new String[18];
+            String[] strings21 = new String[18];
+            for ( int i = 0 ; i<mapChar01.size() ;i++){
+                Object a = mapChar01.get(i);
+                strings01[i] = a.toString();
+                Object b = mapChar11.get(i);
+                strings11[i] = b.toString();
+                Object c = mapChar21.get(i);
+                strings21[i] = c.toString();
+            }
+            stringsa[j] = strings01;
+            stringsb[j] = strings11;
+            stringsc[j] = strings21;
+        }
+        examList.put("back0",stringsa);
+        examList.put("back1",stringsb);
+        examList.put("back2",stringsc);
+
+        map.put("exerciseList",exerciseList);
+        map.put("examList",examList);
+        return map;
+    }
+
+
+    /**
+     * 制作0back组块数据
+     * @return
+     */
+    public static Map createBack0(){
+        List list = new ArrayList();
+        List indexList = new ArrayList();
+        Map mapChar = new LinkedHashMap();
+        mapChar = getMapChar(mapChar,list);
+        indexList = getRandomNum(1,17,indexList,9);
+        for ( Object index : indexList){
+            mapChar.put(index,mapChar.get(0));
+        }
+        //Log.i("0-back",mapChar.toString());
+        return mapChar;
+    }
+
+    /**
+     * 1-back
+     * @return
+     */
+    public static Map createBack(int type){
+        Map mapChar = new LinkedHashMap();
+        List list = new ArrayList();
+        mapChar = getMapChar(mapChar,list);
+        //Log.i(type+"-mapOld",mapChar.toString());
+        List indexList = new ArrayList();
+        indexList = getRandomNum(type,17,indexList,9);
+        Collections.sort(indexList);
+        for ( Object index : indexList){
+            mapChar.put(index,mapChar.get((int)index-type));
+        }
+        //Log.i(type+"-Index",indexList.toString());
+        //Log.i(type+"-back",mapChar.toString());
+        return mapChar;
+    }
+
+
+
+    /**
+     * 获取到18位的随机字符
+     * @param map
+     * @param list
+     * @return
+     */
+    public static Map getMapChar(Map map,List list){
+        char strChar = (char)(Math.random()*26+'A');
+        if ( list.isEmpty()){
+            list.add(strChar);
+        }else {
+            if ( !list.contains( strChar)){
+                list.add(strChar);
+            }
+        }
+        if ( list.size() == 18 ){
+            for (int i = 0; i<list.size();i++){
+                map.put(i,list.get(i));
+            }
+            return map;
+        }else {
+            return getMapChar(map,list);
+        }
+    }
+
+    /**
+     * 获取到范围内随机数
+     * @param min
+     * @param max
+     * @param list
+     * @return
+     */
+    public static List getRandomNum(int min,int max,List list,int size){
+        Random random = new Random();
+        int num = random.nextInt(max)%(max-min+1) + min;
+        if ( !list.contains(num)) {
+            list.add(num);
+        }
+        if ( list.size() == size){
+            return list;
+        }else {
+            return getRandomNum(min,max,list,size);
+        }
+    }
+
+    /**
+     * 获取到记忆量表字符出厂顺序2
+     * @return
+     */
+    public static Map recallCharTwo(){
+        Map map = new HashMap();
+        Map exerciseList = new HashMap();
+        Map examList = new HashMap();
+
+        Map back1 = new LinkedHashMap();
+        Map back1Map1 = createBackOne(1);
+        Map back1Map2 = createBackTwo(1,back1Map1);
+        for ( int i = 0 ; i<back1Map1.size() ;i++){
+            back1.put(i,back1Map1.get(i));
+        }
+        for ( int i = 0 ; i<back1Map2.size() ;i++){
+            back1.put(i+9,back1Map2.get(i));
+        }
+        Map back2 = new LinkedHashMap();
+        Map back2Map1 = createBackOne(2);
+        Map back2Map2 = createBackS(2,back2Map1);
+        for ( int i = 0 ; i<back2Map1.size() ;i++){
+            back2.put(i,back2Map1.get(i));
+        }
+        for ( int i = 0 ; i<back2Map2.size() ;i++){
+            back2.put(i+9,back2Map2.get(i));
+        }
+        //System.out.println("mapChar1:"+mapChar1);
+        //System.out.println("mapChar2:"+mapChar2);
+        String[] strings1 = new String[18];
+        String[] strings2 = new String[18];
+        for ( int i = 0 ; i<back1.size() ;i++){
+            Object b = back1.get(i);
+            strings1[i] = b.toString();
+            Object c = back2.get(i);
+            strings2[i] = c.toString();
+        }
+        exerciseList.put("back1",strings1);
+        exerciseList.put("back2",strings2);
+
+        String[][] stringsb = new String[3][18];
+        String[][] stringsc = new String[3][18];
+        for ( int j = 0 ; j<3 ;j++){
+            Map examback1 = new LinkedHashMap();
+            Map examback1Map1 = createBackOne(1);
+            Map examback1Map2 = createBackTwo(1,examback1Map1);
+            for ( int i = 0 ; i<examback1Map1.size() ;i++){
+                examback1.put(i,examback1Map1.get(i));
+            }
+            for ( int i = 0 ; i<examback1Map2.size() ;i++){
+                examback1.put(i+9,examback1Map2.get(i));
+            }
+            Map examback2 = new LinkedHashMap();
+            Map examback2Map1 = createBackOne(2);
+            Map examback2Map2 = createBackS(2,examback2Map1);
+            for ( int i = 0 ; i<examback2Map1.size() ;i++){
+                examback2.put(i,examback2Map1.get(i));
+            }
+            for ( int i = 0 ; i<examback2Map2.size() ;i++){
+                examback2.put(i+9,examback2Map2.get(i));
+            }
+            String[] strings11 = new String[18];
+            String[] strings21 = new String[18];
+            for ( int i = 0 ; i<examback1.size() ;i++){
+                Object b = examback1.get(i);
+                strings11[i] = b.toString();
+                Object c = examback2.get(i);
+                strings21[i] = c.toString();
+            }
+            stringsb[j] = strings11;
+            stringsc[j] = strings21;
+        }
+        examList.put("back1",stringsb);
+        examList.put("back2",stringsc);
+
+        map.put("exerciseList",exerciseList);
+        map.put("examList",examList);
+        return map;
+    }
+
+    /**
+     * 1-back
+     * @return
+     */
+    public static Map createBackOne(int type){
+        Map mapChar = new LinkedHashMap();
+        List list = new ArrayList();
+        mapChar = getMapCharTwo(mapChar,list);
+        List indexList = new ArrayList();
+        indexList = getRandomNumTwo(type,8,indexList,4);
+        Collections.sort(indexList);
+        for ( Object index : indexList){
+            mapChar.put(index,mapChar.get((int)index-type));
+        }
+        return mapChar;
+    }
+
+    /**
+     * 1-back
+     * @return
+     */
+    public static Map createBackTwo(int type,Map map11){
+        Map mapChar = new LinkedHashMap();
+        List list = new ArrayList();
+        list.add(map11.get(8));
+        mapChar = getMapCharTwo(mapChar,list);
+        List indexList = new ArrayList();
+        indexList = getRandomNumTwo(type,8,indexList,4);
+        Collections.sort(indexList);
+        for ( Object index : indexList){
+            mapChar.put(index,mapChar.get((int)index-type));
+        }
+        return mapChar;
+    }
+
+    /**
+     * 1-back
+     * @return
+     */
+    public static Map createBackS(int type,Map map11){
+        Map mapChar = new LinkedHashMap();
+        List list = new ArrayList();
+        list.add(map11.get(8));
+        mapChar = getMapCharTwo(mapChar,list);
+        List indexList = new ArrayList();
+        indexList = getRandomNumTwo(type,8,indexList,5);
+        Collections.sort(indexList);
+        for ( Object index : indexList){
+            mapChar.put(index,mapChar.get((int)index-type));
+        }
+        return mapChar;
+    }
+
+
+
+    /**
+     * 获取到18位的随机字符
+     * @param map
+     * @param list
+     * @return
+     */
+    public static Map getMapCharTwo(Map map,List list){
+        //char strChar = (char)(Math.random()*26+'A');
+        int ran1 = (int) (Math.random()*(10-1)+1);
+        if ( list.isEmpty()){
+            list.add(ran1);
+        }else {
+            if ( !list.contains( ran1)){
+                list.add(ran1);
+            }
+        }
+        if ( list.size() == 9 ){
+            for (int i = 0; i<list.size();i++){
+                map.put(i,list.get(i));
+            }
+            return map;
+        }else {
+            return getMapCharTwo(map,list);
+        }
+    }
+
+    /**
+     * 获取到范围内随机数
+     * @param min
+     * @param max
+     * @param list
+     * @return
+     */
+    public static List getRandomNumTwo(int min,int max,List list,int size){
+        Random random = new Random();
+        int num = random.nextInt(max)%(max-min+1) + min;
+        if ( !list.contains(num)) {
+            list.add(num);
+        }
+        if ( list.size() == size){
+            return list;
+        }else {
+            return getRandomNumTwo(min,max,list,size);
+        }
+    }
+
+
+    /*public static Map recallCharTwo(){
+        Map map = new HashMap();
+        Map exerciseList = new HashMap();
+        Map examList = new HashMap();
+
+        String[] strings1 = new String[20];
+        String[] strings2 = new String[20];
+        for ( int i = 0 ; i<20 ;i++){
+            int ran1 = (int) (Math.random()*(10-1)+1);
+            int ran2 = (int) (Math.random()*(10-1)+1);
+            strings1[i] = String.valueOf(ran1);
+            strings2[i] = String.valueOf(ran2);
+        }
+        exerciseList.put("back1",strings1);
+        exerciseList.put("back2",strings2);
+
+        String[][] stringsb = new String[3][20];
+        String[][] stringsc = new String[3][20];
+        for ( int j = 0 ; j<3 ;j++){
+            String[] strings11 = new String[20];
+            String[] strings21 = new String[20];
+            for ( int i = 0 ; i<20 ;i++){
+                int ran1 = (int) (Math.random()*(10-1)+1);
+                int ran2 = (int) (Math.random()*(10-1)+1);
+                strings11[i] = String.valueOf(ran1);
+                strings21[i] = String.valueOf(ran2);
+            }
+            stringsb[j] = strings11;
+            stringsc[j] = strings21;
+        }
+        examList.put("back1",stringsb);
+        examList.put("back2",stringsc);
+
+        map.put("exerciseList",exerciseList);
+        map.put("examList",examList);
+        return map;
+    }*/
+
+
+}

+ 62 - 0
src/main/java/com/rf/youth/utils/Result.java

@@ -0,0 +1,62 @@
+package com.rf.youth.utils;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/18 19:27
+ */
+
+public class Result<T> {
+    /**
+     * 状态码
+     */
+    private String code;
+
+    /**
+     * 信息
+     */
+    private String msg;
+
+    /**
+     * 返回数据
+     */
+    private T data;
+
+    public Result(String code, String msg, T data) {
+        this.code = code;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public Result() {
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public Result(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+}

+ 727 - 0
src/main/java/com/rf/youth/utils/ScaleResultBusinessMap.java

@@ -0,0 +1,727 @@
+package com.rf.youth.utils;
+
+import java.util.HashMap;
+
+/**
+ * 量表结果计算类注册 (暂时不再使用,从数据库取)
+ */
+
+public class ScaleResultBusinessMap {
+    public static HashMap<String, String> ScaleResultsMap = null;
+
+    static {
+//        TODO 初始化MAP
+        ScaleResultsMap = new HashMap<>();
+        //System.out.println("初始化量表注册类");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_API, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_LSAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_BPRS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_HAMA, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_UCLA, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put(Constant.QUEST_FLAG_MAST,"com.rf.psychological.scale.resultBusiness.scaleResult.MASTScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_BSSI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put(Constant.QUEST_FLAG_CBQ,"com.rf.psychological.scale.resultBusiness.scaleResult.CBQScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ITS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_GCQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SDS, "com.rf.psychological.scale.resultBusiness.scaleResult.SDSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TAS_26, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MCSD, "com.rf.psychological.scale.resultBusiness.scaleResult.MCSDScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PHCSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SD, "com.rf.psychological.scale.resultBusiness.scaleResult.SDScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SAD, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_BDI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_GAD_7, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CES_D, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MUNSH, "com.rf.psychological.scale.resultBusiness.scaleResult.MUNSHScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PSS, "com.rf.psychological.scale.resultBusiness.scaleResult.PSSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_HADS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PHQ_9, "com.rf.psychological.scale.resultBusiness.scaleResult.PHQScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_QSA, "com.rf.psychological.scale.resultBusiness.scaleResult.QSAScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SES, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MMPI_K, "com.rf.psychological.scale.resultBusiness.scaleResult.MMPIKScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MMPI_L, "com.rf.psychological.scale.resultBusiness.scaleResult.MMPILScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_NYLS, "com.rf.psychological.scale.resultBusiness.scaleResult.NYLSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MHLC_A, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MHLC_B, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SIT, "com.rf.psychological.scale.resultBusiness.scaleResult.SITScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CSES, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MHLC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_AUDIT, "com.rf.psychological.scale.resultBusiness.scaleResult.AUDITScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_RD, "com.rf.psychological.scale.resultBusiness.scaleResult.RDScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SCL_90, "com.rf.psychological.scale.resultBusiness.scaleResult.SCL90Scale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SCSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.SCSQScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PRCA_24, "com.rf.psychological.scale.resultBusiness.scaleResult.PRCAScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_IAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PSSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_APIUS, "com.rf.psychological.scale.resultBusiness.scaleResult.APIUSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SCCS, "com.rf.psychological.scale.resultBusiness.scaleResult.SCCSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_AS, "com.rf.psychological.scale.resultBusiness.scaleResult.ASScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ATO, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_QLSCA, "com.rf.psychological.scale.resultBusiness.scaleResult.QLSCAScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_GDS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CRS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_FAD, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_FES_CV, "com.rf.psychological.scale.resultBusiness.scaleResult.FESCVScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ASAS, "com.rf.psychological.scale.resultBusiness.scaleResult.ASASScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ESLI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_BRMS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MPS, "com.rf.psychological.scale.resultBusiness.scaleResult.MPSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PGC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_LSIA, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put(Constant.QUEST_FLAG_LSIA,"com.rf.psychological.scalesJNI.ScalesJNI");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TSI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SITS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_FPS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TIP, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put(Constant.QUEST_FLAG_TS,"com.rf.psychological.scalesJNI.ScalesJNI");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PSAI, "com.rf.psychological.scale.resultBusiness.scaleResult.PSAIScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PRS, "com.rf.psychological.scale.resultBusiness.scaleResult.PRSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DSI, "com.rf.psychological.scale.resultBusiness.scaleResult.DSIScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DASS_42, "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_AIS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_EHS, "com.rf.psychological.scale.resultBusiness.scaleResult.EHSScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ESS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TTT, "com.rf.psychological.scale.resultBusiness.scaleResult.TTTScale");
+        ScaleResultsMap.put("20220326193800", "com.rf.psychological.scale.resultBusiness.scaleResult.SF36Scale");
+        ScaleResultsMap.put("20210804155508", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804155950", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160121", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804160152","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160214", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160333", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160402", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160427", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160447", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160509", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160531", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160551", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160615", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160645", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160708", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160731", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160758", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160822", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160848", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160913", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804160938", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161005", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161023", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161047", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161111", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161135", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161216", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161236", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161301", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161325", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161350", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161413", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161433", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161454", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161521", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161603", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161627", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161649", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161715", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161759", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161824", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161849", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161908", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161933", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162007", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162027", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162048", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804161737", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162506", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162527", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162551", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804162613","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162645", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162714", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162751", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162824", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162843", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162904", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162929", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804162951", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163013", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163034", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804163104","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163211", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163126", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163233", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163259", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163315", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163333", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163356", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163416", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163517", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163435", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163536", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163555", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804163618","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163641", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163801", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163817", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163839", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163901", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163921", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163940", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163959", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164017", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164036", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164055", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164112", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164131", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164150", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164210", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164230", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164254", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164311", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164328", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164347", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164411", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164427", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164444", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164500", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164634", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164816", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164919", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164838", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164939", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164957", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165014", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165033", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165051", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165115", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165223", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165242", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165314", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165337", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165400", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165441", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165459", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165516", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165537", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165558", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165617", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165633", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165651", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165709", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165730", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165752", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170209", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170231", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170254", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170427", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170515", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170532", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170603", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170622", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170725", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170645", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170744", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170804", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170819", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170838", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170856", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171021", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171043", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171108", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171149", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171207", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171230", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171251", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171308", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171324", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171342", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171358", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171415", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171433", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171452", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171515", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171530", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171629", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171656", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171719", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171806", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171743", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171824", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171843", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171902", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804171922", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804171943","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172003", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172022", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172340", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172215", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172401", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172421", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172443", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172501", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172522", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172541", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172556", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172646", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804172753","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172810", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172736", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804172043", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804165420", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804164857", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210804172242","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804170706", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163457", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210804163150", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220412111118", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220412110816", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220421082644", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220421082538", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+
+        //第二批
+        ScaleResultsMap.put("20210910155601", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910155858", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160029", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160146", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160216", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160254", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160325", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160347", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160414", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160515", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910160551", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162249", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162306", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162436", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162454", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162850", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162919", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910162948", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163045", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163107", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163131", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163158", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163219", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163241", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163311", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163334", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163420", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163435", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163452", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163517", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163539", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163557", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910163755", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910164336", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910164644", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210910165112", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210723174414", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+
+        ScaleResultsMap.put("20211118093229", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118095105", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118095607", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118095647", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118095850", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118095916", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100057", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100155", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100323", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100422", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100444", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100509", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100544", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100632", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118100929", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101005", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101244", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101337", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101443", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101541", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101710", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118101819", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118102013", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211118090814", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211129163807", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+
+
+        //第三批
+        //ScaleResultsMap.put("20210915114712","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210915113233","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210915115016","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210915115514","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        //ScaleResultsMap.put("20210915113551","com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020110351", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020112318", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020113032", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020113607", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020113818", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211020112514", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211021155421", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211021155741", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211021160012", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211023174751", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211101163739", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211101164050", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+
+        ScaleResultsMap.put("20210820143117", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210820143910", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210820144203", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210820145639", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210827170744", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210827171326", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210827171752", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210827172830", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210827174758", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210901113207", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210901113727", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210901113828", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210901113926", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210901114210", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210908113703", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210908113945", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210908114713", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210908115334", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210908121333", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913082601", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913083144", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913083913", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913084345", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913085052", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913085210", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913085400", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913092127", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913092348", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913092518", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913092752", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913092925", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210913093119", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915112305", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915112436", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915112917", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915113053", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915113233", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915113434", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915113551", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915114409", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915114529", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915114712", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915115016", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915115514", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915120603", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915120757", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915121051", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210915121226", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916103928", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916104050", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916104211", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916104306", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916104618", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916105800", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916105952", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110053", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110221", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110355", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110447", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110825", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916110934", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210916111038", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918155946", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918160131", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918160637", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918161254", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918161352", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918161811", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918162018", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918162228", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210918162613", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922123225", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922123752", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922124359", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922130428", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922131425", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922131506", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922131822", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922132144", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922132409", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922133419", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922134032", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922134152", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922221535", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922221637", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922221757", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922221909", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922222021", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922222308", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922222349", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922222521", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210922222603", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923215949", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923220601", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923220700", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923221550", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923223346", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923231538", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923232350", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210923232624", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926214035", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926214357", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926214626", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926214904", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926215106", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926215322", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926215606", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926215723", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926220423", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926220616", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926220854", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221108", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221257", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221355", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221449", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221822", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221919", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210926221958", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929220959", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929221120", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929221755", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929221913", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222112", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222319", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222424", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222520", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222624", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222731", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222811", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210929222912", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20210930095308", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002193755", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002193844", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002193947", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002194347", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002194641", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002195405", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002213204", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002213656", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002213832", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211002213945", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003094719", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003095259", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003095351", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put("20211003095711", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003095818", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003100323", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003100957", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003101101", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003101201", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20211003101316", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+
+        ScaleResultsMap.put("20220124190855", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124191041", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124191211", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124191319", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124191450", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124191718", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124192823", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124192940", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124202714", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124202808", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124202851", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124202953", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203027", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203119", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203336", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203458", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203541", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203636", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203726", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203802", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124203834", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220126171007", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220216104956", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220218140518", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220219150122", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220220215606", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220220221627", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220221210607", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220226213739", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220226213855", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220227145412", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220227151201", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220228162852", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220228174318", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220302200820", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220302202320", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307104708", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307104923", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307105039", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307105121", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307105155", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307110701", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220307110922", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220123175535", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220123183205", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220123183401", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124185252", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124185348", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124185514", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220124190640", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220126165651", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220218134931", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220220213841", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put("20220318153050", "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        /**
+         * 新量表模板
+         */
+        ScaleResultsMap.put("20220515221609", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put("20220516104828", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put("20220515221718", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put("20220515221827", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+        ScaleResultsMap.put("20220515221429", "com.rf.psychological.scale.resultBusiness.scaleResult.NEWCOMMONScale");
+
+
+        /** 许博文 **/
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.PSQScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_AHDSC, "com.rf.psychological.scale.resultBusiness.scaleResult.AHDSCScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_QSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.QSQScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_GSDS, "com.rf.psychological.scale.resultBusiness.scaleResult.GSDSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.DSQScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_ZungDP, "com.rf.psychological.scale.resultBusiness.scaleResult.ZungDPScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_IDIAT, "com.rf.psychological.scale.resultBusiness.scaleResult.IDIATScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_NHS3, "com.rf.psychological.scale.resultBusiness.scaleResult.NHS3Scale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_IQCODE, "com.rf.psychological.scale.resultBusiness.scaleResult.IQCODEScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SCAT, "com.rf.psychological.scale.resultBusiness.scaleResult.SCATScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SACDS, "com.rf.psychological.scale.resultBusiness.scaleResult.SACDSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PPDC, "com.rf.psychological.scale.resultBusiness.scaleResult.PPDCScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_CCF, "com.rf.psychological.scale.resultBusiness.scaleResult.CCFScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_BE, "com.rf.psychological.scale.resultBusiness.scaleResult.BEScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_EVQEA, "com.rf.psychological.scale.resultBusiness.scaleResult.EVQEAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_ABE, "com.rf.psychological.scale.resultBusiness.scaleResult.ABEScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DDBS2, "com.rf.psychological.scale.resultBusiness.scaleResult.DDBS2Scale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SRBA, "com.rf.psychological.scale.resultBusiness.scaleResult.SRBAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PEBS, "com.rf.psychological.scale.resultBusiness.scaleResult.PEBSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SCRSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.SCRSQScale");
+        /** 许博文 **/
+        ScaleResultsMap.put(Constant.QUEST_TYPE_TSCS, "com.rf.psychological.scale.resultBusiness.scaleResult.TSCSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DBS, "com.rf.psychological.scale.resultBusiness.scaleResult.DBSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_TCS, "com.rf.psychological.scale.resultBusiness.scaleResult.TCSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_GDMS, "com.rf.psychological.scale.resultBusiness.scaleResult.GDMSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SRHP, "com.rf.psychological.scale.resultBusiness.scaleResult.SRHPScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_RFNGS, "com.rf.psychological.scale.resultBusiness.scaleResult.RFNGSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_CS, "com.rf.psychological.scale.resultBusiness.scaleResult.CSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SNAPIV, "com.rf.psychological.scale.resultBusiness.scaleResult.SNAPIVScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SNAPIV2, "com.rf.psychological.scale.resultBusiness.scaleResult.SNAPIV2Scale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_WFIRS, "com.rf.psychological.scale.resultBusiness.scaleResult.WFIRSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_FCRSS, "com.rf.psychological.scale.resultBusiness.scaleResult.FCRSSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_MDSIC, "com.rf.psychological.scale.resultBusiness.scaleResult.MDSICScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_TLOC, "com.rf.psychological.scale.resultBusiness.scaleResult.TLOCScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DSA, "com.rf.psychological.scale.resultBusiness.scaleResult.DSAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DCBQ, "com.rf.psychological.scale.resultBusiness.scaleResult.DCBQScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DAS, "com.rf.psychological.scale.resultBusiness.scaleResult.DASScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_TSA, "com.rf.psychological.scale.resultBusiness.scaleResult.TSAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_BYNDS, "com.rf.psychological.scale.resultBusiness.scaleResult.BYNDSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PADIC, "com.rf.psychological.scale.resultBusiness.scaleResult.PADICScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DPOMS, "com.rf.psychological.scale.resultBusiness.scaleResult.DPOMSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_ARQ, "com.rf.psychological.scale.resultBusiness.scaleResult.ARQScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PQEEPH, "com.rf.psychological.scale.resultBusiness.scaleResult.PQEEPHScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DDBS, "com.rf.psychological.scale.resultBusiness.scaleResult.DDBSScale");
+
+
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MRA_SAFE, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_OCC_AGE, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_STAI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PLOC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SRHMS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CFD, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SEI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_GWB, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_WVI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DSR, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_BDQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TCSQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_STUR, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_WILL, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PRCS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DACL, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PER, "com.rf.psychological.scale.resultBusiness.scaleResult.PERScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_EPQ, "com.rf.psychological.scale.resultBusiness.scaleResult.EPQScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PRT, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PLP, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_AOO, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SADS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_LSIB, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_NDDI_E, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ESM, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CSHQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MSIQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_IPC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_IELCS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_YSV, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_YSP, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_YFI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_WHD, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PCR, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ESLIS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DISC, "com.rf.psychological.scale.resultBusiness.scaleResult.DISCScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_AAS, "com.rf.psychological.scale.resultBusiness.scaleResult.AASScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CCSAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ECR, "com.rf.psychological.scale.resultBusiness.scaleResult.ECRScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CCSAS2, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ABT, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CARS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ABC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CABS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ADSC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DDI, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_DWTA, "com.rf.psychological.scale.resultBusiness.scaleResult.DWTAScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_THAT, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ZAS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PST, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PAST, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CAGE, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_STOPB, "com.rf.psychological.scale.resultBusiness.scaleResult.STOPBScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TCSQT, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_EPDS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PDSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_CESDC, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MADRS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_FSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_YBOCS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_PANSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_ASWS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MFS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_SRBD, "com.rf.psychological.scale.resultBusiness.scaleResult.SRBDScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TCPSS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_TESS, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MAA, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_IWBIGA, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_FLAG_MASQ, "com.rf.psychological.scale.resultBusiness.scaleResult.COMMONScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_PSQI, "com.rf.psychological.scale.resultBusiness.scaleResult.PSQIScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_CMIM, "com.rf.psychological.scale.resultBusiness.scaleResult.CMIMScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_CMIW, "com.rf.psychological.scale.resultBusiness.scaleResult.CMIWScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_POMS, "com.rf.psychological.scale.resultBusiness.scaleResult.POMSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_MBTI, "com.rf.psychological.scale.resultBusiness.scaleResult.MBTIScale");
+        ScaleResultsMap.put("20220228172644", "com.rf.psychological.scale.resultBusiness.scaleResult.BRIEFScale");
+
+        /** 20220310 lpf **/
+        ScaleResultsMap.put(Constant.QUEST_TYPE_BRT, "com.rf.psychological.scale.resultBusiness.scaleResult.BRTScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_DXSLA, "com.rf.psychological.scale.resultBusiness.scaleResult.DXSLAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_JRXLYJ, "com.rf.psychological.scale.resultBusiness.scaleResult.JRXLYJScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_Russell, "com.rf.psychological.scale.resultBusiness.scaleResult.RussellScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_STUHEA, "com.rf.psychological.scale.resultBusiness.scaleResult.STUHEAScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_SDLRS, "com.rf.psychological.scale.resultBusiness.scaleResult.SDLRSScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_HLD, "com.rf.psychological.scale.resultBusiness.scaleResult.HLDScale");
+        ScaleResultsMap.put(Constant.QUEST_TYPE_YDRZ, "com.rf.psychological.scale.resultBusiness.scaleResult.YDRZScale");
+        /** END **/
+
+
+    }
+
+    public static HashMap<String, String> getScaleResultsMap() {
+        return ScaleResultsMap;
+    }
+
+}

+ 23 - 0
src/main/java/com/rf/youth/utils/ScaleScoringVersion.java

@@ -0,0 +1,23 @@
+package com.rf.youth.utils;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Component
+@ConfigurationProperties(prefix = "scalescoringversion")//接收配置文件中scaleScoringVersion下面的属性
+public class ScaleScoringVersion {
+
+    private Map<String,String> versionmap = new HashMap<>();
+
+    public Map<String,String> getVersionmap(){
+        return versionmap;
+    }
+
+    public void setVersionmap(Map<String,String> versionMap){
+        this.versionmap=versionMap;
+    }
+
+}

+ 23 - 0
src/main/java/com/rf/youth/utils/ScaleUtil.java

@@ -0,0 +1,23 @@
+package com.rf.youth.utils;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/3/5 9:34
+ */
+
+public class ScaleUtil {
+
+    public static void getScaleDll(String fileName){
+        String fileUrl;
+        //设置文件路径
+        if(OSUtil.isLinux()){
+            fileUrl = "./scalesDll/"+fileName;
+        }else{
+            fileUrl = "D:\\softWare\\ideaWorkspace\\psychological\\src\\main\\resources\\scalesDll\\"+fileName;
+        }
+        System.load(fileUrl);
+        //System.loadLibrary("APIUSScale");
+    }
+
+}

+ 117 - 0
src/main/java/com/rf/youth/utils/SendMessageUtil.java

@@ -0,0 +1,117 @@
+package com.rf.youth.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.github.qcloudsms.SmsSingleSender;
+import com.github.qcloudsms.SmsSingleSenderResult;
+import com.github.qcloudsms.httpclient.HTTPException;
+import lombok.extern.slf4j.Slf4j;
+import org.json.JSONException;
+import java.io.IOException;
+
+/**
+ * 腾讯云短信发送验证码工具类
+ * @author QQ
+ */
+@Slf4j
+public class SendMessageUtil {
+
+    // 短信应用SDK AppID
+    int appid = 1400555402; // 1400开头
+
+    // 短信应用SDK AppKey
+    String appkey = "197596018c4565ad023c2b145f4069a1";
+
+    // 短信模板ID,需要在短信应用中申请
+    int templateId = 1064633; // NOTE: 这里的模板ID`7839`只是一个示例,真实的模板ID需要在短信控制台中申请
+
+    // 签名
+    String smsSign = "北京决明科技"; // NOTE: 这里的签名"腾讯云"只是一个示例,真实的签名需要在短信控制台中申请,另外签名参数使用的是`签名内容`,而不是`签名ID`
+
+    // 验证码
+    String str = "000000";
+
+    /**
+     * 发送短信验证码
+     * @param phoneNum 需要发送给哪个手机号码
+     * @return 验证码,若为000000,则发送失败
+     */
+    public String sendMessage(String phoneNum) {
+        try {
+            // 随即6位数赋值验证码
+            String strTemp = (int) ((Math.random() * 9 + 1) * 100000) + "";
+
+            // 数组具体的元素个数和模板中变量个数必须一致
+            // 比如你模板中需要填写验证码和有效时间,{1},{2}
+            // 那你这里的参数就应该填两个
+            //String[] params = {strTemp , "5"};
+            String[] params = {strTemp};
+            SmsSingleSender ssender = new SmsSingleSender(appid, appkey);
+
+            // 签名参数未提供或者为空时,会使用默认签名发送短信
+            SmsSingleSenderResult result = ssender.sendWithParam("86", phoneNum, templateId, params, smsSign, "", "");
+
+            System.out.println("result = " + result);
+
+            // 发送成功则给验证码赋值
+            if (result.result == 0) {
+                str = strTemp;
+            }
+        } catch (HTTPException e1) {
+            // HTTP响应码错误
+            e1.printStackTrace();
+        } catch (JSONException e2) {
+            // json解析错误
+            e2.printStackTrace();
+        } catch (IOException e3) {
+            // 网络IO错误
+            e3.printStackTrace();
+        }
+        return str;
+    }
+
+    /**
+     * 测试计划短信提醒
+     */
+    public static void planMessage(JSONObject resultJson) {
+        try {
+            // 数组具体的元素个数和模板中变量个数必须一致
+            // 比如你模板中需要填写验证码和有效时间,{1},{2}
+            // 那你这里的参数就应该填两个
+            //String[] params = {strTemp , "5"};
+            String[] params = {resultJson.getString("userName"),DateUtil.getDateStr(resultJson.getDate("beginTime"),DateUtil.DEFAULT_DATE),DateUtil.getDateStr(resultJson.getDate("endTime"),DateUtil.DEFAULT_DATE)};
+            SmsSingleSender ssender = new SmsSingleSender(Constant.appId, Constant.appKey);
+
+            // 签名参数未提供或者为空时,会使用默认签名发送短信
+            SmsSingleSenderResult result = ssender.sendWithParam("86", resultJson.getString("phone"), 1401718, params, Constant.smsSign, "", "");
+            JSONObject jsonObject = JSONObject.parseObject(result.toString());
+            String errorMsg = jsonObject.getString("errmsg");
+            if(errorMsg.equals("OK")){
+                log.info(resultJson.getString("phone")+"发送完成");
+            }else {
+                log.info(Utils.unicodeDecode(errorMsg));
+            }
+            System.out.println(resultJson.getString("phone")+"-result = " + result);
+
+        } catch (HTTPException e1) {
+            // HTTP响应码错误
+            e1.printStackTrace();
+        } catch (JSONException e2) {
+            // json解析错误
+            e2.printStackTrace();
+        } catch (IOException e3) {
+            // 网络IO错误
+            e3.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("userName","111");
+        jsonObject.put("phone","18612203962");
+        jsonObject.put("beginTime","20202020");
+        jsonObject.put("endTime","20202020");
+
+        planMessage(jsonObject);
+    }
+
+}

+ 36 - 0
src/main/java/com/rf/youth/utils/ServerUtil.java

@@ -0,0 +1,36 @@
+package com.rf.youth.utils;
+
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.util.Enumeration;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/5/21 15:42
+ */
+public class ServerUtil {
+
+    public  static String getHostIp(){
+        try {
+            for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
+                NetworkInterface intf = en.nextElement();
+                for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();)
+                {
+                    InetAddress inetAddress = enumIpAddr.nextElement();
+                    if (!inetAddress.isLoopbackAddress() && (inetAddress instanceof Inet4Address))
+                    {
+                        System.out.println("LocalhostIP:"+inetAddress.getHostAddress().toString());
+                        return inetAddress.getHostAddress().toString();
+                    }
+                }
+            }
+        }        catch (SocketException ex){
+            ex.printStackTrace();
+        }
+        return null;
+
+    }
+}

+ 23 - 0
src/main/java/com/rf/youth/utils/StringUtils.java

@@ -0,0 +1,23 @@
+package com.rf.youth.utils;
+
+import java.util.regex.Pattern;
+
+/**
+ * @author lpf
+ * @description: String字符串工具类
+ * @date 2022/6/2 10:40
+ */
+public class StringUtils {
+
+
+    //判断是否为数字(int + double + float)
+    public static boolean isNumber(String str) {
+        if (str == null || "".equals(str)) {
+            return false;
+        }
+        Pattern pattern = Pattern.compile("^(-|\\+)?\\d+(\\.\\d+)?$");
+        return pattern.matcher(str).matches();
+    }
+
+
+}

+ 192 - 0
src/main/java/com/rf/youth/utils/Utils.java

@@ -0,0 +1,192 @@
+package com.rf.youth.utils;
+
+
+import com.rf.youth.enums.UserRole;
+import org.apache.commons.lang.StringUtils;
+
+import java.io.*;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Base64;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author zzf
+ * @description:
+ * @date 2021/1/28 10:43
+ */
+public class Utils {
+
+    /**
+     * 计算X的N次方
+     * @param x 常数
+     * @param n 指数
+     * @return
+     */
+    public static int x_n(int x ,int n ){
+        int result = 0;
+        if(n==0){
+            return 1 ;
+        }else{
+            result = x_n(x,n/2);
+            result = result * result;
+            if(n%2 != 0 ){
+                result = x * result;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 计算对数函数
+     * @param a 底数
+     * @param n 真数
+     * @param scale 小数位数
+     * @return
+     */
+    public static double loga_n(int a ,int n,int scale) {
+        double result = Math.log(n) / Math.log(a);
+        return new BigDecimal(result).setScale(scale, RoundingMode.HALF_UP).doubleValue();
+    }
+
+    // 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
+    public static String GetImageStr(String imgFilePath) {
+        byte[] data = null;
+
+        // 读取图片字节数组
+        try {
+            InputStream in = new FileInputStream(imgFilePath);
+            data = new byte[in.available()];
+            in.read(data);
+            in.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        // 对字节数组Base64编码
+        return new String(Base64.getEncoder().encode(data));// 返回Base64编码过的字节数组字符串
+    }
+
+    /**
+     * zzf  roleType  to roleName
+     * @param roleType
+     * @return
+     */
+    public static String roleType2roleName(String roleType){
+        String roleName = "";
+        switch  (roleType){
+
+            case "3":
+                roleName = UserRole.SUPERADMIN.getName();
+                break;
+            case "2":
+                roleName = UserRole.ADMIN.getName();
+                break;
+            case "1":
+                roleName = UserRole.COMMON.getName();
+                break;
+        }
+        return roleName;
+    }
+
+    /**
+     * 日期时间戳转换
+     *
+     * @param dateStr yyyy-MM-dd
+     * @param flag  Constant  搜索关键字  日期转换标志
+     * @return yyyy-MM-dd HH:mm:ss
+     */
+    public static Date date2time(String dateStr,String flag) throws ParseException {
+        if(StringUtils.isBlank(dateStr))
+            return null;
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = simpleDateFormat.parse(dateStr);
+        if(flag.equals("start")){
+            return date;
+        }else {
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(date);
+            calendar.add(Calendar.DATE,1);
+            date = calendar.getTime();
+        }
+        return date;
+    }
+
+
+    // 对字节数组字符串进行Base64解码并生成图片
+    public static boolean GenerateImage(String imgStr, String imgFilePath) {
+        if (imgStr == null) // 图像数据为空
+            return false;
+        try {
+            // Base64解码
+            byte[] bytes = Base64.getDecoder().decode(imgStr);
+            for (int i = 0; i < bytes.length; ++i) {
+                if (bytes[i] < 0) {// 调整异常数据
+                    bytes[i] += 256;
+                }
+            }
+            // 生成jpeg图片
+            OutputStream out = new FileOutputStream(imgFilePath);
+            out.write(bytes);
+            out.flush();
+            out.close();
+            return true;
+        } catch (Exception e) {
+            return false;
+        }
+    }
+    /**
+     * @Title: unicodeDecode
+     * @Description: unicode解码
+     * @param sourceString
+     * @return
+     */
+    public static String unicodeDecode(String sourceString) {
+        Pattern pattern = Pattern.compile("(\\\\u(\\p{XDigit}{4}))");
+        Matcher matcher = pattern.matcher(sourceString);
+        char ch;
+        while (matcher.find()) {
+            ch = (char) Integer.parseInt(matcher.group(2), 16);
+            sourceString = sourceString.replace(matcher.group(1), ch + "");
+        }
+        return sourceString;
+    }
+
+    /**
+     * @Title: unicodeEncode
+     * @Description: unicode编码
+     * @param string
+     * @return
+     */
+    public static String unicodeEncode(String string) {
+        char[] utfBytes = string.toCharArray();
+        String unicodeBytes = "";
+        for (int i = 0; i < utfBytes.length; i++) {
+            String hexB = Integer.toHexString(utfBytes[i]);
+            if (hexB.length() <= 2) {
+                hexB = "00" + hexB;
+            }
+            unicodeBytes = unicodeBytes + "\\u" + hexB;
+        }
+        return unicodeBytes;
+    }
+
+    /**
+     * 两个时间差的分钟数
+     * @param dateFrom 开始时间
+     * @param dateEnd 结束时间
+     */
+    public static long minuteDiff(Date dateFrom , Date dateEnd){
+        long dateLong = dateFrom.getTime()/1000/60;
+        long dateLong1 = dateEnd.getTime()/1000/60;
+        return  (dateLong-dateLong1);
+    }
+
+
+
+}

+ 140 - 0
src/main/java/com/rf/youth/utils/ZipUtils.java

@@ -0,0 +1,140 @@
+package com.rf.youth.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class ZipUtils {
+    private static final Logger log = LoggerFactory.getLogger(ZipUtils.class);
+
+    private ZipUtils() {
+    }
+    /**
+     * 创建ZIP文件
+     * @param sourcePath 文件或文件夹路径
+     * @param zipPath 生成的zip文件存在路径(包括文件名)
+     * @param isDrop  是否删除原文件:true删除、false不删除
+     */
+    public static void createZip(String sourcePath, String zipPath,Boolean isDrop) {
+        FileOutputStream fos = null;
+        ZipOutputStream zos = null;
+        try {
+            fos = new FileOutputStream(zipPath);
+            zos = new ZipOutputStream(fos);
+            //zos.setEncoding("utf8");//此处修改字节码方式。
+            //createXmlFile(sourcePath,"293.xml");
+            writeZip(new File(sourcePath), "", zos,isDrop);
+        } catch (FileNotFoundException e) {
+            log.error("创建ZIP文件失败",e);
+        } finally {
+            try {
+                if (zos != null) {
+                    zos.close();
+                }
+            } catch (IOException e) {
+                log.error("创建ZIP文件失败",e);
+            }
+
+        }
+    }
+    /**
+     * 清空文件和文件目录
+     *
+     * @param f
+     */
+    public static void clean(File f) throws Exception {
+        String cs[] = f.list();
+        if (cs == null || cs.length <= 0) {
+            //System.out.println("delFile:[ " + f + " ]");
+            boolean isDelete = f.delete();
+            if (!isDelete) {
+                //System.out.println("delFile:[ " + f.getName() + "文件删除失败!" + " ]");
+                throw new Exception(f.getName() + "文件删除失败!");
+            }
+        } else {
+            for (int i = 0; i < cs.length; i++) {
+                String cn = cs[i];
+                String cp = f.getPath() + File.separator + cn;
+                File f2 = new File(cp);
+                if (f2.exists() && f2.isFile()) {
+                    //System.out.println("delFile:[ " + f2 + " ]");
+                    boolean isDelete = f2.delete();
+                    if (!isDelete) {
+                        //System.out.println("delFile:[ " + f2.getName() + "文件删除失败!" + " ]");
+                        throw new Exception(f2.getName() + "文件删除失败!");
+                    }
+                } else if (f2.exists() && f2.isDirectory()) {
+                    clean(f2);
+                }
+            }
+            //System.out.println("delFile:[ " + f + " ]");
+            boolean isDelete = f.delete();
+            if (!isDelete) {
+                //System.out.println("delFile:[ " + f.getName() + "文件删除失败!" + " ]");
+                throw new Exception(f.getName() + "文件删除失败!");
+            }
+        }
+    }
+    private static void writeZip(File file, String parentPath, ZipOutputStream zos,Boolean isDrop) {
+        if(file.exists()){
+            if(file.isDirectory()){//处理文件夹
+                parentPath+=file.getName()+File.separator;
+                File [] files=file.listFiles();
+                if(files.length != 0)
+                {
+                    for(File f:files){
+                        writeZip(f, parentPath, zos,isDrop);
+                    }
+                }
+                else
+                {       //空目录则创建当前目录
+                    try {
+                        zos.putNextEntry(new ZipEntry(parentPath));
+                    } catch (IOException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                    }
+                }
+            }else{
+                FileInputStream fis=null;
+                try {
+                    fis=new FileInputStream(file);
+                    ZipEntry ze = new ZipEntry(parentPath + file.getName());
+                    zos.putNextEntry(ze);
+                    byte [] content=new byte[1024];
+                    int len;
+                    while((len=fis.read(content))!=-1){
+                        zos.write(content,0,len);
+                        zos.flush();
+                    }
+
+                } catch (FileNotFoundException e) {
+                    log.error("创建ZIP文件失败",e);
+                } catch (IOException e) {
+                    log.error("创建ZIP文件失败",e);
+                }finally{
+                    try {
+                        if(fis!=null){
+                            fis.close();
+                        }
+                        if(isDrop){
+                            clean(file);
+                        }
+                    }catch(IOException e){
+                        log.error("创建ZIP文件失败",e);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+}

+ 201 - 0
src/main/java/com/softkey/jsyunew3.java

@@ -0,0 +1,201 @@
+package com.softkey;
+
+public class jsyunew3
+{
+	//获到锁的版本
+	public static native int GetVersion(String InPath);
+	//获到锁的扩展版本
+	public static native int GetVersionEx(String InPath);
+	//获到锁的ID
+	public static native long GetID_1(String InPath);
+	public static native long GetID_2(String InPath);
+	//返回最后的错误信息
+	public static native long get_LastError();
+	//查找加密锁
+	public static native String FindPort(int start);
+	//查找指定的加密锁(使用普通算法一)
+	public static native String FindPort_2(int start,long in_data,long verf_data);
+	//查找指定的加密锁(使用普通算法二)
+	public static native String FindPort_3(int start, long in_data, long verf_data);
+
+	//设置读密码
+	public static native int SetReadPassword(String W_hkey, String W_lkey, String new_hkey, String new_lkey, String InPath);
+	//设置写密码
+	public static native int SetWritePassword(String W_hkey, String W_lkey, String new_hkey, String new_lkey, String InPath);
+	//普通算法函数
+	public static native int sWriteEx_New(int in_data, String KeyPath);
+	public static native int sWrite_2Ex_New(int in_data, String KeyPath);
+	public static native int sWriteEx(int InData, String InPath);
+	public static native int sWrite_2Ex(int InData, String InPath);
+	public static native long sRead(String InPath);
+	public static native int sWrite(long InData,String InPath);
+	public static native int sWrite_2(long InData,String InPath);
+	//从加密锁中读取一批字节
+	public static native int YReadEx(short Address, short len, String HKey, String LKey, String InPath);
+	//从加密锁中读取一个字节,一般不使用
+	public static native int YRead(short Address, String HKey, String LKey, String InPath);
+	//从缓冲区中获得数据
+	public static native short GetBuf(int pos);
+	//写一批字节到加密锁中
+	public static native int YWriteEx(short Address, short len, String HKey, String LKey, String InPath);
+	//写一个字节到加密锁中,一般不使用
+	public static native int YWrite(short inData, short Address, String HKey, String LKey, String InPath);
+	//设置要写入的缓冲区的数据
+	public static native int SetBuf(int pos, short Data);
+	//从加密锁中读字符串-新
+	public static native String NewReadString(int Address, int len, String HKey, String LKey, String InPath);
+	//写字符串到加密锁中-新
+	public static native int NewWriteString(String InString, int Address, String HKey, String LKey, String InPath);
+	//兼容旧的读写字符串函数,不再使用
+	public static native String YReadString(short Address, short len, String HKey, String LKey,String InPath);
+	public static native int YWriteString(String InString, short Address, String HKey, String LKey,String InPath);
+	//'设置增强算法密钥一
+	public static native int SetCal_2(String Key, String InPath);
+	//使用增强算法一对字符串进行加密
+	public static native String EncString(String InString, String InPath);
+	//使用增强算法一对二进制数据进行加密
+	public static native int Cal(String InPath);
+	//'设置增强算法密钥二
+	public static native int SetCal_New(String Key, String InPath);
+	//使用增强算法二对字符串进行加密
+	public static native String EncString_New(String InString, String InPath);
+	//使用增强算法二对二进制数据进行加密
+	public static native int Cal_New(String InPath);
+	//使用增强算法对字符串进行解密
+	public static native String DecString(String InString, String Key);
+	//设置要加密的缓冲区的数据
+	public static native int SetEncBuf(int pos, short Data);
+	//从缓冲区中获取加密后的数据
+	public static native short GetEncBuf(int pos);
+
+	//返回加密锁的公钥对
+	public static native String GetPubKeyX(String InPath);
+	public static native String GetPubKeyY(String InPath);
+	//生成SM2密钥对,获取私钥及公钥
+	public static native String get_GenPriKey();
+	public static native String get_GenPubKeyX();
+	public static native String get_GenPubKeyY();
+	//生成SM2密钥对,产生密钥对
+	public static native int StarGenKeyPair(String InPath);
+	public static native String SM2_EncString(String InString,String InPath);
+	public static native String SM2_DecString(String InString,String Pin,String InPath);
+	public static native int YtSetPin(String OldPin,String NewPin,String InPath);
+	//对消息进行签名
+	public static native String YtSign(String msg,String Pin,String InPath);
+	//对签名进行验证
+	public static native boolean YtVerfiy(String id,String msg,String PubKeyX,String  PubKeyY,String VerfiySign,String InPath);
+	//设置SM2密钥对及身份
+	public static native int Set_SM2_KeyPair(String PriKey,String PubKeyX,String PubKeyY,String sm2UserName,String InPath);
+	//获取加密锁中的身份
+	public static native String GetSm2UserName(String InPath);
+	//返回锁的硬件芯片唯一ID
+	public static native String GetChipID(String InPath);
+	//查找加密锁,返回的是U盘的路径,即U盘的盘符,通过这个路径也可以直接操作锁
+	public static native String FindU(int start);
+	//查找指定的加密锁(使得普通算法二),返回的是U盘的路径,即U盘的盘符,通过这个路径也可以直接操作锁
+	public static native String FindU_3(int start,int in_data,int verf_data);
+	//查找指定的加密锁(使得普通算法一),返回的是U盘的路径,即U盘的盘符,通过这个路径也可以直接操作锁
+	public static native String FindU_2(int start,int in_data,int verf_data);
+	//设置U盘部分为只读状态,
+	public static native int SetUReadOnly(String InPath);
+	//设置是否显示U盘部分盘符,真为显示,否为不显示
+	public static native int SetHidOnly(boolean IsHidOnly,String InPath);
+	//返回U盘部分是否为只读状态,真为只读
+	public static native boolean IsUReadOnly(String InPath);
+
+	//设置锁的ID
+	public static native int SetID(String Seed, String InPath);
+	//设置普通算法
+	public static native int SetCal(String Old_hkey, String Old_lkey, String new_hkey, String new_lkey, String InPath);
+	//获取出厂唯一编码
+	public static native String GetProduceDate(String InPath);
+
+	//***初始化加密锁函数
+	public static native int ReSet(String InPath);
+
+	//以下是代码下载及运行所需要的函数
+	//查找D8加密狗
+	public static native String FindD8(int pos,String VerfCode);
+	//获取功能版本
+	public static native int GetFuncVer(String InPath);
+
+	//下载要运行的代码
+	public static native int  DownLoadBinFile(boolean bIsEnc,String BinFile,String InPath);
+	public static native int  DownLoadData(boolean bIsEnc,byte[] Buf,int BufLen,String InPath);
+	public static native String  EncBinFile(String BinFile,String Key);
+	//运行函数
+	public static native int RunFuntion(String FunctionName,String InPath );
+	public static native int ContinuRun(String InPath);
+
+	//设置初始化变量值到锁中
+	public static native int  SetVar(byte []Buf,int MemBeginPos,int BufLen,String InPath);
+	//从锁中返回运行结果
+	public static native byte[] GetVar(int MemBeginPos,int OutBufLen,String InPath);
+
+	//设置下载密钥
+	public static native String  SetDownLodKey(String OldKey,String NewKey,String InPath);
+	public static native int  OpenKey(String VerfCode,String InPath);//下载数据时,要先打开KEY,这个函数也可以用于验证是否是自己的KEY
+	public static native int  CloseKey(String InPath);//关闭KEY,用于禁止下载,要下载BIN文件到KYE时,必须要先打开
+
+
+	//调用上位机API,
+	public static native byte [] GetApiParam(int OutLen,String InPath);//获取要输入的参数数据
+	public static native int  SetApiParam(byte []Buf,int InLen,String InPath);//设置要返回的参数数据
+
+	//操作28K储存器
+	public static native int WriteEprom(byte[]InBuf,int Addr,int len,String HKey,String LKey,String InPath);
+	public static native byte [] ReadEprom(int Addr,int len,String HKey,String LKey,String InPath);
+	public static native int NewSetReadPassword(String OldWriteHKey,String OldWriteLKey,String NewHKey,String NewLKey,String InPath);
+	public static native int NewSetWritePassword(String OldWriteHKey,String OldWriteLKey,String NewHKey,String NewLKey,String InPath);
+
+	//时间限制
+	public static native int GetLimitYear(String InPath);
+	public static native int GetLimitMonth(String InPath);
+	public static native int GetLimitDay(String InPath);
+	public static native int GetUserID(String InPath);
+	public static native int GetLeaveNumber(String InPath);
+	public static native int GetLeaveDays(String CurDate,String InPath);
+	public static native int CheckBind(boolean bIsAdd,String MacAddr,String InPath);
+	public static native int CheckNumber(String InPath);
+	public static native int CheckDate(String InDate,String InPath);
+	public static native int UpdateAuth(byte Flag,String Auth,String InPath);
+	public static native int DateAuth(int CurYear,byte CurMonth,byte CurDay,
+									  int LimitYear,byte LimitMonth,byte LimitDay,int UserID,
+									  String Key,String InPath);
+	public static native int NumberAuth(int Number,int UserID,String Key,String InPath);
+	public static native int BindAuth(boolean bReBind,int BindCount,int UserID,String Key,String InPath);
+	public static native int GetLimitBindCount(String InPath);
+	public static native int GetAlreadyBindCoun(String InPath);
+	public static native String MakeBindAuth(boolean bReBind, int BindCount, int UserID, String Key);
+	public static native String MakeNumberAuth(int Number,int UserID,String Key);
+	public static native String MakeDateAuth(int CurYear,byte CurMonth,byte CurDay,
+											 int LimitYear,byte LimitMonth,byte LimitDay,int UserID,
+											 String Key);
+	public static native int CloseUsbHandle(String InPath);
+	static
+	{
+		String DllName;
+		String JdkBit=System.getProperty("sun.arch.data.model");
+		if(JdkBit.equals("32"))
+		{
+			DllName="Jsyunew3";
+
+		}
+		else
+		{
+			DllName = "Jsyunew3_64";
+
+		}
+		try
+		{
+
+			System.loadLibrary(DllName);
+		}
+		catch (UnsatisfiedLinkError e)
+		{
+			System.err.println("Can//t find library:" + DllName);
+			System.exit(-1);
+		}
+	}
+
+}

Some files were not shown because too many files changed in this diff