Browse Source

first commit

15810770710@163.com 3 years ago
parent
commit
3def04784c
47 changed files with 21985 additions and 0 deletions
  1. 118 0
      .mvn/wrapper/MavenWrapperDownloader.java
  2. 2 0
      .mvn/wrapper/maven-wrapper.properties
  3. 8 0
      HELP.md
  4. 310 0
      mvnw
  5. 182 0
      mvnw.cmd
  6. 263 0
      pom.xml
  7. BIN
      src.rar
  8. 37 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/App.java
  9. 32 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/SwaggerConfig.java
  10. 637 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/action/ChannelAction.java
  11. 35 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/constant/ChannelConstant.java
  12. 14 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/AsyncReqMqMessage.java
  13. 33 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/CacheStreamObject.java
  14. 17 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/CallbackDownstreamRequest.java
  15. 38 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/DecodeThreeElementRequestObject.java
  16. 56 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoFtpResult.java
  17. 29 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoParamExcelObject.java
  18. 21 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoRequestObject.java
  19. 20 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2CustomBodyObject.java
  20. 19 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2RequestObject.java
  21. 31 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2ResponseObject.java
  22. 9 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/KafkaAccessLog.java
  23. 26 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/RedisParamObject.java
  24. 10 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/RequestObject.java
  25. 68 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/process/FailedDataProcessor.java
  26. 306 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/process/IllegalInfoProcessor.java
  27. 19 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/property/SupplierProperties.java
  28. 51 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/service/ChannelService.java
  29. 892 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/service/ChannelServiceImpl.java
  30. 48 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/sftp/IllegalInfoDownloadRoute.java
  31. 23 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/task/AsyncDelayTask.java
  32. 158 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/task/IllegalInfoTask.java
  33. 78 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/AesUtil.java
  34. 50 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/EsOpeateUtils.java
  35. 193 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/ExcelUtil.java
  36. 65 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/IllegalInfoScoreUtil.java
  37. 78 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/Md5Sha256DecodeUtil.java
  38. 162 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/SFTPUtil.java
  39. 35 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/SendService.java
  40. 36 0
      src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/ThreadPoolConfig.java
  41. 139 0
      src/main/resources/config/application-test.yml
  42. 3 0
      src/main/resources/config/banner.txt
  43. 22 0
      src/main/resources/config/bootstrap.yml
  44. 111 0
      src/main/resources/config/iov-sjjh-servicenode-stat-hwtest.yml
  45. 144 0
      src/main/resources/config/iov-sjjh-servicenode-supplier-10000040.yaml
  46. 39 0
      src/main/resources/config/logback-spring.xml
  47. 17318 0
      src/main/resources/failedData.json

+ 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

+ 8 - 0
HELP.md

@@ -0,0 +1,8 @@
+# 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.2.7.RELEASE/maven-plugin/)
+

+ 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%

+ 263 - 0
pom.xml

@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>info.aspirecn.iov.sjjh</groupId>
+    <artifactId>iov-sjjh-servicenode-supplier-10000040</artifactId>
+    <version>1.1.7</version>
+    <name>iov-sjjh-servicenode-supplier-10000040</name>
+    <description>iov-sjjh-servicenode-supplier-10000040</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <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-test</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+        </dependency>
+
+        <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>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-stream-kafka</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
+            <version>2.0.6.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+                         <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.70</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-config-client</artifactId>
+        </dependency>
+
+        <!--easypoi-->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>3.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>3.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>3.17</version>
+        </dependency>
+
+        <!--ftp-->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-spring-boot-starter</artifactId>
+            <version>2.18.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-ftp</artifactId>
+            <version>2.18.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-stream-kafka</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
+            <version>2.0.6.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.searchbox</groupId>
+            <artifactId>jest</artifactId>
+            <version>6.3.1</version>
+        </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>
+                    <includes>
+
+                        <include>
+                            <groupId>info.aspirecn.iov.sjjh</groupId>
+                            <artifactId>iov-sjjh-commons-lang</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
+                            </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
+                            </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>
+
+
+        </plugins>
+    </build>
+
+</project>

BIN
src.rar


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

@@ -0,0 +1,37 @@
+package info.aspirecn.iov.sjjh.supplier10000040;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.core.env.Environment;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.util.StopWatch;
+
+@SpringBootApplication
+@EnableConfigurationProperties
+@EnableScheduling
+@Slf4j
+@EnableEurekaClient
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.except")
+@ComponentScan("info.aspirecn.rdc.aspirecloud.node.brave")
+@ComponentScan("info.aspirecn.iov.sjjh.supplier10000040")
+public class App {
+
+    public static void main(String[] args) {
+        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());
+    }
+
+}

+ 32 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/SwaggerConfig.java

@@ -0,0 +1,32 @@
+package info.aspirecn.iov.sjjh.supplier10000040;
+
+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 {
+    private boolean swaggerShow = true;
+
+    @Bean
+    public Docket createRestApi() {
+
+        return new Docket(DocumentationType.SWAGGER_2).enable(swaggerShow).apiInfo(apiInfo()).select()
+                .apis(RequestHandlerSelectors.basePackage("info.aspirecn.iov.sjjh.supplier10000040.action"))
+                .paths(PathSelectors.any()).build();
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder().title("10000040通道接口").description("").termsOfServiceUrl("").version("1.0.0").build();
+    }
+}

+ 637 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/action/ChannelAction.java

