15810770710@163.com 4 éve
szülő
commit
eda95f1da5
29 módosított fájl, 2012 hozzáadás és 0 törlés
  1. 118 0
      .mvn/wrapper/MavenWrapperDownloader.java
  2. 2 0
      .mvn/wrapper/maven-wrapper.properties
  3. 9 0
      HELP.md
  4. 310 0
      mvnw
  5. 182 0
      mvnw.cmd
  6. 248 0
      pom.xml
  7. 37 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/App.java
  8. 37 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/SwaggerConfig.java
  9. 138 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/action/Supplier10000039Action.java
  10. 20 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/service/Supplier10000039Service.java
  11. 365 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/service/Supplier10000039ServiceImpl.java
  12. 27 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/CheckUtils.java
  13. 87 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/DateUtil.java
  14. 65 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/QueryBuilerUtil.java
  15. 26 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/SearchSourceBuilderUtil.java
  16. 88 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/Sm3Utils.java
  17. 20 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/DriverVerificationRequestObject.java
  18. 15 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/ResultBody.java
  19. 9 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/UserLiveRequestObject.java
  20. 14 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/UserLiveResponseObject.java
  21. 10 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/VoucherLiveRequestObject.java
  22. 12 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/VoucherLiveResponseObject.java
  23. 91 0
      src/main/resources/config/application-test.yml
  24. 3 0
      src/main/resources/config/banner.txt
  25. 34 0
      src/main/resources/config/bootstrap.yml
  26. 37 0
      src/main/resources/config/logback-spring.xml
  27. 8 0
      src/main/resources/docker/Dockerfile
  28. BIN
      src/main/resources/lib/IDOCR-PubSdk-QueryService-Std-Java-Release-V2.2.1.jar
  29. BIN
      src/main/resources/lib/eid-clouddecode-ap-service-sdk-release-1.4.0-proguard.jar

+ 118 - 0
.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-present the original author or 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.
+ */
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    private static final String WRAPPER_VERSION = "0.5.6";
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+            + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+            String username = System.getenv("MVNW_USERNAME");
+            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+            Authenticator.setDefault(new Authenticator() {
+                @Override
+                protected PasswordAuthentication getPasswordAuthentication() {
+                    return new PasswordAuthentication(username, password);
+                }
+            });
+        }
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

+ 2 - 0
.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

+ 9 - 0
HELP.md

@@ -0,0 +1,9 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.4.1/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.4.1/maven-plugin/reference/html/#build-image)
+

+ 310 - 0
mvnw

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

+ 182 - 0
mvnw.cmd

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

+ 248 - 0
pom.xml

@@ -0,0 +1,248 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.0.6.RELEASE</version>
+    </parent>
+  <artifactId>iov-sjjh-servicenode-supplier-10000039</artifactId>
+  <version>1.0.8</version>
+
+  <name>iov-sjjh-servicenode-supplier-10000039</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <!-- 服务注册 -->
+      <dependency>
+          <groupId>org.springframework.cloud</groupId>
+          <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+      </dependency>
+
+
+      <dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+		</dependency>
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-devtools</artifactId>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+			<artifactId>spring-cloud-config-client</artifactId>
+		</dependency>
+		
+		<!-- aspire maven私服 -->
+		<dependency>
+       		<groupId>info.aspirecn.rdc</groupId>
+			<artifactId>aspirecloud-commons-sleuthlog-starter</artifactId>
+            <version>5.0.1</version>
+	    </dependency>
+	    
+	    <dependency>
+			<groupId>info.aspirecn.rdc</groupId>
+			<artifactId>aspirecloud-commons-errorlog-starter</artifactId>
+            <version>5.0.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>info.aspirecn.iov.sjjh</groupId>
+			<artifactId>iov-sjjh-commons-lang</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>clouddecode.eid.sdk</groupId>
+			<artifactId>clouddecode</artifactId>
+			<version>1.0.0</version>
+			<scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/eid-clouddecode-ap-service-sdk-release-1.4.0-proguard.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib</artifactId>
+			<version>2.4</version>
+			<classifier>jdk15</classifier>
+		</dependency>
+		<dependency>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcprov-jdk16</artifactId>
+			<version>1.46</version>
+		</dependency>
+		 <dependency>
+	      <groupId>org.springframework.boot</groupId>
+	      <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
+	    </dependency>
+	    <dependency>
+	      <groupId>io.searchbox</groupId>
+	      <artifactId>jest</artifactId>
+	      <version>6.3.1</version>
+	    </dependency>
+      <dependency>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-starter-actuator</artifactId>
+      </dependency>
+            		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.70</version>
+		</dependency>
+		
+  </dependencies>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>Finchley.SR2</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                    <includes>
+                        <include>
+                            <groupId>info.aspirecn.iov.sjjh</groupId>
+                            <artifactId>iov-sjjh-commons-lang</artifactId>
+                        </include>
+                        <include>
+                            <groupId>clouddecode.eid.sdk</groupId>
+                            <artifactId>clouddecode</artifactId>
+                        </include>
+                    </includes>
+                </configuration>
+
+
+			</plugin>
+			
+			<plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                 <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>lib/</classpathPrefix>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <excludeGroupIds>
+                                info.aspirecn.iov.sjjh,clouddecode.eid.sdk
+                            </excludeGroupIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+					    <id>copy</id>
+					    <phase>install</phase>
+					    <goals>
+					        <goal>copy-dependencies</goal>
+					    </goals>
+					    <configuration>
+					        <outputDirectory>
+					            ${project.build.directory}/lib
+					        </outputDirectory>
+					        <excludeGroupIds>
+                                info.aspirecn.iov.sjjh,clouddecode.eid.sdk
+					        </excludeGroupIds>
+					    </configuration>
+					</execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-resources</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>target/classes</outputDirectory>
+                            <useDefaultDelimiters>false</useDefaultDelimiters>
+                            <delimiters>
+                                <delimiter>@</delimiter>
+                            </delimiters>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources</directory>
+                                    <filtering>true</filtering>
+                                    <includes>
+                                        <include>**</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+			<plugin>
+				<groupId>com.spotify</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.0</version>
+                <configuration>
+                    <!-- 设置Docker 镜像名称 -->
+                    <imageName>hub.i139.cn/iov-sjjh/${project.artifactId}:${project.version}</imageName>
+                    <!-- 设置Dockerfile存放目录地址 -->
+                    <dockerDirectory>${project.basedir}/src/main/resources/docker</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <!-- 设置和setting.xml中的servers对应的server,里面存放了docker hub仓库的用户名、密码 -->
+                    <serverId>docker-hub</serverId>
+                    <!-- 设置docker hub仓库地址 -->
+                    <registryUrl>https://hub.i139.cn</registryUrl>
+                    <!-- 设置docker remote API地址 -->
+                    <!--<dockerHost>http://docker-in-docker.rdc-plugin:2375</dockerHost>-->
+                </configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 37 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/App.java

@@ -0,0 +1,37 @@
+package info.aspirecn.iov.sjjh.supplier10000039;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.env.Environment;
+import org.springframework.util.StopWatch;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+import info.aspirecn.rdc.aspirecloud.node.except.annotations.EnableAspireCloudRdcHandleExcept;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 
+ * @author bzh
+ *
+ */
+@SpringBootApplication
+@EnableAspireCloudRdcHandleExcept
+@Slf4j
+@EnableEurekaClient
+public class App {
+	public static void main(String[] args) throws JsonProcessingException {
+        StopWatch watch = new StopWatch();
+        watch.start();
+
+        ApplicationContext context = SpringApplication.run(App.class, args);
+        Environment environment = context.getBean(Environment.class);
+        String applicationName = environment.getProperty("spring.application.name");
+        
+        watch.stop();
+        log.info("{} 启动完毕,times={}s", applicationName, watch.getTotalTimeSeconds());
+    }
+	
+}

+ 37 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/SwaggerConfig.java

@@ -0,0 +1,37 @@
+package info.aspirecn.iov.sjjh.supplier10000039;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * 
+ * @author minmin
+ *
+ */
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+	@Value("${swagger.show}")
+    private boolean swaggerShow;
+
+    @Bean
+    public Docket createRestApi() {
+
+        return new Docket(DocumentationType.SWAGGER_2).enable(swaggerShow).apiInfo(apiInfo()).select()
+                .apis(RequestHandlerSelectors.basePackage("info.aspirecn.iov.sjjh.supplier10000039.action"))
+                .paths(PathSelectors.any()).build();
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder().title("10000039通道接口").description("").termsOfServiceUrl("").version("1.0.0").build();
+    }
+}

+ 138 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/action/Supplier10000039Action.java

@@ -0,0 +1,138 @@
+package info.aspirecn.iov.sjjh.supplier10000039.action;
+
+
+
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.supplier10000039.service.Supplier10000039Service;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 
+ * @author bzh
+ *
+ */
+@Slf4j
+@RestController
+public class Supplier10000039Action {
+	/**日志参数中的错误参数名*/
+	private static final String LOG_ERROR_PARA = "respnoseCode";
+	/**日志参数中的是否收费*/
+	private static final String LOG_FEE_PARA = "isCharge";
+	
+	@Autowired
+	private Supplier10000039Service service;
+	
+	@ApiOperation(value = "活体证件查询比对返照接口", notes = "")
+	@PostMapping(value = "/queryUserlive.do")
+    public ChannelTypeHandleResponseObject queryUserlive(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {		
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+	
+		//调用service
+		ChannelTypeHandleResponseObject ret = service.queryUserlive(request, customBody, outTime);
+        //把接口参数、调用结果和是否收费放入访问日志中
+        if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY, 
+					Base64.encodeBase64String(customBody.getBytes("utf-8")));
+
+    	} catch (Exception ex) {
+    		ErrorUtils.captureException(ex);
+    		log.error("Supplier10000038Action.queryUserlive.Exception{}", ex);
+    	}
+		
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);        
+        return ret;
+	}
+	
+	@ApiOperation(value = "eID人像证照比对编码服务接口", notes = "")
+	@PostMapping(value = "/queryVoucherlive.do")
+    public ChannelTypeHandleResponseObject queryVoucherlive(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {		
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+	
+		//调用service
+		ChannelTypeHandleResponseObject ret = service.queryVoucherlive(request, customBody, outTime);
+        //把接口参数、调用结果和是否收费放入访问日志中
+        if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY, 
+					Base64.encodeBase64String(customBody.getBytes("utf-8")));
+
+    	} catch (Exception ex) {
+    		ErrorUtils.captureException(ex);
+    		log.error("Supplier10000038Action.queryVoucherlive.Exception{}", ex);
+    	}
+		
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);        
+        return ret;
+	}
+	
+
+	@ApiOperation(value = "司机线上线下一致性验证接口", notes = "")
+	@PostMapping(value = "/driverVerification.do")
+    public ChannelTypeHandleResponseObject driverVerification(
+    		@ApiParam(value="通道ID")@RequestHeader(name="channelId")  String channelId,
+    		@ApiParam(value="超时时间,单位:毫秒",example = "10000")@RequestParam(name = "outTime", required = true) int outTime,
+    		@ApiParam(value="请求参数JSON串")@RequestParam(name = "customBody", required = true) String customBody) {		
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
+				.getRequest();
+	
+		//调用service
+		ChannelTypeHandleResponseObject ret = service.driverVerification(request, customBody, outTime);
+        //把接口参数、调用结果和是否收费放入访问日志中
+        if(ret.getCode() != Constant.SUCCESS) {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+    	} else {
+    		request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_SUCCESS_CODE);
+    	}
+    	request.setAttribute(LOG_FEE_PARA, ret.getIsCharge());
+
+		try {
+			request.setAttribute(Constant.CHANNEL_LOG_QUERY, 
+					Base64.encodeBase64String(customBody.getBytes("utf-8")));
+
+    	} catch (Exception ex) {
+    		ErrorUtils.captureException(ex);
+    		log.error("Supplier10000038Action.driverVerification.Exception{}", ex);
+    	}
+		
+		request.setAttribute(Constant.CHANNEL_TYPE_KEY,Constant.CHANNEL_TYPE_SYNC);        
+        return ret;
+	}
+
+}

+ 20 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/service/Supplier10000039Service.java