@@ -0,0 +1,637 @@
+package info.aspirecn.iov.sjjh.supplier10000040.action;
+
+import brave.Tracer;
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.supplier10000040.constant.ChannelConstant;
+import info.aspirecn.iov.sjjh.supplier10000040.property.SupplierProperties;
+import info.aspirecn.iov.sjjh.supplier10000040.service.ChannelService;
+import info.aspirecn.iov.sjjh.supplier10000040.task.AsyncDelayTask;
+import info.aspirecn.iov.sjjh.supplier10000040.util.EsOpeateUtils;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.tomcat.util.ExceptionUtils;
+import org.apache.tomcat.util.codec.binary.Base64;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.UnsupportedEncodingException;
+import java.util.concurrent.*;
+
+/**
+ * @author: xusonglin
+ * @create: 2020/4/22 14:59
+ * @version: V1.0
+ **/
+@Slf4j
+@RestController
+public class ChannelAction {
+    /**
+     * 日志参数中的错误参数名
+     */
+    private static final String LOG_ERROR_PARA = "x-responseCode";
+    /**
+     * 日志参数中的是否收费
+     */
+    private static final String LOG_FEE_PARA = "x-isCharge";
+
+    @Autowired
+    EsOpeateUtils esOpeateUtils;
+    @Autowired
+    ChannelService channelService;
+    @Autowired
+    private SupplierProperties supplierProperties;
+    @Autowired
+    AsyncDelayTask asyncDelayTask;
+
+    @Qualifier("mainThreadPoolExecutor")
+    @Autowired
+    ThreadPoolExecutor threadPoolExecutor;
+
+    @Value("${supplier.delayedTime}")
+    private Long delayedTime;
+
+    private static final String LOG_TREACEID = "x-b3-traceid";
+    private static final String LOG_SPAN_ID = "x-b3-spanid";
+    private static final String LOG_PARENT_SPAN_ID = "x-b3-parentspanid";
+    private static final String LOG_REAL_IP = "X-Real-IP";
+    private static final String LOG_CHANNEL_ID = "channelId";
+    private static final String LOG_CUSTOME_BODY = "x-requestQuery";
+    private static final String LOG_PRICE = "price";
+    private static final String LOG_REQ_TYPE = "req_type";
+    private static final String LOG_PRODUCT_ID = "productId";
+    private static final String LOG_USER_ID = "userid";
+
+    @Autowired
+    private Tracer tracer;
+
+    @ApiOperation(value = "个人不良信息查询-评分", notes = "")
+    @PostMapping(value = "/getIllegalInfoScore.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoScore(
+            @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) {
+        log.info("个人不良信息查询-评分请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        //记录日志信息09
+        recordQueryRequestLog(request);
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfo(request, customBody, outTime, "1", ChannelConstant.ILLEGAL_INFO_SCORE);
+            //日志记录通道响应码
+            if (responseObject.getCode() != 1) {
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+            } else {
+                log.info("ifJk:{}", request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if (Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))) {
+
+                    String code = supplierProperties.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}", responseObject.getResultCode(), code);
+                    if (code != null) {
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if (customBody != null) {
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}", e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY, responseObject.getIsCharge());
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询-返回上游结果", notes = "")
+    @PostMapping(value = "/getIllegalInfoResult.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoResult(
+            @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) {
+        log.info("个人不良信息查询-返回上游结果请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        //记录日志信息09
+        recordQueryRequestLog(request);
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfo(request, customBody, outTime, "1", ChannelConstant.ILLEGAL_INFO_RESULT);
+            //日志记录通道响应码
+            if (responseObject.getCode() != 1) {
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+            } else {
+                log.info("ifJk:{}", request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if (Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))) {
+
+                    String code = supplierProperties.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}", responseObject.getResultCode(), code);
+                    if (code != null) {
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if (customBody != null) {
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}", e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY, responseObject.getIsCharge());
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询-简版", notes = "")
+    @PostMapping(value = "/getIllegalInfoSimple.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoSimple(
+            @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) {
+        log.info("个人不良信息查询-简版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        //记录日志信息09
+        recordQueryRequestLog(request);
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfo(request, customBody, outTime, "1", ChannelConstant.ILLEGAL_INFO_SIMPLE);
+            //日志记录通道响应码
+            if (responseObject.getCode() != 1) {
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+            } else {
+                log.info("ifJk:{}", request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA));
+                if (Constant.CUSTOMER_RETURN_JK.equals(request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA))) {
+
+                    String code = supplierProperties.getCode().get(responseObject.getResultCode());
+                    log.info("resultCode:{},jkCode:{}", responseObject.getResultCode(), code);
+                    if (code != null) {
+                        responseObject.setResultCode(Integer.valueOf(code));
+                    }
+                }
+                request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+            }
+            //日志记录通道查询参数
+            if (customBody != null) {
+                try {
+                    request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes("utf-8")));
+                } catch (UnsupportedEncodingException e) {
+                    ExceptionUtils.handleThrowable(e);
+                    log.error("异常信息:{}", e);
+                }
+            }
+
+            request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY, responseObject.getIsCharge());
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    public void recordQueryRequestLog(HttpServletRequest request) {
+        request.setAttribute(LOG_FEE_PARA, Constant.IS_NOT_CHARGE);
+        request.setAttribute(LOG_ERROR_PARA, Constant.CHANNEL_LOG_ERROR_CODE);
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        request.setAttribute(LOG_REQ_TYPE, Constant.CHANNEL_TYPE_ASYNC);
+        request.setAttribute(Constant.IFCJ_KEY, Constant.IFCJ_CJ);
+        log.info("traceIdString:{},headerTraceId:{}", tracer.currentSpan().context().traceIdString(), request.getHeader(LOG_TREACEID));
+        request.setAttribute(LOG_TREACEID, tracer.currentSpan().context().traceIdString());
+        request.setAttribute(LOG_SPAN_ID, tracer.currentSpan().context().spanId());
+        request.setAttribute(LOG_PARENT_SPAN_ID, tracer.currentSpan().context().parentId());
+        request.setAttribute(LOG_REAL_IP, request.getHeader(LOG_REAL_IP));
+        request.setAttribute(LOG_CHANNEL_ID, request.getHeader(LOG_CHANNEL_ID));
+        request.setAttribute(LOG_PRICE, request.getHeader(LOG_PRICE));
+        request.setAttribute(LOG_PRODUCT_ID, request.getHeader(LOG_PRODUCT_ID));
+        request.setAttribute(LOG_USER_ID, request.getHeader(LOG_USER_ID));
+
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-简版", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2Simple.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2Simple(
+            @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) {
+        log.info("个人不良信息查询V2-简版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SIMPLE);
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-评分版", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2Score.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2Score(
+            @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) {
+        log.info("个人不良信息查询V2-评分版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SCORE);
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-详版", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2Result.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2Result(
+            @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) {
+        log.info("个人不良信息查询V2-详版版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_RESULT);
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-定制版", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2DrugEscape.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2DrugEscape(
+            @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) {
+        log.info("个人不良信息查询V2-定制版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // scm解密
+            String decodeCustomBody = channelService.getDecodeIdCard(request, customBody, outTime, ChannelConstant.DECODE_TYPE_MD5, responseObject);
+            log.info("scm解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-简版-SHA256", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2SimpleSHA256.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2SimpleSHA256(
+            @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) {
+        log.info("个人不良信息查询V2-简版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // scm解密
+            String decodeCustomBody = channelService.getDecodeIdCard(request, customBody, outTime, ChannelConstant.DECODE_TYPE_SHA256, responseObject);
+            log.info("scm解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SIMPLE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-评分版-SHA256", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2ScoreSHA256.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2ScoreSHA256(
+            @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) {
+        log.info("个人不良信息查询V2-评分版SHA256请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // 查看是否命中挡板数据
+            boolean isIllegalInfoV2ScoreSHA256TestData = channelService.isIllegalInfoV2ScoreSHA256TestData(request, customBody, responseObject);
+            String decodeCustomBody = "";
+            if (!isIllegalInfoV2ScoreSHA256TestData) {
+                // 未命中, 执行scm解密
+                decodeCustomBody = channelService.getDecodeIdCard(request, customBody, outTime, ChannelConstant.DECODE_TYPE_SHA256, responseObject);
+            }
+
+            log.info("scm解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SCORE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-评分版-MD5", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2ScoreMD5.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2ScoreMD5(
+            @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) {
+        log.info("个人不良信息查询V2-评分版SHA256请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // scm解密
+            String decodeCustomBody = channelService.getDecodeIdCard(request, customBody, outTime, ChannelConstant.DECODE_TYPE_MD5, responseObject);
+            log.info("scm解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SCORE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-定制版-AES", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2DrugEscapeAES.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2DrugEscapeAES(
+            @ApiParam(value = "通道ID") @RequestHeader(name = "channelId") String channelId,
+            @ApiParam(value = "超时时间,单位:毫秒", example = "10000") @RequestParam(name = "outTime", required = true) int outTime,
+            @ApiParam(value = "请求参数JSON串") @RequestBody String customBody) {
+        log.info("个人不良信息查询V2-定制版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // aes解密
+            String decodeCustomBody = channelService.getAesDecodeIdCard(request, customBody, responseObject);
+            log.info("aes解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-定制版-AES-MD5", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2DrugEscapeAESMD5.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2DrugEscapeAESMD5(
+            @ApiParam(value = "通道ID") @RequestHeader(name = "channelId") String channelId,
+            @ApiParam(value = "超时时间,单位:毫秒", example = "10000") @RequestParam(name = "outTime", required = true) int outTime,
+            @ApiParam(value = "请求参数JSON串") @RequestBody String customBody) {
+        log.info("个人不良信息查询V2-定制版请求--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // aes解密
+            String decodeCustomBody = channelService.getAesMd5DecodeIdCode(request, customBody, responseObject, outTime);
+            log.info("aes+md5解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    @ApiOperation(value = "个人不良信息查询V2-简版-身份证SHA256-姓名明文", notes = "")
+    @PostMapping(value = "/getIllegalInfoV2SimpleSHA256IdCode.do")
+    public ChannelTypeHandleResponseObject getIllegalInfoV2SimpleSHA256IdCode(
+            @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) {
+        log.info("个人不良信息查询V2-简版-身份证SHA256-姓名明文--->channelId:{}--->outTime:{},--->customBody:{}", channelId, outTime, customBody);
+        Long startTime = System.currentTimeMillis();
+        //日志记录通道类型 - 同步
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        try {
+            // scm解密
+            String decodeCustomBody = channelService.getDecodeIdCode(request, customBody, outTime, ChannelConstant.DECODE_TYPE_SHA256, responseObject);
+            log.info("scm解密耗时:{}", System.currentTimeMillis() - startTime);
+
+            if (StringUtils.isNotBlank(decodeCustomBody)) {
+                customBody = decodeCustomBody;
+                // 调用业务接口
+                responseObject = channelService.validateIllegalInfoV2(request, customBody, outTime, ChannelConstant.ILLEGAL_INFO_SIMPLE);
+            }
+            log.info("调用业务接口时延:{}", System.currentTimeMillis() - startTime);
+
+            recodeIllegalInfoV2RequestLog(responseObject, request, customBody);
+            if (System.currentTimeMillis() - startTime < delayedTime) {
+                delay();
+            }
+            log.info("action总体耗时:{}", System.currentTimeMillis() - startTime);
+            return responseObject;
+        } catch (Exception ex) {
+            log.error("message:{}", ex);
+            return responseObject;
+        }
+    }
+
+    private void delay() {
+        Long startTime = System.currentTimeMillis();
+        try {
+            Future<String> delayTask = asyncDelayTask.doDelay();
+            delayTask.get(delayedTime*2, TimeUnit.MILLISECONDS);
+        } catch (InterruptedException ie) {
+            log.info("InterruptedException, 强制结束子线程,子线程耗时:{}, {}", System.currentTimeMillis() - startTime, ie);
+            ErrorUtils.captureException(ie);
+        } catch (ExecutionException ee) {
+            log.info("ExecutionException, 强制结束子线程,子线程耗时:{}, {}", System.currentTimeMillis() - startTime, ee);
+            ErrorUtils.captureException(ee);
+        } catch (TimeoutException te) {
+            log.info("TimeoutException, 强制结束子线程,子线程耗时:{}, {}", System.currentTimeMillis() - startTime, te);
+            ErrorUtils.captureException(te);
+        }
+    }
+
+    private void recodeIllegalInfoV2RequestLog(ChannelTypeHandleResponseObject responseObject, HttpServletRequest request, String customBody) {
+        //日志记录通道响应码
+        if (responseObject.getCode() != 1) {
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_ERROR_CODE);
+        } else {
+            String ifJkCode = request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA);
+            log.info("ifJk:{}", ifJkCode);
+            if (Constant.CUSTOMER_RETURN_JK.equals(ifJkCode)) {
+
+                String code = supplierProperties.getCode().get(responseObject.getResultCode());
+                log.info("resultCode:{},jkCode:{}", responseObject.getResultCode(), code);
+                if (code != null) {
+                    responseObject.setResultCode(Integer.valueOf(code));
+                }
+            }
+            request.setAttribute(Constant.ACCESSLOG_MG_RESPONSE_CODE_KEY, Constant.CHANNEL_LOG_SUCCESS_CODE);
+        }
+        //日志记录通道查询参数
+        if (customBody != null) {
+            try {
+                request.setAttribute(Constant.CHANNEL_LOG_QUERY, Base64.encodeBase64String(customBody.getBytes("utf-8")));
+            } catch (UnsupportedEncodingException e) {
+                ExceptionUtils.handleThrowable(e);
+                log.error("异常信息:{}", e);
+            }
+        }
+
+        request.setAttribute(Constant.ACCESSLOG_MG_ISCHARGE_KEY, responseObject.getIsCharge());
+
+        request.setAttribute(LOG_FEE_PARA, responseObject.getIsCharge());
+        request.setAttribute(LOG_TREACEID, tracer.currentSpan().context().traceIdString());
+        request.setAttribute(LOG_REAL_IP, request.getHeader(LOG_REAL_IP));
+        request.setAttribute(LOG_CHANNEL_ID, request.getHeader(LOG_CHANNEL_ID));
+        request.setAttribute(LOG_PRICE, request.getHeader(LOG_PRICE));
+        request.setAttribute(LOG_PRODUCT_ID, request.getHeader(LOG_PRODUCT_ID));
+        request.setAttribute(LOG_USER_ID, request.getHeader(LOG_USER_ID));
+        request.setAttribute(Constant.IFCJ_KEY, Constant.IFCJ_CJ);
+        request.setAttribute(LOG_REQ_TYPE, Constant.CHANNEL_TYPE_SYNC);
+    }
+
+}

+ 35 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/constant/ChannelConstant.java

@@ -0,0 +1,35 @@
+package info.aspirecn.iov.sjjh.supplier10000040.constant;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/26 14:38
+ * @version: V1.0
+ **/
+public class ChannelConstant {
+    public static String ILLEGAL_INFO_SCORE = "score";
+    public static String ILLEGAL_INFO_RESULT = "result";
+    public static String ILLEGAL_INFO_SIMPLE = "simple";
+    public static String ILLEGAL_INFO_DRUG_ESCAPE = "drugAndEscape";
+
+    // 状态 1:待处理
+    public static Integer REQUEST_STATUS_1 = 1;
+    // 2:处理中
+    public static Integer REQUEST_STATUS_2 = 2;
+    // 3:已发送上游
+    public static Integer REQUEST_STATUS_3 = 3;
+    // 4:处理完成
+    public static Integer REQUEST_STATUS_4 = 4;
+
+    public static final String DECODE_TYPE_SHA256 = "SHA256";
+
+    public static final String DECODE_TYPE_MD5 = "MD5";
+
+    public static final String DECODE_TYPE_AES = "AES";
+
+    /**
+     * 请求头用户Id key*/
+    public static final String USER_ID_HEADER_KEY = "userid";
+
+    public static final String AES_KEY = "illegal-info-";
+}

+ 14 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/AsyncReqMqMessage.java

@@ -0,0 +1,14 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+
+@Data
+public class AsyncReqMqMessage {
+
+    private String traceid;  //标识此次异步请求的traceid
+    private String callbackResult;  //此字段base64编码    返回给下游的结果(需要转换成最终的结果,后面不再做转换,直接返回给客户)
+    private boolean queryCache;   //异步请求是否走了缓存
+    private boolean syncReturn;   //异步请求,上游是不是同步返回的
+    private int isCharge;  //是否计费
+    private Long firstConsumeTimestamp;   //kafka初次消费时间
+}

+ 33 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/CacheStreamObject.java

@@ -0,0 +1,33 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+
+import lombok.Data;
+
+@Data
+public class CacheStreamObject {
+    private AsyncMsg asyncRequestMsg;
+    private String callbackResult;
+    private Boolean queryCache;
+    private int isCharge;
+
+    @Data
+    public static class AsyncMsg {
+        private String UserAgent;
+        private String userIP;
+        private String userId;
+        private String productId;
+        private String productType;
+        private String channelType;
+        private String channelId;
+        private String money;
+        private String accessId;
+        private String customBody;
+        private int ifJkCode;
+        //private String responseBody;
+        private String traceId;
+        private String channelPrice;
+        private String callBackUrl;
+        private String responseCodeDesc;
+        private String supplierApplicationName;
+    }
+}

+ 17 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/CallbackDownstreamRequest.java

@@ -0,0 +1,17 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+
+import lombok.Data;
+
+
+/**
+ * 返回客户的信息
+ */
+@Data
+public class CallbackDownstreamRequest {
+
+    private String accessId;   //客户请求的accessId
+    private int resultCode;   //转译之后的返回码
+    private String resultBody;   //响应结果,要处理完毕的,之后不再处理
+    private String transationId;
+}

+ 38 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/DecodeThreeElementRequestObject.java

@@ -0,0 +1,38 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2019/9/29 15:04
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class DecodeThreeElementRequestObject {
+    /**接口名*/
+    private String api;
+    /**appkey*/
+    private String appKey;
+    /**密钥*/
+    private String appSecret;
+    /**被查询人对象*/
+    private DecodeThreeElementRequestData data;
+
+    @Data
+    @ToString(callSuper = true, includeFieldNames = true)
+    public static class DecodeThreeElementRequestData {
+        /**姓名*/
+        private String name;
+        /**身份证号*/
+        private String id_number;
+        /**手机号*/
+        private String mobile;
+        /**加密方式*/
+        private String encrypt;
+        /**sign*/
+        private String sign;
+    }
+}

+ 56 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoFtpResult.java

@@ -0,0 +1,56 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/25 15:46
+ * @version: V1.0
+ **/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
+public class IllegalInfoFtpResult implements Serializable {
+    private static final long serialVersionUID = 6086475268462115081L;
+    /**
+     * 流水号
+     */
+    private String traceId;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 身份证号
+     */
+    private String idCard;
+
+    /**
+     * 身份证一致不一致
+     */
+    private Integer isIdCard;
+
+    /**
+     * 是否在逃
+     */
+    private Integer isEscape;
+
+    /**
+     * 是否有前科
+     */
+    private Integer isPedigree;
+
+    /**
+     * 是否吸毒贩毒
+     */
+    private Integer isDrugs;
+}

+ 29 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoParamExcelObject.java

@@ -0,0 +1,29 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/24 20:30
+ * @version: V1.0
+ **/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class IllegalInfoParamExcelObject implements Serializable {
+    private static final long serialVersionUID = -3688801487363011961L;
+
+//    @Excel(name = "traceId")
+    private String traceId;
+
+//    @Excel(name = "name")
+    private String name;
+
+//    @Excel(name = "idCode")
+    private String idCode;
+}

+ 21 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoRequestObject.java

@@ -0,0 +1,21 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/22 16:10
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class IllegalInfoRequestObject {
+    @NotNull(message = "参数名错误")
+    private String idCode;
+    @NotNull(message = "参数名错误")
+    private String name;
+}

+ 20 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2CustomBodyObject.java

@@ -0,0 +1,20 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Data
+@ToString
+public class IllegalInfoV2CustomBodyObject extends IllegalInfoRequestObject implements Serializable {
+    private static final long serialVersionUID = -1957944839221496650L;
+
+    @NotNull(message = "参数名错误")
+    private String type;
+}

+ 19 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2RequestObject.java

@@ -0,0 +1,19 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Data
+@ToString(callSuper = true)
+public class IllegalInfoV2RequestObject implements Serializable {
+    private static final long serialVersionUID = 3082345123509918359L;
+    private String idCode;
+    private String name;
+    private String traceId;
+}

+ 31 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/IllegalInfoV2ResponseObject.java

@@ -0,0 +1,31 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Data
+@ToString
+public class IllegalInfoV2ResponseObject implements Serializable {
+    private static final long serialVersionUID = -4960899912978504309L;
+
+    private String code;
+
+    private IllegalInfoV2ResponseMessage message;
+
+    @Data
+    public static class IllegalInfoV2ResponseMessage {
+        private String code;
+
+        private String isEscape;
+
+        private String isPedigree;
+
+        private String isDrugs;
+    }
+}

+ 9 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/KafkaAccessLog.java

@@ -0,0 +1,9 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+
+@Data
+public class KafkaAccessLog {
+    private int type;//1 kafka,2 log
+    private String content;
+}

+ 26 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/RedisParamObject.java

@@ -0,0 +1,26 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/23 13:10
+ * @version: V1.0
+ **/
+@Data
+@ToString
+public class RedisParamObject {
+    private String idCode;
+    private String name;
+    private String traceId;
+    private String returnType;
+    private String interfaceType;
+    // 状态 1:待处理 2:处理中 3:已发送上游 4:处理完成
+    private Integer status;
+    // 此条数据的版本号
+    private Integer version;
+    // 参数传入时间戳
+    private Long timestamp;
+}

+ 10 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/model/RequestObject.java

@@ -0,0 +1,10 @@
+package info.aspirecn.iov.sjjh.supplier10000040.model;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+@Data
+public class RequestObject {
+    private String traceId;
+    private int responseTime;
+}

+ 68 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/process/FailedDataProcessor.java

@@ -0,0 +1,68 @@
+package info.aspirecn.iov.sjjh.supplier10000040.process;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import info.aspirecn.iov.sjjh.supplier10000040.service.ChannelService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.stereotype.Component;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/9/2 14:27
+ * @version: V1.0
+ **/
+
+@Slf4j
+//@Component
+public class FailedDataProcessor implements ApplicationRunner {
+    @Autowired
+    ChannelService channelService;
+    @Autowired
+    ResourceLoader resourceLoader;
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        log.info("开始处理推送失败数据");
+        List<JSONObject> failedDataList = readFile();
+        for (JSONObject jsonObject : failedDataList) {
+            String source = jsonObject.getString("_source");
+            JSONObject sourceObject = JSON.parseObject(source);
+            String traceId = sourceObject.getString("traceId");
+            channelService.sendFailedMessage(traceId);
+        }
+        log.info("处理推送失败数据完成");
+    }
+
+    private List<JSONObject> readFile() throws IOException {
+        ClassPathResource classPathResource = new ClassPathResource("/failedData.json");
+
+        InputStream inputStream = classPathResource.getInputStream();
+        InputStreamReader reader = new InputStreamReader(classPathResource.getInputStream(), "Utf-8");
+        BufferedReader br = new BufferedReader(reader);
+        StringBuilder data = new StringBuilder();
+
+        String tempString;
+        while ((tempString = br.readLine()) != null) {
+            data.append(tempString);
+        }
+
+        br.close();
+        reader.close();
+        inputStream.close();
+
+        List<JSONObject> list = JSON.parseArray(data.toString(), JSONObject.class);
+        return list;
+    }
+}

+ 306 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/process/IllegalInfoProcessor.java

@@ -0,0 +1,306 @@
+package info.aspirecn.iov.sjjh.supplier10000040.process;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.supplier10000040.constant.ChannelConstant;
+import info.aspirecn.iov.sjjh.supplier10000040.model.*;
+import info.aspirecn.iov.sjjh.supplier10000040.property.SupplierProperties;
+import info.aspirecn.iov.sjjh.supplier10000040.util.EsOpeateUtils;
+import info.aspirecn.iov.sjjh.supplier10000040.util.ExcelUtil;
+import info.aspirecn.iov.sjjh.supplier10000040.util.IllegalInfoScoreUtil;
+import info.aspirecn.iov.sjjh.supplier10000040.util.SendService;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.file.GenericFileMessage;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.io.RandomAccessFile;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/25 21:11
+ * @version: V1.0
+ **/
+@Slf4j
+@Component
+public class IllegalInfoProcessor implements Processor {
+    @Value("${localDir.download}")
+    private String localDownloadDir;
+    @Autowired
+    SupplierProperties supplierProperties;
+
+    @Autowired
+    private StringRedisTemplate redisTemplate;
+
+    @Autowired
+    private SendService sendService;
+
+    @Autowired
+    private EsOpeateUtils esOpeateUtils;
+
+//    @Override
+//    public void process(Exchange exchange) throws Exception {
+//        exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
+//        GenericFileMessage<RandomAccessFile> inFileMessage = (GenericFileMessage<RandomAccessFile>) exchange.getIn();
+//        //文件名
+//        String fileName = inFileMessage.getGenericFile().getFileName();
+//        //文件的绝对路径
+//        log.info("supplier10000040.process:" + localDownloadDir + File.separator + fileName);
+//        List<IllegalInfoFtpResult> illegalInfoFtpResults = ExcelUtil.readExcel(localDownloadDir + File.separator + fileName);
+//        String upstreamCode = "1000";
+//        for (IllegalInfoFtpResult result : illegalInfoFtpResults) {
+//            ChannelTypeHandleResponseObject responseObject = responseAnalyze(result);
+//            String traceId = result.getTraceId().split("-")[1];
+//            AsyncReqMqMessage asyncReqMqMessage = new AsyncReqMqMessage();
+//            asyncReqMqMessage.setTraceid(traceId);
+//            asyncReqMqMessage.setQueryCache(false);
+//            asyncReqMqMessage.setSyncReturn(false);
+//            asyncReqMqMessage.setIsCharge(responseObject.getIsCharge());
+//
+//            String asyncReqInfoStr = (String) redisTemplate.boundHashOps("sjjh_async_request_info").get(traceId);
+//            log.info("traceId:{},asyncReqInfoStr:{}", traceId, asyncReqInfoStr);
+//
+//            if (StringUtils.isNotEmpty(asyncReqInfoStr)) {
+//                CacheStreamObject.AsyncMsg asyncReqInfo = JSON.parseObject(asyncReqInfoStr, CacheStreamObject.AsyncMsg.class);
+//                CallbackDownstreamRequest request = new CallbackDownstreamRequest();
+//                request.setAccessId(asyncReqInfo.getAccessId());
+//                request.setTransationId(traceId);
+//                request.setResultCode(responseObject.getResultCode());
+//
+//                if (asyncReqInfo.getIfJkCode() == 1) {
+//                    String code = supplierProperties.getCode().get(String.valueOf(responseObject.getResultCode()));
+//                    if (code != null) {
+//                        request.setResultCode(Integer.valueOf(code));
+//                    }
+//
+//                }
+//
+//                request.setResultBody(responseObject.getResultBody().toString());
+//                log.info("request:{}", request);
+//                asyncReqMqMessage.setCallbackResult(Base64.encodeBase64String(JSON.toJSONString(request, SerializerFeature.WriteMapNullValue).getBytes("UTF-8")));
+//                String message = JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue);
+//                log.info("发送到kafka的message:{}", message);
+//                Boolean sendResult;
+//                sendResult = sendService.sendMsg(JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue));
+//                if (!sendResult) {//成功发起请求记录日志
+//                    KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+//                    kafkaAccessLog.setType(1);
+//                    kafkaAccessLog.setContent(message);
+//                    String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+//                    long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+//                    log.info("kafka信息:{}发送redis是否成功:{}", message, addKafkaAccessLogResult);
+//                }
+//                boolean logFlag = false;
+//                //修改es日志记录
+//                try {
+//                    logFlag = esOpeateUtils.updateByQuery(traceId, "use", responseObject.getIsCharge(), upstreamCode);
+//                } catch (Exception ex) {
+//                    log.error("update es 异常:{}", ex);
+//                }
+//                if (!logFlag) {
+//                    KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+//                    kafkaAccessLog.setType(2);
+//                    Map<String, String> contentMap = new HashMap<String, String>();
+//                    contentMap.put("traceId", traceId);
+//                    contentMap.put("ifCj", "use");
+//                    contentMap.put("isCharge", String.valueOf(responseObject.getIsCharge()));
+//                    String contentStr = JSON.toJSONString(contentMap);
+//                    kafkaAccessLog.setContent(contentStr);
+//                    String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+//                    long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+//                    log.info("log update 信息:{}是否成功:{}", contentStr, addKafkaAccessLogResult);
+//                }
+//            }
+//            Long removeResult = redisTemplate.boundZSetOps("sjjh_async_request_traceids").remove(traceId);
+//            log.info("删除sjjh_async_request_traceids:{},结果:{}", traceId, removeResult);
+//        }
+//    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
+        GenericFileMessage<RandomAccessFile> inFileMessage = (GenericFileMessage<RandomAccessFile>) exchange.getIn();
+        //文件名
+        String fileName = inFileMessage.getGenericFile().getFileName();
+        //文件的绝对路径
+        log.info("supplier10000040.process:" + localDownloadDir + File.separator + fileName);
+        List<IllegalInfoFtpResult> illegalInfoFtpResults = new ArrayList<>();
+        try {
+            illegalInfoFtpResults = ExcelUtil.readExcel(localDownloadDir + File.separator + fileName);
+        } catch (Exception e) {
+            ErrorUtils.captureException(e);
+            log.info("supplier10000040.process读取excel失败接口Exception={}", e);
+            File file = new File(localDownloadDir + File.separator + fileName);
+            if (file.exists()) {
+                file.delete();
+            }
+        }
+
+        String upstreamCode = "1000";
+        for (IllegalInfoFtpResult result : illegalInfoFtpResults) {
+            ChannelTypeHandleResponseObject responseObject = responseAnalyze(result);
+            String traceId = result.getTraceId().split("-")[1];
+
+            AsyncReqMqMessage asyncReqMqMessage = new AsyncReqMqMessage();
+            asyncReqMqMessage.setTraceid(traceId);
+            asyncReqMqMessage.setQueryCache(false);
+            asyncReqMqMessage.setSyncReturn(false);
+            asyncReqMqMessage.setIsCharge(responseObject.getIsCharge());
+
+            String asyncReqInfoStr = (String) redisTemplate.boundHashOps("sjjh_async_request_info").get(traceId);
+            log.info("traceId:{},asyncReqInfoStr:{}", traceId, asyncReqInfoStr);
+
+            if (StringUtils.isBlank(asyncReqInfoStr)) {
+                continue;
+            }
+
+            if (StringUtils.isNotEmpty(asyncReqInfoStr)) {
+                CacheStreamObject.AsyncMsg asyncReqInfo = JSON.parseObject(asyncReqInfoStr, CacheStreamObject.AsyncMsg.class);
+                CallbackDownstreamRequest request = new CallbackDownstreamRequest();
+                request.setAccessId(asyncReqInfo.getAccessId());
+                request.setTransationId(traceId);
+                request.setResultCode(responseObject.getResultCode());
+
+                if (asyncReqInfo.getIfJkCode() == 1) {
+                    String code = supplierProperties.getCode().get(String.valueOf(responseObject.getResultCode()));
+                    if (code != null) {
+                        request.setResultCode(Integer.valueOf(code));
+                    }
+                }
+
+                request.setResultBody(responseObject.getResultBody().toString());
+                log.info("request:{}", request);
+                asyncReqMqMessage.setCallbackResult(Base64.encodeBase64String(JSON.toJSONString(request, SerializerFeature.WriteMapNullValue).getBytes("UTF-8")));
+                String message = JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue);
+                log.info("发送到kafka的message:{}", message);
+                Boolean sendResult;
+                sendResult = sendService.sendMsg(JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue));
+                if (!sendResult) {//成功发起请求记录日志
+                    KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+                    kafkaAccessLog.setType(1);
+                    kafkaAccessLog.setContent(message);
+                    String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+                    long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+                    log.info("kafka信息:{}发送redis是否成功:{}", message, addKafkaAccessLogResult);
+                }
+                boolean logFlag = false;
+                //修改es日志记录
+                try {
+                    logFlag = esOpeateUtils.updateByQuery(traceId, "use", responseObject.getIsCharge(), upstreamCode);
+                } catch (Exception ex) {
+                    log.error("update es 异常:{}", ex);
+                }
+                if (!logFlag) {
+                    KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+                    kafkaAccessLog.setType(2);
+                    Map<String, String> contentMap = new HashMap<String, String>();
+                    contentMap.put("traceId", traceId);
+                    contentMap.put("ifCj", "use");
+                    contentMap.put("isCharge", String.valueOf(responseObject.getIsCharge()));
+                    String contentStr = JSON.toJSONString(contentMap);
+                    kafkaAccessLog.setContent(contentStr);
+                    String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+                    long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+                    log.info("log update 信息:{}是否成功:{}", contentStr, addKafkaAccessLogResult);
+                } else {
+                    // 修改es成功
+                    String redisRequestParam = (String) redisTemplate.boundHashOps("asynchronous-illegal-info-request").get(traceId);
+                    RedisParamObject redisRequestParamObject = JSON.toJavaObject(JSON.parseObject(redisRequestParam), RedisParamObject.class);
+                    redisRequestParamObject.setStatus(ChannelConstant.REQUEST_STATUS_4);
+                    redisRequestParamObject.setVersion(redisRequestParamObject.getVersion() + 1);
+                    redisTemplate.boundHashOps("asynchronous-illegal-info-request")
+                            .put(redisRequestParamObject.getTraceId(), JSON.toJSONString(redisRequestParamObject));
+                    log.info("illegalInfoTask -- 修改数据流水号:{},修改为状态:4(处理完成)");
+                }
+            }
+            Long removeResult = redisTemplate.boundZSetOps("sjjh_async_request_traceids").remove(traceId);
+            log.info("删除sjjh_async_request_traceids:{},结果:{}", traceId, removeResult);
+        }
+    }
+
+    private ChannelTypeHandleResponseObject responseAnalyze(IllegalInfoFtpResult result) {
+        String traceId = result.getTraceId();
+        String interfaceType = traceId.split("-")[0];
+        String isIdCard = String.valueOf(result.getIsIdCard());
+        String isDrugs = String.valueOf(result.getIsDrugs());
+        String isEscape = String.valueOf(result.getIsEscape());
+        String isPedigree = String.valueOf(result.getIsPedigree());
+        log.info("supplier10000040.process:上游返回结果:{}", result);
+        ChannelTypeHandleResponseObject responseObject = new ChannelTypeHandleResponseObject();
+        if (isIdCard.equals("2") || isDrugs.equals("2") || isEscape.equals("2") || isPedigree.equals("2")) {
+            responseObject.setResultCode(Constant.OTHER_ERROR_CODE);
+            responseObject.setResultBody(Constant.OTHER_ERROR);
+            responseObject.setIsCharge(Constant.IS_NOT_CHARGE);
+            return responseObject;
+        }
+        if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_SCORE)) {
+            return getIllegalInfoScoreResult(result, responseObject);
+        } else if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_RESULT)) {
+            return getIllegalInfoResult(result, responseObject);
+        } else {
+            return getIllegalInfoSimple(result, responseObject);
+        }
+
+    }
+
+    private ChannelTypeHandleResponseObject getIllegalInfoScoreResult(IllegalInfoFtpResult result, ChannelTypeHandleResponseObject responseObject) {
+        String isIdCard = String.valueOf(result.getIsIdCard());
+        String isDrugs = String.valueOf(result.getIsDrugs());
+        String isEscape = String.valueOf(result.getIsEscape());
+        String isPedigree = String.valueOf(result.getIsPedigree());
+        String resultCode = isDrugs + isEscape + isPedigree;
+        return IllegalInfoScoreUtil.getIllegalInfoScoreResult(resultCode, responseObject);
+    }
+
+    private ChannelTypeHandleResponseObject getIllegalInfoResult(IllegalInfoFtpResult result, ChannelTypeHandleResponseObject responseObject) {
+        String isIdCard = String.valueOf(result.getIsIdCard());
+        String isDrugs = String.valueOf(result.getIsDrugs());
+        String isEscape = String.valueOf(result.getIsEscape());
+        String isPedigree = String.valueOf(result.getIsPedigree());
+        JSONObject responseResult = new JSONObject();
+        responseResult.put("name", result.getName());
+        responseResult.put("idCode", result.getIdCard());
+        responseResult.put("isIdCard", isIdCard);
+        responseResult.put("isDrugs", isDrugs);
+        responseResult.put("isEscape", isEscape);
+        responseResult.put("isPedigree", isPedigree);
+
+        responseObject.setResultCode(Constant.SUCCESS);
+        responseObject.setResultBody(JSON.toJSONString(responseResult));
+        responseObject.setIsCharge(Constant.IS_CHARGE);
+
+        return responseObject;
+    }
+
+    private ChannelTypeHandleResponseObject getIllegalInfoSimple(IllegalInfoFtpResult result, ChannelTypeHandleResponseObject responseObject) {
+        String isIdCard = String.valueOf(result.getIsIdCard());
+        String isDrugs = String.valueOf(result.getIsDrugs());
+        String isEscape = String.valueOf(result.getIsEscape());
+        String isPedigree = String.valueOf(result.getIsPedigree());
+
+        if (isDrugs.equals("1") || isEscape.equals("1") || isPedigree.equals("1")) {
+            responseObject.setResultBody("是");
+        } else {
+            responseObject.setResultBody("否");
+        }
+        responseObject.setResultCode(Constant.SUCCESS);
+        responseObject.setIsCharge(Constant.IS_CHARGE);
+        return responseObject;
+    }
+}

+ 19 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/property/SupplierProperties.java

@@ -0,0 +1,19 @@
+package info.aspirecn.iov.sjjh.supplier10000040.property;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Data
+@ConfigurationProperties(prefix = "supplier")
+@Component
+public class SupplierProperties {
+    Map<Integer, String> code;
+    private String decodeApi;
+    private String decodeUrl;
+    private String decodeAppKey;
+    private String decodeAppSecret;
+}

+ 51 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/service/ChannelService.java

@@ -0,0 +1,51 @@
+package info.aspirecn.iov.sjjh.supplier10000040.service;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.supplier10000040.model.IllegalInfoParamExcelObject;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/22 15:00
+ * @version: V1.0
+ **/
+public interface ChannelService {
+    /**
+     * 异步不良
+     *
+     * @param request
+     * @param customBody 入参:身份证号,姓名
+     * @param outTime
+     * @param type
+     * @return
+     */
+    ChannelTypeHandleResponseObject validateIllegalInfo(HttpServletRequest request, String customBody, int outTime,
+                                                        String type, String interfaceType);
+
+    boolean sendRequest(List<IllegalInfoParamExcelObject> excelObjectList);
+
+    void sendFailedMessage(String traceId);
+
+    /**
+     * 不良同步
+     * @param request
+     * @param customBody
+     * @param outTime
+     * @param interfaceType
+     * @return
+     */
+    ChannelTypeHandleResponseObject validateIllegalInfoV2(HttpServletRequest request, String customBody, int outTime, String interfaceType);
+
+    String getDecodeIdCard(HttpServletRequest request, String customBody, int outTime, String decodeType, ChannelTypeHandleResponseObject ret);
+
+    String getAesDecodeIdCard(HttpServletRequest request, String customBody, ChannelTypeHandleResponseObject ret);
+
+    boolean isIllegalInfoV2ScoreSHA256TestData(HttpServletRequest request, String customBody, ChannelTypeHandleResponseObject ret);
+
+    String getAesMd5DecodeIdCode(HttpServletRequest request, String customBody, ChannelTypeHandleResponseObject ret, int outTime);
+
+    String getDecodeIdCode(HttpServletRequest request, String customBody, int outTime, String decodeType, ChannelTypeHandleResponseObject ret);
+}

+ 892 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/service/ChannelServiceImpl.java

@@ -0,0 +1,892 @@
+package info.aspirecn.iov.sjjh.supplier10000040.service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.SftpException;
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+import info.aspirecn.iov.sjjh.commons.lang.PatternTools;
+import info.aspirecn.iov.sjjh.supplier10000040.constant.ChannelConstant;
+import info.aspirecn.iov.sjjh.supplier10000040.model.*;
+import info.aspirecn.iov.sjjh.supplier10000040.util.*;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Service;
+import sun.rmi.runtime.Log;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import javax.validation.ValidatorFactory;
+import java.io.*;
+import java.net.SocketTimeoutException;
+import java.security.MessageDigest;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/22 15:00
+ * @version: V1.0
+ **/
+@Service
+@Slf4j
+public class ChannelServiceImpl implements ChannelService {
+    @Autowired
+    private ObjectMapper objectMapper;
+    @Autowired
+    private StringRedisTemplate redisTemplate;
+    @Autowired
+    private EsOpeateUtils esOpeateUtils;
+    @Autowired
+    private SendService sendService;
+
+    @Value("${localDir.upload}")
+    private String localUploadDir;
+
+    @Value("${localDir.keyFilePath}")
+    private String keyFilePath;
+
+    @Value("${ftpServer.host}")
+    private String ftpServerHost;
+
+    @Value("${ftpServer.port}")
+    private String ftpServerPort;
+
+    @Value("${ftpServer.username}")
+    private String ftpServerUsername;
+
+    @Value("${ftpServer.passphrase}")
+    private String ftpServerPassphrase;
+
+    @Value("${ftpServer.dir.upload}")
+    private String ftpServerUploadDir;
+
+    @Value("${supplier.illegalInfoV2.url}")
+    private String illegalInfoV2Url;
+
+    @Value("${supplier.decodeApi}")
+    private String decodeApi;
+
+    @Value("${supplier.decodeUrl}")
+    private String decodeUrl;
+
+    @Value("${supplier.decodeAppKey}")
+    private String decodeAppKey;
+
+    @Value("${supplier.decodeAppSecret}")
+    private String decodeAppSecret;
+
+    DateTimeFormatter yMdHms = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+
+    private static final String MEDIA_TYPE = "application/json;charset=UTF-8";
+
+    private OkHttpClient okHttpClient = new OkHttpClient.Builder().build();
+
+    @Override
+    public ChannelTypeHandleResponseObject validateIllegalInfo(HttpServletRequest request, String customBody,
+                                                               int outTime, String type, String interfaceType) {
+        ChannelTypeHandleResponseObject ret = new ChannelTypeHandleResponseObject();
+        ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+        String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+        String returnType = request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA);
+
+        if (StringUtils.isBlank(returnType)) {
+            returnType = Constant.CUSTOMER_RETURN_ZW;
+        }
+        if (outTime <= 0) {
+            outTime = Constant.HTTPCLIENT_CONNECTTIMEOUT;
+        }
+        log.info("validateIllegalInfo---customBody={},outTime={}", customBody, outTime);
+        try {
+            IllegalInfoRequestObject illegalInfoRequestObject = objectMapper.readValue(customBody, IllegalInfoRequestObject.class);
+            // 参数校验
+            if (!validateParams(ret, returnType, illegalInfoRequestObject)) {
+                ret.setCode(Constant.SUCCESS);
+                request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
+                return ret;
+            }
+
+            // 封装放入缓存参数对象
+            RedisParamObject redisParamObject = new RedisParamObject();
+            BeanUtils.copyProperties(illegalInfoRequestObject, redisParamObject);
+            redisParamObject.setReturnType(type);
+            redisParamObject.setTraceId((String) request.getAttribute("x-b3-traceid"));
+            redisParamObject.setInterfaceType(interfaceType);
+            // 身份证姓名放入缓存
+
+            redisParamObject.setStatus(ChannelConstant.REQUEST_STATUS_1);
+            redisParamObject.setVersion(1);
+            redisParamObject.setTimestamp(System.currentTimeMillis());
+            redisTemplate.boundHashOps("asynchronous-illegal-info-request").put(request.getAttribute("x-b3-traceid"),
+                    JSON.toJSONString(redisParamObject));
+            ret.setIfSuccessAsyn(1);
+            ret.setIsCharge(Constant.IS_CHARGE);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.IFCJ_KEY, Constant.IFCJ_NO_CJ);
+            if (returnType.equals(Constant.CUSTOMER_RETURN_JK)) {
+                ret.setResultCode(Constant.JK_RETURN_CODE_MATCH);
+            } else {
+                ret.setResultCode(Constant.MATCH_CODE);
+            }
+            ret.setResultBody(Constant.QUERY_SUCCESS);
+            ret.setResultDesc(Constant.QUERY_SUCCESS);
+            upstreamCode = "1000";
+        } catch (Exception ioe) {
+            ErrorUtils.captureException(ioe);
+            log.info("supplier10000040.validateIllegalInfo接口Exception={}", ioe);
+            ret.setCode(Constant.FAIL);
+            if (returnType.equals(Constant.CUSTOMER_RETURN_JK)) {
+                ret.setResultCode(Constant.JK_RETURN_CODE_OTHER_ERROR);
+            } else {
+                ret.setResultCode(Constant.OTHER_ERROR_CODE);
+            }
+            ret.setResultBody(Constant.OTHER_ERROR);
+            ret.setResultDesc(Constant.OTHER_ERROR);
+        }
+        //上游返回码
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
+        return ret;
+    }
+
+    private boolean validateParams(ChannelTypeHandleResponseObject ret, String returnType, IllegalInfoRequestObject requestObject) {
+        if (!validateParamNullValue(requestObject)) {
+            if (Constant.CUSTOMER_RETURN_ZW.equals(returnType)) {
+                ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+                ret.setResultBody(Constant.PARAMETER_NAME_ERROR);
+                ret.setResultDesc(Constant.PARAMETER_NAME_ERROR);
+            } else {
+                ret.setResultCode(Constant.JK_RETURN_CODE_INVALID_PARAMETER);
+                ret.setResultBody(Constant.PARAMETER_NAME_ERROR);
+                ret.setResultDesc(Constant.PARAMETER_NAME_ERROR);
+            }
+            return false;
+        } else if (StringUtils.isBlank(requestObject.getName()) ||
+                !PatternTools.checkResult(Constant.PATTERN_CN_NAME_REGEX, requestObject.getName())) {
+            if (Constant.CUSTOMER_RETURN_ZW.equals(returnType)) {
+                ret.setResultCode(Constant.NAME_FORMAT_ERROR_CODE);
+                ret.setResultDesc(Constant.NAME_FORMAT_ERROR);
+                ret.setResultBody(Constant.NAME_FORMAT_ERROR);
+            } else {
+                ret.setResultCode(Constant.JK_NAME_FORMAT_ERROR_CODE);
+                ret.setResultDesc(Constant.JK_NAME_FORMAT_ERROR);
+                ret.setResultBody(Constant.JK_NAME_FORMAT_ERROR);
+            }
+            return false;
+        } else if (StringUtils.isBlank(requestObject.getIdCode())
+                || !PatternTools.checkResult(Constant.PATTERN_SPECIAL_ID_NUMBER_REGEX, requestObject.getIdCode())) {
+            if (Constant.CUSTOMER_RETURN_ZW.equals(returnType)) {
+                ret.setResultCode(Constant.IDCODE_FORMAT_ERROR_CODE);
+                ret.setResultDesc(Constant.IDCODE_FORMAT_ERROR);
+                ret.setResultBody(Constant.IDCODE_FORMAT_ERROR);
+            } else {
+                ret.setResultCode(Constant.JK_IDCODE_FORMAT_ERROR_CODE);
+                ret.setResultDesc(Constant.JK_IDCODE_FORMAT_ERROR);
+                ret.setResultBody(Constant.JK_IDCODE_FORMAT_ERROR);
+            }
+            return false;
+        }
+        return true;
+    }
+    private boolean validateType(ChannelTypeHandleResponseObject ret, String returnType, IllegalInfoV2CustomBodyObject customBodyObject) {
+        if (StringUtils.isBlank(customBodyObject.getType()) || !customBodyObject.getType().equals("1")) {
+            if (Constant.CUSTOMER_RETURN_ZW.equals(returnType)) {
+                ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+                ret.setResultBody(Constant.INVALID_PARAMETER);
+                ret.setResultDesc(Constant.INVALID_PARAMETER);
+            } else {
+                ret.setResultCode(Constant.JK_RETURN_CODE_INVALID_PARAMETER);
+                ret.setResultBody(Constant.INVALID_PARAMETER);
+                ret.setResultDesc(Constant.INVALID_PARAMETER);
+            }
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    private boolean validateParamNullValue(Object jsonResolveObject) {
+        ValidatorFactory vf = Validation.buildDefaultValidatorFactory();
+        Validator validator = vf.getValidator();
+        Set<ConstraintViolation<Object>> set = validator.validate(jsonResolveObject);
+        for (ConstraintViolation<Object> con : set) {
+            if (StringUtils.isNotBlank(con.getMessage())) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private String getRedisNowTimeKey() {
+        String redisNowTimeKey;
+
+        String nowTime = yMdHms.format(LocalDateTime.now());
+        String seconds = nowTime.substring(12, 14);
+        if (Long.parseLong(seconds) < 20) {
+            redisNowTimeKey = nowTime.substring(0, 12) + "00";
+        } else if (Long.parseLong(seconds) < 40) {
+            redisNowTimeKey = nowTime.substring(0, 12) + "20";
+        } else {
+            redisNowTimeKey = nowTime.substring(0, 12) + "40";
+        }
+        return redisNowTimeKey;
+    }
+
+//    @Override
+//    public boolean sendRequest(Set<String> set, String key) {
+//        List<IllegalInfoParamExcelObject> paramExcelObjectList = new ArrayList<>();
+//        for (String content : set) {
+//            RedisParamObject redisParamObject = JSON.toJavaObject(JSON.parseObject(content), RedisParamObject.class);
+//            IllegalInfoParamExcelObject paramExcelObject = new IllegalInfoParamExcelObject();
+//            BeanUtils.copyProperties(redisParamObject, paramExcelObject);
+//            paramExcelObject.setTraceId(redisParamObject.getInterfaceType() + "-" + redisParamObject.getTraceId());
+//            paramExcelObjectList.add(paramExcelObject);
+//        }
+//
+//        String fileName = System.currentTimeMillis() + ".xlsx";
+//        String path = localUploadDir + File.separator + fileName;
+//        Map<String, String> headMap = new LinkedHashMap<>();
+//        headMap.put("traceId", "序列号");
+//        headMap.put("name", "姓名");
+//        headMap.put("idCode", "身份证号");
+//        try {
+//            OutputStream outXlsx = new FileOutputStream(path);
+//            ExcelUtil.createExcel(outXlsx, paramExcelObjectList);
+//        } catch (IOException ioe) {
+//            log.info("supplier10000040.sendRequest,导出参数excel发生异常,Exception={}", ioe);
+//            return false;
+//        }
+//        try {
+//            SFTPUtil.upload(ftpServerHost, Integer.parseInt(ftpServerPort), ftpServerUsername, ftpServerPassphrase,
+//                    "/" + ftpServerUploadDir + "/" + fileName, path, keyFilePath);
+//            File localFile = new File(path);
+//            boolean deleteResult = false;
+//            if (localFile.exists()) {
+//                deleteResult = localFile.delete();
+//            }
+//            if (!deleteResult) {
+//                log.info("supplier10000040.sendRequest删除参数excel失败,文件{}", path);
+//            }
+//            for (String content : set) {
+//                long removeResult = redisTemplate.boundSetOps(key).remove(content);
+//                log.info("key:{},removeValue:{},result:{}", key, content, removeResult);
+//            }
+//            return true;
+//        } catch (JSchException jschException) {
+//            log.info("supplier10000040.sendRequest,上传文件时连接sftp服务器失败, 文件{}, 失败原因{}", path, jschException.getMessage());
+//            return false;
+//        } catch (FileNotFoundException fileNotFoundException) {
+//            log.info("supplier10000040.sendRequest,上传文件到sftp服务器生成文件失败, 文件{}, 失败原因{}", path, fileNotFoundException.getMessage());
+//            return false;
+//        } catch (SftpException sftpException) {
+//            log.info("supplier10000040.sendRequest,上传文件到sftp服务器失败, 文件{}, 失败原因{}", path, sftpException.getMessage());
+//            return false;
+//        }
+//    }
+
+    @Override
+    public boolean sendRequest(List<IllegalInfoParamExcelObject> excelObjectList) {
+        String fileName = System.currentTimeMillis() + ".xlsx";
+        String path = localUploadDir + File.separator + fileName;
+        Map<String, String> headMap = new LinkedHashMap<>();
+        headMap.put("traceId", "序列号");
+        headMap.put("name", "姓名");
+        headMap.put("idCode", "身份证号");
+        try {
+            OutputStream outXlsx = new FileOutputStream(path);
+            ExcelUtil.createExcel(outXlsx, excelObjectList);
+        } catch (IOException ioe) {
+            log.info("supplier10000040.sendRequest,导出参数excel发生异常,Exception={}", ioe);
+            return false;
+        }
+        try {
+            SFTPUtil.upload(ftpServerHost, Integer.parseInt(ftpServerPort), ftpServerUsername, ftpServerPassphrase,
+                    "/" + ftpServerUploadDir + "/" + fileName, path, keyFilePath);
+            return true;
+        } catch (JSchException jschException) {
+            log.info("supplier10000040.sendRequest,上传文件时连接sftp服务器失败, 文件{}, 失败原因{}", path, jschException.getMessage());
+            return false;
+        } catch (FileNotFoundException fileNotFoundException) {
+            log.info("supplier10000040.sendRequest,上传文件到sftp服务器生成文件失败, 文件{}, 失败原因{}", path, fileNotFoundException.getMessage());
+            return false;
+        } catch (SftpException sftpException) {
+            log.info("supplier10000040.sendRequest,上传文件到sftp服务器失败, 文件{}, 失败原因{}", path, sftpException.getMessage());
+            return false;
+        } finally {
+            File localFile = new File(path);
+            boolean deleteResult = false;
+            if (localFile.exists()) {
+                deleteResult = localFile.delete();
+            }
+            if (!deleteResult) {
+                log.info("supplier10000040.sendRequest删除参数excel失败,文件{}", path);
+            }
+        }
+    }
+
+    @Override
+    public void sendFailedMessage(String traceId) {
+        AsyncReqMqMessage asyncReqMqMessage = new AsyncReqMqMessage();
+        asyncReqMqMessage.setTraceid(traceId);
+        asyncReqMqMessage.setQueryCache(false);
+        asyncReqMqMessage.setSyncReturn(false);
+        asyncReqMqMessage.setIsCharge(Constant.IS_NOT_CHARGE);
+        String asyncReqInfoStr = (String) redisTemplate.boundHashOps("sjjh_async_request_info").get(traceId);
+        log.info("sendFailedMessage, asyncReqInfoStr:{}", asyncReqInfoStr);
+        if (StringUtils.isNotEmpty(asyncReqInfoStr)) {
+            CacheStreamObject.AsyncMsg asyncReqInfo = JSON.parseObject(asyncReqInfoStr, CacheStreamObject.AsyncMsg.class);
+            CallbackDownstreamRequest request = new CallbackDownstreamRequest();
+            request.setAccessId(asyncReqInfo.getAccessId());
+            request.setTransationId(traceId);
+            if (asyncReqInfo.getIfJkCode() == 1) {
+                request.setResultCode(Constant.JK_RETURN_CODE_OTHER_ERROR);
+            } else {
+                request.setResultCode(Constant.OTHER_ERROR_CODE);
+            }
+
+            request.setResultBody(Constant.OTHER_ERROR);
+            try {
+                asyncReqMqMessage.setCallbackResult(Base64.encodeBase64String(JSON.toJSONString(request, SerializerFeature.WriteMapNullValue).getBytes("UTF-8")));
+            } catch (UnsupportedEncodingException e) {
+                ErrorUtils.captureException(e);
+                log.info("supplier10000040.sendFailedMessage 发送到kafka的message转base64失败Exception={}", e);
+                return;
+            }
+
+            String message = JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue);
+            log.info("发送到kafka的message:{}", message);
+            Boolean sendResult;
+            sendResult = sendService.sendMsg(JSON.toJSONString(asyncReqMqMessage, SerializerFeature.WriteMapNullValue));
+            if (!sendResult) {//成功发起请求记录日志
+                KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+                kafkaAccessLog.setType(1);
+                kafkaAccessLog.setContent(message);
+                String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+                long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+                log.info("kafka信息:{}发送redis是否成功:{}", message, addKafkaAccessLogResult);
+            }
+            boolean logFlag = false;
+            //修改es日志记录
+            try {
+                logFlag = esOpeateUtils.updateByQuery(traceId, "use", Constant.IS_NOT_CHARGE, "1000");
+            } catch (Exception ex) {
+                log.error("update es 异常:{}", ex);
+            }
+            if (!logFlag) {
+                KafkaAccessLog kafkaAccessLog = new KafkaAccessLog();
+                kafkaAccessLog.setType(2);
+                Map<String, String> contentMap = new HashMap<String, String>();
+                contentMap.put("traceId", traceId);
+                contentMap.put("ifCj", "use");
+                contentMap.put("isCharge", String.valueOf(Constant.IS_NOT_CHARGE));
+                String contentStr = JSON.toJSONString(contentMap);
+                kafkaAccessLog.setContent(contentStr);
+                String kafkaContent = JSON.toJSONString(kafkaAccessLog);
+                long addKafkaAccessLogResult = redisTemplate.boundSetOps("Kafka_AccessLog").add(kafkaContent);
+                log.info("log update 信息:{}是否成功:{}", contentStr, addKafkaAccessLogResult);
+            } else {
+                // 修改es成功
+                redisTemplate.boundHashOps("asynchronous-illegal-info-request").delete(traceId);
+                log.info("dealParamInfo -- 移除处理完成的参数:{}", traceId);
+            }
+            Long removeResult = redisTemplate.boundZSetOps("sjjh_async_request_traceids").remove(traceId);
+            log.info("删除sjjh_async_request_traceids:{},结果:{}", traceId, removeResult);
+        }
+    }
+
+    @Override
+    public ChannelTypeHandleResponseObject validateIllegalInfoV2(HttpServletRequest request, String customBody, int outTime, String interfaceType) {
+        ChannelTypeHandleResponseObject ret = new ChannelTypeHandleResponseObject();
+        ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+        String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
+        String returnType = request.getHeader(Constant.CUSTOMER_RETURN_TYPE_PARA);
+
+        if (StringUtils.isBlank(returnType)) {
+            returnType = Constant.CUSTOMER_RETURN_ZW;
+        }
+        if (outTime <= 0) {
+            outTime = Constant.HTTPCLIENT_CONNECTTIMEOUT;
+        }
+        log.info("validateIllegalInfoV2---customBody={},outTime={}", customBody, outTime);
+        IllegalInfoV2CustomBodyObject customBodyObject = new IllegalInfoV2CustomBodyObject();
+        try {
+            customBodyObject = objectMapper.readValue(customBody, IllegalInfoV2CustomBodyObject.class);
+        } catch (IOException ioe) {
+            log.info("supplier10000040.validateIllegalInfoV2接口-IOException:{}", ioe);
+            ErrorUtils.captureException(ioe);
+            ret.setCode(Constant.FAIL);
+        }
+
+        // 参数校验
+        if (!validateParams(ret, returnType, customBodyObject) || !validateType(ret, returnType, customBodyObject)) {
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
+            return ret;
+        }
+
+        IllegalInfoV2RequestObject illegalInfoRequestObject = new IllegalInfoV2RequestObject();
+        BeanUtils.copyProperties(customBodyObject, illegalInfoRequestObject);
+        String traceId = request.getHeader("x-b3-traceid");
+        illegalInfoRequestObject.setTraceId(traceId);
+        illegalInfoRequestObject.setIdCode(illegalInfoRequestObject.getIdCode().toUpperCase());
+        MediaType mediaType = MediaType.parse(MEDIA_TYPE);
+        RequestBody requestBody = RequestBody.create(mediaType, JSON.toJSONString(illegalInfoRequestObject));
+
+        Request okRequest = new Request.Builder()
+                .post(requestBody)
+                .url(illegalInfoV2Url)
+                .build();
+        OkHttpClient client = okHttpClient.newBuilder()
+                .connectTimeout(outTime, TimeUnit.MILLISECONDS)
+                .readTimeout(outTime, TimeUnit.MILLISECONDS)
+                .writeTimeout(outTime, TimeUnit.MILLISECONDS)
+                .build();
+
+        String responseContext = "";
+        try {
+            Long startTime = System.currentTimeMillis();
+            Response response = client.newCall(okRequest).execute();
+            log.info("supplier10000040.validateIllegalInfoV2接口-上游返回时间={}", System.currentTimeMillis() - startTime);
+            if (response.body() != null) {
+                responseContext = response.body().string();
+                log.info("supplier10000040.validateIllegalInfoV2接口responseContext={}",responseContext);
+            }
+            response.close();
+        } catch (SocketTimeoutException ste) {
+            log.info("supplier10000040.validateIllegalInfoV2接口-SocketTimeoutException:{}", ste);
+            ErrorUtils.captureException(ste);
+            ret.setCode(Constant.REQUEST_TIMEOUT);
+            return ret;
+        } catch (Exception e) {
+            log.info("supplier10000040.validateIllegalInfoV2接口Exception={}", e);
+            ErrorUtils.captureException(e);
+            ret.setCode(Constant.FAIL);
+            return ret;
+        }
+        JSONObject resultJsonObject = JSON.parseObject(responseContext);
+        if (resultJsonObject.get("code") != null && resultJsonObject.getString("code").equals("1")) {
+            IllegalInfoV2ResponseObject responseObject = JSON.toJavaObject(resultJsonObject, IllegalInfoV2ResponseObject.class);
+            if (responseObject != null) {
+                ret.setCode(Constant.SUCCESS);
+                setIllegalInfoV2Response(responseObject, interfaceType, ret);
+            } else {
+                ret.setCode(Constant.FAIL);
+            }
+        } else {
+            ret.setResultCode(Constant.OTHER_ERROR_CODE);
+            ret.setResultBody(Constant.OTHER_ERROR);
+            ret.setIsCharge(Constant.IS_NOT_CHARGE);
+        }
+        if (resultJsonObject.get("code") != null) {
+            upstreamCode = resultJsonObject.getString("code");
+        }
+
+        //上游返回码
+        request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
+        return ret;
+    }
+
+    private ChannelTypeHandleResponseObject setIllegalInfoV2Response(IllegalInfoV2ResponseObject responseObject,
+                                          String interfaceType, ChannelTypeHandleResponseObject ret) {
+        if (!responseObject.getCode().equals("1")) {
+            ret.setResultCode(Constant.OTHER_ERROR_CODE);
+            ret.setResultBody(Constant.OTHER_ERROR);
+            ret.setIsCharge(Constant.IS_NOT_CHARGE);
+            return ret;
+        }
+
+        String code = responseObject.getMessage().getCode();
+        String isDrugs = responseObject.getMessage().getIsDrugs();
+        String isEscape = responseObject.getMessage().getIsEscape();
+        String isPedigree = responseObject.getMessage().getIsPedigree();
+
+        if (!checkIllegalInfoV2ErrorResult(code, isDrugs, isEscape, isPedigree, interfaceType)) {
+            ret.setResultCode(Constant.OTHER_ERROR_CODE);
+            ret.setResultBody(Constant.OTHER_ERROR);
+            ret.setIsCharge(Constant.IS_NOT_CHARGE);
+            return ret;
+        }
+        if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_SCORE)) {
+            // 评分版
+            String resultCode = isDrugs + isEscape + isPedigree;
+            ret = IllegalInfoScoreUtil.getIllegalInfoScoreResult(resultCode, ret);
+
+        } else if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_SIMPLE)) {
+            // 简版
+            if (isDrugs.equals("1") || isEscape.equals("1") || isPedigree.equals("1")) {
+                ret.setResultBody("1");
+            } else {
+                ret.setResultBody("0");
+            }
+            ret.setResultCode(Constant.SUCCESS);
+            ret.setIsCharge(Constant.IS_CHARGE);
+
+        } else if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE)) {
+            // xd zt 定制版
+            if (isDrugs.equals("1") || isEscape.equals("1")) {
+                ret.setResultBody("1");
+            } else {
+                ret.setResultBody("0");
+            }
+            ret.setResultCode(Constant.SUCCESS);
+            ret.setIsCharge(Constant.IS_CHARGE);
+        } else {
+            // 详版
+            JSONObject result = new JSONObject();
+            result.put("isDrugs", isDrugs);
+            result.put("isEscape", isEscape);
+            result.put("isPedigree", isPedigree);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody(JSON.toJSONString(result));
+            ret.setIsCharge(Constant.IS_CHARGE);
+        }
+
+        return ret;
+    }
+
+    private boolean checkIllegalInfoV2ErrorResult (String code, String isDrugs, String isEscape, String isPedigree, String interfaceType) {
+        if (StringUtils.isBlank(code) || StringUtils.isBlank(isDrugs) || StringUtils.isBlank(isEscape) || StringUtils.isBlank(isPedigree)) {
+            return false;
+        } else if (!code.equals("0")) {
+            return false;
+        } else if (interfaceType.equals(ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE) && (isDrugs.equals("2") || isEscape.equals("2"))) {
+            return false;
+        } else if (!interfaceType.equals(ChannelConstant.ILLEGAL_INFO_DRUG_ESCAPE) && (isDrugs.equals("2") || isEscape.equals("2") || isPedigree.equals("2"))) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    @Override
+    public String getDecodeIdCard(HttpServletRequest request, String customBody, int outTime, String decodeType, ChannelTypeHandleResponseObject ret) {
+        JSONObject customBodyObject = JSON.parseObject(customBody);
+        if (StringUtils.isBlank(customBodyObject.getString("idCode")) || StringUtils.isBlank(customBodyObject.getString("name"))
+                || (decodeType.equals(ChannelConstant.DECODE_TYPE_SHA256) && (customBodyObject.getString("idCode").length() != 64 || customBodyObject.getString("name").length() != 64))
+                || (decodeType.equals(ChannelConstant.DECODE_TYPE_MD5) && (customBodyObject.getString("idCode").length() != 32 || customBodyObject.getString("name").length() != 32))
+        ) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.INVALID_PARAMETER);
+            ret.setResultDesc(Constant.INVALID_PARAMETER);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+
+        String result = "";
+        String decodeResponseContext = Md5Sha256DecodeUtil.getDecodeIdCard(customBodyObject.getString("idCode"),
+                customBodyObject.getString("name"), decodeType, outTime);
+
+        JSONObject decodeResponseObject = JSON.parseObject(decodeResponseContext);
+        if (decodeResponseObject != null && decodeResponseObject.getString("code").equals("200") && decodeResponseObject.getString("data").equals("1")) {
+            JSONObject msg = JSON.parseObject(JSON.toJSONString(decodeResponseObject.get("msg")));
+            if (StringUtils.isNotBlank(msg.getString("idcard")) && StringUtils.isNotBlank(msg.getString("name"))) {
+                customBodyObject.put("idCode", msg.getString("idcard"));
+                customBodyObject.put("name", msg.getString("name"));
+                result = JSON.toJSONString(customBodyObject);
+            }
+        }
+
+        if (StringUtils.isBlank(result)) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.ZW_RETURN_CODE_134);
+            ret.setResultBody(Constant.RETURN_MESSAGE_134);
+            ret.setResultDesc(Constant.RETURN_MESSAGE_134);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        }
+        return result;
+    }
+
+    @Override
+    public String getAesDecodeIdCard(HttpServletRequest request, String customBody, ChannelTypeHandleResponseObject ret) {
+        JSONObject customBodyObject = JSON.parseObject(customBody);
+        if (customBodyObject.get("idCode") == null || customBodyObject.get("name") == null) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.PARAMETER_NAME_ERROR);
+            ret.setResultDesc(Constant.PARAMETER_NAME_ERROR);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+        if (StringUtils.isBlank(customBodyObject.getString("idCode")) || StringUtils.isBlank(customBodyObject.getString("name"))) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.INVALID_PARAMETER);
+            ret.setResultDesc(Constant.INVALID_PARAMETER);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+
+        try {
+            String userId = request.getHeader(ChannelConstant.USER_ID_HEADER_KEY);
+            String aesDecryptKey = encrypt32(ChannelConstant.AES_KEY + userId).substring(8, 24);
+            log.info("getAesDecodeIdCard.user:{},aesDecryptKey:{}", userId, aesDecryptKey);
+            String decodeIdCode = AesUtil.decryAES(aesDecryptKey, customBodyObject.getString("idCode"));
+            String decodeName = AesUtil.decryAES(aesDecryptKey, customBodyObject.getString("name"));
+
+            if (StringUtils.isBlank(decodeIdCode) || StringUtils.isBlank(decodeName)) {
+                ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+                ret.setResultCode(Constant.ZW_RETURN_CODE_133);
+                ret.setResultBody(Constant.RETURN_MESSAGE_133);
+                ret.setResultDesc(Constant.RETURN_MESSAGE_133);
+                ret.setCode(Constant.SUCCESS);
+                request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+                return "";
+            }
+            customBodyObject.put("idCode", decodeIdCode);
+            customBodyObject.put("name", decodeName);
+            return customBodyObject.toJSONString();
+        } catch (Exception e) {
+            ErrorUtils.captureException(e);
+            log.info("supplier10000040.getAesDecodeIdCard解密失败,Exception={}", e);
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.ZW_RETURN_CODE_133);
+            ret.setResultBody(Constant.RETURN_MESSAGE_133);
+            ret.setResultDesc(Constant.RETURN_MESSAGE_133);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+    }
+
+    public static String encrypt32(String encryptStr) {
+        MessageDigest md5;
+        try {
+            md5 = MessageDigest.getInstance("MD5");
+            byte[] md5Bytes = md5.digest(encryptStr.getBytes());
+            StringBuffer hexValue = new StringBuffer();
+            for (int i = 0; i < md5Bytes.length; i++) {
+                int val = ((int) md5Bytes[i]) & 0xff;
+                if (val < 16)
+                    hexValue.append("0");
+                hexValue.append(Integer.toHexString(val));
+            }
+            encryptStr = hexValue.toString();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        return encryptStr;
+    }
+
+    @Override
+    public boolean isIllegalInfoV2ScoreSHA256TestData(HttpServletRequest request, String customBody, ChannelTypeHandleResponseObject ret) {
+        JSONObject customBodyObject = JSON.parseObject(customBody);
+        String idCode = customBodyObject.getString("idCode");
+        String name = customBodyObject.getString("name");
+        String type = customBodyObject.getString("type");
+        if (idCode == null || name == null || type == null) {
+            return false;
+        }
+        if (idCode.equals("010fea543ecc27a2a47a1d83c24941960e04fc0040be7a4de9117ab1d0d74bb1")
+                && name.equals("6b4fbd39a02eae625eb38d97a20750e84ac3cd01b06f1a279b709de6ac303b66")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("30");
+            ret.setResultDesc("30");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("eac5b0fec35ac8df2dc9a38a43773c37b5082fc5892c1ed29e254819433e8f25")
+                && name.equals("1d841bc0ee98309cb7916670b7f0fdef5f4c35150711a41405ef3633b56322cf")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("30-55");
+            ret.setResultDesc("30-55");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("cbd41cfeb36bede8b618ea7173d80919a343d210e048a6d69d5641d1fa34ff5f")
+                && name.equals("bb1695365ab4734f7e1bc84e0651731391ad699f75577b11bcc3e43108c9c2f8")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("55-60");
+            ret.setResultDesc("55-60");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("01d50825a2592b3d9a21cd6a144134ba0da21840825e80298113f89ed50392b5")
+                && name.equals("eaa7e959207fb76c8e7e38b022709defb9a1f0255538fd40ed47b7f2b70f4824")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("60-65");
+            ret.setResultDesc("60-65");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("e3d20f804609da6875fda87fc87fe61f9a8ce9fa3a3bada5743288c730a0e32c")
+                && name.equals("6004493a9414ea3b0a058c543e73920418da5228c7ca603f8ea8cc59d759dab9")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("65-70");
+            ret.setResultDesc("65-70");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("ffefcf3e3937ab7bbdddf287e80815dc39842d8eca6ba35a956f3d6b79850dee")
+                && name.equals("a31915d77b7e052780cbbb4e8e7a88ea03001b3170f98a260403641991126a99")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("70-85");
+            ret.setResultDesc("70-85");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("8bcbbb7e94673ca5c62207dc40c342bda85cd5c79b343c3d5321c2d6aedeaa85")
+                && name.equals("1c244860bfa8267a7af76a412cd5c5f2e9e9851e7e9f3857041a41c6a4a3fc3e")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("85-90");
+            ret.setResultDesc("85-90");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else if (idCode.equals("282f8dcbdaacbb8ce12e064c67ef06228811fbc05144b83b3e727b28b2eb03d5")
+                && name.equals("a653f33d1b06678ec0dc06e2ea6f4a3e1f58a84d7b7689a22e1d9cd78b415953")
+                && type.equals("1")) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.MATCH_CODE);
+            ret.setResultBody("90-100");
+            ret.setResultDesc("90-100");
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, "test-1");
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public String getAesMd5DecodeIdCode(HttpServletRequest request, String customBody,
+                                        ChannelTypeHandleResponseObject ret, int outTime) {
+        JSONObject customBodyObject = JSON.parseObject(customBody);
+        if (customBodyObject.get("idCode") == null || customBodyObject.get("name") == null) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.PARAMETER_NAME_ERROR);
+            ret.setResultDesc(Constant.PARAMETER_NAME_ERROR);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+        if (StringUtils.isBlank(customBodyObject.getString("idCode")) || StringUtils.isBlank(customBodyObject.getString("name"))) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.INVALID_PARAMETER);
+            ret.setResultDesc(Constant.INVALID_PARAMETER);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+
+        try {
+            String userId = request.getHeader(ChannelConstant.USER_ID_HEADER_KEY);
+            // 对姓名AES解密
+            String aesDecryptKey = encrypt32(ChannelConstant.AES_KEY + userId).substring(8, 24);
+            log.info("getAesDecodeIdCard.user:{},aesDecryptKey:{}", userId, aesDecryptKey);
+            String decodeName = AesUtil.decryAES(aesDecryptKey, customBodyObject.getString("name"));
+
+            // 对身份证MD5解密
+            String decodeIdCode = "";
+            String decodeIdCodeResponseContext = Md5Sha256DecodeUtil.getDecodeIdCard(customBodyObject.getString("idCode"),
+                    "", ChannelConstant.DECODE_TYPE_MD5, outTime);
+            JSONObject decodeResponseObject = JSON.parseObject(decodeIdCodeResponseContext);
+            if (decodeResponseObject != null && decodeResponseObject.getString("code").equals("200") && decodeResponseObject.getString("data").equals("1")) {
+                JSONObject msg = JSON.parseObject(JSON.toJSONString(decodeResponseObject.get("msg")));
+                if (StringUtils.isNotBlank(msg.getString("idcard"))) {
+                    decodeIdCode = msg.getString("idcard");
+                }
+            }
+
+
+            if (StringUtils.isBlank(decodeIdCode) || StringUtils.isBlank(decodeName)) {
+                ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+                ret.setResultCode(Constant.ZW_RETURN_CODE_133);
+                ret.setResultBody(Constant.RETURN_MESSAGE_133);
+                ret.setResultDesc(Constant.RETURN_MESSAGE_133);
+                ret.setCode(Constant.SUCCESS);
+                request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+                return "";
+            }
+            customBodyObject.put("idCode", decodeIdCode);
+            customBodyObject.put("name", decodeName);
+            return customBodyObject.toJSONString();
+        } catch (Exception e) {
+            ErrorUtils.captureException(e);
+            log.info("supplier10000040.getAesDecodeIdCard解密失败,Exception={}", e);
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.ZW_RETURN_CODE_133);
+            ret.setResultBody(Constant.RETURN_MESSAGE_133);
+            ret.setResultDesc(Constant.RETURN_MESSAGE_133);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+    }
+
+    @Override
+    public String getDecodeIdCode(HttpServletRequest request, String customBody, int outTime, String decodeType, ChannelTypeHandleResponseObject ret) {
+        JSONObject customBodyObject = JSON.parseObject(customBody);
+        if (StringUtils.isBlank(customBodyObject.getString("idCode")) || StringUtils.isBlank(customBodyObject.getString("name"))
+                || (decodeType.equals(ChannelConstant.DECODE_TYPE_SHA256) && customBodyObject.getString("idCode").length() != 64)
+                || (decodeType.equals(ChannelConstant.DECODE_TYPE_MD5) && customBodyObject.getString("idCode").length() != 32)
+        ) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.INVALID_PARAMETER_CODE);
+            ret.setResultBody(Constant.INVALID_PARAMETER);
+            ret.setResultDesc(Constant.INVALID_PARAMETER);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+            return "";
+        }
+
+        String result = "";
+        String decodeResponseContext = Md5Sha256DecodeUtil.getDecodeIdCard(customBodyObject.getString("idCode"),
+                "", decodeType, outTime);
+
+        JSONObject decodeResponseObject = JSON.parseObject(decodeResponseContext);
+        if (decodeResponseObject != null && decodeResponseObject.getString("code").equals("200") && decodeResponseObject.getString("data").equals("1")) {
+            JSONObject msg = JSON.parseObject(JSON.toJSONString(decodeResponseObject.get("msg")));
+            if (StringUtils.isNotBlank(msg.getString("idcard"))) {
+                customBodyObject.put("idCode", msg.getString("idcard"));
+                result = JSON.toJSONString(customBodyObject);
+            }
+        }
+
+        if (StringUtils.isBlank(result)) {
+            ret.setIsCharge(Constant.INTERFACE_QUERY_NO_FEE);
+            ret.setResultCode(Constant.ZW_RETURN_CODE_134);
+            ret.setResultBody(Constant.RETURN_MESSAGE_134);
+            ret.setResultDesc(Constant.RETURN_MESSAGE_134);
+            ret.setCode(Constant.SUCCESS);
+            request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE);
+        }
+        return result;
+    }
+}

+ 48 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/sftp/IllegalInfoDownloadRoute.java

@@ -0,0 +1,48 @@
+package info.aspirecn.iov.sjjh.supplier10000040.sftp;
+
+import info.aspirecn.iov.sjjh.supplier10000040.process.IllegalInfoProcessor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/25 21:08
+ * @version: V1.0
+ **/
+@Slf4j
+@Component
+public class IllegalInfoDownloadRoute extends RouteBuilder {
+    @Value("${ftpDownload.route}")
+    private String ftpDownloadRoute;
+
+    @Value("${localDir.download}")
+    private String localDownloadDir;
+
+    @Autowired
+    private IllegalInfoProcessor illegalInfoProcessor;
+
+    @Override
+    public void configure() {
+        downloadRoute();
+        parseRoute();
+    }
+
+    /**
+     * 下载路由
+     */
+    private void downloadRoute() {
+        from(ftpDownloadRoute).to("file:" + localDownloadDir).log(LoggingLevel.INFO, log, "supplier10000040.Downloaded illegalInfo result ${file:name} complete.");
+    }
+
+    /**
+     * 解析路由
+     */
+    private void parseRoute() {
+        from("file:" + localDownloadDir).process(illegalInfoProcessor).log(LoggingLevel.INFO, log, "supplier10000040.Read illegalInfo Result ${file:name} complete.");
+    }
+}

+ 23 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/task/AsyncDelayTask.java

@@ -0,0 +1,23 @@
+package info.aspirecn.iov.sjjh.supplier10000040.task;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.AsyncResult;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.Future;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Component
+public class AsyncDelayTask{
+    @Value("${supplier.delayedTime}")
+    private Long delayedTime;
+    @Async
+    public Future<String> doDelay() throws InterruptedException {
+        Thread.sleep(delayedTime);
+        return new AsyncResult<>("延时任务完成");
+    }
+}

+ 158 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/task/IllegalInfoTask.java

@@ -0,0 +1,158 @@
+package info.aspirecn.iov.sjjh.supplier10000040.task;
+
+import com.alibaba.fastjson.JSON;
+import info.aspirecn.iov.sjjh.supplier10000040.constant.ChannelConstant;
+import info.aspirecn.iov.sjjh.supplier10000040.model.IllegalInfoParamExcelObject;
+import info.aspirecn.iov.sjjh.supplier10000040.model.RedisParamObject;
+import info.aspirecn.iov.sjjh.supplier10000040.service.ChannelService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/23 13:44
+ * @version: V1.0
+ **/
+@Component
+@Slf4j
+public class IllegalInfoTask {
+    @Autowired
+    ChannelService channelService;
+
+    @Autowired
+    private StringRedisTemplate redisTemplate;
+
+    @Value("${localDir.download}")
+    private String localDownloadDir;
+
+//    @Scheduled(cron = "0/10 * * * * ?")
+//    public void illegalInfoTask() {
+//        Set<String> illegalInfoRedisSetKey = redisTemplate.boundZSetOps("asynchronous-zSet-illegal-info").range(0, System.currentTimeMillis());
+//        for (String redisNowTimeKey : illegalInfoRedisSetKey) {
+//            String rankKey = "asynchronous-illegal-info-rank-" + redisNowTimeKey;
+//            String redisSetKey = "asynchronous-illegal-info-" + redisNowTimeKey;
+//            if (!redisTemplate.boundValueOps(rankKey).setIfAbsent("1")) {
+//                log.info("当前有正在执行key为:{}的定时任务", "asynchronous-illegal-info-rank-" + redisNowTimeKey);
+//                continue;
+//            }
+//            Set<String> set = redisTemplate.opsForSet().members(redisSetKey);
+//            if (!set.isEmpty()) {
+//                redisTemplate.boundValueOps(rankKey).expire(set.size(), TimeUnit.SECONDS);
+//                boolean sendResult = channelService.sendRequest(set, redisSetKey);
+//                if (sendResult) {
+//                    boolean deleteKey = redisTemplate.delete(redisSetKey);
+//                    log.info("key:{},是否存在{}", redisSetKey, redisTemplate.hasKey(redisSetKey));
+//                    log.info("删除key:{},结果:{}", redisSetKey, deleteKey);
+//                    long deleteKeyFromZSet = redisTemplate.boundZSetOps("asynchronous-zSet-illegal-info").remove(redisNowTimeKey);
+//                    log.info("移除key:{},中的列表值:{},结果:{}", "asynchronous-zSet-illegal-info", redisNowTimeKey, deleteKeyFromZSet);
+//                }
+//            } else {
+//                continue;
+//            }
+//            boolean deleteRankKey = redisTemplate.delete(rankKey);
+//            log.info("删除rankKey:{},结果:{}", rankKey, deleteRankKey);
+//        }
+//    }
+
+    @Scheduled(cron = "0/10 * * * * ?")
+    public void illegalInfoTask() {
+        // 取出redis参数
+        Map<Object, Object> illegalInfoRequestParams = redisTemplate.opsForHash().entries("asynchronous-illegal-info-request");
+        if (illegalInfoRequestParams.size() == 0) {
+            return;
+        }
+        List<IllegalInfoParamExcelObject> excelObjectList = new ArrayList<>();
+        // 遍历所有参数
+        for (Map.Entry<Object, Object> entry : illegalInfoRequestParams.entrySet()) {
+            // 解析参数String
+            RedisParamObject redisParamObject = JSON.toJavaObject(JSON.parseObject(entry.getValue().toString()), RedisParamObject.class);
+            // 判断参数的状态是否是待处理
+            if (redisParamObject.getStatus().equals(ChannelConstant.REQUEST_STATUS_1)) {
+                // 从redis中重新取该条参数String,进行版本号比对,如果版本号一致,则修改状态
+                String nowTimeParam = (String) redisTemplate.boundHashOps("asynchronous-illegal-info-request").get(redisParamObject.getTraceId());
+                RedisParamObject nowTimeParamObject = JSON.toJavaObject(JSON.parseObject(nowTimeParam), RedisParamObject.class);
+                if (nowTimeParamObject.getVersion().equals(redisParamObject.getVersion())) {
+                    // 该条参数与redis中的版本号一致,进行修改状态操作,并且版本号+1
+                    redisParamObject.setStatus(ChannelConstant.REQUEST_STATUS_2);
+                    redisParamObject.setVersion(redisParamObject.getVersion() + 1);
+
+                    redisTemplate.boundHashOps("asynchronous-illegal-info-request")
+                            .put(redisParamObject.getTraceId(), JSON.toJSONString(redisParamObject));
+                    log.info("illegalInfoTask -- 修改数据流水号:{},修改为状态:2(处理中)", redisParamObject.getTraceId());
+                    IllegalInfoParamExcelObject excelObject = new IllegalInfoParamExcelObject();
+                    excelObject.setName(redisParamObject.getName());
+                    excelObject.setIdCode(redisParamObject.getIdCode());
+                    excelObject.setTraceId(redisParamObject.getInterfaceType() + "-" + redisParamObject.getTraceId());
+                    excelObjectList.add(excelObject);
+                }
+            }
+        }
+
+        if (excelObjectList.size() == 0) {
+            return;
+        }
+        boolean sendResult = channelService.sendRequest(excelObjectList);
+
+        // 发送上游成功,则修改数据状态
+        if (sendResult) {
+            for (IllegalInfoParamExcelObject infoParamExcelObject : excelObjectList) {
+                // 解析参数String
+                String nowTimeParam = (String) redisTemplate.boundHashOps("asynchronous-illegal-info-request").get(infoParamExcelObject.getTraceId().split("-")[1]);
+                RedisParamObject redisParamObject = JSON.toJavaObject(JSON.parseObject(nowTimeParam), RedisParamObject.class);
+                redisParamObject.setStatus(ChannelConstant.REQUEST_STATUS_3);
+                redisParamObject.setVersion(redisParamObject.getVersion() + 1);
+
+                redisTemplate.boundHashOps("asynchronous-illegal-info-request")
+                        .put(redisParamObject.getTraceId(), JSON.toJSONString(redisParamObject));
+                log.info("illegalInfoTask -- 修改数据流水号:{},修改为状态:3(已发送上游)", redisParamObject.getTraceId());
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 0/30 * * * ?", zone = "Asia/Shanghai")
+    public void dealParamInfo() {
+        log.info("dealParamInfo -- 开始处理无结果数据");
+        // 取出redis参数
+        Map<Object, Object> illegalInfoRequestParams = redisTemplate.opsForHash().entries("asynchronous-illegal-info-request");
+        Long nowTimestamp = System.currentTimeMillis();
+        // 遍历所有参数
+        for (Map.Entry<Object, Object> entry : illegalInfoRequestParams.entrySet()) {
+            // 解析参数String
+            RedisParamObject redisParamObject = JSON.toJavaObject(JSON.parseObject(entry.getValue().toString()), RedisParamObject.class);
+            String traceId = redisParamObject.getTraceId();
+            if (redisParamObject.getStatus().equals(ChannelConstant.REQUEST_STATUS_4)) {
+                redisTemplate.boundHashOps("asynchronous-illegal-info-request").delete(traceId);
+                log.info("dealParamInfo -- 移除处理完成的参数:{}", traceId);
+                continue;
+            }
+
+            if ((redisParamObject.getStatus().equals(ChannelConstant.REQUEST_STATUS_2)
+                    || redisParamObject.getStatus().equals(ChannelConstant.REQUEST_STATUS_3))
+                    && (nowTimestamp - redisParamObject.getTimestamp() > 3600000)) {
+                channelService.sendFailedMessage(traceId);
+            }
+        }
+    }
+
+    @Scheduled(cron = "0 0/5 * * * ?", zone = "Asia/Shanghai")
+    public void removeFiles() {
+        File camelFile = new File(localDownloadDir + ".camel" + File.separator);
+        log.info("读取临时文件夹", localDownloadDir + ".camel" + File.separator);
+        File[] files = camelFile.listFiles();
+
+        for (File file : files) {
+            boolean deleteResult = file.delete();
+            log.info("删除文件:{}, 删除结果:{}", file.getName(), deleteResult);
+        }
+    }
+}

File diff suppressed because it is too large
+ 78 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/AesUtil.java


+ 50 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/EsOpeateUtils.java

@@ -0,0 +1,50 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.searchbox.client.JestClient;
+import io.searchbox.core.UpdateByQuery;
+import io.searchbox.core.UpdateByQueryResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class EsOpeateUtils {
+    @Value("${index}")
+    String index;
+    @Autowired
+    private JestClient jestClient;
+
+    @Autowired
+    private ObjectMapper objectMapper;
+
+
+    public boolean updateByQuery(String traceId, String ifCj, int isCharge, String responseCode) throws JsonProcessingException {
+        String source = "{\"script\": {\n" +
+                "    \"source\": \"ctx._source['MG-IfCj']='" + ifCj + "';ctx._source['MG-Upstream-ResponseCode']='" + responseCode + "';ctx._source['MG-IsCharge']=" + isCharge + "\"" +
+                "  } ,\"query\": {    \"bool\": {  \"must\": [       {\"term\" : {\"traceId\" : \"" + traceId + "\"}}, {\"term\": {\"ApplicationName.keyword\":\"iov-sjjh-servicenode-supplier-10000040\"}} \n" +
+                "        \n" +
+                "        ]\n" +
+                "      }\n" +
+                "    }}";
+        log.info("source:{}", source);
+     /*   UpdateByQueryScript UpdateByQueryScript = new UpdateByQueryScript(source,traceId);
+        String builderStr = objectMapper.writeValueAsString(UpdateByQueryScript);*/
+        UpdateByQuery updateByQuery = new UpdateByQuery.Builder(source).addIndex(index).build();
+        UpdateByQueryResult result = null;
+        try {
+            result = jestClient.execute(updateByQuery);
+            log.info("result:{}", result);
+            long updatedCount = result.getUpdatedCount();
+            if (result.isSucceeded() && updatedCount != 0L) {
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("ES更新log异常Exception:", e);
+        }
+        return false;
+    }
+}

+ 193 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/ExcelUtil.java

@@ -0,0 +1,193 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import info.aspirecn.iov.sjjh.supplier10000040.model.IllegalInfoFtpResult;
+import info.aspirecn.iov.sjjh.supplier10000040.model.IllegalInfoParamExcelObject;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import java.io.*;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+import static javax.xml.bind.JAXBIntrospector.getValue;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/4/22 15:00
+ * @version: V1.0
+ **/
+@Slf4j
+public class ExcelUtil {
+
+
+    /**
+     * suffix of excel 2003
+     */
+    public static final String OFFICE_EXCEL_V2003_SUFFIX = "xls";
+    /**
+     * suffix of excel 2007
+     */
+    public static final String OFFICE_EXCEL_V2007_SUFFIX = "xlsx";
+    /**
+     * suffix of excel 2010
+     */
+    public static final String OFFICE_EXCEL_V2010_SUFFIX = "xlsx";
+
+    public static final String NOT_EXCEL_FILE = " is Not a Excel file!";
+
+    public static final String EMPTY = "";
+    public static final String DOT = ".";
+
+    public static String NO_DEFINE = "no_define";//未定义的字段
+    public static String DEFAULT_DATE_PATTERN = "yyyy年MM月dd日";//默认日期格式
+    public static int DEFAULT_COLOUMN_WIDTH = 17;
+
+    public static List<IllegalInfoFtpResult> readExcel(String path) {
+        if (StringUtils.isBlank(path)) {
+            throw new IllegalArgumentException(path + " excel file path is either null or empty");
+        } else {
+            String suffiex = getSuffiex(path);
+            if (StringUtils.isBlank(suffiex)) {
+                throw new IllegalArgumentException(path + " suffiex is either null or empty");
+            }
+            if (OFFICE_EXCEL_V2003_SUFFIX.equals(suffiex)) {
+                return readXls(path);
+            } else if (OFFICE_EXCEL_V2007_SUFFIX.equals(suffiex)) {
+                return readXlsx(path);
+            } else if (OFFICE_EXCEL_V2010_SUFFIX.equals(suffiex)) {
+                return readXlsx(path);
+            } else {
+                throw new IllegalArgumentException(path + NOT_EXCEL_FILE);
+            }
+        }
+    }
+
+    public static List<IllegalInfoFtpResult> readXls(String path) {
+
+        InputStream is = null;
+        HSSFWorkbook hssfWorkbook = null;
+        List<IllegalInfoFtpResult> list = new ArrayList<IllegalInfoFtpResult>();
+        try {
+            is = new FileInputStream(path);
+            hssfWorkbook = new HSSFWorkbook(is);
+            IllegalInfoFtpResult manFtpResult = null;
+
+            // Read the Sheet
+            for (int numSheet = 0; numSheet < hssfWorkbook.getNumberOfSheets(); numSheet++) {
+                HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(numSheet);
+                if (hssfSheet == null) {
+                    continue;
+                }
+                // Read the Row
+                for (int rowNum = 0; rowNum <= hssfSheet.getLastRowNum(); rowNum++) {
+                    HSSFRow hssfRow = hssfSheet.getRow(rowNum);
+                    if (hssfRow != null) {
+                        manFtpResult = new IllegalInfoFtpResult();
+                        HSSFCell traceId = hssfRow.getCell(0);
+                        HSSFCell name = hssfRow.getCell(1);
+                        HSSFCell idCard = hssfRow.getCell(2);
+                        HSSFCell isIdCard = hssfRow.getCell(3);
+                        HSSFCell isEscape = hssfRow.getCell(4);
+                        HSSFCell isPedigree = hssfRow.getCell(5);
+                        HSSFCell isDrugs = hssfRow.getCell(6);
+                        manFtpResult.setTraceId(getValue(traceId).toString());
+                        manFtpResult.setName(getValue(name).toString());
+                        manFtpResult.setIdCard(getValue(idCard).toString());
+                        manFtpResult.setIsIdCard(new BigDecimal(getValue(isIdCard).toString()).intValue());
+                        manFtpResult.setIsEscape(new BigDecimal(getValue(isEscape).toString()).intValue());
+                        manFtpResult.setIsPedigree(new BigDecimal(getValue(isPedigree).toString()).intValue());
+                        manFtpResult.setIsDrugs(new BigDecimal(getValue(isDrugs).toString()).intValue());
+                        list.add(manFtpResult);
+                    }
+                }
+            }
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return list;
+    }
+
+    public static List<IllegalInfoFtpResult> readXlsx(String path) {
+        InputStream is;
+        XSSFWorkbook xssfWorkbook = null;
+        try {
+            is = new FileInputStream(path);
+            xssfWorkbook = new XSSFWorkbook(is);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        IllegalInfoFtpResult manFtpResult = null;
+        List<IllegalInfoFtpResult> list = new ArrayList<IllegalInfoFtpResult>();
+        // Read the Sheet
+        for (int numSheet = 0; numSheet < xssfWorkbook.getNumberOfSheets(); numSheet++) {
+            XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(numSheet);
+            if (xssfSheet == null) {
+                continue;
+            }
+            // Read the Row
+            for (int rowNum = 0; rowNum <= xssfSheet.getLastRowNum(); rowNum++) {
+                XSSFRow xssfRow = xssfSheet.getRow(rowNum);
+                if (xssfRow != null) {
+                    manFtpResult = new IllegalInfoFtpResult();
+                    XSSFCell traceId = xssfRow.getCell(0);
+                    XSSFCell name = xssfRow.getCell(1);
+                    XSSFCell idCard = xssfRow.getCell(2);
+                    XSSFCell isIdCard = xssfRow.getCell(3);
+                    XSSFCell isEscape = xssfRow.getCell(4);
+                    XSSFCell isPedigree = xssfRow.getCell(5);
+                    XSSFCell isDrugs = xssfRow.getCell(6);
+                    manFtpResult.setTraceId(getValue(traceId).toString());
+                    manFtpResult.setName(getValue(name).toString());
+                    manFtpResult.setIdCard(getValue(idCard).toString());
+                    manFtpResult.setIsIdCard(new BigDecimal(getValue(isIdCard).toString()).intValue());
+                    manFtpResult.setIsEscape(new BigDecimal(getValue(isEscape).toString()).intValue());
+                    manFtpResult.setIsPedigree(new BigDecimal(getValue(isPedigree).toString()).intValue());
+                    manFtpResult.setIsDrugs(new BigDecimal(getValue(isDrugs).toString()).intValue());
+                    list.add(manFtpResult);
+                }
+            }
+        }
+        return list;
+    }
+
+    public static String getSuffiex(String path) {
+        if (StringUtils.isBlank(path)) {
+            return EMPTY;
+        }
+        int index = path.lastIndexOf(DOT);
+        if (index == -1) {
+            return EMPTY;
+        }
+        return path.substring(index + 1, path.length());
+    }
+
+    public static String  createExcel(OutputStream outputStream, List<IllegalInfoParamExcelObject> list) throws IOException {
+
+        XSSFWorkbook wb = new XSSFWorkbook();
+        //建立新的sheet对象(excel的表单)
+        XSSFSheet sheet=wb.createSheet();
+        for (int i = 0; i < list.size(); i++) {
+            XSSFRow rowx=sheet.createRow(i);
+            rowx.createCell(0).setCellValue(list.get(i).getTraceId());
+            rowx.createCell(1).setCellValue(list.get(i).getName());
+            rowx.createCell(2).setCellValue(list.get(i).getIdCode());
+        }
+        //输出Excel文件
+        wb.write(outputStream);
+        outputStream.close();
+        return null;
+    }
+}

+ 65 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/IllegalInfoScoreUtil.java

@@ -0,0 +1,65 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+public class IllegalInfoScoreUtil {
+    public static ChannelTypeHandleResponseObject getIllegalInfoScoreResult(String resultCode, ChannelTypeHandleResponseObject responseObject) {
+        /**
+         * 30分  未命中
+         * 30-55 吸毒/涉毒,
+         * 55-60 前科,
+         * 60-65 在逃,
+         * 65- 70 前科+吸毒/涉毒,
+         * 70- 85在逃+前科,
+         * 85- 90 在逃+吸毒,
+         * 90- 100 吸毒/涉毒+前科+在逃。
+         */
+        if (resultCode.equals("000")) {
+            // 30分 未命中
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("30");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("100")) {
+            // 30-55 吸毒/涉毒
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("30-55");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("001")) {
+            // 55-60 前科
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("55-60");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("010")) {
+            // 60-65 在逃
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("60-65");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("101")) {
+            // 65-70 前科+吸毒/涉毒
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("65-70");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("011")) {
+            // 70-85在逃+前科
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("70-85");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("110")) {
+            // 85-90 在逃+吸毒
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("85-90");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        } else if (resultCode.equals("111")) {
+            // 90-100 吸毒/涉毒+前科+在逃
+            responseObject.setResultCode(Constant.SUCCESS);
+            responseObject.setResultBody("90-100");
+            responseObject.setIsCharge(Constant.IS_CHARGE);
+        }
+        return responseObject;
+    }
+}

+ 78 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/Md5Sha256DecodeUtil.java

@@ -0,0 +1,78 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import com.alibaba.fastjson.JSON;
+import info.aspirecn.iov.sjjh.supplier10000040.model.DecodeThreeElementRequestObject;
+import info.aspirecn.iov.sjjh.supplier10000040.property.SupplierProperties;
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import lombok.extern.slf4j.Slf4j;
+import okhttp3.*;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.net.SocketTimeoutException;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Slf4j
+@Component
+public class Md5Sha256DecodeUtil {
+    private static SupplierProperties supplierProperties;
+    private static OkHttpClient okHttpClient = new OkHttpClient.Builder().build();
+
+    @Autowired
+    public Md5Sha256DecodeUtil(SupplierProperties supplierConfig){
+        Md5Sha256DecodeUtil.supplierProperties = supplierConfig;
+    }
+    public static String getDecodeIdCard(String idCode, String name, String decodeType, int outTime) {
+        DecodeThreeElementRequestObject.DecodeThreeElementRequestData dataObject = new DecodeThreeElementRequestObject.DecodeThreeElementRequestData();
+        if (StringUtils.isNotBlank(idCode)) {
+            dataObject.setId_number(idCode.toUpperCase());
+        }
+        if (StringUtils.isNotBlank(name)) {
+            dataObject.setName(name);
+        }
+        dataObject.setEncrypt(decodeType);
+        DecodeThreeElementRequestObject requestObject = new DecodeThreeElementRequestObject();
+        requestObject.setApi(supplierProperties.getDecodeApi());
+        requestObject.setAppKey(supplierProperties.getDecodeAppKey());
+        requestObject.setAppSecret(supplierProperties.getDecodeAppSecret());
+        requestObject.setData(dataObject);
+
+        MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
+        RequestBody requestBody = RequestBody.create(mediaType, JSON.toJSONString(requestObject));
+        Request okHttpRequest = new Request.Builder()
+                .post(requestBody)
+                .url(supplierProperties.getDecodeUrl())
+                .build();
+        OkHttpClient decodeClient = okHttpClient.newBuilder()
+                .connectTimeout(outTime, TimeUnit.MILLISECONDS)
+                .readTimeout(outTime, TimeUnit.MILLISECONDS)
+                .writeTimeout(outTime, TimeUnit.MILLISECONDS)
+                .build();
+
+        String decodeResponseContext = "";
+        decodeResponseContext = getString(okHttpRequest, decodeClient, decodeResponseContext);
+        return decodeResponseContext;
+    }
+
+    public static String getString(Request okHttpRequest, OkHttpClient decodeClient, String decodeResponseContext) {
+        try {
+            Response decodeResponse = decodeClient.newCall(okHttpRequest).execute();
+            if (decodeResponse.body() != null) {
+                decodeResponseContext = decodeResponse.body().string();
+            }
+            log.info("supplier10000040.scmDecodeIdCard接口decodeResponseContext={}", decodeResponseContext);
+        } catch (SocketTimeoutException ste) {
+            ErrorUtils.captureException(ste);
+            log.info("supplier10000040.getDecodeIdCard接口SocketTimeoutException={}", ste);
+        } catch (Exception e) {
+            ErrorUtils.captureException(e);
+            log.info("supplier10000040.decodeIdCode接口Exception={}", e);
+        }
+        return decodeResponseContext;
+    }
+}

+ 162 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/SFTPUtil.java

@@ -0,0 +1,162 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import com.jcraft.jsch.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.util.StringUtils;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * @description:
+ * @author: xusonglin
+ * @create: 2020/2/3 17:19
+ * @version: V1.0
+ **/
+@Slf4j
+public class SFTPUtil {
+    static JSch jsch = null;
+    static Session session = null;
+    static ChannelSftp channel = null;
+
+    /**
+     * 密钥连接到指定的IP
+     *
+     * @param keyFilePath 密钥路径
+     * @param passphrase  密钥的密码
+     */
+    public static void connect(String userName, String host, int port, String passphrase, String keyFilePath) throws JSchException {
+        jsch = new JSch();
+        if (keyFilePath != null) {
+            if (passphrase != null) {
+                jsch.addIdentity(keyFilePath, passphrase);// 设置私钥
+            } else {
+                jsch.addIdentity(keyFilePath);// 设置私钥
+            }
+        }
+        session = jsch.getSession(userName, host, port);
+        Properties sshConfig = new Properties();
+        sshConfig.put("StrictHostKeyChecking", "no");
+        session.setConfig(sshConfig);
+        session.setConfig("kex", "diffie-hellman-group1-sha1");
+        session.connect();
+        channel = (ChannelSftp) session.openChannel("sftp");
+        channel.connect(60000);
+        log.info("连接到SFTP成功.Host: " + host);
+    }
+
+    /**
+     * 关闭连接
+     */
+    public static void close() {
+        if (channel != null) {
+            try {
+                channel.disconnect();
+            } catch (Exception e) {
+                log.error("sftp close channel failed...", e);
+            } finally {
+                channel.disconnect();
+            }
+        }
+        if (session != null) {
+            try {
+                session.disconnect();
+            } catch (Exception e) {
+                log.error("sftp close session failed...", e);
+            } finally {
+                session.disconnect();
+            }
+        }
+    }
+
+    public static void upload(String host, Integer port, String userName, String passphrase, String dir,
+                              String fileName, String keyFilePath)
+            throws JSchException, FileNotFoundException, SftpException {
+        //连接sftp
+        connect(userName, host, port, passphrase, keyFilePath);
+        if (channel == null) {
+            log.info("SFTP服务器未连接");
+            return;
+        }
+        channel.put(new FileInputStream(fileName), dir, ChannelSftp.OVERWRITE);
+        log.info("上传到sftp成功,文件名:{}", fileName);
+    }
+
+    /**
+     * 下载文件
+     * 备份本地文件,再下载服务器端最新文件
+     *
+     * @param localPath  本地存放路径
+     * @param remotePath 服务器端存放路径
+     */
+    public static void download(String username, int port, String host, String passphrase,
+                                String keyFilePath, String localPath, String remotePath)
+            throws JSchException, SftpException, IOException {
+        // src linux服务器文件地址,dst 本地存放地址
+        connect(username, host, port, passphrase, keyFilePath);
+        if (channel == null) {
+            log.info("SFTP服务器未连接");
+            return;
+        }
+        FileOutputStream output;
+
+        // 获取未读取文件
+        List<String> files = listFiles(remotePath);
+        for (String fileName : files) {
+            output = new FileOutputStream(localPath + "/" + fileName);
+            channel.get(remotePath + "/" + fileName, output);
+            log.info("下载文件:" + fileName + "成功");
+            delete(remotePath, fileName);
+            output.close();
+        }
+    }
+
+    /**
+     * 删除文件
+     *
+     * @param directory  要删除文件所在目录
+     * @param deleteFile 要删除的文件
+     * @throws JSchException
+     */
+    private static void delete(String directory, String deleteFile) throws SftpException {
+        if (channel == null) {
+            log.info("SFTP服务器未连接");
+            return;
+        }
+        channel.cd(directory);
+        channel.rm(deleteFile);
+        log.info("删除成功");
+    }
+
+    /**
+     * 列出目录下的文件
+     *
+     * @param directory 要列出的目录
+     * @return
+     * @throws JSchException
+     */
+    @SuppressWarnings("rawtypes")
+    private static List<String> listFiles(String directory) throws SftpException {
+        if (channel == null) {
+            log.info("SFTP服务器未连接");
+            return null;
+        }
+        Vector vector = channel.ls(directory);
+
+        List<String> fileNameList = new ArrayList<>();
+        for (Object object : vector) {
+            String fileName = ((ChannelSftp.LsEntry) object).getFilename();
+            String[] array = StringUtils.split(fileName, ".");
+            if (array.length == 2 && (array[1].equals("xlsx") || array[1].equals("xls"))) {
+                fileNameList.add(fileName);
+            }
+        }
+        return fileNameList;
+    }
+}

+ 35 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/SendService.java

@@ -0,0 +1,35 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.stream.annotation.EnableBinding;
+import org.springframework.cloud.stream.messaging.Source;
+import org.springframework.messaging.support.MessageBuilder;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+@Slf4j
+@Component
+@EnableBinding(Source.class)
+public class SendService {
+    @Resource
+    private Source source;
+
+    public Boolean sendMsg(String msg) {
+        log.info("sendMsg===={}", msg);
+        log.info("source==={}", source);
+        try {
+            msg = new String(msg.getBytes("utf-8"), "utf-8");
+            log.info("msg==={}", msg);
+            boolean send1 = source.output().send(MessageBuilder.withPayload(msg).build());
+            return send1;
+
+        } catch (Exception e) {
+            log.error("发送到kafka异常, 异常信息{}", e);
+            ErrorUtils.captureException(e);
+            return false;
+        }
+    }
+}

+ 36 - 0
src/main/java/info/aspirecn/iov/sjjh/supplier10000040/util/ThreadPoolConfig.java

@@ -0,0 +1,36 @@
+package info.aspirecn.iov.sjjh.supplier10000040.util;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author xusonglin
+ * @version V1.0
+ **/
+@Configuration
+@EnableAsync
+public class ThreadPoolConfig {
+    @Value("${thread.pool.coreSize}")
+    private Integer coreSize;
+
+    @Value("${thread.pool.maximumPoolSize}")
+    private Integer maximumPoolSize;
+
+    @Value("${thread.pool.queueSize}")
+    private Integer queueSize;
+
+    @Bean("mainThreadPoolExecutor")
+    public ThreadPoolExecutor mainThreadPoolExecutor() {
+        LinkedBlockingDeque<Runnable> deque = new LinkedBlockingDeque<>(queueSize);
+
+        return new ThreadPoolExecutor(coreSize,
+                maximumPoolSize, 10,
+                TimeUnit.MINUTES, deque);
+    }
+}

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

@@ -0,0 +1,139 @@
+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":"-","X-Forwarded-For":"-","X-User-IP":"%{X-Real-IP}i","traceId":"%{x-b3-traceid}r","id":"%{x-b3-spanid}r",
+                  "parentId":"%{x-b3-parentspanid}r","ApplicationName":"${spring.application.name}","MG-IsCharge":%{x-isCharge}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-ChannelId":%{channelId}r,
+                  "MG-ResponseCode":%{x-responseCode}r,"MG-CustomBody":"%{x-requestQuery}r","MG-SellingPrice":%{price}r,"req_type":"%{req_type}r","MG-ProductId":%{productId}r,"MG-UserId":%{userid}r,"MG-IfCj":"%{ifcj}r"}'
+      prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+      directory: ${logging.path}
+  servlet:
+    context-path: /
+
+spring:
+  elasticsearch:
+    jest:
+      read-timeout: 300s
+      connection-timeout: 10s
+      uris: http://iov-sjjh-es-1.iov-sjjh:9200,http://iov-sjjh-es-2.iov-sjjh:9200,http://iov-sjjh-es-3.iov-sjjh:9200
+  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
+    stream:
+      kafka:
+        binder:
+          brokers: iov-sjjh-kafka-1.iov-sjjh:9092,iov-sjjh-kafka-2.iov-sjjh:9092,iov-sjjh-kafka-3.iov-sjjh:9092
+          auto-add-partitions: true
+          auto-create-topics: true
+          required-acks: 1
+      bindings:
+        output:
+          destination: iov_sjjh_callback_downstream_online
+          content-type: text/plain
+          producer:
+            partitionCount: 3
+            partitionKeyExpression: headers.id
+  redis:
+    host: iov-sjjh-redis.iov-sjjh
+    port: 6379
+    jedis:
+      pool:
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        min-idle: 0
+
+#management
+management:
+  endpoints:
+    enabled-by-default: true
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+
+
+#logging
+logging:
+  file: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+  config: classpath:config/logback-spring.xml
+  level:
+    info:
+      aspirecn:
+        iov: INFO
+    root: WARN
+  path: /data/var/jakarta/logs
+#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://iov-sjjh-registcenter.iov-sjjh:8080/eureka
+    enabled: true
+camel:
+  springboot:
+    main-run-controller: true
+ftpServer:
+  host: 115.182.208.245
+  port: 10088
+  username: jksftp
+  passphrase: lgZ7dRdrhehp2bj
+  dir:
+    download: download
+    upload: upload
+ftpDownload:
+  route: sftp://jksftp@115.182.208.245:10088/download/?privateKeyFile=/apps/var/jakarta/sftp_rsa/sftp_rsa&privateKeyPassphrase=lgZ7dRdrhehp2bj&delay=5s&delete=true&readLock=fileLock&passiveMode=true
+localDir:
+  upload: /apps/var/jakarta/ftp/upload
+  download: /apps/var/jakarta/ftp/download/
+  keyFilePath: /apps/var/jakarta/sftp_rsa/sftp_rsa
+index: iov_sjjh_access_online*
+supplier:
+  code: {1: 1000,3: 9901,4: 1099,133: 9931,134: 9932}
+  illegalInfoV2:
+    url: http://175.25.24.196:8002/yi/checkIllegalInfo.do
+  decodeApi: CMCC_3RD_DECRYPT
+  decodeUrl: http://jkxy.h11.site/gateway?api=credit.sec.data
+  decodeAppKey: JIAO_KE
+  decodeAppSecret: D78C393359BF128715C65D91C67051478A4DFC13
+  delayedTime: 150
+thread:
+  pool:
+    coreSize: 20
+    maximumPoolSize: 40
+    queueSize: 100
+swagger:
+  show: true

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

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

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

@@ -0,0 +1,22 @@
+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: 20904
+management:
+  server:
+    port: 21094
+

+ 111 - 0
src/main/resources/config/iov-sjjh-servicenode-stat-hwtest.yml

@@ -0,0 +1,111 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: logstash-conf
+  namespace: iov-sjjh
+data:
+  logstash-iov-sjjh.conf: |-
+    input{
+                kafka{
+                        client_id=> "logstash-online-access"
+                        group_id=> "group.logstash.iov_sjjh_access.online"
+                        topics=> ["iov_sjjh_access_online"]
+                        auto_offset_reset=> "latest"
+                        consumer_threads=>5
+                        decorate_events =>true
+                        bootstrap_servers=> "iov-sjjh-kafka-1.iov-sjjh:9092,iov-sjjh-kafka-2.iov-sjjh:9092,iov-sjjh-kafka-3.iov-sjjh:9092"
+                        type => "iov_sjjh_access_online"
+                        codec => "json"
+                }
+
+                kafka{
+                        client_id=> "logstash-online-error"
+                        group_id=> "group.logstash.iov_sjjh_error.online"
+                        topics=> ["iov_sjjh_error_online"]
+                        auto_offset_reset=> "latest"
+                        consumer_threads=> 5
+                        decorate_events => true
+                        bootstrap_servers=> "iov-sjjh-kafka-1.iov-sjjh:9092,iov-sjjh-kafka-2.iov-sjjh:9092,iov-sjjh-kafka-3.iov-sjjh:9092"
+                        type=> "iov_sjjh_error_online"
+                }
+
+        }
+        filter{
+                if [type] == "iov_sjjh_error_online" {
+                        mutate{
+                                gsub =>["message",":-",":-1"]
+                        }
+                        json {
+                                skip_on_invalid_json =>true
+                                source => "message"
+                                remove_field => ["message"]
+                        }
+                }
+                if [type] == "iov_sjjh_access_online" {
+                        ruby{
+                                init => "require 'base64'"
+                                code => "event.set('MG-Action',Base64.decode64(event.get('MG-Action'))) if event.include?('MG-Action')
+                                         event.set('MG-ResponseCodeDesc',Base64.decode64(event.get('MG-ResponseCodeDesc'))) if event.include?('MG-ResponseCodeDesc')
+                                         event.set('MG-ResultBody',Base64.decode64(event.get('MG-ResultBody'))) if event.include?('MG-ResultBody')"
+                        }
+                        json {
+                                skip_on_invalid_json =>true
+                                source => "message"
+                                remove_field => ["message"]
+                        }
+                        date {
+                                match => ["DateTime", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ"]
+                                target => "@timestamp"
+                        }
+                }
+                if [type] == "iov_sjjh_request_online" {
+                        ruby{
+                                init => "require 'base64'"
+                                code => "event.set('MG-RequestBody',Base64.strict_encode64(event.get('MG-RequestBody'))) if event.include?('MG-RequestBody')"
+                        }
+                        mutate{
+                                gsub =>["message",":-",":-1"]
+                        }
+                        json {
+                                skip_on_invalid_json =>true
+                                source => "message"
+                                remove_field => ["message"]
+                        }
+                        date {
+                                match => ["DateTime", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ"]
+                                target => "@timestamp"
+                        }
+                }
+        }
+
+        output{
+                if[type] == "iov_sjjh_access_online"{
+                        elasticsearch {
+                                index =>"iov_sjjh_access_online-%{+YYYY.MM}"
+                                hosts => ["iov-sjjh-es-1.iov-sjjh:9200","iov-sjjh-es-2.iov-sjjh:9200"]
+                                manage_template => false
+                                template_name => "iov_sjjh_access_request_cache_template"
+
+                        }
+                }
+                if[type] == "iov_sjjh_request_online"{
+                        elasticsearch {
+                                index =>"iov_sjjh_request_online-%{+YYYY.MM}"
+                                hosts => ["iov-sjjh-es-1.iov-sjjh:9200","iov-sjjh-es-2.iov-sjjh:9200"]
+                                manage_template => false
+                                template_name => "iov_sjjh_access_request_cache_template"
+                        }
+                }
+                if[type] == "iov_sjjh_error_online"{
+                        elasticsearch {
+                                codec => "json"
+                                index =>"iov_sjjh_error_online-%{+YYYY.MM}"
+                                hosts => ["iov-sjjh-es-1.iov-sjjh:9200","iov-sjjh-es-2.iov-sjjh:9200"]
+                                manage_template => false
+                                template_name => "iov_sjjh_error_template"
+                        }
+                }
+        }
+
+
+

+ 144 - 0
src/main/resources/config/iov-sjjh-servicenode-supplier-10000040.yaml

@@ -0,0 +1,144 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: iov-sjjh-servicenode-supplier-10000040
+  namespace: iov-sjjh
+data:
+    iov-sjjh-servicenode-supplier-10000040-jkonline.yml: |-
+        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":"-","X-Forwarded-For":"-","X-User-IP":"%{X-Real-IP}i","traceId":"%{x-b3-traceid}r","id":"%{x-b3-spanid}r",
+                          "parentId":"%{x-b3-parentspanid}r","ApplicationName":"${spring.application.name}","MG-IsCharge":%{x-isCharge}r,"MG-Upstream-ResponseCode":"%{upResponseCode}r","MG-ChannelId":%{channelId}r,
+                          "MG-ResponseCode":%{x-responseCode}r,"MG-CustomBody":"%{x-requestQuery}r","MG-SellingPrice":%{price}r,"req_type":"%{req_type}r","MG-ProductId":%{productId}r,"MG-UserId":%{userid}r,"MG-IfCj":"%{ifcj}r"}'
+              prefix: access_${HOSTNAME}_${spring.application.name}_${server.port}
+              directory: ${logging.path}
+          servlet:
+            context-path: /
+
+        spring:
+          elasticsearch:
+            jest:
+              read-timeout: 300s
+              connection-timeout: 10s
+              uris: http://iov-sjjh-es-1.iov-sjjh:9200,http://iov-sjjh-es-2.iov-sjjh:9200,http://iov-sjjh-es-3.iov-sjjh:9200
+          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
+            stream:
+              kafka:
+                binder:
+                  brokers: iov-sjjh-kafka-1.iov-sjjh:9092,iov-sjjh-kafka-2.iov-sjjh:9092,iov-sjjh-kafka-3.iov-sjjh:9092
+                  auto-add-partitions: true
+                  auto-create-topics: true
+                  required-acks: 1
+              bindings:
+                output:
+                  destination: iov_sjjh_callback_downstream_online
+                  content-type: text/plain
+                  producer:
+                    partitionCount: 3
+                    partitionKeyExpression: headers.id
+          redis:
+            host: iov-sjjh-redis.iov-sjjh
+            port: 6379
+            jedis:
+              pool:
+                max-active: 8
+                max-wait: -1
+                max-idle: 8
+                min-idle: 0
+
+        #management
+        management:
+          endpoints:
+            enabled-by-default: true
+            web:
+              exposure:
+                include: '*'
+          endpoint:
+            health:
+              show-details: always
+            shutdown:
+              enabled: true
+
+
+        #logging
+        logging:
+          file: ${logging.path}/catalina_${spring.cloud.client.hostname}_${spring.application.name}_${server.port}.out
+          config: classpath:config/logback-spring.xml
+          level:
+            info:
+              aspirecn:
+                iov: INFO
+            root: WARN
+          path: /data/var/jakarta/logs
+        #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:
+            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://iov-sjjh-registcenter.iov-sjjh:8080/eureka
+            enabled: true
+        camel:
+          springboot:
+            main-run-controller: true
+        ftpServer:
+          host: 115.182.208.245
+          port: 10088
+          username: jksftp
+          passphrase: lgZ7dRdrhehp2bj
+          dir:
+            download: download
+            upload: upload
+        ftpDownload:
+          route: sftp://jksftp@115.182.208.245:10088/download/?privateKeyFile=/apps/var/jakarta/sftp_rsa/sftp_rsa&privateKeyPassphrase=lgZ7dRdrhehp2bj&delay=5s&delete=true&readLock=fileLock&passiveMode=true
+        localDir:
+          upload: /apps/var/jakarta/ftp/upload
+          download: /apps/var/jakarta/ftp/download/
+          keyFilePath: /apps/var/jakarta/sftp_rsa/sftp_rsa
+        index: iov_sjjh_access_online*
+        supplier:
+          code: {1: 1000,3: 9901,4: 1099,133: 9931,134: 9932}
+          illegalInfoV2:
+            url: http://175.25.24.196:8002/yi/checkIllegalInfo.do
+          decodeApi: CMCC_3RD_DECRYPT
+          decodeUrl: http://jkxy.h11.site/gateway?api=credit.sec.data
+          decodeAppKey: JIAO_KE
+          decodeAppSecret: D78C393359BF128715C65D91C67051478A4DFC13
+          delayedTime: 150
+        thread:
+          pool:
+            coreSize: 20
+            maximumPoolSize: 40
+            queueSize: 100
+        swagger:
+          show: true

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

@@ -0,0 +1,39 @@
+<?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-10000040" />
+	<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>

File diff suppressed because it is too large
+ 17318 - 0
src/main/resources/failedData.json