@@ -0,0 +1,20 @@
+package info.aspirecn.iov.sjjh.supplier10000039.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+
+/**
+ * 
+ * @author bzh
+ *
+ */
+public interface Supplier10000039Service {
+
+	ChannelTypeHandleResponseObject queryUserlive(HttpServletRequest request, String customBody, int outTime);
+
+	ChannelTypeHandleResponseObject queryVoucherlive(HttpServletRequest request, String customBody, int outTime);
+
+	ChannelTypeHandleResponseObject driverVerification(HttpServletRequest request, String customBody, int outTime);
+
+}

+ 365 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/service/Supplier10000039ServiceImpl.java

@@ -0,0 +1,365 @@
+package info.aspirecn.iov.sjjh.supplier10000039.service;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+
+import info.aspirecn.iov.sjjh.supplier10000039.util.Sm3Utils;
+import org.aiav.eid.clouddecode.apsdk.constants.PublicParam;
+import org.aiav.eid.clouddecode.apsdk.pojo.request.EidImageCompareParam;
+import org.aiav.eid.clouddecode.apsdk.pojo.result.CommonResult;
+import org.aiav.eid.clouddecode.apsdk.service.EidlinkService;
+import org.apache.commons.lang3.StringUtils;
+import org.elasticsearch.index.query.BoolQueryBuilder;
+import org.elasticsearch.index.query.QueryBuilders;
+import org.elasticsearch.search.builder.SearchSourceBuilder;
+import org.elasticsearch.search.sort.SortOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.supplier10000039.util.CheckUtils;
+import info.aspirecn.iov.sjjh.supplier10000039.util.DateUtil;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.DriverVerificationRequestObject;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.ResultBody;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.UserLiveRequestObject;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.UserLiveResponseObject;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.VoucherLiveRequestObject;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.VoucherLiveResponseObject;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import io.searchbox.client.JestClient;
+import io.searchbox.core.Search;
+import io.searchbox.core.SearchResult;
+import lombok.extern.slf4j.Slf4j;
+
+
+/**
+ * 
+ * @author bzh
+ *
+ */
+@Slf4j
+@Service
+public class Supplier10000039ServiceImpl implements Supplier10000039Service {	
+	
+	@Value("${supplier.eIdLinkIp}")
+	private String eIdLinkIp;
+	@Value("${supplier.eIdLinkPort}")
+	private int eIdLinkPort;
+	@Value("${supplier.appId}")
+	private String appId;
+	@Value("${supplier.appKey}")
+	private String appKey;
+	@Value("${firstIndex}")
+	private String firstIndex;
+
+	@Autowired
+    private JestClient jestClient;
+    @Autowired
+    private ObjectMapper objectMapper;
+	  
+	@Override
+	public ChannelTypeHandleResponseObject queryUserlive(HttpServletRequest request, String customBody, int outTime) {
+		 ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
+	        String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+	        try {
+	            UserLiveRequestObject jsonResolveObject = objectMapper.readValue(customBody,
+	                    UserLiveRequestObject.class);
+
+	            if (CheckUtils.checkUserParam(jsonResolveObject)) {
+	                res.setResultCode(Constant.INVALID_PARAMETER_CODE);
+	                res.setResultBody(Constant.INVALID_PARAMETER);
+	                res.setResultDesc(Constant.INVALID_PARAMETER);
+	                return res;
+	            }
+	            res.setIsCharge(Constant.IS_NOT_CHARGE);
+	            res.setCode(Constant.SUCCESS);
+		       	EidlinkService.initBasicInfo(eIdLinkIp, eIdLinkPort, appId, appKey);
+				 //私有参数
+		  		PublicParam publicParam = new PublicParam();
+		  		EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, jsonResolveObject.getReqID());
+		  	    CommonResult responseObject = EidlinkService.register(eidImageCompareParam);
+		  	    String body = JSON.toJSONString(responseObject);
+	            log.info("responseObject.body:{}",body);
+	            if(responseObject ==null){
+	                res.setResultCode(Constant.OTHER_ERROR_CODE);
+	                res.setResultBody(Constant.OTHER_ERROR);
+	                res.setResultDesc(Constant.OTHER_ERROR);
+	            }else{
+	                upstreamCode =responseObject.getResult();
+	                if ("00".equals(responseObject.getResult())) {
+	                	UserLiveResponseObject userLiveResponseObject=new UserLiveResponseObject();
+	                	userLiveResponseObject.setReqId(responseObject.getReqID());
+	                	userLiveResponseObject.setAppeidcode(responseObject.getAppEidCode());
+	                	userLiveResponseObject.setEIDvoucher(responseObject.geteIDvoucher());
+	                	userLiveResponseObject.setH1(responseObject.getH1());
+	                	userLiveResponseObject.setSimilarity(responseObject.getSimilarity());
+	                	userLiveResponseObject.setResult_msg(responseObject.getResult_msg());
+	                    res.setResultCode(Constant.MATCH_CODE);
+	                    res.setResultBody(userLiveResponseObject);
+	                    res.setResultDesc("查询成功");
+	                    res.setIsCharge(Constant.IS_CHARGE);
+	                }else {
+	                	res.setResultCode(Constant.OTHER_ERROR_CODE);
+		                res.setResultBody(Constant.OTHER_ERROR);
+		                res.setResultDesc(Constant.OTHER_ERROR);
+					}
+	            }
+	            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE,  upstreamCode);
+	            return res;
+	        } catch (IOException e) {
+	            ErrorUtils.captureException(e);
+	            log.error("IOException,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        } catch (Exception e) {
+	            ErrorUtils.captureException(e);
+	            log.error("Exception,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        }
+	}
+
+	@Override
+	public ChannelTypeHandleResponseObject queryVoucherlive(HttpServletRequest request, String customBody, int outTime) {
+		 ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
+	        String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+	        try {
+	            VoucherLiveRequestObject jsonResolveObject = objectMapper.readValue(customBody,
+	            		VoucherLiveRequestObject.class);
+	            if (CheckUtils.checkVoucherParam(jsonResolveObject)) {
+	                res.setResultCode(Constant.INVALID_PARAMETER_CODE);
+	                res.setResultBody(Constant.INVALID_PARAMETER);
+	                res.setResultDesc(Constant.INVALID_PARAMETER);
+	                return res;
+	            }
+	            res.setIsCharge(Constant.IS_NOT_CHARGE);
+	            res.setCode(Constant.SUCCESS);
+	            String reqID = jsonResolveObject.getReqID();
+           		String eIDvoucher = jsonResolveObject.getEidVoucher();
+           		String appeidcode = jsonResolveObject.getAppeIdCode();
+            	PublicParam publicParam = new PublicParam();
+           		EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, reqID, eIDvoucher, appeidcode);
+           		CommonResult responseObject = EidlinkService.eidImageCompare(eidImageCompareParam);
+           		String body = JSON.toJSONString(responseObject);
+	            log.info("responseObject.body:{}",body);
+	            if(responseObject ==null){
+	                res.setResultCode(Constant.OTHER_ERROR_CODE);
+	                res.setResultBody(Constant.OTHER_ERROR);
+	                res.setResultDesc(Constant.OTHER_ERROR);
+	            }else{
+	                upstreamCode =responseObject.getResult();
+	                if ("00".equals(responseObject.getResult())) {
+	                  	VoucherLiveResponseObject voucherLiveResponseObject=new VoucherLiveResponseObject();
+	                  	voucherLiveResponseObject.setReqId(responseObject.getReqID());
+	                  	voucherLiveResponseObject.setAppeidcode(responseObject.getAppEidCode());
+	                  	voucherLiveResponseObject.setH1(responseObject.getH1());
+	                  	voucherLiveResponseObject.setSimilarity(responseObject.getSimilarity());
+	                  	voucherLiveResponseObject.setResult_msg(responseObject.getResult_msg());
+	                    res.setResultCode(Constant.MATCH_CODE);
+	                    res.setResultBody(voucherLiveResponseObject);
+	                    res.setResultDesc("查询成功");
+	                    res.setIsCharge(Constant.IS_CHARGE);
+	                }else {
+	                	res.setResultCode(Constant.OTHER_ERROR_CODE);
+		                res.setResultBody(Constant.OTHER_ERROR);
+		                res.setResultDesc(Constant.OTHER_ERROR);
+					}
+	            }
+	            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE,  upstreamCode);
+	            return res;
+	        } catch (IOException e) {
+	            ErrorUtils.captureException(e);
+	            log.error("IOException,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        } catch (Exception e) {
+	            ErrorUtils.captureException(e);
+	            log.error("Exception,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        }
+	}
+	
+	@Override
+	public ChannelTypeHandleResponseObject driverVerification(HttpServletRequest request, String customBody, int outTime) {
+		 ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
+	        String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+	        try {
+	            DriverVerificationRequestObject jsonResolveObject = objectMapper.readValue(customBody,
+	            		DriverVerificationRequestObject.class);
+	            List<String> list=new ArrayList<String>();
+				if (StringUtils.isBlank(jsonResolveObject.getShippingNoteNumber())&&"".equals(jsonResolveObject.getShippingNoteNumber())) {
+					list.add("shippingNoteNumber");
+				}
+				if (jsonResolveObject.getDrivers()==null&&jsonResolveObject.getDrivers().size()==0) {
+					list.add("name");
+					list.add("idNumber");
+				}
+				if (StringUtils.isBlank(jsonResolveObject.getDespatchActualDateTime())&&"".equals(jsonResolveObject.getDespatchActualDateTime())) {
+					list.add("despatchActualDateTime");
+				}
+				if (list.size()>0) {
+					ResultBody resultBody = new ResultBody();
+					resultBody.setCode(3);
+					resultBody.setResultList(list);
+					res.setResultBody(resultBody);
+					res.setResultCode(Constant.INVALID_PARAMETER_CODE);
+					return res;
+				}
+				res.setIsCharge(Constant.IS_NOT_CHARGE);
+	            res.setCode(Constant.SUCCESS);
+				// 创建 Bool 查询构建器
+	            BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
+	            // 构建查询条件
+	            boolQueryBuilder.must(QueryBuilders.termsQuery("RequestInfo.ShippingNoteNumber.keyword",jsonResolveObject.getShippingNoteNumber()));
+	            boolQueryBuilder.must(QueryBuilders.termsQuery("URI.keyword","/info_check/living.do"));
+	            // 构建查询源构建器
+	            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
+	            searchSourceBuilder.query(boolQueryBuilder);
+	            searchSourceBuilder.sort("DateTime", SortOrder.DESC);
+	            //设置源字段过虑,第一个参数结果集包括哪些字段,第二个参数表示结果集不包括哪些字段
+	            searchSourceBuilder.fetchSource(new String[]{"RequestInfo","Check-Reuslt", "DateTime","MG-Consistent"}, null);
+	            Search build = new Search.Builder(searchSourceBuilder.toString()).addIndex("access-yysj_gateway_first_log-cloud-yysj*").addType("doc").build();
+	            SearchResult result = jestClient.execute(build);
+	            //结果处理
+	        	ResultBody resultBody = new ResultBody();
+	        	 String reqId = "";
+	            if (result.isSucceeded()) {
+	            	 JsonObject jsonObject = result.getJsonObject();
+	                 JsonObject hits = jsonObject.getAsJsonObject("hits");
+	                 JsonArray array = hits.get("hits").getAsJsonArray();
+	                 int size = array.size();
+	                 //校验订单号
+	                 if (size<=0) {
+	                	//数据源为空响应
+	                	list.add("shippingNoteNumber");
+	                	res.setResultCode(Constant.UN_MATCH_CODE);
+						resultBody.setCode(1);
+						resultBody.setResultList(list);
+						res.setResultBody(resultBody);
+	 	                return res;
+					 }
+                	 JsonObject hit = array.get(0).getAsJsonObject();
+                     JsonObject source = hit.get("_source").getAsJsonObject();
+                     log.info("活体数据查询:{}",source);
+                     String dateTime = source.get("DateTime").getAsString();
+                     String dealDateFormat = DateUtil.dealDateFormat(dateTime);
+                     //发货时间前2小时
+                     String starTime = DateUtil.starTime(jsonResolveObject.getDespatchActualDateTime());
+                     //发货时间后2小时
+                     String endTime = DateUtil.endTime(jsonResolveObject.getDespatchActualDateTime());
+                     DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
+                     boolean effectiveDate = DateUtil.isEffectiveDate(format.parse(dealDateFormat),format.parse(starTime),format.parse(endTime));
+                     //校验发货时间是否是前后2小时
+                     if (!effectiveDate) {
+                		//数据不一致响应
+                    	list.add("DateTime");
+                		res.setResultCode(Constant.UN_MATCH_CODE);
+						resultBody.setCode(2);
+						resultBody.setResultList(list);
+						res.setResultBody(resultBody);
+ 	 	                return res;
+					 }
+                   
+                	 String consistent = source.get("MG-Consistent").getAsString();
+                	 //检验活体检测是否通过
+                	 if (!consistent.equals("1")) {
+            			list.add("MG-Consistent");
+                		res.setResultCode(Constant.UN_MATCH_CODE);
+						resultBody.setCode(2);
+						resultBody.setResultList(list);
+						res.setResultBody(resultBody);
+ 	 	                return res;
+					}
+                	reqId = source.get("RequestInfo").getAsJsonObject().get("ReqID").getAsString();
+                 }
+	            for (int i = 0; i < jsonResolveObject.getDrivers().size(); i++) {
+	            	 //生成j1对比身份信息
+					 String encrypt=jsonResolveObject.getDrivers().get(i).getName()+jsonResolveObject.getDrivers().get(i).getIdNumber()+"eID2015101";
+					 String j1 = Sm3Utils.encrypt(encrypt);
+		             BoolQueryBuilder reqBoolQueryBuilder = QueryBuilders.boolQuery();
+		             reqBoolQueryBuilder.must(QueryBuilders.termsQuery("RequestInfo.ReqID.keyword",reqId));
+		             reqBoolQueryBuilder.must(QueryBuilders.termsQuery("URI.keyword","/info_check/identity.do"));
+		             SearchSourceBuilder reqSearchSourceBuilder = new SearchSourceBuilder();
+		             reqSearchSourceBuilder.query(reqBoolQueryBuilder);
+		             reqSearchSourceBuilder.sort("DateTime", SortOrder.DESC);
+		            //设置源字段过虑,第一个参数结果集包括哪些字段,第二个参数表示结果集不包括哪些字段
+		            reqSearchSourceBuilder.fetchSource(new String[]{"RequestInfo","Check-Reuslt", "DateTime","MG-Consistent"}, null);
+		            Search reqBuild = new Search.Builder(reqSearchSourceBuilder.toString()).addIndex(firstIndex).addType("doc").build();
+		            SearchResult reqResult = jestClient.execute(reqBuild);
+		            JsonObject jsonObjectReq = reqResult.getJsonObject();
+	                JsonObject hitsReq = jsonObjectReq.getAsJsonObject("hits");
+	                JsonArray arrayReq = hitsReq.get("hits").getAsJsonArray();
+	           	 	JsonObject hitReq = arrayReq.get(0).getAsJsonObject();
+	                JsonObject sourceReq = hitReq.get("_source").getAsJsonObject();
+	                log.info("身份数据查询:{}",sourceReq);
+	                JsonArray asJsonArray = sourceReq.get("Check-Reuslt").getAsJsonArray();
+	                if (asJsonArray.size()>0) {
+	                   	 String resultData = asJsonArray.get(0).getAsJsonObject().get("result").getAsString();
+	                   	 String h1 = JSONObject.parseObject(resultData).get("H1").toString();
+	                   	 if (!h1.equals(j1)) {
+	                   		list.add("H1");
+	                		res.setResultCode(Constant.UN_MATCH_CODE);
+							resultBody.setCode(2);
+							resultBody.setResultList(list);
+							res.setResultBody(resultBody);
+	 	 	                return res;
+						}
+	                   
+	                }
+				}
+                res.setResultCode(Constant.MATCH_CODE);
+                res.setResultBody("一致");
+                res.setIsCharge(Constant.IS_CHARGE);
+	            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE,  upstreamCode);
+	            return res;
+	        } catch (IOException e) {
+	            ErrorUtils.captureException(e);
+	            log.error("IOException,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        } catch (Exception e) {
+	            ErrorUtils.captureException(e);
+	            log.error("Exception,message:{}", e);
+	            res.setCode(Constant.FAIL);
+	            return res;
+	        }
+	}
+	
+	
+	public static void main(String[] args) {
+		String eIdLinkIp = "118.244.229.17";
+		 int eIdLinkPort = 8080;
+		 String appId = "BEAXKTSV5igT0xrCDRId";
+		 String appKey = "C197B6EC9DA768A1527B44956ADD60D3";
+		 EidlinkService.initBasicInfo(eIdLinkIp, eIdLinkPort, appId, appKey);
+		 //私有参数
+		 String reqID = "865241a7865150031349498fa";
+  		 PublicParam publicParam = new PublicParam();
+  		 EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, reqID);
+  	 	 CommonResult result = EidlinkService.register(eidImageCompareParam);
+//     	String reqID ="865241a7865150031349498fa";
+//   		String eIDvoucher = "11";
+//   		String appeidcode ="11";
+//    	PublicParam publicParam1 = new PublicParam();
+//   		EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam1, reqID, eIDvoucher, appeidcode);
+//   		CommonResult result = EidlinkService.eidImageCompare(eidImageCompareParam);
+  		// 00:返回正确结果
+  		if ("00".equals(result.getResult())) {
+  			System.out.println("===== 证件解码活体比对返索引接口正常:" + JSONObject.toJSONString(result));
+  		} else {
+  			System.out.println("===== 证件解码活体比对返索引接口异常:" +JSONObject.toJSONString(result));
+  		}
+	}
+}

+ 27 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/CheckUtils.java

@@ -0,0 +1,27 @@
+package info.aspirecn.iov.sjjh.supplier10000039.util;
+
+import org.apache.commons.lang3.StringUtils;
+
+import info.aspirecn.iov.sjjh.supplier10000039.vo.UserLiveRequestObject;
+import info.aspirecn.iov.sjjh.supplier10000039.vo.VoucherLiveRequestObject;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class CheckUtils {
+
+    public static boolean checkUserParam(UserLiveRequestObject jsonResolveObject ){
+        if (StringUtils.isBlank(jsonResolveObject.getReqID())) {
+            log.info("reqId为空:{}",jsonResolveObject);
+            return true;
+        } 
+        return false;
+    }
+    
+    public static boolean checkVoucherParam(VoucherLiveRequestObject jsonResolveObject ){
+        if (StringUtils.isBlank(jsonResolveObject.getReqID())||StringUtils.isBlank(jsonResolveObject.getAppeIdCode())||StringUtils.isBlank(jsonResolveObject.getEidVoucher())) {
+            log.info("参数为空:{}",jsonResolveObject);
+            return true;
+        } 
+        return false;
+    }
+}

+ 87 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/DateUtil.java

@@ -0,0 +1,87 @@
+package info.aspirecn.iov.sjjh.supplier10000039.util;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+
+public class DateUtil {
+	/**
+	  * 日期格式转换yyyy-MM-dd'T'HH:mm:ss.SSSXXX  (yyyy-MM-dd'T'HH:mm:ss.SSSZ) TO  yyyy-MM-dd HH:mm:ss
+	  * @throws ParseException
+	  */
+	 public static String dealDateFormat(String oldDate) {
+        Date date1 = null;
+        DateFormat df2 = null;
+        try {
+            DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+            Date date = df.parse(oldDate);
+            SimpleDateFormat df1 = new SimpleDateFormat ("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
+            date1 = df1.parse(date.toString());
+            df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return df2.format(date1);
+	 }
+	 
+		//计算指定时间前一小时
+	 public static  String  starTime(String dateTime) throws Exception  {
+	        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+	        Calendar calendar = Calendar.getInstance();
+	        Date date = sdf.parse(dateTime);
+	        calendar.setTime(date);
+	        calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY) - 2);
+			return sdf.format(calendar.getTime());
+		}
+		//计算指定时间后一小时
+	 public static String  endTime(String dateTime) throws Exception  {
+	        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+	        Calendar calendar = Calendar.getInstance();
+	        Date date = sdf.parse(dateTime);
+	        calendar.setTime(date);
+	        calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY) + 2);
+			return sdf.format(calendar.getTime());
+		}
+		
+		/**
+		* 判断当前时间是否在[startTime, endTime]区间,注意时间格式要一致
+		*
+		* @param nowTime 当前时间
+		* @param startTime 开始时间
+		* @param endTime 结束时间
+		* @return
+		* @author jqlin
+		*/
+		public static boolean isEffectiveDate(Date nowTime, Date startTime, Date endTime) {
+			if (nowTime.getTime() == startTime.getTime()|| nowTime.getTime() == endTime.getTime()) {
+				return true;
+			}
+			Calendar date = Calendar.getInstance();
+			date.setTime(nowTime);
+			Calendar begin = Calendar.getInstance();
+			begin.setTime(startTime);
+			Calendar end = Calendar.getInstance();
+			end.setTime(endTime);
+			if (date.after(begin) && date.before(end)) {
+				return true;
+			} else {
+				return false;
+			}
+		}
+	 
+	 public static void main(String[] args) throws ParseException {
+		
+		try {
+			 System.out.println(dealDateFormat("2020-04-16T12:40:45.800+0800"));
+			 System.out.println(starTime("2020-04-16 12:40:45"));
+			 System.out.println(endTime("2020-04-16 12:40:45"));
+			 DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
+			 System.out.println(isEffectiveDate(new Date(),format.parse(starTime("2020-04-17 00:40:45")),format.parse(endTime("2020-04-17 02:40:45"))));
+		} catch (Exception e) {
+			// TODO: handle exception
+		}
+	}
+}

+ 65 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/QueryBuilerUtil.java

@@ -0,0 +1,65 @@
+package info.aspirecn.iov.sjjh.supplier10000039.util;
+
+import org.elasticsearch.index.query.QueryBuilders;
+import org.elasticsearch.index.query.RangeQueryBuilder;
+import org.elasticsearch.index.query.TermQueryBuilder;
+import org.elasticsearch.index.query.WildcardQueryBuilder;
+
+/**
+ * @Date: 2020/4/14
+ * @Author: bzh
+ * @Description:   生产查询条件
+ */
+public class QueryBuilerUtil {
+
+
+
+
+    /**
+     * 精确匹配查询
+     *
+     * @param field
+     * @param value
+     * @return
+     */
+    public static TermQueryBuilder getTermQuery(String field, int value) {
+        return QueryBuilders.termQuery(field, value);
+    }
+
+    /**
+     * 精确匹配查询
+     *
+     * @param field
+     * @param value
+     * @return
+     */
+    public static TermQueryBuilder getTermQuery(String field, String value) {
+        return QueryBuilders.termQuery(field, value);
+    }
+
+    /**
+     * 模糊查询   value支持 * ?
+     *
+     * @param field
+     * @param value
+     * @return
+     */
+    public static WildcardQueryBuilder getWildcardQueryBuilder(String field, String value) {
+        return QueryBuilders.wildcardQuery(field, value);
+    }
+
+    /**
+     * 数值范围查询
+     *
+     * @param field        字段
+     * @param from         起
+     * @param to           止
+     * @param includeUpper 是否包括最大值(止)
+     * @param includeLower 是否包括最小值(起)
+     * @return
+     */
+    public static RangeQueryBuilder getNumRangeQuery(String field, int from, int to, boolean includeUpper, boolean includeLower) {
+        return QueryBuilders.rangeQuery(field).from(from).to(to).includeUpper(includeUpper).includeLower(includeLower);
+    }
+
+}

+ 26 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/SearchSourceBuilderUtil.java

@@ -0,0 +1,26 @@
+package info.aspirecn.iov.sjjh.supplier10000039.util;
+
+import org.elasticsearch.search.builder.SearchSourceBuilder;
+import org.elasticsearch.search.sort.SortBuilder;
+
+/**
+ * @Date: 2018/11/2
+ * @Author: zhangxinhong
+ * @Description:
+ */
+public class SearchSourceBuilderUtil {
+    private SearchSourceBuilderUtil(){}
+
+    public static SearchSourceBuilder getSearchSourceBuilder(Integer pageNo, Integer size, boolean explain, SortBuilder sort){
+        SearchSourceBuilder builder = new SearchSourceBuilder();
+        if(pageNo!=null && pageNo>0 && size !=null && size >= 0){
+            builder.from((pageNo-1)*size);
+        }
+        builder.size(size);     //获取文档数据的数量   一般聚合统计时设置为0
+        builder.explain(explain);   //是否返回匹配度的解释说明信息
+        if(sort!=null){
+            builder.sort(sort);  //排序
+        }
+        return builder;
+    }
+}

+ 88 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/util/Sm3Utils.java

@@ -0,0 +1,88 @@
+package info.aspirecn.iov.sjjh.supplier10000039.util;
+
+import java.io.UnsupportedEncodingException;
+import java.security.Security;
+import java.util.Arrays;
+
+import org.bouncycastle.crypto.digests.SM3Digest;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
+
+public class Sm3Utils {
+	
+	private static final String ENCODING = "UTF-8";
+	
+    static {
+        Security.addProvider(new BouncyCastleProvider());
+    }
+
+	/**
+	 * sm3算法加密
+	 * @explain
+	 * @param paramStr
+	 *            待加密字符串
+	 * @return 返回加密后,固定长度=32的16进制字符串
+	 */
+	public static String encrypt(String paramStr){
+	    // 将返回的hash值转换成16进制字符串
+	    String resultHexString = "";
+	    try {
+	        // 将字符串转换成byte数组
+	        byte[] srcData = paramStr.getBytes(ENCODING);
+	        // 调用hash()
+	        byte[] resultHash = hash(srcData);
+	        // 将返回的hash值转换成16进制字符串
+	        resultHexString = ByteUtils.toHexString(resultHash);
+	    } catch (UnsupportedEncodingException e) {
+	        e.printStackTrace();
+	    }
+	    return resultHexString;
+	}
+
+	/**
+	 * 返回长度=32的byte数组
+	 * @explain 生成对应的hash值
+	 * @param srcData
+	 * @return
+	 */
+	public static byte[] hash(byte[] srcData) {
+	    SM3Digest digest = new SM3Digest();
+	    digest.update(srcData, 0, srcData.length);
+	    byte[] hash = new byte[digest.getDigestSize()];
+	    digest.doFinal(hash, 0);
+	    return hash;
+	}
+	/**
+	 * 判断源数据与加密数据是否一致
+	 * @explain 通过验证原数组和生成的hash数组是否为同一数组,验证2者是否为同一数据
+	 * @param srcStr
+	 *            原字符串
+	 * @param sm3HexString
+	 *            16进制字符串
+	 * @return 校验结果
+	 */
+	public static boolean verify(String srcStr, String sm3HexString) {
+	    boolean flag = false;
+	    try {
+	        byte[] srcData = srcStr.getBytes(ENCODING);
+	        byte[] sm3Hash = ByteUtils.fromHexString(sm3HexString);
+	        byte[] newHash = hash(srcData);
+	        if (Arrays.equals(newHash, sm3Hash))
+	            flag = true;
+	    } catch (UnsupportedEncodingException e) {
+	        e.printStackTrace();
+	    }
+	    return flag;
+	}
+	
+	public static void main(String[] args) {
+	    // 测试二:json
+	    String json = "白1111111111111eID2015101";
+	    String hex = Sm3Utils.encrypt(json);
+	    System.out.println(hex);// 0b0880f6f2ccd817809a432420e42b66d3772dc18d80789049d0f9654efeae5c
+	    // 验证加密后的16进制字符串与加密前的字符串是否相同
+	    boolean flag = Sm3Utils.verify(json, hex);
+	    System.out.println(flag);// true
+
+	}
+}

+ 20 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/DriverVerificationRequestObject.java

@@ -0,0 +1,20 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import java.util.List;
+
+import lombok.Data;
+
+@Data
+public class DriverVerificationRequestObject {
+    private String shippingNoteNumber;//运单号
+    //司机列表
+    private List<DriverChildObject> drivers;
+    private String despatchActualDateTime;//发货时间
+    
+    @Data
+	public static class DriverChildObject {
+    	private String name;//司机姓名
+    	private String idNumber;//身份证号
+    
+    }
+}

+ 15 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/ResultBody.java

@@ -0,0 +1,15 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Email:lixinxu@aspirecn.com
+ * Descrption:
+ */
+@Data
+public class ResultBody {
+    int code;
+    List<String> resultList;
+}

+ 9 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/UserLiveRequestObject.java

@@ -0,0 +1,9 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import lombok.Data;
+
+@Data
+public class UserLiveRequestObject {
+    private String reqID;
+
+}

+ 14 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/UserLiveResponseObject.java

@@ -0,0 +1,14 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import lombok.Data;
+
+@Data
+public class UserLiveResponseObject {
+    private String reqId;//获取身份信 息请求id
+    private String H1;//身份信息
+    private String appeidcode;//用户eID身 份标识
+    private String eIDvoucher;//eID验证凭 证
+    private String similarity;//相似度
+    private String result_msg;//当 result 不为 00 时,作为补充 描述值
+
+}

+ 10 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/VoucherLiveRequestObject.java

@@ -0,0 +1,10 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import lombok.Data;
+
+@Data
+public class VoucherLiveRequestObject {
+    private String reqID;//获取身份信 息请求id
+    private String appeIdCode;//用户eID身 份标识
+    private String eidVoucher;//eID验证凭 证
+}

+ 12 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000039/vo/VoucherLiveResponseObject.java

@@ -0,0 +1,12 @@
+package info.aspirecn.iov.sjjh.supplier10000039.vo;
+
+import lombok.Data;
+
+@Data
+public class VoucherLiveResponseObject {
+    private String reqId;//获取身份信 息请求id
+    private String appeidcode;//用户eID身 份标识
+    private String H1;//身份信息
+    private String similarity;//相似度
+    private String result_msg;//当 result 不为 00 时,作为补充 描述值
+}

+ 91 - 0
src/main/resources/config/application-test.yml

@@ -0,0 +1,91 @@
+
+server:
+  tomcat:
+    accesslog:
+      buffered: false
+      enabled: true
+      pattern: '{"DateTime":"%{yyyy-MM-dd''T''HH:mm:ss.SSSZZ}t","ClientIP":"%a","Method":"%m","URI":"%U","RequestProtocol":"%H","ResponseCode":%s,"ResponseTime":%D,"UserAgent":"%{user-agent}i","X-Forwarded-For":"%{x-forwarded-for}r","X-User-IP":"%{X-User-IP}i","traceId":"%{x-b3-traceid}i","id":"%{x-b3-spanid}r",
+                               "parentId":"%{x-b3-parentspanid}i","ApplicationName":"${spring.application.name}","MG-IsCharge":%{isCharge}r,"MG-ChannelId":%{channelId}i,"MG-CustomBody":"%{x-requestQuery}r","MG-ResponseCode":%{respnoseCode}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-SellingPrice":%{price}i,"req_type":"%{req_type}r","MG-ResultBody":"%{resultBody}r","MG-ProductId":%{productId}i,"MG-UserId":%{userid}i}'
+      prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+      directory: ${logging.path}
+  servlet:
+    context-path: /
+
+spring:
+  elasticsearch:
+    jest:
+      uris: http://10.8.17.117:9200,http://10.8.17.118:9200,http://10.8.17.119:9200,http://10.8.17.119:9200
+      read-timeout: 20s
+      connection-timeout: 5s
+  sleuth:
+    sampler:
+      probability: 0.1
+    web:
+      additional-skip-pattern: /api/v2/spans
+  zipkin:
+    base-url: http://127.0.0.1:${server.port}
+  mvc:
+    favicon:
+      enabled: false
+  cloud:
+    config:
+      overrideSystemProperties: true
+      allowOverride: true
+      overrideNone: true
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+
+
+#logging
+logging:
+  path: /apps/var/jakarta/logs
+  level:
+    root: INFO
+    red:
+      microcloud: DEBUG
+  config: classpath:config/logback-spring.xml
+  file: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+#error logging
+#sleuth logging
+rdc:
+  logging:
+    error-file: ${logging.path}/error_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+    sleuth-file: ${logging.path}/sleuth_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.log
+
+#eureka
+eureka:
+  instance:
+    prefer-ip-address: true
+    instance-id: ${spring.cloud.client.ip-address}:${server.port}:${spring.application.name}
+    metadata-map:
+      management:
+        server:
+          port: ${management.server.port}
+    health-check-url: http://${spring.cloud.client.ip-address}:${management.server.port}${eureka.instance.health-check-url-path}
+    health-check-url-path: /actuator/health
+  client:
+    serviceUrl:
+      defaultZone: http://10.8.18.172:31102/eureka
+    enabled: true
+
+supplier:
+  eIdLinkIp: 118.244.229.17
+  eIdLinkPort: 8080
+  appId: BEAXKTSV5igT0xrCDRId
+  appKey: C197B6EC9DA768A1527B44956ADD60D3
+
+
+
+firstIndex: "access-yysj_gateway_first_log-cloud-yysj*"

+ 3 - 0
src/main/resources/config/banner.txt

@@ -0,0 +1,3 @@
+*******************************************************************************
+	 @project.artifactId@  (version:@project.version@)
+*******************************************************************************

+ 34 - 0
src/main/resources/config/bootstrap.yml

@@ -0,0 +1,34 @@
+spring:
+  application:
+    name: '@project.artifactId@'
+  banner:
+    location: classpath:config/banner.txt
+  profiles:
+    active: hwtest
+  cloud:
+    config:
+      discovery:
+        enabled: false
+      uri: http://10.8.18.157:32533
+      label: trunk
+      name: ${spring.application.name}
+      profile: ${spring.profiles.active}
+
+
+server:
+  port: 25102
+management:
+  server:
+    port: 35102
+
+
+
+  
+swagger:
+  show: true
+info:
+  name: '@project.description@'
+  version: '@project.version@'
+
+
+

+ 37 - 0
src/main/resources/config/logback-spring.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+	<include resource="org/springframework/boot/logging/logback/defaults.xml" />
+	<include
+		resource="org/springframework/boot/logging/logback/console-appender.xml" />
+
+	<property name="LOG_FILE"
+		value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/spring.log}" />		
+	<springProperty scope="context" name="LOG_PATH" source="logging.path" defaultValue="/apps/var/jakarta/logs" />
+	<springProperty scope="context" name="application_name" source="spring.application.name" defaultValue="iov-sjjh-servicenode-supplier-10000007" />
+	<springProperty scope="context" name="sleuth_file" source="rdc.logging.sleuth-file" defaultValue="${LOG_PATH}/sleuth/sleuth.log" />
+	<springProperty scope="context" name="error_file" source="rdc.logging.error-file" defaultValue="${LOG_PATH}/error/error.log" />
+
+	<include resource="info/aspirecn/rdc/aspirecloud/node/except/xml/defaults.xml" />
+	<include resource="info/aspirecn/rdc/aspirecloud/node/brave/xml/defaults.xml" />
+
+	<appender name="TIME_FILE"
+		class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<encoder>
+			<pattern>${FILE_LOG_PATTERN}</pattern>
+		</encoder>
+		<file>${LOG_FILE}</file>
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i</fileNamePattern>
+			<maxHistory>8</maxHistory>
+			<timeBasedFileNamingAndTriggeringPolicy
+				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+		</rollingPolicy>
+	</appender>
+	
+	<root level="INFO">
+		<appender-ref ref="CONSOLE" />
+		<appender-ref ref="TIME_FILE" />
+	</root>
+</configuration>

+ 8 - 0
src/main/resources/docker/Dockerfile

@@ -0,0 +1,8 @@
+FROM hub.i139.cn/rdc-commons/official-openjdk:8u191-jre-alpine3.9
+VOLUME /tmp
+COPY target/lib/ ./lib/
+ADD *.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS="-Xmx256M -Xms256M -Xss256k -Duser.timezone=Asia/Shanghai"
+ENV APP_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar $APP_OPTS" ]

BIN
src/main/resources/lib/IDOCR-PubSdk-QueryService-Std-Java-Release-V2.2.1.jar


BIN
src/main/resources/lib/eid-clouddecode-ap-service-sdk-release-1.4.0-proguard.jar