first commit
This commit is contained in:
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**
|
||||
!**/src/test/**
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
118
.mvn/wrapper/MavenWrapperDownloader.java
vendored
Normal file
118
.mvn/wrapper/MavenWrapperDownloader.java
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright 2012-2019 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.5";
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
|
||||
20
README.md
Normal file
20
README.md
Normal file
@ -0,0 +1,20 @@
|
||||
项目概述:
|
||||
此项目为安全统筹项目,主要涉及车辆的保险接口,定损平台等相关业务。以及修理厂等相关事宜,还有图片库业务
|
||||
|
||||
对接人:
|
||||
赵嘉辉,王茜 (如果需要接口文档以及业务逻辑上的问题请联系王茜,赵嘉辉)
|
||||
|
||||
项目主要为推送
|
||||
以下为相关接口:
|
||||
@PostMapping("/twodianthree")
|
||||
@PostMapping("/xiugaiguize4")
|
||||
@PostMapping("/baoxian")
|
||||
@PostMapping("/a")
|
||||
@PostMapping("/twodianthree")
|
||||
@PostMapping("/api/insLoss/pushData")
|
||||
@PostMapping("/api/quoteGuide/pushData")
|
||||
@PostMapping("/xuigai")
|
||||
@PostMapping("/xuigai1")
|
||||
@PostMapping("/xuigai2")
|
||||
@PostMapping("xixi")
|
||||
@PostMapping("/hahahah")
|
||||
322
mvnw
vendored
Normal file
322
mvnw
vendored
Normal file
@ -0,0 +1,322 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ]; then
|
||||
|
||||
if [ -f /etc/mavenrc ]; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ]; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
darwin=false
|
||||
mingw=false
|
||||
case "$(uname)" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true ;;
|
||||
Darwin*)
|
||||
darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="$(/usr/libexec/java_home)"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -r /etc/gentoo-release ]; then
|
||||
JAVA_HOME=$(java-config --jre-home)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ]; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=$(ls -ld "$PRG")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' >/dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="$(dirname "$PRG")/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=$(pwd)
|
||||
|
||||
M2_HOME=$(dirname "$PRG")/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=$(cd "$M2_HOME" && pwd)
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=$(cygpath --unix "$M2_HOME")
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="$( (
|
||||
cd "$M2_HOME"
|
||||
pwd
|
||||
))"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="$( (
|
||||
cd "$JAVA_HOME"
|
||||
pwd
|
||||
))"
|
||||
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.5/maven-wrapper-0.5.5.jar"
|
||||
else
|
||||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.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
mvnw.cmd
vendored
Normal file
182
mvnw.cmd
vendored
Normal file
@ -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 Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing 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.5/maven-wrapper-0.5.5.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.5/maven-wrapper-0.5.5.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%
|
||||
BIN
oioioi.jiyuankeshang.com_jks.zip
Normal file
BIN
oioioi.jiyuankeshang.com_jks.zip
Normal file
Binary file not shown.
1
oioioi.jiyuankeshang.com_jks/keystorePass.txt
Normal file
1
oioioi.jiyuankeshang.com_jks/keystorePass.txt
Normal file
@ -0,0 +1 @@
|
||||
2u75hg6v08
|
||||
BIN
oioioi.jiyuankeshang.com_jks/oioioi.jiyuankeshang.com.jks
Normal file
BIN
oioioi.jiyuankeshang.com_jks/oioioi.jiyuankeshang.com.jks
Normal file
Binary file not shown.
78
pom.xml
Normal file
78
pom.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?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.2.1.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>sso</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>sso</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
<artifactId>java-jwt</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.45</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpmime</artifactId>
|
||||
<version>4.5.14</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
18
src/main/java/com/example/sso/SsoApplication.java
Normal file
18
src/main/java/com/example/sso/SsoApplication.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.example.sso;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@EnableAsync
|
||||
|
||||
public class SsoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SsoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
48
src/main/java/com/example/sso/config/AsyncConfig.java
Normal file
48
src/main/java/com/example/sso/config/AsyncConfig.java
Normal file
@ -0,0 +1,48 @@
|
||||
package com.example.sso.config;
|
||||
|
||||
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.AsyncConfigurer;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
public class AsyncConfig implements AsyncConfigurer {
|
||||
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
public Executor getAsyncExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
// 核心线程数:线程池创建的时候初始化的线程数
|
||||
executor.setCorePoolSize(30);
|
||||
// 最大线程数:线程池最大的线程数,只有缓冲队列满了之后才会申请超过核心线程数的线程
|
||||
executor.setMaxPoolSize(100);
|
||||
// 缓冲队列:用来缓冲执行任务的队列
|
||||
executor.setQueueCapacity(50);
|
||||
// 线程池关闭:等待所有任务都完成再关闭
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
// 等待时间:等待5秒后强制停止
|
||||
executor.setAwaitTerminationSeconds(5);
|
||||
// 允许空闲时间:超过核心线程之外的线程到达60秒后会被销毁
|
||||
executor.setKeepAliveSeconds(60);
|
||||
// 线程名称前缀
|
||||
executor.setThreadNamePrefix("anquantongchou");
|
||||
// 缓冲队列满了之后的拒绝策略:由调用线程处理(一般是主线程)
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
|
||||
// 初始化线程
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.example.sso.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@Configuration
|
||||
public class GlobalThreadPoolConfig {
|
||||
@Bean(name = "globalThreadPool")
|
||||
public ExecutorService globalThreadPool() {
|
||||
int corePoolSize = Runtime.getRuntime().availableProcessors() * 2; // IO密集型建议2~4倍CPU核心数
|
||||
int maxPoolSize = corePoolSize * 2;
|
||||
return new ThreadPoolExecutor(
|
||||
corePoolSize,
|
||||
maxPoolSize,
|
||||
60L, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<>(1000), // 避免无界队列导致OOM
|
||||
new ThreadFactory() { // 自定义线程命名
|
||||
private final AtomicInteger counter = new AtomicInteger(1);
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
return new Thread(r, "global-pool-" + counter.getAndIncrement());
|
||||
}
|
||||
},
|
||||
new ThreadPoolExecutor.CallerRunsPolicy() // 队列满时由调用线程执行
|
||||
);
|
||||
}
|
||||
}
|
||||
28
src/main/java/com/example/sso/config/HttpsConfig.java
Normal file
28
src/main/java/com/example/sso/config/HttpsConfig.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.example.sso.config;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.connector.Connector;
|
||||
import org.apache.tomcat.util.descriptor.web.SecurityCollection;
|
||||
import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class HttpsConfig {
|
||||
@Bean
|
||||
public ServletWebServerFactory servletContainer() {
|
||||
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
|
||||
tomcat.addAdditionalTomcatConnectors(redirectHttpConnector());
|
||||
return tomcat;
|
||||
}
|
||||
private Connector redirectHttpConnector() {
|
||||
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setScheme("http");
|
||||
connector.setPort(8080);
|
||||
connector.setSecure(false);
|
||||
connector.setRedirectPort(8089); // 重定向到HTTPS端口
|
||||
return connector;
|
||||
}
|
||||
}
|
||||
110
src/main/java/com/example/sso/controller/ChuDanController.java
Normal file
110
src/main/java/com/example/sso/controller/ChuDanController.java
Normal file
@ -0,0 +1,110 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.UpdataBaoXian;
|
||||
import com.example.sso.util.AnQuanUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class ChuDanController {
|
||||
@PostMapping("/baoxian")
|
||||
public String dan(@RequestBody JSONObject data1) {
|
||||
JSONObject datas = data1.getJSONObject("data");
|
||||
log.info(datas.toJSONString());
|
||||
String a = datas.getString("a");
|
||||
String b = datas.getString("b");
|
||||
String c = datas.getString("c");
|
||||
String d = datas.getString("d");
|
||||
String e = datas.getString("e");
|
||||
String f = datas.getString("f");
|
||||
String g = datas.getString("g");
|
||||
String h = datas.getString("h");
|
||||
String i = datas.getString("i");
|
||||
String j = datas.getString("j");
|
||||
Float k = datas.getFloat("k");
|
||||
Float l = datas.getFloat("l");
|
||||
Float m = datas.getFloat("m");
|
||||
Float n = datas.getFloat("n");
|
||||
String o = datas.getString("o");
|
||||
String p = datas.getString("p");
|
||||
String q = datas.getString("q");
|
||||
String r = datas.getString("r");
|
||||
String s = datas.getString("s");
|
||||
String t = datas.getString("t");
|
||||
String u = datas.getString("u");
|
||||
String v = datas.getString("v");
|
||||
String gonghao = datas.getString("gonghao");
|
||||
String id = datas.getString("_id");
|
||||
if (p.isEmpty() || p == null){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("username",gonghao);
|
||||
jsonObject.put("password","000000");
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("beginTime",a);
|
||||
data.put("endTime",b);
|
||||
data.put("carNo",c);
|
||||
data.put("bf_personName",d);
|
||||
data.put("bf_certNo",e);
|
||||
data.put("cf_isgroup",f);
|
||||
data.put("cf_personName",g);
|
||||
data.put("cf_certNo",h);
|
||||
data.put("cz_personName",i);
|
||||
data.put("cz_certNo",j);
|
||||
|
||||
data.put("z_cs_jdmp",k);
|
||||
data.put("z_sz_tcje",l);
|
||||
data.put("z_sj_tcje",m);
|
||||
data.put("z_ck_zwtcje",n);
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String chu = AnQuanUtil.chu(jsonString);
|
||||
log.info("出单: " +chu );
|
||||
JSONObject jsonObject1 = JSON.parseObject(chu);
|
||||
String errcode = jsonObject1.getString("errcode");
|
||||
String errmsg = jsonObject1.getString("errmsg");
|
||||
String id1 = "";
|
||||
if (errcode.equals("0")) {
|
||||
id1 = jsonObject1.getJSONObject("data").getString("id");
|
||||
}
|
||||
String updatas = UpdataBaoXian.updatas(id, id1, errcode, errmsg);
|
||||
log.info(updatas);
|
||||
|
||||
|
||||
}else {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("username",gonghao);
|
||||
jsonObject.put("password","000000");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
data.put("carNo",c);
|
||||
data.put("vin",o);
|
||||
data.put("abortDate",p);
|
||||
data.put("remark",q);
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String chu = AnQuanUtil.tui(jsonString);
|
||||
log.info("退单: " +chu );
|
||||
JSONObject jsonObject1 = JSON.parseObject(chu);
|
||||
String errcode = jsonObject1.getString("errcode");
|
||||
String errmsg = jsonObject1.getString("errmsg");
|
||||
String id1 = "";
|
||||
if (errcode.equals("0")) {
|
||||
id1 = jsonObject1.getJSONObject("data").getString("id");
|
||||
}
|
||||
String updatas = UpdataBaoXian.updatas(id, id1, errcode, errmsg);
|
||||
log.info(updatas);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return "成功!!!!!";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.AnQuanUtil;
|
||||
|
||||
public class TuiDanController {
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("username","10010");
|
||||
jsonObject.put("password","000000");
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("carNo","京BD55281");
|
||||
data.put("vin","");
|
||||
data.put("abortDate","2024-09-26");
|
||||
data.put("remark","备注");
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String chu = AnQuanUtil.tui( jsonString);
|
||||
System.out.println(chu);
|
||||
}
|
||||
}
|
||||
50
src/main/java/com/example/sso/controller/XianCheng.java
Normal file
50
src/main/java/com/example/sso/controller/XianCheng.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class XianCheng {
|
||||
@Autowired
|
||||
@Qualifier("globalThreadPool")
|
||||
private ExecutorService executor;
|
||||
|
||||
@PostMapping("/a")
|
||||
public CompletableFuture<JSONObject> pushdata(@RequestBody JSONObject data) {
|
||||
// 1. 先构造并返回固定响应
|
||||
JSONObject fixedResponse = new JSONObject();
|
||||
fixedResponse.put("data", "11");
|
||||
|
||||
// 2. 提交耗时任务到线程池(不阻塞主线程)
|
||||
executor.execute(() -> {
|
||||
try {
|
||||
Thread.sleep(5000); // 模拟耗时操作
|
||||
log.info("耗时操作完成,处理结果: {}", data);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("耗时操作被中断", e);
|
||||
Thread.currentThread().interrupt(); // 恢复中断状态
|
||||
}
|
||||
});
|
||||
|
||||
// 3. 立即返回响应
|
||||
return CompletableFuture.completedFuture(fixedResponse);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
117
src/main/java/com/example/sso/dao/FengXianXinXi.java
Normal file
117
src/main/java/com/example/sso/dao/FengXianXinXi.java
Normal file
@ -0,0 +1,117 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class FengXianXinXi {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId,String ruleName,Double overAmount,String lossName,
|
||||
String requestId,String riskClass,String riskCategory,String riskClassCode,String riskCategoryCode,
|
||||
Integer fxxx, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5015829096e59acb03542");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", fxxx);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject ruleName1 = new JSONObject();
|
||||
ruleName1.put("value", ruleName);
|
||||
data.put("rulename", ruleName1);
|
||||
if ( overAmount!= null){
|
||||
JSONObject overAmount1 = new JSONObject();
|
||||
overAmount1.put("value", overAmount);
|
||||
data.put("overamount", overAmount1);
|
||||
}
|
||||
|
||||
if ( lossName!= null){
|
||||
JSONObject lossName1 = new JSONObject();
|
||||
lossName1.put("value", lossName);
|
||||
data.put("lossname", lossName1);
|
||||
}
|
||||
|
||||
if (requestId != null){
|
||||
JSONObject requestId1 = new JSONObject();
|
||||
requestId1.put("value", requestId);
|
||||
data.put("requestid", requestId1);
|
||||
}
|
||||
|
||||
if (riskClass != null){
|
||||
JSONObject riskClass1 = new JSONObject();
|
||||
riskClass1.put("value", riskClass);
|
||||
data.put("riskclass", riskClass1);
|
||||
|
||||
}
|
||||
if ( riskCategory!= null){
|
||||
JSONObject riskCategory1 = new JSONObject();
|
||||
riskCategory1.put("value", riskCategory);
|
||||
data.put("riskcategory", riskCategory1);
|
||||
}
|
||||
|
||||
if ( riskClassCode!= null){
|
||||
JSONObject riskClassCode1 = new JSONObject();
|
||||
riskClassCode1.put("value", riskClassCode);
|
||||
data.put("riskclasscode", riskClassCode1);
|
||||
}
|
||||
|
||||
if (riskCategoryCode != null){
|
||||
JSONObject riskCategoryCode1 = new JSONObject();
|
||||
riskCategoryCode1.put("value", riskCategoryCode);
|
||||
data.put("riskcategorycode", riskCategoryCode1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
107
src/main/java/com/example/sso/dao/FengXianXinXiTwoFour.java
Normal file
107
src/main/java/com/example/sso/dao/FengXianXinXiTwoFour.java
Normal file
@ -0,0 +1,107 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class FengXianXinXiTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String ruleName, Double overAmount, String lossName,
|
||||
String requestId, String riskClass, String riskCategory, String riskClassCode, String riskCategoryCode,
|
||||
String isConfirmRisk,String data_sources1,Integer FX,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5015829096e59acb03542");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value",data_sources1 + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", FX);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject ruleName1 = new JSONObject();
|
||||
ruleName1.put("value", ruleName);
|
||||
data.put("rulename", ruleName1);
|
||||
if ( overAmount!= null){ JSONObject overAmount1 = new JSONObject();
|
||||
overAmount1.put("value", overAmount);
|
||||
data.put("overamount", overAmount1);}
|
||||
|
||||
if ( lossName!= null){JSONObject lossName1 = new JSONObject();
|
||||
lossName1.put("value", lossName);
|
||||
data.put("lossname", lossName1); }
|
||||
|
||||
if ( requestId!= null){ JSONObject requestId1 = new JSONObject();
|
||||
requestId1.put("value", requestId);
|
||||
data.put("requestid", requestId1); }
|
||||
|
||||
if ( riskClass!= null){ JSONObject riskClass1 = new JSONObject();
|
||||
riskClass1.put("value", riskClass);
|
||||
data.put("riskclass", riskClass1);}
|
||||
|
||||
if ( riskCategory!= null){ JSONObject riskCategory1 = new JSONObject();
|
||||
riskCategory1.put("value", riskCategory);
|
||||
data.put("riskcategory", riskCategory1); }
|
||||
|
||||
if ( riskClassCode!= null){ JSONObject riskClassCode1 = new JSONObject();
|
||||
riskClassCode1.put("value", riskClassCode);
|
||||
data.put("riskclasscode", riskClassCode1); }
|
||||
if ( riskCategoryCode!= null){ JSONObject riskCategoryCode1 = new JSONObject();
|
||||
riskCategoryCode1.put("value", riskCategoryCode);
|
||||
data.put("riskcategorycode", riskCategoryCode1); }
|
||||
|
||||
|
||||
|
||||
JSONObject isConfirmRisk1 = new JSONObject();
|
||||
isConfirmRisk1.put("value", isConfirmRisk);
|
||||
data.put("isconfirmrisk", isConfirmRisk1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/FengXianXinXiTwoFour_.java
Normal file
75
src/main/java/com/example/sso/dao/FengXianXinXiTwoFour_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FengXianXinXiTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5015829096e59acb03542");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5015829096e59acb03542");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
74
src/main/java/com/example/sso/dao/FengXianXinXi_.java
Normal file
74
src/main/java/com/example/sso/dao/FengXianXinXi_.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FengXianXinXi_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5015829096e59acb03542");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5015829096e59acb03542");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
166
src/main/java/com/example/sso/dao/GongShiDingSun.java
Normal file
166
src/main/java/com/example/sso/dao/GongShiDingSun.java
Normal file
@ -0,0 +1,166 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class GongShiDingSun {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId,String createDate,Double manpowerSurveyPrice,String idDcInsLossDetail,
|
||||
Double auditDamagePrice,String manpowerItemName,String manpowerItemCode,Double manpowerDiscountPrice,
|
||||
String remark,Double manpowerDiscount,Double multiaspectRuleDiscount,Integer serialNo,String manpowerGroupName,
|
||||
String seriesName,String seriesGroupName,String schemeName,String isAiLossManpower,String isHisManpower,
|
||||
String isLock, String insuranceCodes, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5000e47f52adcb2040858");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject manpowerSurveyPrice1 = new JSONObject();
|
||||
manpowerSurveyPrice1.put("value", manpowerSurveyPrice);
|
||||
data.put("manpowersurveyprice", manpowerSurveyPrice1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if ( auditDamagePrice!= null){
|
||||
JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject manpowerItemName1 = new JSONObject();
|
||||
manpowerItemName1.put("value", manpowerItemName);
|
||||
data.put("manpoweritemname", manpowerItemName1);
|
||||
if ( manpowerItemCode!= null){
|
||||
JSONObject manpowerItemCode1 = new JSONObject();
|
||||
manpowerItemCode1.put("value", manpowerItemCode);
|
||||
data.put("manpoweritemcode", manpowerItemCode1);
|
||||
}
|
||||
|
||||
if (manpowerDiscountPrice != null){
|
||||
JSONObject manpowerDiscountPrice1 = new JSONObject();
|
||||
manpowerDiscountPrice1.put("value", manpowerDiscountPrice);
|
||||
data.put("manpowerdiscountprice", manpowerDiscountPrice1);
|
||||
}
|
||||
|
||||
if ( remark!= null){
|
||||
JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1);
|
||||
}
|
||||
|
||||
if ( manpowerDiscount!= null){
|
||||
JSONObject manpowerDiscount1 = new JSONObject();
|
||||
manpowerDiscount1.put("value", manpowerDiscount);
|
||||
data.put("manpowerdiscount", manpowerDiscount1);
|
||||
}
|
||||
|
||||
if (multiaspectRuleDiscount != null){
|
||||
JSONObject multiaspectRuleDiscount1 = new JSONObject();
|
||||
multiaspectRuleDiscount1.put("value", multiaspectRuleDiscount);
|
||||
data.put("multiaspectrulediscount", multiaspectRuleDiscount1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
if ( manpowerGroupName!= null){
|
||||
JSONObject manpowerGroupName1 = new JSONObject();
|
||||
manpowerGroupName1.put("value", manpowerGroupName);
|
||||
data.put("manpowergroupname", manpowerGroupName1);
|
||||
}
|
||||
|
||||
if (seriesGroupName != null){
|
||||
JSONObject seriesName1 = new JSONObject();
|
||||
seriesName1.put("value", seriesName);
|
||||
data.put("seriesname", seriesName1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject seriesGroupName1 = new JSONObject();
|
||||
seriesGroupName1.put("value", seriesGroupName);
|
||||
data.put("seriesgroupname", seriesGroupName1);
|
||||
if ( schemeName!= null){
|
||||
JSONObject schemeName1 = new JSONObject();
|
||||
schemeName1.put("value", schemeName);
|
||||
data.put("schemename", schemeName1);
|
||||
}
|
||||
|
||||
if (isAiLossManpower != null){
|
||||
JSONObject isAiLossManpower1 = new JSONObject();
|
||||
isAiLossManpower1.put("value", isAiLossManpower);
|
||||
data.put("isailossmanpower", isAiLossManpower1);
|
||||
}
|
||||
|
||||
if ( isHisManpower!= null){
|
||||
JSONObject isHisManpower1 = new JSONObject();
|
||||
isHisManpower1.put("value", isHisManpower);
|
||||
data.put("ishismanpower", isHisManpower1);
|
||||
}
|
||||
|
||||
if ( isLock!= null){
|
||||
JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1);
|
||||
}
|
||||
|
||||
if (insuranceCodes != null){
|
||||
JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
141
src/main/java/com/example/sso/dao/GongShiDingSunTwoFour.java
Normal file
141
src/main/java/com/example/sso/dao/GongShiDingSunTwoFour.java
Normal file
@ -0,0 +1,141 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class GongShiDingSunTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String createDate, Double manpowerSurveyPrice, String idDcInsLossDetail,
|
||||
Double auditDamagePrice, String manpowerItemName, String manpowerItemCode, Double manpowerDiscountPrice,
|
||||
String remark, Double manpowerDiscount, Double multiaspectRuleDiscount, Integer serialNo, String manpowerGroupName,
|
||||
String seriesName, String seriesGroupName, String schemeName, String isAiLossManpower, String isHisManpower,
|
||||
String isLock, String insuranceCodes,String data_sources1,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5000e47f52adcb2040858");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value",data_sources1 + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject manpowerSurveyPrice1 = new JSONObject();
|
||||
manpowerSurveyPrice1.put("value", manpowerSurveyPrice);
|
||||
data.put("manpowersurveyprice", manpowerSurveyPrice1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if ( auditDamagePrice!= null){ JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1); }
|
||||
|
||||
|
||||
JSONObject manpowerItemName1 = new JSONObject();
|
||||
manpowerItemName1.put("value", manpowerItemName);
|
||||
data.put("manpoweritemname", manpowerItemName1);
|
||||
if ( manpowerItemCode!= null){ JSONObject manpowerItemCode1 = new JSONObject();
|
||||
manpowerItemCode1.put("value", manpowerItemCode);
|
||||
data.put("manpoweritemcode", manpowerItemCode1); }
|
||||
|
||||
if ( manpowerDiscountPrice!= null){ JSONObject manpowerDiscountPrice1 = new JSONObject();
|
||||
manpowerDiscountPrice1.put("value", manpowerDiscountPrice);
|
||||
data.put("manpowerdiscountprice", manpowerDiscountPrice1); }
|
||||
|
||||
if ( remark!= null){ JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1);}
|
||||
|
||||
if ( manpowerDiscount!= null){ JSONObject manpowerDiscount1 = new JSONObject();
|
||||
manpowerDiscount1.put("value", manpowerDiscount);
|
||||
data.put("manpowerdiscount", manpowerDiscount1); }
|
||||
|
||||
if ( multiaspectRuleDiscount!= null){ JSONObject multiaspectRuleDiscount1 = new JSONObject();
|
||||
multiaspectRuleDiscount1.put("value", multiaspectRuleDiscount);
|
||||
data.put("multiaspectrulediscount", multiaspectRuleDiscount1); }
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
if ( manpowerGroupName!= null){ JSONObject manpowerGroupName1 = new JSONObject();
|
||||
manpowerGroupName1.put("value", manpowerGroupName);
|
||||
data.put("manpowergroupname", manpowerGroupName1); }
|
||||
if ( seriesName!= null){ JSONObject seriesName1 = new JSONObject();
|
||||
seriesName1.put("value", seriesName);
|
||||
data.put("seriesname", seriesName1);}
|
||||
|
||||
|
||||
if (seriesGroupName != null){ JSONObject seriesGroupName1 = new JSONObject();
|
||||
seriesGroupName1.put("value", seriesGroupName);
|
||||
data.put("seriesgroupname", seriesGroupName1); }
|
||||
|
||||
if ( schemeName!= null){ JSONObject schemeName1 = new JSONObject();
|
||||
schemeName1.put("value", schemeName);
|
||||
data.put("schemename", schemeName1);}
|
||||
|
||||
if ( isAiLossManpower!= null){ JSONObject isAiLossManpower1 = new JSONObject();
|
||||
isAiLossManpower1.put("value", isAiLossManpower);
|
||||
data.put("isailossmanpower", isAiLossManpower1); }
|
||||
|
||||
if ( isHisManpower!= null){ JSONObject isHisManpower1 = new JSONObject();
|
||||
isHisManpower1.put("value", isHisManpower);
|
||||
data.put("ishismanpower", isHisManpower1); }
|
||||
|
||||
if ( isLock!= null){ JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1);}
|
||||
|
||||
if ( insuranceCodes!= null){ JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GongShiDingSunTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5000e47f52adcb2040858");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5000e47f52adcb2040858");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/GongShiDingSun_.java
Normal file
75
src/main/java/com/example/sso/dao/GongShiDingSun_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GongShiDingSun_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5000e47f52adcb2040858");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5000e47f52adcb2040858");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
92
src/main/java/com/example/sso/dao/GouTongJiLuTwoFour.java
Normal file
92
src/main/java/com/example/sso/dao/GouTongJiLuTwoFour.java
Normal file
@ -0,0 +1,92 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
public class GouTongJiLuTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String operatorName,String operatorUm,
|
||||
String operatorRole,String createDate,String opinion,String opinionDescribe,Integer dataSource,
|
||||
String idDcCommunication,String os,String data_sources1,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject operatorName1 = new JSONObject();
|
||||
operatorName1.put("value", operatorName);
|
||||
data.put("operatorname", operatorName1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
data.put("operatorum", operatorUm1);
|
||||
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
data.put("operatorrole", operatorRole1);
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject opinion1 = new JSONObject();
|
||||
opinion1.put("value", opinion);
|
||||
data.put(opinion, opinion1);
|
||||
if ( opinionDescribe!= null){ JSONObject opinionDescribe1 = new JSONObject();
|
||||
opinionDescribe1.put("value", opinionDescribe);
|
||||
data.put("opiniondescribe", opinionDescribe1);}
|
||||
|
||||
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
|
||||
JSONObject idDcCommunication1 = new JSONObject();
|
||||
idDcCommunication1.put("value", idDcCommunication);
|
||||
data.put("iddccommunication", idDcCommunication1);
|
||||
if ( os!= null){ JSONObject os1 = new JSONObject();
|
||||
os1.put("value", os);
|
||||
data.put("os", os1);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
74
src/main/java/com/example/sso/dao/GouTongJiLuTwoFour_.java
Normal file
74
src/main/java/com/example/sso/dao/GouTongJiLuTwoFour_.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GouTongJiLuTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
// JSONObject data_sources = new JSONObject();
|
||||
// data_sources.put("field","data_sources");
|
||||
// data_sources.put("method","eq");
|
||||
// JSONArray jsonArraydata_sources = new JSONArray();
|
||||
// jsonArraydata_sources.add(data_sources1);
|
||||
// data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
// cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
98
src/main/java/com/example/sso/dao/GouTongXinXi.java
Normal file
98
src/main/java/com/example/sso/dao/GouTongXinXi.java
Normal file
@ -0,0 +1,98 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class GouTongXinXi {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String operatorName,String operatorUm,
|
||||
String operatorRole,String createDate,String opinion,String opinionDescribe,Integer dataSource,
|
||||
String idDcCommunication,String os, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject operatorName1 = new JSONObject();
|
||||
operatorName1.put("value", operatorName);
|
||||
data.put("operatorname", operatorName1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
data.put("operatorum", operatorUm1);
|
||||
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
data.put("operatorrole", operatorRole1);
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject opinion1 = new JSONObject();
|
||||
opinion1.put("value", opinion);
|
||||
data.put("opinion", opinion1);
|
||||
if ( opinionDescribe!= null){
|
||||
JSONObject opinionDescribe1 = new JSONObject();
|
||||
opinionDescribe1.put("value", opinionDescribe);
|
||||
data.put("opiniondescribe", opinionDescribe1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
|
||||
JSONObject idDcCommunication1 = new JSONObject();
|
||||
idDcCommunication1.put("value", idDcCommunication);
|
||||
data.put("iddccommunication", idDcCommunication1);
|
||||
if ( os!= null){
|
||||
JSONObject os1 = new JSONObject();
|
||||
os1.put("value", os);
|
||||
data.put(os, os1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/GouTongXinXi_.java
Normal file
75
src/main/java/com/example/sso/dao/GouTongXinXi_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GouTongXinXi_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
// JSONObject data_sources = new JSONObject();
|
||||
// data_sources.put("field","data_sources");
|
||||
// data_sources.put("method","eq");
|
||||
// JSONArray jsonArraydata_sources = new JSONArray();
|
||||
// jsonArraydata_sources.add(data_sources1);
|
||||
// data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
// cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
111
src/main/java/com/example/sso/dao/HeJiaHeSunJieGuo.java
Normal file
111
src/main/java/com/example/sso/dao/HeJiaHeSunJieGuo.java
Normal file
@ -0,0 +1,111 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class HeJiaHeSunJieGuo {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, Double rescueFee, Double verifyReduce,
|
||||
Double actualValue, Double surplusValue, String auditType, String operatorRole,
|
||||
String operatorUm, String opinionDescribe, Double guideAmount, String lossPosition2,
|
||||
String pushQuoteInfoId, String pushQuoteDate, String data_sources1,String time
|
||||
|
||||
) {
|
||||
JSONArray datasall = new JSONArray();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
if (rescueFee != null) {
|
||||
JSONObject rescueFee1 = new JSONObject();
|
||||
rescueFee1.put("value", rescueFee);
|
||||
data.put("rescuefee", rescueFee1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
if (actualValue != null) {
|
||||
JSONObject actualValue1 = new JSONObject();
|
||||
actualValue1.put("value", actualValue);
|
||||
data.put("actualvalue", actualValue1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject surplusValue1 = new JSONObject();
|
||||
surplusValue1.put("value", surplusValue);
|
||||
data.put("surplusvalue", surplusValue1);
|
||||
|
||||
JSONObject auditType1 = new JSONObject();
|
||||
auditType1.put("value", auditType);
|
||||
data.put("audittype", auditType1);
|
||||
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
data.put("operatorrole", operatorRole1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
data.put("operatorum", operatorUm1);
|
||||
if (opinionDescribe != null) {
|
||||
JSONObject opinionDescribe1 = new JSONObject();
|
||||
opinionDescribe1.put("value", opinionDescribe);
|
||||
data.put("opiniondescribe", opinionDescribe1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject guideAmount1 = new JSONObject();
|
||||
guideAmount1.put("value", guideAmount);
|
||||
data.put("guideamount", guideAmount1);
|
||||
|
||||
if (lossPosition2 != null) {
|
||||
JSONObject lossPosition21 = new JSONObject();
|
||||
lossPosition21.put("value", lossPosition2);
|
||||
data.put("lossposition2", lossPosition21);
|
||||
}
|
||||
|
||||
if (pushQuoteInfoId != null){
|
||||
JSONObject pushQuoteInfoId1 = new JSONObject();
|
||||
pushQuoteInfoId1.put("value", pushQuoteInfoId);
|
||||
data.put("pushquoteinfoId", pushQuoteInfoId1);
|
||||
}
|
||||
|
||||
if ( pushQuoteDate!= null){
|
||||
JSONObject pushQuoteDate1 = new JSONObject();
|
||||
pushQuoteDate1.put("value", pushQuoteDate);
|
||||
data.put("pushquotedate", pushQuoteDate1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/HeJiaHeSunJieGuo_.java
Normal file
75
src/main/java/com/example/sso/dao/HeJiaHeSunJieGuo_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class HeJiaHeSunJieGuo_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
288
src/main/java/com/example/sso/dao/PeiJianDingSun.java
Normal file
288
src/main/java/com/example/sso/dao/PeiJianDingSun.java
Normal file
@ -0,0 +1,288 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class PeiJianDingSun {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId,Integer audit,Integer recycle,Integer fitsFeeRateType,
|
||||
Integer fitsFeeRateTypeEx,String createDate, Double adjustFitsFee,Double fitsSurveyPrice,Integer fitsCount,
|
||||
String idDcInsLossDetail,Double auditDamagePrice,Double reduceRemnant,Double verifyReduce,String fitsName,
|
||||
String fitsCode, String originalFitsName,String originalFitsCode,Double originalFitsDiscountPrice,
|
||||
Double fitsFeeRate,String fitLabelCode,String lossRemark,Integer serialNo,String isFitsUnique,Double upperLimitPrice,
|
||||
Double fitsFee,Double fitsDiscount,String fitsReamrk,String fitsMaterial,String isAiLossFits,String isHisFits,
|
||||
String isLock,Double extendPrice,Integer carLimitCount,String dataSource,String insuranceCodes,String isEnquiry,
|
||||
String isQuotation,Double historyLoss4SPrice,Double historyLossMkPrice,String isMultipleFitsUnique, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
if ( audit!= null){
|
||||
JSONObject audit1 = new JSONObject();
|
||||
audit1.put("value", audit);
|
||||
data.put("audit", audit1);
|
||||
}
|
||||
|
||||
if ( recycle!= null){
|
||||
JSONObject recycle1 = new JSONObject();
|
||||
recycle1.put("value", recycle);
|
||||
data.put("recycle", recycle1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject fitsFeeRateType1 = new JSONObject();
|
||||
fitsFeeRateType1.put("value", fitsFeeRateType);
|
||||
data.put("fitsfeeratetype", fitsFeeRateType1);
|
||||
if (fitsFeeRateTypeEx != null){
|
||||
JSONObject fitsFeeRateTypeEx1 = new JSONObject();
|
||||
fitsFeeRateTypeEx1.put("value", fitsFeeRateTypeEx);
|
||||
data.put("fitsfeeratetypeex", fitsFeeRateTypeEx1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put(createDate, createDate1);
|
||||
if (adjustFitsFee != null){
|
||||
JSONObject adjustFitsFee1 = new JSONObject();
|
||||
adjustFitsFee1.put("value", adjustFitsFee);
|
||||
data.put("adjustfitsfee", adjustFitsFee1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
JSONObject fitsCount1 = new JSONObject();
|
||||
fitsCount1.put("value", fitsCount);
|
||||
data.put("fitscount", fitsCount1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if ( auditDamagePrice!= null){
|
||||
JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1);
|
||||
}
|
||||
|
||||
if ( reduceRemnant!= null){
|
||||
JSONObject reduceRemnant1 = new JSONObject();
|
||||
reduceRemnant1.put("value", reduceRemnant);
|
||||
data.put("reduceremnant", reduceRemnant1);
|
||||
}
|
||||
|
||||
if (verifyReduce != null){
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if (fitsCode != null){
|
||||
JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1);
|
||||
}
|
||||
|
||||
if (originalFitsName != null){
|
||||
JSONObject originalFitsName1 = new JSONObject();
|
||||
originalFitsName1.put("value", originalFitsName);
|
||||
data.put("originalfitsname", originalFitsName1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (originalFitsCode != null){
|
||||
JSONObject originalFitsCode1 = new JSONObject();
|
||||
originalFitsCode1.put("value", originalFitsCode);
|
||||
data.put("originalfitscode", originalFitsCode1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject originalFitsDiscountPrice1 = new JSONObject();
|
||||
originalFitsDiscountPrice1.put("value", originalFitsDiscountPrice);
|
||||
data.put("originalfitsdiscountprice", originalFitsDiscountPrice1);
|
||||
|
||||
if (fitsFeeRate != null){
|
||||
JSONObject fitsFeeRate1 = new JSONObject();
|
||||
fitsFeeRate1.put("value", fitsFeeRate);
|
||||
data.put("fitsfeerate", fitsFeeRate1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( fitLabelCode!= null){
|
||||
JSONObject fitLabelCode1 = new JSONObject();
|
||||
fitLabelCode1.put("value", fitLabelCode);
|
||||
data.put("fitlabelcode", fitLabelCode1);
|
||||
}
|
||||
|
||||
|
||||
if (lossRemark != null){
|
||||
JSONObject lossRemark1 = new JSONObject();
|
||||
lossRemark1.put("value", lossRemark);
|
||||
data.put("lossremark", lossRemark1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
if (isFitsUnique != null){
|
||||
JSONObject isFitsUnique1 = new JSONObject();
|
||||
isFitsUnique1.put("value", isFitsUnique);
|
||||
data.put("isfitsunique", isFitsUnique1);
|
||||
}
|
||||
|
||||
if (upperLimitPrice != null){
|
||||
JSONObject upperLimitPrice1 = new JSONObject();
|
||||
upperLimitPrice1.put("value", upperLimitPrice);
|
||||
data.put("upperlimitprice", upperLimitPrice1);
|
||||
}
|
||||
|
||||
if ( fitsFee!= null){
|
||||
JSONObject fitsFee1 = new JSONObject();
|
||||
fitsFee1.put("value", fitsFee);
|
||||
data.put("fitsfee", fitsFee1);
|
||||
}
|
||||
|
||||
if ( fitsDiscount!= null){
|
||||
JSONObject fitsDiscount1 = new JSONObject();
|
||||
fitsDiscount1.put("value", fitsDiscount);
|
||||
data.put("fitsdiscount", fitsDiscount1);
|
||||
}
|
||||
|
||||
if (fitsReamrk != null){
|
||||
JSONObject fitsReamrk1 = new JSONObject();
|
||||
fitsReamrk1.put("value", fitsReamrk);
|
||||
data.put("fitsreamrk", fitsReamrk1);
|
||||
}
|
||||
|
||||
if ( fitsMaterial!= null){
|
||||
JSONObject fitsMaterial1 = new JSONObject();
|
||||
fitsMaterial1.put("value", fitsMaterial);
|
||||
data.put("fitsmaterial", fitsMaterial1);
|
||||
}
|
||||
|
||||
if ( isAiLossFits!= null){
|
||||
JSONObject isAiLossFits1 = new JSONObject();
|
||||
isAiLossFits1.put("value", isAiLossFits);
|
||||
data.put("isailossfits", isAiLossFits1);
|
||||
}
|
||||
|
||||
if ( isHisFits!= null){
|
||||
JSONObject isHisFits1 = new JSONObject();
|
||||
isHisFits1.put("value", isHisFits);
|
||||
data.put("ishisfits", isHisFits1);
|
||||
}
|
||||
|
||||
if (isLock != null){
|
||||
JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1);
|
||||
}
|
||||
|
||||
if (extendPrice != null){
|
||||
JSONObject extendPrice1 = new JSONObject();
|
||||
extendPrice1.put("value", extendPrice);
|
||||
data.put("extendprice", extendPrice1);
|
||||
}
|
||||
|
||||
if (carLimitCount != null){
|
||||
JSONObject carLimitCount1 = new JSONObject();
|
||||
carLimitCount1.put("value", carLimitCount);
|
||||
data.put("carlimitcount", carLimitCount1);
|
||||
}
|
||||
|
||||
if ( dataSource!= null){
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
}
|
||||
|
||||
if ( insuranceCodes!= null){
|
||||
JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject isEnquiry1 = new JSONObject();
|
||||
isEnquiry1.put("value", isEnquiry);
|
||||
data.put("isenquiry", isEnquiry1);
|
||||
|
||||
JSONObject isQuotation1 = new JSONObject();
|
||||
isQuotation1.put("value", isQuotation);
|
||||
data.put("isquotation", isQuotation1);
|
||||
if (historyLoss4SPrice != null){
|
||||
JSONObject historyLoss4SPrice1 = new JSONObject();
|
||||
historyLoss4SPrice1.put("value", historyLoss4SPrice);
|
||||
data.put("historyloss4sprice", historyLoss4SPrice1);
|
||||
}
|
||||
|
||||
if ( historyLossMkPrice!= null){
|
||||
JSONObject historyLossMkPrice1 = new JSONObject();
|
||||
historyLossMkPrice1.put("value", historyLossMkPrice);
|
||||
data.put("historylossmkprice", historyLossMkPrice1);
|
||||
}
|
||||
|
||||
if (isMultipleFitsUnique != null){
|
||||
JSONObject isMultipleFitsUnique1 = new JSONObject();
|
||||
isMultipleFitsUnique1.put("value", isMultipleFitsUnique);
|
||||
data.put("ismultiplefitsunique", isMultipleFitsUnique1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
224
src/main/java/com/example/sso/dao/PeiJianDingSunTwoFour.java
Normal file
224
src/main/java/com/example/sso/dao/PeiJianDingSunTwoFour.java
Normal file
@ -0,0 +1,224 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class PeiJianDingSunTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, Integer audit, Integer recycle, Integer fitsFeeRateType,
|
||||
Integer fitsFeeRateTypeEx, String createDate, Double adjustFitsFee, Double fitsSurveyPrice, Integer fitsCount,
|
||||
String idDcInsLossDetail, Double auditDamagePrice, Double reduceRemnant, Double verifyReduce, String fitsName,
|
||||
String fitsCode, String originalFitsName, String originalFitsCode, Double originalFitsDiscountPrice,
|
||||
Double fitsFeeRate, String fitLabelCode, String lossRemark, Integer serialNo, String isFitsUnique, Double upperLimitPrice,
|
||||
Double fitsFee, Double fitsDiscount, String fitsReamrk, String fitsMaterial, String isAiLossFits, String isHisFits,
|
||||
String isLock, Double extendPrice, Integer carLimitCount, String dataSource, String insuranceCodes, String isMultipleFitsUnique,
|
||||
String data_sources1,Double auditPrice,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject auditprice = new JSONObject();
|
||||
auditprice.put("value", auditPrice);
|
||||
data.put("auditprice", auditprice);
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value",data_sources1 + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
if ( audit!= null){ JSONObject audit1 = new JSONObject();
|
||||
audit1.put("value", audit);
|
||||
data.put("audit", audit1);}
|
||||
|
||||
if ( recycle!= null){ JSONObject recycle1 = new JSONObject();
|
||||
recycle1.put("value", recycle);
|
||||
data.put("recycle", recycle1);
|
||||
}
|
||||
|
||||
JSONObject fitsFeeRateType1 = new JSONObject();
|
||||
fitsFeeRateType1.put("value", fitsFeeRateType);
|
||||
data.put("fitsfeeratetype", fitsFeeRateType1);
|
||||
|
||||
JSONObject fitsFeeRateTypeEx1 = new JSONObject();
|
||||
fitsFeeRateTypeEx1.put("value", fitsFeeRateTypeEx);
|
||||
data.put("fitsfeeratetypeex", fitsFeeRateTypeEx1);
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
if ( adjustFitsFee!= null){ JSONObject adjustFitsFee1 = new JSONObject();
|
||||
adjustFitsFee1.put("value", adjustFitsFee);
|
||||
data.put("adjustfitsfee", adjustFitsFee1);}
|
||||
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
JSONObject fitsCount1 = new JSONObject();
|
||||
fitsCount1.put("value", fitsCount);
|
||||
data.put("fitscount", fitsCount1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if ( auditDamagePrice!= null){
|
||||
JSONObject idDcInsLossDetail111 = new JSONObject();
|
||||
idDcInsLossDetail111.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", idDcInsLossDetail111);
|
||||
|
||||
}
|
||||
if ( reduceRemnant!= null){
|
||||
JSONObject reduceRemnant1 = new JSONObject();
|
||||
reduceRemnant1.put("value", reduceRemnant);
|
||||
data.put("reduceremnant", reduceRemnant1);
|
||||
}
|
||||
|
||||
if ( verifyReduce!= null){
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if ( fitsCode!= null){ JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1);}
|
||||
|
||||
if ( originalFitsName!= null){ JSONObject originalFitsName1 = new JSONObject();
|
||||
originalFitsName1.put("value", originalFitsName);
|
||||
data.put("originalfitsname", originalFitsName1); }
|
||||
|
||||
|
||||
|
||||
if ( originalFitsCode!= null){
|
||||
JSONObject originalFitsCode1 = new JSONObject();
|
||||
originalFitsCode1.put("value", originalFitsCode);
|
||||
data.put("originalfitscode", originalFitsCode1);
|
||||
}
|
||||
|
||||
if ( originalFitsDiscountPrice!= null){ JSONObject originalFitsDiscountPrice1 = new JSONObject();
|
||||
originalFitsDiscountPrice1.put("value", originalFitsDiscountPrice);
|
||||
data.put("originalfitsdiscountprice", originalFitsDiscountPrice1);}
|
||||
|
||||
if ( fitsFeeRate!= null){ JSONObject fitsFeeRate1 = new JSONObject();
|
||||
fitsFeeRate1.put("value", fitsFeeRate);
|
||||
data.put("fitsfeerate", fitsFeeRate1); }
|
||||
|
||||
|
||||
|
||||
if ( fitLabelCode!= null){JSONObject fitLabelCode1 = new JSONObject();
|
||||
fitLabelCode1.put("value", fitLabelCode);
|
||||
data.put("fitlabelcode", fitLabelCode1); }
|
||||
|
||||
|
||||
if ( lossRemark!= null){ JSONObject lossRemark1 = new JSONObject();
|
||||
lossRemark1.put("value", lossRemark);
|
||||
data.put("lossremark", lossRemark1); }
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
if ( isFitsUnique!= null){ JSONObject isFitsUnique1 = new JSONObject();
|
||||
isFitsUnique1.put("value", isFitsUnique);
|
||||
data.put("isfitsunique", isFitsUnique1); }
|
||||
|
||||
if ( upperLimitPrice!= null){ JSONObject upperLimitPrice1 = new JSONObject();
|
||||
upperLimitPrice1.put("value", upperLimitPrice);
|
||||
data.put("upperlimitprice", upperLimitPrice1); }
|
||||
|
||||
if ( fitsFee!= null){ JSONObject fitsFee1 = new JSONObject();
|
||||
fitsFee1.put("value", fitsFee);
|
||||
data.put("fitsfee", fitsFee1); }
|
||||
|
||||
if ( fitsDiscount!= null){ JSONObject fitsDiscount1 = new JSONObject();
|
||||
fitsDiscount1.put("value", fitsDiscount);
|
||||
data.put("fitsdiscount", fitsDiscount1); }
|
||||
|
||||
if (fitsReamrk != null){ JSONObject fitsReamrk1 = new JSONObject();
|
||||
fitsReamrk1.put("value", fitsReamrk);
|
||||
data.put("fitsreamrk", fitsReamrk1); }
|
||||
|
||||
if ( fitsMaterial!= null){ JSONObject fitsMaterial1 = new JSONObject();
|
||||
fitsMaterial1.put("value", fitsMaterial);
|
||||
data.put("fitsmaterial", fitsMaterial1);}
|
||||
|
||||
if ( isAiLossFits!= null){ JSONObject isAiLossFits1 = new JSONObject();
|
||||
isAiLossFits1.put("value", isAiLossFits);
|
||||
data.put("isailossfits", isAiLossFits1); }
|
||||
|
||||
if ( isHisFits!= null){ JSONObject isHisFits1 = new JSONObject();
|
||||
isHisFits1.put("value", isHisFits);
|
||||
data.put("ishisfits", isHisFits1);}
|
||||
|
||||
if ( isLock!= null){ JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1); }
|
||||
|
||||
if ( extendPrice!= null){ JSONObject extendPrice1 = new JSONObject();
|
||||
extendPrice1.put("value", extendPrice);
|
||||
data.put("extendprice", extendPrice1);}
|
||||
|
||||
if ( carLimitCount!= null){JSONObject carLimitCount1 = new JSONObject();
|
||||
carLimitCount1.put("value", carLimitCount);
|
||||
data.put("carlimitcount", carLimitCount1); }
|
||||
|
||||
if ( dataSource!= null){ JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1); }
|
||||
|
||||
if ( insuranceCodes!= null){ JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);}
|
||||
|
||||
|
||||
|
||||
if ( isMultipleFitsUnique!= null){ JSONObject isMultipleFitsUnique1 = new JSONObject();
|
||||
isMultipleFitsUnique1.put("value", isMultipleFitsUnique);
|
||||
data.put("ismultiplefitsunique", isMultipleFitsUnique1); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class PeiJianDingSunTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
74
src/main/java/com/example/sso/dao/PeiJianDingSun_.java
Normal file
74
src/main/java/com/example/sso/dao/PeiJianDingSun_.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class PeiJianDingSun_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67ecb49a914adcf1de525e66");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
32
src/main/java/com/example/sso/dao/PhotoUpData.java
Normal file
32
src/main/java/com/example/sso/dao/PhotoUpData.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
public class PhotoUpData {
|
||||
|
||||
public static void up(String id,String app_id,String entry_id,String url) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id",app_id);
|
||||
jsonObject.put("entry_id",entry_id);
|
||||
jsonObject.put("data_id",id);
|
||||
jsonObject.put("is_start_trigger",true);
|
||||
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value",url);
|
||||
data.put("img_system_url",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
292
src/main/java/com/example/sso/dao/Result.java
Normal file
292
src/main/java/com/example/sso/dao/Result.java
Normal file
@ -0,0 +1,292 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class Result {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, Double rescueFee, Double surplusValue,String vin,
|
||||
Double actualValue,Double verifyReduce,String auditType,String fitsPriceType,String fitLabelType,
|
||||
String operatorUm,String operatorRole,String provinceCode,String cityCode,String garageCode,String garageName,
|
||||
String garageType,String brandName,String manufacturerName,String modelCode,String modelName,String lossPosition,
|
||||
String groupName,String modelCategoryCode,String seriesName,String address,Double lossAmount,String opinionDescribe,
|
||||
String brandList,String telephone,String idDcInsuranceGarageRule,String carDealerCode,String modeRemark,String modelCategoryName,
|
||||
String isClaim,String vinParseType,String organizeCode,String lossPosition2,String buriedType,String pushLossInfoId,String pushLossDate,
|
||||
String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
String lowerCase1 = reportNo;
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
String lowerCase2 = lossSeqNo;
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
String lowerCase3 = taskId;
|
||||
data.put("taskid", taskId1);
|
||||
if (rescueFee != null){
|
||||
JSONObject rescueFee1 = new JSONObject();
|
||||
rescueFee1.put("value", rescueFee);
|
||||
data.put("rescuefee", rescueFee1);
|
||||
}
|
||||
|
||||
if (surplusValue != null){
|
||||
JSONObject surplusValue1 = new JSONObject();
|
||||
surplusValue1.put("value", surplusValue);
|
||||
data.put("surplusvalue", surplusValue1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject vin1 = new JSONObject();
|
||||
vin1.put("value", vin);
|
||||
String lowerCase4 = vin;
|
||||
data.put("vin", vin1);
|
||||
if (actualValue != null){
|
||||
JSONObject actualValue1 = new JSONObject();
|
||||
actualValue1.put("value", actualValue);
|
||||
data.put("actualvalue", actualValue1);
|
||||
}
|
||||
|
||||
if (verifyReduce != null){
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject auditType1 = new JSONObject();
|
||||
auditType1.put("value", auditType);
|
||||
String lowerCase5 = auditType;
|
||||
data.put("audittype", auditType1);
|
||||
|
||||
JSONObject fitsPriceType1 = new JSONObject();
|
||||
fitsPriceType1.put("value", fitsPriceType);
|
||||
String lowerCase6 = fitsPriceType;
|
||||
data.put("fitspricetype", fitsPriceType1);
|
||||
|
||||
JSONObject fitLabelType1 = new JSONObject();
|
||||
fitLabelType1.put("value", fitLabelType);
|
||||
data.put("fitLabeltype", fitLabelType1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
String lowerCase7 = operatorUm;
|
||||
data.put("operatorum", operatorUm1);
|
||||
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
String lowerCase8 = operatorRole;
|
||||
data.put("operatorrole", operatorRole1);
|
||||
|
||||
JSONObject provinceCode1 = new JSONObject();
|
||||
provinceCode1.put("value", provinceCode);
|
||||
String lowerCase9 = provinceCode;
|
||||
data.put("provincecode", provinceCode1);
|
||||
|
||||
JSONObject cityCode1 = new JSONObject();
|
||||
cityCode1.put("value", cityCode);
|
||||
String lowerCase10 = cityCode;
|
||||
data.put("citycode", cityCode1);
|
||||
|
||||
JSONObject garageCode1 = new JSONObject();
|
||||
garageCode1.put("value", garageCode);
|
||||
String lowerCase11 = garageCode;
|
||||
data.put("garagecode", garageCode1);
|
||||
|
||||
JSONObject garageName1 = new JSONObject();
|
||||
garageName1.put("value", garageName);
|
||||
String lowerCase12 = garageName;
|
||||
data.put("garagename", garageName1);
|
||||
|
||||
JSONObject garageType1 = new JSONObject();
|
||||
garageType1.put("value", garageType);
|
||||
String lowerCase13 = garageType;
|
||||
data.put("garagetype", garageType1);
|
||||
if ( brandName!= null){
|
||||
JSONObject brandName1 = new JSONObject();
|
||||
brandName1.put("value", brandName);
|
||||
String lowerCase = brandName;
|
||||
data.put("brandname", brandName1);
|
||||
}
|
||||
|
||||
if ( manufacturerName!= null){
|
||||
JSONObject manufacturerName1 = new JSONObject();
|
||||
manufacturerName1.put("value", manufacturerName);
|
||||
String lowerCase = manufacturerName;
|
||||
data.put("manufacturername", manufacturerName1);
|
||||
}
|
||||
|
||||
if ( modelCode!= null){
|
||||
JSONObject modelCode1 = new JSONObject();
|
||||
modelCode1.put("value", modelCode);
|
||||
String lowerCase = modelCode;
|
||||
data.put("modelcode", modelCode1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject modelName1 = new JSONObject();
|
||||
modelName1.put("value", modelName);
|
||||
String lowerCase14 = modelName;
|
||||
data.put("modelname", modelName1);
|
||||
|
||||
JSONObject lossPosition1 = new JSONObject();
|
||||
lossPosition1.put("value", lossPosition);
|
||||
data.put("lossPosition", lossPosition1);
|
||||
if ( groupName!= null){
|
||||
JSONObject groupName1 = new JSONObject();
|
||||
groupName1.put("value", groupName);
|
||||
String lowerCase = groupName;
|
||||
data.put("groupname", groupName1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject modelCategoryCode1 = new JSONObject();
|
||||
modelCategoryCode1.put("value", modelCategoryCode);
|
||||
String lowerCase15 = modelCategoryCode;
|
||||
data.put("modelcategorycode", modelCategoryCode1);
|
||||
if (seriesName != null){
|
||||
JSONObject seriesName1 = new JSONObject();
|
||||
seriesName1.put("value", seriesName);
|
||||
String lowerCase = seriesName;
|
||||
data.put("seriesname", seriesName1);
|
||||
}
|
||||
|
||||
if (address != null){
|
||||
JSONObject address1 = new JSONObject();
|
||||
address1.put("value", address);
|
||||
String lowerCase = address;
|
||||
data.put("address", address1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject lossAmount1 = new JSONObject();
|
||||
lossAmount1.put("value", lossAmount);
|
||||
data.put("lossamount", lossAmount1);
|
||||
if (opinionDescribe != null){
|
||||
JSONObject opinionDescribe1 = new JSONObject();
|
||||
opinionDescribe1.put("value", opinionDescribe);
|
||||
String lowerCase = opinionDescribe;
|
||||
data.put("opiniondescribe", opinionDescribe1);
|
||||
}
|
||||
|
||||
if (brandList != null){
|
||||
JSONObject brandList1 = new JSONObject();
|
||||
brandList1.put("value", brandList);
|
||||
String lowerCase = brandList;
|
||||
data.put("brandlist", brandList1);
|
||||
}
|
||||
|
||||
if ( telephone!= null){
|
||||
JSONObject telephone1 = new JSONObject();
|
||||
telephone1.put("value", telephone);
|
||||
String lowerCase = telephone;
|
||||
data.put("telephone", telephone1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject idDcInsuranceGarageRule1 = new JSONObject();
|
||||
idDcInsuranceGarageRule1.put("value", idDcInsuranceGarageRule);
|
||||
String lowerCase16 = idDcInsuranceGarageRule;
|
||||
data.put("iddcinsurancegaragerule", idDcInsuranceGarageRule1);
|
||||
|
||||
JSONObject carDealerCode1 = new JSONObject();
|
||||
carDealerCode1.put("value", carDealerCode);
|
||||
String lowerCase17 = carDealerCode;
|
||||
data.put("cardealercode", carDealerCode1);
|
||||
if ( modeRemark!= null){
|
||||
JSONObject modeRemark1 = new JSONObject();
|
||||
modeRemark1.put("value", modeRemark);
|
||||
String lowerCase = modeRemark;
|
||||
data.put("moderemark", modeRemark1);
|
||||
}
|
||||
|
||||
if ( modelCategoryName!= null){
|
||||
JSONObject modelCategoryName1 = new JSONObject();
|
||||
modelCategoryName1.put("value", modelCategoryName);
|
||||
String lowerCase = modelCategoryName;
|
||||
data.put("modelcategoryname", modelCategoryName1);
|
||||
}
|
||||
|
||||
if (isClaim != null){JSONObject isClaim1 = new JSONObject();
|
||||
isClaim1.put("value", isClaim);
|
||||
String lowerCase = isClaim;
|
||||
data.put("isclaim", isClaim1);}
|
||||
|
||||
if (vinParseType != null){
|
||||
JSONObject vinParseType1 = new JSONObject();
|
||||
vinParseType1.put("value", vinParseType);
|
||||
String lowerCase = vinParseType;
|
||||
data.put("vinparsetype", vinParseType1);
|
||||
}
|
||||
|
||||
if (organizeCode != null){
|
||||
JSONObject organizeCode1 = new JSONObject();
|
||||
organizeCode1.put("value", organizeCode);
|
||||
String lowerCase = organizeCode;
|
||||
data.put("lowercase", organizeCode1);
|
||||
}
|
||||
|
||||
if (lossPosition2 != null){
|
||||
JSONObject lossPosition21 = new JSONObject();
|
||||
lossPosition21.put("value", lossPosition2);
|
||||
String lowerCase = lossPosition2;
|
||||
data.put("lossposition2", lossPosition21);
|
||||
|
||||
}
|
||||
|
||||
JSONObject buriedType1 = new JSONObject();
|
||||
buriedType1.put("value", buriedType);
|
||||
|
||||
String lowerCase18 = buriedType;
|
||||
String lowerCase = lowerCase18;
|
||||
data.put("buriedtype", buriedType1);
|
||||
|
||||
JSONObject pushLossInfoId1 = new JSONObject();
|
||||
pushLossInfoId1.put("value", pushLossInfoId);
|
||||
String lowerCase19 = pushLossInfoId;
|
||||
data.put("pushlossinfoid", pushLossInfoId1);
|
||||
|
||||
JSONObject pushLossDate1 = new JSONObject();
|
||||
pushLossDate1.put("value", pushLossDate);
|
||||
String lowerCase20 = pushLossDate;
|
||||
data.put("pushlossdate", pushLossDate1);
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
82
src/main/java/com/example/sso/dao/Result_.java
Normal file
82
src/main/java/com/example/sso/dao/Result_.java
Normal file
@ -0,0 +1,82 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Result_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67ecb38234853d8f6e69c0bf");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
123
src/main/java/com/example/sso/dao/ShiJiuFei.java
Normal file
123
src/main/java/com/example/sso/dao/ShiJiuFei.java
Normal file
@ -0,0 +1,123 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class ShiJiuFei {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId,Double trailerStartingFare,
|
||||
Double trailerMileagePrice,Double trailerOverMileage,Double craneStartingFare,
|
||||
Double cranePrice, Double craneWorkTime,Double otherFee,String remark,
|
||||
String insuranceCodes, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", 1);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
if ( trailerStartingFare!= null){
|
||||
JSONObject trailerStartingFare1 = new JSONObject();
|
||||
trailerStartingFare1.put("value", trailerStartingFare);
|
||||
data.put("trailerstartingfare", trailerStartingFare1);
|
||||
}
|
||||
|
||||
if (trailerMileagePrice != null){
|
||||
JSONObject trailerMileagePrice1 = new JSONObject();
|
||||
trailerMileagePrice1.put("value", trailerMileagePrice);
|
||||
data.put("trailermileageprice", trailerMileagePrice1);
|
||||
}
|
||||
|
||||
if ( trailerOverMileage!= null){
|
||||
JSONObject trailerOverMileage1 = new JSONObject();
|
||||
trailerOverMileage1.put("value", trailerOverMileage);
|
||||
data.put("trailerovermileage", trailerOverMileage1);
|
||||
|
||||
}
|
||||
if ( craneStartingFare!= null){
|
||||
JSONObject craneStartingFare1 = new JSONObject();
|
||||
craneStartingFare1.put("value", craneStartingFare);
|
||||
data.put("cranestartingfare", craneStartingFare1);
|
||||
}
|
||||
|
||||
if ( cranePrice!= null){
|
||||
JSONObject cranePrice1 = new JSONObject();
|
||||
cranePrice1.put("value", cranePrice);
|
||||
data.put("craneprice", cranePrice1);
|
||||
}
|
||||
|
||||
if ( craneWorkTime!= null){
|
||||
JSONObject craneWorkTime1 = new JSONObject();
|
||||
craneWorkTime1.put("value", craneWorkTime);
|
||||
data.put("craneworktime", craneWorkTime1);
|
||||
}
|
||||
|
||||
if (otherFee != null){
|
||||
JSONObject otherFee1 = new JSONObject();
|
||||
otherFee1.put("value", otherFee);
|
||||
data.put("otherfee", otherFee1);
|
||||
}
|
||||
|
||||
if ( remark!= null){
|
||||
JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1);
|
||||
}
|
||||
|
||||
if (insuranceCodes != null){
|
||||
JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
104
src/main/java/com/example/sso/dao/ShiJiuFeiTwoFour.java
Normal file
104
src/main/java/com/example/sso/dao/ShiJiuFeiTwoFour.java
Normal file
@ -0,0 +1,104 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class ShiJiuFeiTwoFour {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, Double trailerStartingFare,
|
||||
Double trailerMileagePrice, Double trailerOverMileage, Double craneStartingFare,
|
||||
Double cranePrice, Double craneWorkTime, Double otherFee, String remark,
|
||||
String insuranceCodes,String data_sources1,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value",data_sources1 + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", 1);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
if ( trailerStartingFare!= null){JSONObject trailerStartingFare1 = new JSONObject();
|
||||
trailerStartingFare1.put("value", trailerStartingFare);
|
||||
data.put("trailerstartingfare", trailerStartingFare1); }
|
||||
|
||||
if ( trailerMileagePrice!= null){ JSONObject trailerMileagePrice1 = new JSONObject();
|
||||
trailerMileagePrice1.put("value", trailerMileagePrice);
|
||||
data.put("trailermileageprice", trailerMileagePrice1);
|
||||
}
|
||||
if ( trailerOverMileage!= null){ JSONObject trailerOverMileage1 = new JSONObject();
|
||||
trailerOverMileage1.put("value", trailerOverMileage);
|
||||
data.put("trailerovermileage", trailerOverMileage1); }
|
||||
|
||||
if (craneStartingFare != null){ JSONObject craneStartingFare1 = new JSONObject();
|
||||
craneStartingFare1.put("value", craneStartingFare);
|
||||
data.put("cranestartingfare", craneStartingFare1); }
|
||||
|
||||
if (cranePrice != null){JSONObject cranePrice1 = new JSONObject();
|
||||
cranePrice1.put("value", cranePrice);
|
||||
data.put("craneprice", cranePrice1); }
|
||||
|
||||
if ( craneWorkTime!= null){ JSONObject craneWorkTime1 = new JSONObject();
|
||||
craneWorkTime1.put("value", craneWorkTime);
|
||||
data.put("craneworktime", craneWorkTime1); }
|
||||
|
||||
if ( otherFee!= null){ JSONObject otherFee1 = new JSONObject();
|
||||
otherFee1.put("value", otherFee);
|
||||
data.put("otherfee", otherFee1);}
|
||||
|
||||
if ( remark!= null){ JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1);}
|
||||
|
||||
if ( insuranceCodes!= null){ JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/ShiJiuFeiTwoFour_.java
Normal file
75
src/main/java/com/example/sso/dao/ShiJiuFeiTwoFour_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ShiJiuFeiTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
77
src/main/java/com/example/sso/dao/ShiJiuFei_.java
Normal file
77
src/main/java/com/example/sso/dao/ShiJiuFei_.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ShiJiuFei_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f501362e399b68fe0f0e33");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
40
src/main/java/com/example/sso/dao/UpdataBaoXian.java
Normal file
40
src/main/java/com/example/sso/dao/UpdataBaoXian.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
public class UpdataBaoXian {
|
||||
public static String updatas(String id,String r1, String t1, String u1) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","628eeaace7f28c00089a60cc");
|
||||
jsonObject.put("entry_id","6707ab707080a6db0c2faeba");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
String nowtime = TimeUtil.nowtime();
|
||||
|
||||
JSONObject s = new JSONObject();
|
||||
s.put("value",nowtime);
|
||||
data.put("s",s);
|
||||
|
||||
JSONObject u = new JSONObject();
|
||||
u.put("value",u1);
|
||||
data.put("u",u);
|
||||
|
||||
JSONObject t = new JSONObject();
|
||||
t.put("value",t1);
|
||||
data.put("t",t);
|
||||
|
||||
JSONObject r = new JSONObject();
|
||||
r.put("value",r1);
|
||||
data.put("r",r);
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
return updata;
|
||||
}
|
||||
}
|
||||
122
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXi.java
Normal file
122
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXi.java
Normal file
@ -0,0 +1,122 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class WaiXiuDingDanXinXi {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String idClmOuterRepairDetail,String fitsName,
|
||||
String fitsCode,String lossCompanyAmount,String lossAmountInsurance,String remark,
|
||||
String status,String idRepairOutsideInfo,String garageName,String lossAmountReference,
|
||||
Integer wxdd, String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", wxdd);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject idClmOuterRepairDetail1 = new JSONObject();
|
||||
idClmOuterRepairDetail1.put("value", idClmOuterRepairDetail);
|
||||
data.put("idclmouterrepairdetail", idClmOuterRepairDetail1);
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if (fitsCode != null){
|
||||
JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1);
|
||||
}
|
||||
|
||||
if (lossCompanyAmount != null){
|
||||
JSONObject lossCompanyAmount1 = new JSONObject();
|
||||
lossCompanyAmount1.put("value", lossCompanyAmount);
|
||||
data.put("losscompanyamount", lossCompanyAmount1);
|
||||
}
|
||||
|
||||
if ( lossAmountInsurance!= null){
|
||||
JSONObject lossAmountInsurance1 = new JSONObject();
|
||||
lossAmountInsurance1.put("value", lossAmountInsurance);
|
||||
data.put("lossamountinsurance", lossAmountInsurance1);
|
||||
}
|
||||
|
||||
if ( remark!= null){
|
||||
JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject status1 = new JSONObject();
|
||||
status1.put("value", status);
|
||||
data.put("status", status1);
|
||||
|
||||
JSONObject idRepairOutsideInfo1 = new JSONObject();
|
||||
idRepairOutsideInfo1.put("value", idRepairOutsideInfo);
|
||||
data.put("idrepairoutsideinfo", idRepairOutsideInfo1);
|
||||
|
||||
JSONObject garageName1 = new JSONObject();
|
||||
garageName1.put("value", garageName);
|
||||
data.put("garagename", garageName1);
|
||||
if ( lossAmountReference!= null){
|
||||
JSONObject lossAmountReference1 = new JSONObject();
|
||||
lossAmountReference1.put("value", lossAmountReference);
|
||||
data.put("lossamountreference", lossAmountReference1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
108
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXiTwoFour.java
Normal file
108
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXiTwoFour.java
Normal file
@ -0,0 +1,108 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
public class WaiXiuDingDanXinXiTwoFour {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String idClmOuterRepairDetail,String fitsName,
|
||||
String fitsCode,String lossCompanyAmount,String lossAmountInsurance,String remark,
|
||||
String status,String idRepairOutsideInfo,String garageName,String lossAmountReference,
|
||||
String data_sources1,Integer WX,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value",data_sources1 + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject serialno = new JSONObject();
|
||||
serialno.put("value", WX);
|
||||
data.put("serialno", serialno );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject idClmOuterRepairDetail1 = new JSONObject();
|
||||
idClmOuterRepairDetail1.put("value", idClmOuterRepairDetail);
|
||||
data.put("idclmouterrepairdetail", idClmOuterRepairDetail1);
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if ( fitsCode!= null){ JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1); }
|
||||
|
||||
if ( lossCompanyAmount!= null){ JSONObject lossCompanyAmount1 = new JSONObject();
|
||||
lossCompanyAmount1.put("value", lossCompanyAmount);
|
||||
data.put("losscompanyamount", lossCompanyAmount1); }
|
||||
|
||||
if ( lossAmountInsurance!= null){ JSONObject lossAmountInsurance1 = new JSONObject();
|
||||
lossAmountInsurance1.put("value", lossAmountInsurance);
|
||||
data.put("lossamountinsurance", lossAmountInsurance1); }
|
||||
|
||||
if ( remark!= null){JSONObject remark1 = new JSONObject();
|
||||
remark1.put("value", remark);
|
||||
data.put("remark", remark1); }
|
||||
|
||||
|
||||
JSONObject status1 = new JSONObject();
|
||||
status1.put("value", status);
|
||||
data.put("status", status1);
|
||||
|
||||
JSONObject idRepairOutsideInfo1 = new JSONObject();
|
||||
idRepairOutsideInfo1.put("value", idRepairOutsideInfo);
|
||||
data.put("idrepairoutsideinfo", idRepairOutsideInfo1);
|
||||
|
||||
JSONObject garageName1 = new JSONObject();
|
||||
garageName1.put("value", garageName);
|
||||
data.put("garagename", garageName1);
|
||||
if ( lossAmountReference!= null){ JSONObject lossAmountReference1 = new JSONObject();
|
||||
lossAmountReference1.put("value", lossAmountReference);
|
||||
data.put("lossamountreference", lossAmountReference1); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class WaiXiuDingDanXinXiTwoFour_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
74
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXi_.java
Normal file
74
src/main/java/com/example/sso/dao/WaiXiuDingDanXinXi_.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class WaiXiuDingDanXinXi_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f5019647f52adcb2040ba4");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
203
src/main/java/com/example/sso/dao/WaiXiuXiangMuDingSun.java
Normal file
203
src/main/java/com/example/sso/dao/WaiXiuXiangMuDingSun.java
Normal file
@ -0,0 +1,203 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class WaiXiuXiangMuDingSun {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String outerGarage, String createDate, Double fitsSurveyPrice,
|
||||
String idDcInsLossDetail, Double auditDamagePrice, Integer serialNo, String fitsName, String fitsCode, String fitsReamrk,
|
||||
String fitsMaterial, String fitLabelCode, String lossRemark, Integer fitsFeeRateType, Double originalFitsDiscountPrice,
|
||||
String originalFitsName, String originalFitsCode, String isHisOuterFits, String isFitsUnique, Double fitsDiscount,
|
||||
Double fitsFee, Double fitsFeeRate, String isLock, Double extendPrice, Integer carLimitCount, String dataSource,
|
||||
String insuranceCodes, Double lossCompanyAmount, String time
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value","定损" + lossSeqNo );
|
||||
data.put("match_field", match_field );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject outerGarage1 = new JSONObject();
|
||||
outerGarage1.put("value", outerGarage);
|
||||
data.put("outergarage", outerGarage1);
|
||||
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if (auditDamagePrice != null){
|
||||
JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if ( fitsCode!= null){
|
||||
JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1);
|
||||
}
|
||||
|
||||
if (fitsReamrk != null){
|
||||
JSONObject fitsReamrk1 = new JSONObject();
|
||||
fitsReamrk1.put("value", fitsReamrk);
|
||||
data.put("fitsreamrk", fitsReamrk1);
|
||||
|
||||
}
|
||||
if ( fitsMaterial!= null){
|
||||
JSONObject fitsMaterial1 = new JSONObject();
|
||||
fitsMaterial1.put("value", fitsMaterial);
|
||||
data.put("fitsmaterial", fitsMaterial1);
|
||||
}
|
||||
|
||||
if ( fitLabelCode!= null){
|
||||
JSONObject fitLabelCode1 = new JSONObject();
|
||||
fitLabelCode1.put("value", fitLabelCode);
|
||||
data.put("fitlabelcode", fitLabelCode1);
|
||||
}
|
||||
|
||||
if (lossRemark != null){
|
||||
JSONObject lossRemark1 = new JSONObject();
|
||||
lossRemark1.put("value", lossRemark);
|
||||
data.put("lossremark", lossRemark1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
JSONObject fitsFeeRateType1 = new JSONObject();
|
||||
fitsFeeRateType1.put("value", fitsFeeRateType);
|
||||
data.put("fitsferatetype", fitsFeeRateType1);
|
||||
if (originalFitsDiscountPrice != null){
|
||||
JSONObject originalFitsDiscountPrice1 = new JSONObject();
|
||||
originalFitsDiscountPrice1.put("value", originalFitsDiscountPrice);
|
||||
data.put("originalfitsdiscountprice", originalFitsDiscountPrice1);
|
||||
}
|
||||
|
||||
if ( originalFitsName!= null){
|
||||
JSONObject originalFitsName1 = new JSONObject();
|
||||
originalFitsName1.put("value", originalFitsName);
|
||||
data.put("originalfitsname", originalFitsName1);
|
||||
}
|
||||
|
||||
if ( originalFitsCode!= null){
|
||||
JSONObject originalFitsCode1 = new JSONObject();
|
||||
originalFitsCode1.put("value", originalFitsCode);
|
||||
data.put("originalfitscode", originalFitsCode1);
|
||||
}
|
||||
|
||||
if ( isHisOuterFits!= null){
|
||||
JSONObject isHisOuterFits1 = new JSONObject();
|
||||
isHisOuterFits1.put("value", isHisOuterFits);
|
||||
data.put("ishisouterfits", isHisOuterFits1);
|
||||
}
|
||||
|
||||
if ( isFitsUnique!= null){
|
||||
JSONObject isFitsUnique1 = new JSONObject();
|
||||
isFitsUnique1.put("value", isFitsUnique);
|
||||
data.put("isfitsunique", isFitsUnique1);
|
||||
}
|
||||
|
||||
if (fitsDiscount != null){
|
||||
JSONObject fitsDiscount1 = new JSONObject();
|
||||
fitsDiscount1.put("value", fitsDiscount);
|
||||
data.put("fitsdiscount", fitsDiscount1);
|
||||
}
|
||||
|
||||
if ( fitsFee!= null){
|
||||
JSONObject fitsFee1 = new JSONObject();
|
||||
fitsFee1.put("value", fitsFee);
|
||||
data.put("fitsdiscount", fitsFee1);
|
||||
}
|
||||
if ( fitsFeeRate!= null){
|
||||
JSONObject fitsFeeRate1 = new JSONObject();
|
||||
fitsFeeRate1.put("value", fitsFeeRate);
|
||||
data.put("fitsfeerate", fitsFeeRate1);
|
||||
}
|
||||
|
||||
|
||||
if (extendPrice != null){
|
||||
JSONObject extendPrice1 = new JSONObject();
|
||||
extendPrice1.put("value", extendPrice);
|
||||
data.put("extendprice", extendPrice1);
|
||||
}
|
||||
|
||||
if ( isLock!= null){
|
||||
JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1);
|
||||
}
|
||||
|
||||
if ( carLimitCount!= null){
|
||||
JSONObject carLimitCount1 = new JSONObject();
|
||||
carLimitCount1.put("value", carLimitCount);
|
||||
data.put("carlimitcount", carLimitCount1);
|
||||
}
|
||||
|
||||
if ( dataSource!= null){
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
}
|
||||
|
||||
if (insuranceCodes != null){
|
||||
JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);
|
||||
}
|
||||
|
||||
if ( lossCompanyAmount!= null){
|
||||
JSONObject lossCompanyAmount1 = new JSONObject();
|
||||
lossCompanyAmount1.put("value", lossCompanyAmount);
|
||||
data.put("losscompanyamount", lossCompanyAmount1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
public class WaiXiuXiangMuDingSunTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String outerGarage, String createDate, Double fitsSurveyPrice,
|
||||
String idDcInsLossDetail, Double auditDamagePrice, Integer serialNo, String fitsName, String fitsCode, String fitsReamrk,
|
||||
String fitsMaterial, String fitLabelCode, String lossRemark, Integer fitsFeeRateType, Double originalFitsDiscountPrice,
|
||||
String originalFitsName, String originalFitsCode, String isHisOuterFits, String isFitsUnique, Double fitsDiscount,
|
||||
Double fitsFee, Double fitsFeeRate, String isLock, Double extendPrice, Integer carLimitCount, String dataSource,
|
||||
String insuranceCodes, Double lossCompanyAmount,String data_sources1,String time
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject match_field = new JSONObject();
|
||||
match_field.put("value", data_sources1 + lossSeqNo);
|
||||
data.put("match_field", match_field );
|
||||
|
||||
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject outerGarage1 = new JSONObject();
|
||||
outerGarage1.put("value", outerGarage);
|
||||
data.put("outergarage", outerGarage1);
|
||||
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
if (auditDamagePrice != null){
|
||||
JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject serialNo1 = new JSONObject();
|
||||
serialNo1.put("value", serialNo);
|
||||
data.put("serialno", serialNo1);
|
||||
|
||||
JSONObject fitsName1 = new JSONObject();
|
||||
fitsName1.put("value", fitsName);
|
||||
data.put("fitsname", fitsName1);
|
||||
if ( fitsCode!= null){
|
||||
JSONObject fitsCode1 = new JSONObject();
|
||||
fitsCode1.put("value", fitsCode);
|
||||
data.put("fitscode", fitsCode1);
|
||||
}
|
||||
|
||||
if (fitsReamrk != null){
|
||||
JSONObject fitsReamrk1 = new JSONObject();
|
||||
fitsReamrk1.put("value", fitsReamrk);
|
||||
data.put("fitsreamrk", fitsReamrk1);
|
||||
|
||||
}
|
||||
if ( fitsMaterial!= null){
|
||||
JSONObject fitsMaterial1 = new JSONObject();
|
||||
fitsMaterial1.put("value", fitsMaterial);
|
||||
data.put("fitsmaterial", fitsMaterial1);
|
||||
}
|
||||
|
||||
if ( fitLabelCode!= null){
|
||||
JSONObject fitLabelCode1 = new JSONObject();
|
||||
fitLabelCode1.put("value", fitLabelCode);
|
||||
data.put("fitLabelcode", fitLabelCode1);
|
||||
}
|
||||
|
||||
if (lossRemark != null){
|
||||
JSONObject lossRemark1 = new JSONObject();
|
||||
lossRemark1.put("value", lossRemark);
|
||||
data.put("lossremark", lossRemark1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
JSONObject fitsFeeRateType1 = new JSONObject();
|
||||
fitsFeeRateType1.put("value", fitsFeeRateType);
|
||||
data.put("fitsferatetype", fitsFeeRateType1);
|
||||
if (originalFitsDiscountPrice != null){
|
||||
JSONObject originalFitsDiscountPrice1 = new JSONObject();
|
||||
originalFitsDiscountPrice1.put("value", originalFitsDiscountPrice);
|
||||
data.put("originalfitsdiscountprice", originalFitsDiscountPrice1);
|
||||
}
|
||||
|
||||
if ( originalFitsName!= null){
|
||||
JSONObject originalFitsName1 = new JSONObject();
|
||||
originalFitsName1.put("value", originalFitsName);
|
||||
data.put("originalfitsname", originalFitsName1);
|
||||
}
|
||||
|
||||
if ( originalFitsCode!= null){
|
||||
JSONObject originalFitsCode1 = new JSONObject();
|
||||
originalFitsCode1.put("value", originalFitsCode);
|
||||
data.put("originalfitscode", originalFitsCode1);
|
||||
}
|
||||
|
||||
if ( isHisOuterFits!= null){
|
||||
JSONObject isHisOuterFits1 = new JSONObject();
|
||||
isHisOuterFits1.put("value", isHisOuterFits);
|
||||
data.put("ishisouterfits", isHisOuterFits1);
|
||||
}
|
||||
|
||||
if ( isFitsUnique!= null){
|
||||
JSONObject isFitsUnique1 = new JSONObject();
|
||||
isFitsUnique1.put("value", isFitsUnique);
|
||||
data.put("isfitsunique", isFitsUnique1);
|
||||
}
|
||||
|
||||
if (fitsDiscount != null){
|
||||
JSONObject fitsDiscount1 = new JSONObject();
|
||||
fitsDiscount1.put("value", fitsDiscount);
|
||||
data.put("fitsdiscount", fitsDiscount1);
|
||||
}
|
||||
|
||||
if ( fitsFee!= null){
|
||||
JSONObject fitsFee1 = new JSONObject();
|
||||
fitsFee1.put("value", fitsFee);
|
||||
data.put("fitsdiscount", fitsFee1);
|
||||
}
|
||||
if ( fitsFeeRate!= null){
|
||||
JSONObject fitsFeeRate1 = new JSONObject();
|
||||
fitsFeeRate1.put("value", fitsFeeRate);
|
||||
data.put("fitsfeerate", fitsFeeRate1);
|
||||
}
|
||||
|
||||
|
||||
if (extendPrice != null){
|
||||
JSONObject extendPrice1 = new JSONObject();
|
||||
extendPrice1.put("value", extendPrice);
|
||||
data.put("extendprice", extendPrice1);
|
||||
}
|
||||
|
||||
if ( isLock!= null){
|
||||
JSONObject isLock1 = new JSONObject();
|
||||
isLock1.put("value", isLock);
|
||||
data.put("islock", isLock1);
|
||||
}
|
||||
|
||||
if ( carLimitCount!= null){
|
||||
JSONObject carLimitCount1 = new JSONObject();
|
||||
carLimitCount1.put("value", carLimitCount);
|
||||
data.put("carlimitcount", carLimitCount1);
|
||||
}
|
||||
|
||||
if ( dataSource!= null){
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
}
|
||||
|
||||
if (insuranceCodes != null){
|
||||
JSONObject insuranceCodes1 = new JSONObject();
|
||||
insuranceCodes1.put("value", insuranceCodes);
|
||||
data.put("insurancecodes", insuranceCodes1);
|
||||
}
|
||||
|
||||
if ( lossCompanyAmount!= null){
|
||||
JSONObject lossCompanyAmount1 = new JSONObject();
|
||||
lossCompanyAmount1.put("value", lossCompanyAmount);
|
||||
data.put("losscompanyamount", lossCompanyAmount1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class WaiXiuXiangMuDingSunTwoFour_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
74
src/main/java/com/example/sso/dao/WaiXiuXiangMuDingSun_.java
Normal file
74
src/main/java/com/example/sso/dao/WaiXiuXiangMuDingSun_.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class WaiXiuXiangMuDingSun_ {
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("field","data_sources");
|
||||
data_sources.put("method","eq");
|
||||
JSONArray jsonArraydata_sources = new JSONArray();
|
||||
jsonArraydata_sources.add(data_sources1);
|
||||
data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500732e399b68fe0f0db4");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","");
|
||||
data.put("match_field",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
134
src/main/java/com/example/sso/dao/XiuGaiJiLu.java
Normal file
134
src/main/java/com/example/sso/dao/XiuGaiJiLu.java
Normal file
@ -0,0 +1,134 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class XiuGaiJiLu {
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String idDcInsLossDetail,String operatorName,
|
||||
String operatorUm,String operatorRole,Double fitsSurveyPrice,Double auditPrice,
|
||||
Double auditDamagePrice,Double adjustFitsFee,String createDate,Integer dataSource,
|
||||
String idDcCarLossRecord,Integer fitsCount,String isDel,Double reduceRemnant,Double verifyReduce,
|
||||
String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500d85c9195bacf624dba");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", "定损");
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
|
||||
JSONObject operatorName1 = new JSONObject();
|
||||
operatorName1.put("value", operatorName);
|
||||
data.put("operatorname", operatorName1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
data.put("operatorum", operatorUm1);
|
||||
if (operatorRole != null){
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
data.put("operatorrole", operatorRole1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
if ( auditPrice!= null){
|
||||
JSONObject auditPrice1 = new JSONObject();
|
||||
auditPrice1.put("value", auditPrice);
|
||||
data.put("auditprice", auditPrice1);
|
||||
}
|
||||
|
||||
if ( auditDamagePrice!= null){
|
||||
JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1);
|
||||
}
|
||||
|
||||
if (adjustFitsFee != null){
|
||||
JSONObject adjustFitsFee1 = new JSONObject();
|
||||
adjustFitsFee1.put("value", adjustFitsFee);
|
||||
data.put("adjustfitsfee", adjustFitsFee1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
|
||||
JSONObject idDcCarLossRecord1 = new JSONObject();
|
||||
idDcCarLossRecord1.put("value", idDcCarLossRecord);
|
||||
data.put("iddccarlossrecord", idDcCarLossRecord1);
|
||||
if ( fitsCount!= null){
|
||||
JSONObject fitsCount1 = new JSONObject();
|
||||
fitsCount1.put("value", fitsCount);
|
||||
data.put("fitscount", fitsCount1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject isDel1 = new JSONObject();
|
||||
isDel1.put("value", isDel);
|
||||
data.put(isDel, isDel1);
|
||||
if (reduceRemnant != null){
|
||||
JSONObject reduceRemnant1 = new JSONObject();
|
||||
reduceRemnant1.put("value", reduceRemnant);
|
||||
data.put("reduceremnant", reduceRemnant1);
|
||||
}
|
||||
|
||||
if (verifyReduce != null){
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
129
src/main/java/com/example/sso/dao/XiuGaiJiLuTwoFour.java
Normal file
129
src/main/java/com/example/sso/dao/XiuGaiJiLuTwoFour.java
Normal file
@ -0,0 +1,129 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
|
||||
|
||||
public class XiuGaiJiLuTwoFour {
|
||||
|
||||
public static void add(String reportNo, String lossSeqNo, String taskId, String idDcInsLossDetail, String operatorName,
|
||||
String operatorUm, String operatorRole, Double fitsSurveyPrice, Double auditPrice,
|
||||
Double auditDamagePrice, Double adjustFitsFee, String createDate, Integer dataSource,
|
||||
String idDcCarLossRecord, Integer fitsCount, String isDel, Double reduceRemnant, Double verifyReduce,
|
||||
String orgName,String data_sources1,String time
|
||||
|
||||
) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500d85c9195bacf624dba");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject uuid = new JSONObject();
|
||||
uuid.put("value", time);
|
||||
data.put("uuid", uuid);
|
||||
JSONObject data_sources = new JSONObject();
|
||||
data_sources.put("value", data_sources1);
|
||||
data.put("data_sources", data_sources );
|
||||
|
||||
JSONObject reportNo1 = new JSONObject();
|
||||
reportNo1.put("value", reportNo);
|
||||
data.put("reportno", reportNo1);
|
||||
|
||||
JSONObject lossSeqNo1 = new JSONObject();
|
||||
lossSeqNo1.put("value", lossSeqNo);
|
||||
data.put("lossseqno", lossSeqNo1);
|
||||
|
||||
JSONObject taskId1 = new JSONObject();
|
||||
taskId1.put("value", taskId);
|
||||
data.put("taskid", taskId1);
|
||||
|
||||
JSONObject orgName1 = new JSONObject();
|
||||
orgName1.put("value", orgName);
|
||||
data.put("orgname", orgName1);
|
||||
|
||||
JSONObject idDcInsLossDetail1 = new JSONObject();
|
||||
idDcInsLossDetail1.put("value", idDcInsLossDetail);
|
||||
data.put("iddcinslossdetail", idDcInsLossDetail1);
|
||||
|
||||
JSONObject operatorName1 = new JSONObject();
|
||||
operatorName1.put("value", operatorName);
|
||||
data.put("operatorname", operatorName1);
|
||||
|
||||
JSONObject operatorUm1 = new JSONObject();
|
||||
operatorUm1.put("value", operatorUm);
|
||||
data.put("operatorum", operatorUm1);
|
||||
|
||||
JSONObject operatorRole1 = new JSONObject();
|
||||
operatorRole1.put("value", operatorRole);
|
||||
data.put("operatorrole", operatorRole1);
|
||||
|
||||
JSONObject fitsSurveyPrice1 = new JSONObject();
|
||||
fitsSurveyPrice1.put("value", fitsSurveyPrice);
|
||||
data.put("fitssurveyprice", fitsSurveyPrice1);
|
||||
|
||||
if ( auditPrice!= null){ JSONObject auditPrice1 = new JSONObject();
|
||||
auditPrice1.put("value", auditPrice);
|
||||
data.put("auditprice", auditPrice1); }
|
||||
|
||||
if ( auditDamagePrice!= null){ JSONObject auditDamagePrice1 = new JSONObject();
|
||||
auditDamagePrice1.put("value", auditDamagePrice);
|
||||
data.put("auditdamageprice", auditDamagePrice1); }
|
||||
|
||||
if ( adjustFitsFee!= null){ JSONObject adjustFitsFee1 = new JSONObject();
|
||||
adjustFitsFee1.put("value", adjustFitsFee);
|
||||
data.put("adjustfitsfee", adjustFitsFee1); }
|
||||
|
||||
|
||||
JSONObject createDate1 = new JSONObject();
|
||||
createDate1.put("value", createDate);
|
||||
data.put("createdate", createDate1);
|
||||
|
||||
JSONObject dataSource1 = new JSONObject();
|
||||
dataSource1.put("value", dataSource);
|
||||
data.put("datasource", dataSource1);
|
||||
|
||||
JSONObject idDcCarLossRecord1 = new JSONObject();
|
||||
idDcCarLossRecord1.put("value", idDcCarLossRecord);
|
||||
data.put("iddccarlossrecord", idDcCarLossRecord1);
|
||||
if ( fitsCount!= null){
|
||||
JSONObject fitsCount1 = new JSONObject();
|
||||
fitsCount1.put("value", fitsCount);
|
||||
data.put("fitscount", fitsCount1);
|
||||
}
|
||||
|
||||
|
||||
JSONObject isDel1 = new JSONObject();
|
||||
isDel1.put("value", isDel);
|
||||
data.put("isdel", isDel1);
|
||||
if ( reduceRemnant!= null){ JSONObject reduceRemnant1 = new JSONObject();
|
||||
reduceRemnant1.put("value", reduceRemnant);
|
||||
data.put("reduceremnant", reduceRemnant1);}
|
||||
|
||||
if ( verifyReduce!= null){
|
||||
JSONObject verifyReduce1 = new JSONObject();
|
||||
verifyReduce1.put("value", verifyReduce);
|
||||
data.put("verifyreduce", verifyReduce1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
77
src/main/java/com/example/sso/dao/XiuGaiJiLuTwoFour_.java
Normal file
77
src/main/java/com/example/sso/dao/XiuGaiJiLuTwoFour_.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class XiuGaiJiLuTwoFour_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
|
||||
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500d85c9195bacf624dba");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
// JSONObject data_sources = new JSONObject();
|
||||
// data_sources.put("field","data_sources");
|
||||
// data_sources.put("method","eq");
|
||||
// JSONArray jsonArraydata_sources = new JSONArray();
|
||||
// jsonArraydata_sources.add(data_sources1);
|
||||
// data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
// cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500d85c9195bacf624dba");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/example/sso/dao/XiuGaiJiLu_.java
Normal file
75
src/main/java/com/example/sso/dao/XiuGaiJiLu_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class XiuGaiJiLu_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500d85c9195bacf624dba");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
// JSONObject data_sources = new JSONObject();
|
||||
// data_sources.put("field","data_sources");
|
||||
// data_sources.put("method","eq");
|
||||
// JSONArray jsonArraydata_sources = new JSONArray();
|
||||
// jsonArraydata_sources.add(data_sources1);
|
||||
// data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
// cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500d85c9195bacf624dba");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
142
src/main/java/com/example/sso/newcontroller/Page.java
Normal file
142
src/main/java/com/example/sso/newcontroller/Page.java
Normal file
@ -0,0 +1,142 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
public class Page {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString ="{\n" +
|
||||
" \"accessRole\": \"45\",\n" +
|
||||
" \"accidentDate\": \"2021-07-25 16:20:00\",\n" +
|
||||
" \"actualValue\": 14065.00,\n" +
|
||||
" \"carMark\": \"晋H5748\",\n" +
|
||||
" \"carMarkType\": \"01\",\n" +
|
||||
" \"caseType\": \"1\",\n" +
|
||||
" \"damageType\": \"01\",\n" +
|
||||
" \"insuranceCodeList\": \"C060101200,C060101310\",\n" +
|
||||
" \"insuranceCodes\": \"C060101200\",\n" +
|
||||
" \"insuredName\": \"忠运输装卸服务队\",\n" +
|
||||
" \"isYFast\": \"0\",\n" +
|
||||
" \"orgName\": \"安诚财产保险股份有限公司榆林中心支公司\",\n" +
|
||||
" \"reportNo\": \"BA030061002021005755\",\n" +
|
||||
" \"rescueFeeInfo\": {\n" +
|
||||
" \"cranePrice\": 0,\n" +
|
||||
" \"craneStartingFare\": 0,\n" +
|
||||
" \"craneWorkTime\": 0,\n" +
|
||||
" \"otherFee\": 0,\n" +
|
||||
" \"trailerMileagePrice\": 0,\n" +
|
||||
" \"trailerOverMileage\": 0,\n" +
|
||||
" \"trailerStartingFare\": 0\n" +
|
||||
" },\n" +
|
||||
" \"trafficMileage\": 20,\n" +
|
||||
" \"vin\": \"LG6ZDCNH0GY2\",\n" +
|
||||
" \n" +
|
||||
" \"communicationList\": [],\n" +
|
||||
" \"extensionBtnList\": [\n" +
|
||||
" {\n" +
|
||||
" \"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005755\",\n" +
|
||||
" \"btnLocation\": 1,\n" +
|
||||
" \"btnName\": \"流程图\",\n" +
|
||||
" \"openType\": 1,\n" +
|
||||
" \"seqNo\": 2\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
" \"isSurvey\": \"N\",\n" +
|
||||
" \"leakageMangement\": {\n" +
|
||||
" \"caseTimes\": 1\n" +
|
||||
" },\n" +
|
||||
" \"lossFitsItemList\": [\n" +
|
||||
" {\n" +
|
||||
" \"adjustFitsFee\": 0.00,\n" +
|
||||
" \"audit\": 0,\n" +
|
||||
" \"auditDamagePrice\": 540.00,\n" +
|
||||
" \"auditPrice\": 600.00,\n" +
|
||||
" \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
" \"fitsCount\": 1,\n" +
|
||||
" \"fitsFeeRateTypeEx\": 3,\n" +
|
||||
" \"fitsName\": \"前挡风玻璃\",\n" +
|
||||
" \"fitsSurveyPrice\": 1250.00,\n" +
|
||||
" \"idDcInsLossDetail\": \"C88A4CB3FCBD8A4FE0530438210AE9BF\",\n" +
|
||||
" \"isDel\": \"N\",\n" +
|
||||
" \"recycle\": 0,\n" +
|
||||
" \"reduceRemnant\": 0.00,\n" +
|
||||
" \"verifyReduce\": 0.00\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"lossManpowerItemList\": [\n" +
|
||||
" {\n" +
|
||||
" \"auditDamagePrice\": 500.00,\n" +
|
||||
" \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
" \"idDcInsLossDetail\": \"C88A4CB3FCE18A4FE0530438210AE9BF\",\n" +
|
||||
" \"isDel\": \"N\",\n" +
|
||||
" \"manpowerItemName\": \"拆装更换发动机受损件 水箱 中冷器 风圈\",\n" +
|
||||
" \"manpowerSurveyPrice\": 1000.00\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"lossOuterFitsItemList\": [],\n" +
|
||||
" \"lossSeqNo\": \"21000678297\",\n" +
|
||||
" \"lossSeqNoHis\": \"\",\n" +
|
||||
" \"operatorDptCde\": \"61\",\n" +
|
||||
" \"operatorName\": \"李\",\n" +
|
||||
" \"operatorRole\": \"47\",\n" +
|
||||
" \"operatorUm\": \"161021491\",\n" +
|
||||
" \"opinionDescribe\": \"双证在查勘前端资料,总价协商13000,工时费低请老师调整按13000审核\",\n" +
|
||||
" \"lossAreaList\":[{\n" +
|
||||
" \"provinceCode\":\"610000\",\n" +
|
||||
" \"cityList\": [\n" +
|
||||
" \"610100\",\n" +
|
||||
" \"610200\",\n" +
|
||||
" \"610300\",\n" +
|
||||
" \"610400\",\n" +
|
||||
" \"610500\",\n" +
|
||||
" \"610600\",\n" +
|
||||
" \"610700\",\n" +
|
||||
" \"610800\",\n" +
|
||||
" \"610900\",\n" +
|
||||
" \"611000\"\n" +
|
||||
" ]\n" +
|
||||
" }],\n" +
|
||||
" \"readonly\": \"Y\"\n" +
|
||||
"}\n" ;
|
||||
JSONObject jsonObject = JSON.parseObject(jsonString);
|
||||
String jsonString2 = jsonObject.toJSONString();
|
||||
System.out.println("我是转 " + jsonString2);
|
||||
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.page(jsonString1);
|
||||
JSONObject jsonObject1 = JSON.parseObject(newlossplatform);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("respData");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
String code = jsonObject1.getString("code");
|
||||
boolean b = YiZhangUtil.verifySignature(code + msg + respData, KEY, signature);
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
System.out.println(result);
|
||||
System.out.println(b);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
164
src/main/java/com/example/sso/newcontroller/PageTwoOne.java
Normal file
164
src/main/java/com/example/sso/newcontroller/PageTwoOne.java
Normal file
@ -0,0 +1,164 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
|
||||
public class PageTwoOne {
|
||||
@PostMapping("/twodianone")
|
||||
public JSONObject PageTwoOne(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是twodianone参数 " + data.toJSONString());
|
||||
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
String string = data.getString("lossAreaList");
|
||||
JSONArray jsonArray = JSON.parseArray(string);
|
||||
data.put("lossAreaList",jsonArray);
|
||||
String jsonString = data.toJSONString();
|
||||
log.info("转换后的代码 " + jsonString);
|
||||
|
||||
// String jsonString ="{\n" +
|
||||
// " \"accessRole\": \"45\",\n" +
|
||||
// " \"accidentDate\": \"2021-07-25 16:20:00\",\n" +
|
||||
// " \"actualValue\": 14065.00,\n" +
|
||||
// " \"carMark\": \"晋H5748\",\n" +
|
||||
// " \"carMarkType\": \"01\",\n" +
|
||||
// " \"caseType\": \"1\",\n" +
|
||||
// " \"damageType\": \"01\",\n" +
|
||||
// " \"insuranceCodeList\": \"C060101200,C060101310\",\n" +
|
||||
// " \"insuranceCodes\": \"C060101200\",\n" +
|
||||
// " \"insuredName\": \"忠运输装卸服务队\",\n" +
|
||||
// " \"isYFast\": \"0\",\n" +
|
||||
// " \"orgName\": \"安诚财产保险股份有限公司榆林中心支公司\",\n" +
|
||||
// " \"reportNo\": \"BA030061002021005755\",\n" +
|
||||
// " \"rescueFeeInfo\": {\n" +
|
||||
// " \"cranePrice\": 0,\n" +
|
||||
// " \"craneStartingFare\": 0,\n" +
|
||||
// " \"craneWorkTime\": 0,\n" +
|
||||
// " \"otherFee\": 0,\n" +
|
||||
// " \"trailerMileagePrice\": 0,\n" +
|
||||
// " \"trailerOverMileage\": 0,\n" +
|
||||
// " \"trailerStartingFare\": 0\n" +
|
||||
// " },\n" +
|
||||
// " \"trafficMileage\": 20,\n" +
|
||||
// " \"vin\": \"LG6ZDCNH0GY2\",\n" +
|
||||
// " \n" +
|
||||
// " \"communicationList\": [],\n" +
|
||||
// " \"extensionBtnList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005755\",\n" +
|
||||
// " \"btnLocation\": 1,\n" +
|
||||
// " \"btnName\": \"流程图\",\n" +
|
||||
// " \"openType\": 1,\n" +
|
||||
// " \"seqNo\": 2\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
// " \"isSurvey\": \"N\",\n" +
|
||||
// " \"leakageMangement\": {\n" +
|
||||
// " \"caseTimes\": 1\n" +
|
||||
// " },\n" +
|
||||
// " \"lossFitsItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"adjustFitsFee\": 0.00,\n" +
|
||||
// " \"audit\": 0,\n" +
|
||||
// " \"auditDamagePrice\": 540.00,\n" +
|
||||
// " \"auditPrice\": 600.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"fitsCount\": 1,\n" +
|
||||
// " \"fitsFeeRateTypeEx\": 3,\n" +
|
||||
// " \"fitsName\": \"前挡风玻璃\",\n" +
|
||||
// " \"fitsSurveyPrice\": 1250.00,\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCBD8A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"recycle\": 0,\n" +
|
||||
// " \"reduceRemnant\": 0.00,\n" +
|
||||
// " \"verifyReduce\": 0.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossManpowerItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"auditDamagePrice\": 500.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCE18A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"manpowerItemName\": \"拆装更换发动机受损件 水箱 中冷器 风圈\",\n" +
|
||||
// " \"manpowerSurveyPrice\": 1000.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossOuterFitsItemList\": [],\n" +
|
||||
// " \"lossSeqNo\": \"21000678297\",\n" +
|
||||
// " \"lossSeqNoHis\": \"\",\n" +
|
||||
// " \"operatorDptCde\": \"61\",\n" +
|
||||
// " \"operatorName\": \"李\",\n" +
|
||||
// " \"operatorRole\": \"47\",\n" +
|
||||
// " \"operatorUm\": \"161021491\",\n" +
|
||||
// " \"opinionDescribe\": \"双证在查勘前端资料,总价协商13000,工时费低请老师调整按13000审核\",\n" +
|
||||
// " \"lossAreaList\":[{\n" +
|
||||
// " \"provinceCode\":\"610000\",\n" +
|
||||
// " \"cityList\": [\n" +
|
||||
// " \"610100\",\n" +
|
||||
// " \"610200\",\n" +
|
||||
// " \"610300\",\n" +
|
||||
// " \"610400\",\n" +
|
||||
// " \"610500\",\n" +
|
||||
// " \"610600\",\n" +
|
||||
// " \"610700\",\n" +
|
||||
// " \"610800\",\n" +
|
||||
// " \"610900\",\n" +
|
||||
// " \"611000\"\n" +
|
||||
// " ]\n" +
|
||||
// " }],\n" +
|
||||
// " \"readonly\": \"Y\"\n" +
|
||||
// "}\n" ;
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.page(jsonString1);
|
||||
JSONObject jsonObject1 = JSON.parseObject(newlossplatform);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("respData");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
String code = jsonObject1.getString("code");
|
||||
boolean b = YiZhangUtil.verifySignature(code + msg + respData, KEY, signature);
|
||||
if (b == true) {
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
log.info("返回的url " +result );
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url",result);
|
||||
return jsonObject;
|
||||
|
||||
}else {
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url", "失败: "+msg + msg);
|
||||
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
155
src/main/java/com/example/sso/newcontroller/PageTwoThree.java
Normal file
155
src/main/java/com/example/sso/newcontroller/PageTwoThree.java
Normal file
@ -0,0 +1,155 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
|
||||
public class PageTwoThree {
|
||||
@PostMapping("/twodianthree")
|
||||
public JSONObject PageTwoThree(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是PageTwoThree参数 " + data.toJSONString());
|
||||
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
String jsonString = data.toJSONString();
|
||||
|
||||
// String jsonString ="{\n" +
|
||||
// " \"accessRole\": \"45\",\n" +
|
||||
// " \"accidentDate\": \"2021-07-25 16:20:00\",\n" +
|
||||
// " \"actualValue\": 14065.00,\n" +
|
||||
// " \"carMark\": \"晋H5748\",\n" +7777777
|
||||
// " \"carMarkType\": \"01\",\n" +
|
||||
// " \"caseType\": \"1\",\n" +
|
||||
// " \"damageType\": \"01\",\n" +
|
||||
// " \"insuranceCodeList\": \"C060101200,C060101310\",\n" +
|
||||
// " \"insuranceCodes\": \"C060101200\",\n" +
|
||||
// " \"insuredName\": \"忠运输装卸服务队\",\n" +
|
||||
// " \"isYFast\": \"0\",\n" +
|
||||
// " \"orgName\": \"安诚财产保险股份有限公司榆林中心支公司\",\n" +
|
||||
// " \"reportNo\": \"BA030061002021005755\",\n" +
|
||||
// " \"rescueFeeInfo\": {\n" +
|
||||
// " \"cranePrice\": 0,\n" +
|
||||
// " \"craneStartingFare\": 0,\n" +
|
||||
// " \"craneWorkTime\": 0,\n" +
|
||||
// " \"otherFee\": 0,\n" +
|
||||
// " \"trailerMileagePrice\": 0,\n" +
|
||||
// " \"trailerOverMileage\": 0,\n" +
|
||||
// " \"trailerStartingFare\": 0\n" +
|
||||
// " },\n" +
|
||||
// " \"trafficMileage\": 20,\n" +
|
||||
// " \"vin\": \"LG6ZDCNH0GY2\",\n" +
|
||||
// " \n" +
|
||||
// " \"communicationList\": [],\n" +
|
||||
// " \"extensionBtnList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005755\",\n" +
|
||||
// " \"btnLocation\": 1,\n" +
|
||||
// " \"btnName\": \"流程图\",\n" +
|
||||
// " \"openType\": 1,\n" +
|
||||
// " \"seqNo\": 2\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
// " \"isSurvey\": \"N\",\n" +
|
||||
// " \"leakageMangement\": {\n" +
|
||||
// " \"caseTimes\": 1\n" +
|
||||
// " },\n" +
|
||||
// " \"lossFitsItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"adjustFitsFee\": 0.00,\n" +
|
||||
// " \"audit\": 0,\n" +
|
||||
// " \"auditDamagePrice\": 540.00,\n" +
|
||||
// " \"auditPrice\": 600.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"fitsCount\": 1,\n" +
|
||||
// " \"fitsFeeRateTypeEx\": 3,\n" +
|
||||
// " \"fitsName\": \"前挡风玻璃\",\n" +
|
||||
// " \"fitsSurveyPrice\": 1250.00,\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCBD8A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"recycle\": 0,\n" +
|
||||
// " \"reduceRemnant\": 0.00,\n" +
|
||||
// " \"verifyReduce\": 0.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossManpowerItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"auditDamagePrice\": 500.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCE18A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"manpowerItemName\": \"拆装更换发动机受损件 水箱 中冷器 风圈\",\n" +
|
||||
// " \"manpowerSurveyPrice\": 1000.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossOuterFitsItemList\": [],\n" +
|
||||
// " \"lossSeqNo\": \"21000678297\",\n" +
|
||||
// " \"lossSeqNoHis\": \"\",\n" +
|
||||
// " \"operatorDptCde\": \"61\",\n" +
|
||||
// " \"operatorName\": \"李\",\n" +
|
||||
// " \"operatorRole\": \"47\",\n" +
|
||||
// " \"operatorUm\": \"161021491\",\n" +
|
||||
// " \"opinionDescribe\": \"双证在查勘前端资料,总价协商13000,工时费低请老师调整按13000审核\",\n" +
|
||||
// " \"lossAreaList\":[{\n" +
|
||||
// " \"provinceCode\":\"610000\",\n" +
|
||||
// " \"cityList\": [\n" +
|
||||
// " \"610100\",\n" +
|
||||
// " \"610200\",\n" +
|
||||
// " \"610300\",\n" +
|
||||
// " \"610400\",\n" +
|
||||
// " \"610500\",\n" +
|
||||
// " \"610600\",\n" +
|
||||
// " \"610700\",\n" +
|
||||
// " \"610800\",\n" +
|
||||
// " \"610900\",\n" +
|
||||
// " \"611000\"\n" +
|
||||
// " ]\n" +
|
||||
// " }],\n" +
|
||||
// " \"readonly\": \"Y\"\n" +
|
||||
// "}\n" ;
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.quoteGuidepage(jsonString1);
|
||||
JSONObject jsonObject1 = JSON.parseObject(newlossplatform);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("respData");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
String code = jsonObject1.getString("code");
|
||||
boolean b = YiZhangUtil.verifySignature(code + msg + respData, KEY, signature);
|
||||
if (b == true) {
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url",result);
|
||||
return jsonObject;
|
||||
|
||||
}else {
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url", "失败: "+msg + msg);
|
||||
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
500
src/main/java/com/example/sso/newcontroller/PushDataInsLoss.java
Normal file
500
src/main/java/com/example/sso/newcontroller/PushDataInsLoss.java
Normal file
@ -0,0 +1,500 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.*;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static com.example.sso.util.YiZhangUtil.verifySignature;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class PushDataInsLoss {
|
||||
|
||||
@PostMapping("/api/insLoss/pushData")
|
||||
public JSONObject pushdata(@RequestBody JSONObject data) throws Exception {
|
||||
String now = TimeUtil.now();
|
||||
log.info("我是insLoss参数 " + data.toJSONString());
|
||||
String S = data.toJSONString();
|
||||
|
||||
//String S = "{\"reqData\":\"eyJiYXNlSW5mbyI6eyJyZXBvcnRObyI6IjEyMjIyMjIyMjIiLCJpbnN1cmFuY2VDb2RlTGlzdCI6IjEyMzQ1NSwzMzQ1NjQiLCJ2aW4iOiJMVk4xMjMxMjMxMiJ9LCJhZGRyZXNzIjoi5rWL6K+V5Zyw5Z2AIiwiY291bnR5Q29kZSI6IjEwMDExMCIsInByZUNoZWNrU3RhdGUiOiIyIn0=\",\"siteCode\":\"YJIC\",\"signature\":\"YVIxcXVqMkwzQTBaQ285em9wQy8yYVZmWVc2SEVjVnpVNmttQzdmVlFhY0I5U3ZvcnNnNkZxbEVRTzdnRDh6T05oOHkzZ2pGdUQxSkJPd2NZM2Y5Z05uWVBleElYRWZNV3FudXRCQ1RTaU5BSnNVWGZzb0thZUdtQ2RsdWhycXJMK0ZWWGkxblN6QlQ4a3VsZXBKa2NYcGlTUE1SdHlKYVRlNTAzN2FrT3JXUDFMTGYweGVsWitPV1ppOU5RTU5ualFvYTlqZGU2RzRXM1d5RE9qNnI4YzVhUnJvS2piRVJ2bFRDSzR6ZGRTL2tXaGU1OGRwdTllQmJNbzVvTVVPYUcvZjJLVjJTUXRwMzd0NkJla0t4MTY2TFkvN0V5dkM0azFRKzAvdkxDWEpqUVM1SlllbG5tckhjZnF2UVpCb0JEN0I5YzBFcWZOcjZ0K01uMDFtbFJRPT0=\"}";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
JSONObject jsonObject1 = JSON.parseObject(S);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("reqData");
|
||||
String siteCode = jsonObject1.getString("siteCode");
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
boolean b = verifySignature(siteCode + respData, KEY, signature);
|
||||
|
||||
if (b == true) {
|
||||
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
log.info("我是转换后insLoss参数 " + result);
|
||||
JSONObject jsonObject = JSON.parseObject(result);
|
||||
//外修定损项目
|
||||
JSONArray lossFitsItemList = jsonObject.getJSONArray("lossFitsItemList");
|
||||
// 2.2.2.2. 工时定损项目
|
||||
JSONArray lossManpowerItemList = jsonObject.getJSONArray("lossManpowerItemList");
|
||||
//2.2.2.3. 外修定损项目lossOuterFitsItemList
|
||||
JSONArray lossOuterFitsItemList = jsonObject.getJSONArray("lossOuterFitsItemList");
|
||||
// 2.2.2.5. 沟通信息communicationList
|
||||
JSONArray communicationList = jsonObject.getJSONArray("communicationList");
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
JSONObject rescueFeeInfo = jsonObject.getJSONObject("rescueFeeInfo");
|
||||
|
||||
//反渗漏结果
|
||||
JSONObject leakageMangementResult = jsonObject.getJSONObject("leakageMangementResult");
|
||||
JSONArray riskList = new JSONArray();
|
||||
if(leakageMangementResult != null ) {
|
||||
riskList = leakageMangementResult.getJSONArray("riskList");
|
||||
}
|
||||
|
||||
// 2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
JSONArray repairOutsideFitList = jsonObject.getJSONArray("repairOutsideFitList");
|
||||
|
||||
String reportNo = jsonObject.getString("reportNo");
|
||||
String lossSeqNo = jsonObject.getString("lossSeqNo");
|
||||
String taskId = jsonObject.getString("taskId");
|
||||
Double rescueFee = jsonObject.getDouble("rescueFee");
|
||||
Double surplusValue = jsonObject.getDouble("surplusValue");
|
||||
String vin = jsonObject.getString("vin");
|
||||
Double actualValue = jsonObject.getDouble("actualValue");
|
||||
Double verifyReduce = jsonObject.getDouble("verifyReduce");
|
||||
String auditType = jsonObject.getString("auditType");
|
||||
String fitsPriceType = jsonObject.getString("fitsPriceType");
|
||||
String fitLabelType = jsonObject.getString("fitLabelType");
|
||||
String operatorUm = jsonObject.getString("operatorUm");
|
||||
String operatorRole = jsonObject.getString("operatorRole");
|
||||
String provinceCode = jsonObject.getString("provinceCode");
|
||||
String cityCode = jsonObject.getString("cityCode");
|
||||
String garageCode = jsonObject.getString("garageCode");
|
||||
String garageName = jsonObject.getString("garageName");
|
||||
String garageType = jsonObject.getString("garageType");
|
||||
String brandName = jsonObject.getString("brandName");
|
||||
String manufacturerName = jsonObject.getString("manufacturerName");
|
||||
String modelCode = jsonObject.getString("modelCode");
|
||||
String modelName = jsonObject.getString("modelName");
|
||||
String lossPosition = jsonObject.getString("lossPosition");
|
||||
String groupName = jsonObject.getString("groupName");
|
||||
String modelCategoryCode = jsonObject.getString("modelCategoryCode");
|
||||
String seriesName = jsonObject.getString("seriesName");
|
||||
String address = jsonObject.getString("address");
|
||||
Double lossAmount = jsonObject.getDouble("lossAmount");
|
||||
String opinionDescribe = jsonObject.getString("opinionDescribe");
|
||||
String brandList = jsonObject.getString("brandList");
|
||||
String telephone = jsonObject.getString("telephone");
|
||||
String idDcInsuranceGarageRule = jsonObject.getString("idDcInsuranceGarageRule");
|
||||
String carDealerCode = jsonObject.getString("carDealerCode");
|
||||
String modeRemark = jsonObject.getString("modeRemark");
|
||||
String modelCategoryName = jsonObject.getString("modelCategoryName");
|
||||
String isClaim = jsonObject.getString("isClaim");
|
||||
String vinParseType = jsonObject.getString("vinParseType");
|
||||
String organizeCode = jsonObject.getString("organizeCode");
|
||||
String lossPosition2 = jsonObject.getString("lossPosition2");
|
||||
String buriedType = jsonObject.getString("buriedType");
|
||||
String pushLossInfoId = jsonObject.getString("pushLossInfoId");
|
||||
String pushLossDate = jsonObject.getString("pushLossDate");
|
||||
|
||||
|
||||
Result_.list("定损",lossSeqNo);
|
||||
|
||||
|
||||
Result.add(reportNo, lossSeqNo, taskId, rescueFee, surplusValue, vin,
|
||||
actualValue, verifyReduce, auditType, fitsPriceType, fitLabelType,
|
||||
operatorUm, operatorRole, provinceCode, cityCode, garageCode, garageName,
|
||||
garageType, brandName, manufacturerName, modelCode, modelName, lossPosition,
|
||||
groupName, modelCategoryCode, seriesName, address, lossAmount, opinionDescribe,
|
||||
brandList, telephone, idDcInsuranceGarageRule, carDealerCode, modeRemark, modelCategoryName,
|
||||
isClaim, vinParseType, organizeCode, lossPosition2, buriedType, pushLossInfoId, pushLossDate,lossSeqNo+now);
|
||||
//配件定损
|
||||
|
||||
JSONArray operationRecordListlossFitsItemList = new JSONArray();
|
||||
String idDcInsLossDetaillossFitsItemList = "";
|
||||
|
||||
if (lossFitsItemList != null && lossFitsItemList.size() != 0) {
|
||||
log.info("配件定损bug " + lossSeqNo);
|
||||
PeiJianDingSun_.list("定损",lossSeqNo);
|
||||
for (Object o : lossFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordListlossFitsItemList = test.getJSONArray("operationRecordList");
|
||||
Integer audit = test.getInteger("audit");
|
||||
Integer recycle = test.getInteger("recycle");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Integer fitsFeeRateTypeEx = test.getInteger("fitsFeeRateTypeEx");
|
||||
String createDate = test.getString("createDate");
|
||||
Double adjustFitsFee = test.getDouble("adjustFitsFee");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
Integer fitsCount = test.getInteger("fitsCount");
|
||||
idDcInsLossDetaillossFitsItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Double reduceRemnant = test.getDouble("reduceRemnant");
|
||||
Double verifyReduce2 = test.getDouble("verifyReduce"); //111111111111111111111111
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double upperLimitPrice = test.getDouble("upperLimitPrice");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String isAiLossFits = test.getString("isAiLossFits");
|
||||
String isHisFits = test.getString("isHisFits");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
String isEnquiry = test.getString("isEnquiry");
|
||||
String isQuotation = test.getString("isQuotation");
|
||||
Double historyLoss4SPrice = test.getDouble("historyLoss4SPrice");
|
||||
Double historyLossMkPrice = test.getDouble("historyLossMkPrice");
|
||||
String isMultipleFitsUnique = test.getString("isMultipleFitsUnique");
|
||||
|
||||
|
||||
|
||||
PeiJianDingSun.add(reportNo, lossSeqNo, taskId, audit, recycle, fitsFeeRateType,
|
||||
fitsFeeRateTypeEx, createDate, adjustFitsFee, fitsSurveyPrice, fitsCount,
|
||||
idDcInsLossDetaillossFitsItemList, auditDamagePrice, reduceRemnant, verifyReduce2, fitsName,
|
||||
fitsCode, originalFitsName, originalFitsCode, originalFitsDiscountPrice,
|
||||
fitsFeeRate, fitLabelCode, lossRemark, serialNo, isFitsUnique, upperLimitPrice,
|
||||
fitsFee, fitsDiscount, fitsReamrk, fitsMaterial, isAiLossFits, isHisFits,
|
||||
isLock, extendPrice, carLimitCount, dataSource, insuranceCodes, isEnquiry,
|
||||
isQuotation, historyLoss4SPrice, historyLossMkPrice, isMultipleFitsUnique,lossSeqNo+now);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (operationRecordListlossFitsItemList != null && operationRecordListlossFitsItemList.size() != 0) {
|
||||
XiuGaiJiLu_.list("定损",lossSeqNo);
|
||||
for (Object o1 : operationRecordListlossFitsItemList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
XiuGaiJiLu.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossFitsItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
JSONArray operationRecordListlossManpowerItemList = new JSONArray();
|
||||
String idDcInsLossDetaillossManpowerItemList = "";
|
||||
//2.2.2.2. 工时定损项目
|
||||
if (lossManpowerItemList != null && lossManpowerItemList.size() != 0) {
|
||||
GongShiDingSun_.list("定损",lossSeqNo);
|
||||
for (Object o : lossManpowerItemList) {
|
||||
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordListlossManpowerItemList = test.getJSONArray("operationRecordList");
|
||||
String createDate = test.getString("createDate");
|
||||
Double manpowerSurveyPrice = test.getDouble("manpowerSurveyPrice");
|
||||
idDcInsLossDetaillossManpowerItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
String manpowerItemName = test.getString("manpowerItemName");
|
||||
String manpowerItemCode = test.getString("manpowerItemCode");
|
||||
Double manpowerDiscountPrice = test.getDouble("manpowerDiscountPrice");
|
||||
String remark = test.getString("remark");
|
||||
Double manpowerDiscount = test.getDouble("manpowerDiscount");
|
||||
Double multiaspectRuleDiscount = test.getDouble("multiaspectRuleDiscount");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String manpowerGroupName = test.getString("manpowerGroupName");
|
||||
String seriesName1 = test.getString("seriesName"); //111111111111111111111111
|
||||
String seriesGroupName = test.getString("seriesGroupName");
|
||||
String schemeName = test.getString("schemeName");
|
||||
String isAiLossManpower = test.getString("isAiLossManpower");
|
||||
String isHisManpower = test.getString("isHisManpower");
|
||||
String isLock = test.getString("isLock");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
|
||||
|
||||
GongShiDingSun.add(reportNo, lossSeqNo, taskId, createDate, manpowerSurveyPrice, idDcInsLossDetaillossManpowerItemList,
|
||||
auditDamagePrice, manpowerItemName, manpowerItemCode, manpowerDiscountPrice,
|
||||
remark, manpowerDiscount, multiaspectRuleDiscount, serialNo, manpowerGroupName,
|
||||
seriesName1, seriesGroupName, schemeName, isAiLossManpower, isHisManpower,
|
||||
isLock, insuranceCodes,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (operationRecordListlossManpowerItemList != null && operationRecordListlossManpowerItemList.size() != 0) {
|
||||
XiuGaiJiLu_.list("定损",lossSeqNo);
|
||||
for (Object o1 : operationRecordListlossManpowerItemList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLu.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossManpowerItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// 外修定损
|
||||
|
||||
JSONArray operationRecordListlossOuterFitsItemList = null;
|
||||
String idDcInsLossDetaillossOuterFitsItemList = "";
|
||||
|
||||
if (lossOuterFitsItemList != null && lossOuterFitsItemList.size() != 0) {
|
||||
WaiXiuXiangMuDingSun_.list("定损",lossSeqNo);
|
||||
for (Object o : lossOuterFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordListlossOuterFitsItemList = test.getJSONArray("operationRecordList");
|
||||
String outerGarage = test.getString("outerGarage");
|
||||
String createDate = test.getString("createDate");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
idDcInsLossDetaillossOuterFitsItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
String isHisOuterFits = test.getString("isHisOuterFits");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
Double lossCompanyAmount = test.getDouble("lossCompanyAmount");
|
||||
|
||||
WaiXiuXiangMuDingSun.add(reportNo, lossSeqNo, taskId, outerGarage, createDate, fitsSurveyPrice,
|
||||
idDcInsLossDetaillossOuterFitsItemList, auditDamagePrice, serialNo, fitsName, fitsCode, fitsReamrk,
|
||||
fitsMaterial, fitLabelCode, lossRemark, fitsFeeRateType, originalFitsDiscountPrice,
|
||||
originalFitsName, originalFitsCode, isHisOuterFits, isFitsUnique, fitsDiscount,
|
||||
fitsFee, fitsFeeRate, isLock, extendPrice, carLimitCount, dataSource,
|
||||
insuranceCodes, lossCompanyAmount,lossSeqNo+now);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (operationRecordListlossOuterFitsItemList != null && operationRecordListlossOuterFitsItemList.size() != 0) {
|
||||
XiuGaiJiLu_.list("定损",lossSeqNo);
|
||||
for (Object o1 : operationRecordListlossOuterFitsItemList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLu.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossOuterFitsItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//2.2.2.5. 沟通信息communicationList
|
||||
if (communicationList != null && communicationList.size() != 0) {
|
||||
GouTongXinXi_.list("定损",lossSeqNo);
|
||||
for (Object o : communicationList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String operatorName = test.getString("operatorName");
|
||||
String operatorUm1 = test.getString("operatorUm");// 111111111
|
||||
String operatorRole1 = test.getString("operatorRole"); //111111111111
|
||||
String createDate = test.getString("createDate");
|
||||
String opinion = test.getString("opinion");
|
||||
String opinionDescribe1 = test.getString("opinionDescribe");//111111111111111
|
||||
Integer dataSource = test.getInteger("dataSource");
|
||||
String idDcCommunication = test.getString("idDcCommunication");
|
||||
String os = test.getString("os");
|
||||
|
||||
GouTongXinXi.add(reportNo, lossSeqNo, taskId, operatorName, operatorUm1,
|
||||
operatorRole1, createDate, opinion, opinionDescribe1, dataSource,
|
||||
idDcCommunication, os,lossSeqNo+now);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
if (rescueFeeInfo != null) {
|
||||
Double trailerStartingFare = rescueFeeInfo.getDouble("trailerStartingFare");
|
||||
Double trailerMileagePrice = rescueFeeInfo.getDouble("trailerMileagePrice");
|
||||
Double trailerOverMileage = rescueFeeInfo.getDouble("trailerOverMileage");
|
||||
Double craneStartingFare = rescueFeeInfo.getDouble("craneStartingFare");
|
||||
Double cranePrice = rescueFeeInfo.getDouble("cranePrice");
|
||||
Double craneWorkTime = rescueFeeInfo.getDouble("craneWorkTime");
|
||||
Double otherFee = rescueFeeInfo.getDouble("otherFee");
|
||||
String remark = rescueFeeInfo.getString("remark");
|
||||
String insuranceCodes = rescueFeeInfo.getString("insuranceCodes");
|
||||
ShiJiuFei_.list("定损",lossSeqNo);
|
||||
|
||||
ShiJiuFei.add(reportNo, lossSeqNo, taskId, trailerStartingFare,
|
||||
trailerMileagePrice, trailerOverMileage, craneStartingFare,
|
||||
cranePrice, craneWorkTime, otherFee, remark,
|
||||
insuranceCodes,lossSeqNo+now);
|
||||
}
|
||||
|
||||
|
||||
Integer fxxx = 1;
|
||||
//2.2.2.9. 风险信息列表、锁死规则列表 riskList
|
||||
if (riskList != null && riskList.size() != 0) {
|
||||
FengXianXinXi_.list("定损",lossSeqNo);
|
||||
for (Object o : riskList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String ruleName = test.getString("ruleName");
|
||||
Double overAmount = test.getDouble("overAmount");
|
||||
String lossName = test.getString("lossName");
|
||||
String requestId = test.getString("requestId");
|
||||
String riskClass = test.getString("riskClass");
|
||||
String riskCategory = test.getString("riskCategory");
|
||||
String riskClassCode = test.getString("riskClassCode");
|
||||
String riskCategoryCode = test.getString("riskCategoryCode");
|
||||
|
||||
FengXianXinXi.add(reportNo, lossSeqNo, taskId, ruleName, overAmount, lossName,
|
||||
requestId, riskClass, riskCategory, riskClassCode, riskCategoryCode,fxxx,lossSeqNo+now);
|
||||
|
||||
fxxx += 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Integer wxdd = 1;
|
||||
//2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
if (repairOutsideFitList != null && repairOutsideFitList.size() != 0) {
|
||||
WaiXiuDingDanXinXi_.list("定损",lossSeqNo);
|
||||
for (Object o : repairOutsideFitList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String idClmOuterRepairDetail = test.getString("idClmOuterRepairDetail");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String lossCompanyAmount = test.getString("lossCompanyAmount");
|
||||
String lossAmountInsurance = test.getString("lossAmountInsurance");
|
||||
String remark1 = test.getString("remark"); //11111111111111
|
||||
String status = test.getString("status");
|
||||
String idRepairOutsideInfo = test.getString("idRepairOutsideInfo");
|
||||
String garageName1 = test.getString("garageName"); //11111111111111
|
||||
String lossAmountReference = test.getString("lossAmountReference");
|
||||
|
||||
WaiXiuDingDanXinXi.add(reportNo, lossSeqNo, taskId, idClmOuterRepairDetail, fitsName,
|
||||
fitsCode, lossCompanyAmount, lossAmountInsurance, remark1,
|
||||
status, idRepairOutsideInfo, garageName1, lossAmountReference,wxdd,lossSeqNo+now);
|
||||
wxdd += 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("200"+ "请求成功" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("code", 200);
|
||||
object.put("msg", "请求成功");
|
||||
object.put("respData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
return object;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,496 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.*;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import static com.example.sso.util.YiZhangUtil.verifySignature;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
|
||||
public class PushDataQuoteGuide {
|
||||
|
||||
|
||||
@PostMapping("/api/quoteGuide/pushData")
|
||||
public JSONObject pushdata(@RequestBody JSONObject data) throws Exception {
|
||||
String now = TimeUtil.now();
|
||||
log.info("我是quoteGuide参数 " + data.toJSONString());
|
||||
String S = data.toJSONString();
|
||||
|
||||
|
||||
// 提交任务到线程池
|
||||
|
||||
// 在线程池中处理业务逻辑
|
||||
//String S = "{\"reqData\":\"eyJiYXNlSW5mbyI6eyJyZXBvcnRObyI6IjEyMjIyMjIyMjIiLCJpbnN1cmFuY2VDb2RlTGlzdCI6IjEyMzQ1NSwzMzQ1NjQiLCJ2aW4iOiJMVk4xMjMxMjMxMiJ9LCJhZGRyZXNzIjoi5rWL6K+V5Zyw5Z2AIiwiY291bnR5Q29kZSI6IjEwMDExMCIsInByZUNoZWNrU3RhdGUiOiIyIn0=\",\"siteCode\":\"YJIC\",\"signature\":\"YVIxcXVqMkwzQTBaQ285em9wQy8yYVZmWVc2SEVjVnpVNmttQzdmVlFhY0I5U3ZvcnNnNkZxbEVRTzdnRDh6T05oOHkzZ2pGdUQxSkJPd2NZM2Y5Z05uWVBleElYRWZNV3FudXRCQ1RTaU5BSnNVWGZzb0thZUdtQ2RsdWhycXJMK0ZWWGkxblN6QlQ4a3VsZXBKa2NYcGlTUE1SdHlKYVRlNTAzN2FrT3JXUDFMTGYweGVsWitPV1ppOU5RTU5ualFvYTlqZGU2RzRXM1d5RE9qNnI4YzVhUnJvS2piRVJ2bFRDSzR6ZGRTL2tXaGU1OGRwdTllQmJNbzVvTVVPYUcvZjJLVjJTUXRwMzd0NkJla0t4MTY2TFkvN0V5dkM0azFRKzAvdkxDWEpqUVM1SlllbG5tckhjZnF2UVpCb0JEN0I5YzBFcWZOcjZ0K01uMDFtbFJRPT0=\"}";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
JSONObject jsonObject1 = JSON.parseObject(S);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("reqData");
|
||||
String siteCode = jsonObject1.getString("siteCode");
|
||||
|
||||
CompletableFuture.runAsync(() -> {
|
||||
boolean b = false;
|
||||
try {
|
||||
b = verifySignature(siteCode + respData, KEY, signature);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (b == true) {
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
log.info("我是转换后quoteGuide参数 " + result);
|
||||
|
||||
JSONObject jsonObject = JSON.parseObject(result);
|
||||
|
||||
//2.4.2.1. 配件定损项目lossFitsItemList
|
||||
JSONArray lossFitsItemList = jsonObject.getJSONArray("lossFitsItemList");
|
||||
|
||||
//2.4.2.1.2.4.2.2. 工时定损项目lossManpowerItemList
|
||||
JSONArray lossManpowerItemList = jsonObject.getJSONArray("lossManpowerItemList");
|
||||
|
||||
//22.4.2.3. 外修定损项目lossOuterFitsItemList
|
||||
JSONArray lossOuterFitsItemList = jsonObject.getJSONArray("lossOuterFitsItemList");
|
||||
|
||||
// 2.2.2.5. 沟通信息communicationList
|
||||
JSONArray communicationList = jsonObject.getJSONArray("communicationList");
|
||||
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
JSONObject rescueFeeInfo = jsonObject.getJSONObject("rescueFeeInfo");
|
||||
|
||||
// 2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
JSONArray repairOutsideFitList = jsonObject.getJSONArray("repairOutsideFitList");
|
||||
|
||||
|
||||
String data_sources1 = "";
|
||||
|
||||
|
||||
String reportNo = jsonObject.getString("reportNo");
|
||||
String lossSeqNo = jsonObject.getString("lossSeqNo");
|
||||
String taskId = jsonObject.getString("taskId");
|
||||
Double rescueFee = jsonObject.getDouble("rescueFee");
|
||||
Double verifyReduce = jsonObject.getDouble("verifyReduce");
|
||||
Double actualValue = jsonObject.getDouble("actualValue");
|
||||
Double surplusValue = jsonObject.getDouble("surplusValue");
|
||||
String auditType = jsonObject.getString("auditType");
|
||||
String operatorRole = jsonObject.getString("operatorRole");
|
||||
String operatorUm = jsonObject.getString("operatorUm");
|
||||
String opinionDescribe = jsonObject.getString("opinionDescribe");
|
||||
Double guideAmount = jsonObject.getDouble("guideAmount");
|
||||
String lossPosition2 = jsonObject.getString("lossPosition2");
|
||||
String pushQuoteInfoId = jsonObject.getString("pushQuoteInfoId");
|
||||
String pushQuoteDate = jsonObject.getString("pushQuoteDate");
|
||||
if (operatorRole.equals("3")) {
|
||||
data_sources1 = "核价";
|
||||
}
|
||||
if (operatorRole.equals("2")) {
|
||||
data_sources1 = "核损";
|
||||
}
|
||||
HeJiaHeSunJieGuo_.list(data_sources1,lossSeqNo);
|
||||
|
||||
HeJiaHeSunJieGuo.add(reportNo, lossSeqNo, taskId, rescueFee, verifyReduce,
|
||||
actualValue, surplusValue, auditType, operatorRole,
|
||||
operatorUm, opinionDescribe, guideAmount, lossPosition2,
|
||||
pushQuoteInfoId, pushQuoteDate,data_sources1,lossSeqNo+now);
|
||||
|
||||
//配件定损项目lossFitsItemList
|
||||
JSONArray operationRecordList = null;
|
||||
String idDcInsLossDetaillossFitsItemList = "";
|
||||
if (lossFitsItemList != null && lossFitsItemList.size() != 0) {
|
||||
PeiJianDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
|
||||
for (Object o : lossFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordList = test.getJSONArray("operationRecordList");
|
||||
Integer audit = test.getInteger("audit");
|
||||
Integer recycle = test.getInteger("recycle");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Integer fitsFeeRateTypeEx = test.getInteger("fitsFeeRateTypeEx");
|
||||
String createDate = test.getString("createDate");
|
||||
Double adjustFitsFee = test.getDouble("adjustFitsFee");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
Integer fitsCount = test.getInteger("fitsCount");
|
||||
idDcInsLossDetaillossFitsItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Double reduceRemnant = test.getDouble("reduceRemnant");
|
||||
Double verifyReduce2 = test.getDouble("verifyReduce"); //111111111111111111111111
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double upperLimitPrice = test.getDouble("upperLimitPrice");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String isAiLossFits = test.getString("isAiLossFits");
|
||||
String isHisFits = test.getString("isHisFits");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
String isMultipleFitsUnique = test.getString("isMultipleFitsUnique");
|
||||
Double auditPrice = test.getDouble("auditPrice");
|
||||
|
||||
|
||||
PeiJianDingSunTwoFour.add(reportNo, lossSeqNo, taskId, audit, recycle, fitsFeeRateType,
|
||||
fitsFeeRateTypeEx, createDate, adjustFitsFee, fitsSurveyPrice, fitsCount,
|
||||
idDcInsLossDetaillossFitsItemList, auditDamagePrice, reduceRemnant, verifyReduce2, fitsName,
|
||||
fitsCode, originalFitsName, originalFitsCode, originalFitsDiscountPrice,
|
||||
fitsFeeRate, fitLabelCode, lossRemark, serialNo, isFitsUnique, upperLimitPrice,
|
||||
fitsFee, fitsDiscount, fitsReamrk, fitsMaterial, isAiLossFits, isHisFits,
|
||||
isLock, extendPrice, carLimitCount, dataSource, insuranceCodes,
|
||||
isMultipleFitsUnique,data_sources1,auditPrice,lossSeqNo+now);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (operationRecordList != null && operationRecordList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice1 = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossFitsItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice1,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
JSONArray operationRecordListlossManpowerItemList = null;
|
||||
String idDcInsLossDetaillossManpowerItemList = "";
|
||||
//2.2.2.2. 工时定损项目
|
||||
if (lossManpowerItemList != null && lossManpowerItemList.size() != 0) {
|
||||
GongShiDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : lossManpowerItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordListlossManpowerItemList = test.getJSONArray("operationRecordList");
|
||||
String createDate = test.getString("createDate");
|
||||
Double manpowerSurveyPrice = test.getDouble("manpowerSurveyPrice");
|
||||
idDcInsLossDetaillossManpowerItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
String manpowerItemName = test.getString("manpowerItemName");
|
||||
String manpowerItemCode = test.getString("manpowerItemCode");
|
||||
Double manpowerDiscountPrice = test.getDouble("manpowerDiscountPrice");
|
||||
String remark = test.getString("remark");
|
||||
Double manpowerDiscount = test.getDouble("manpowerDiscount");
|
||||
Double multiaspectRuleDiscount = test.getDouble("multiaspectRuleDiscount");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String manpowerGroupName = test.getString("manpowerGroupName");
|
||||
String seriesName1 = test.getString("seriesName"); //111111111111111111111111
|
||||
String seriesGroupName = test.getString("seriesGroupName");
|
||||
String schemeName = test.getString("schemeName");
|
||||
String isAiLossManpower = test.getString("isAiLossManpower");
|
||||
String isHisManpower = test.getString("isHisManpower");
|
||||
String isLock = test.getString("isLock");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
|
||||
|
||||
GongShiDingSunTwoFour.add(reportNo, lossSeqNo, taskId, createDate, manpowerSurveyPrice, idDcInsLossDetaillossManpowerItemList,
|
||||
auditDamagePrice, manpowerItemName, manpowerItemCode, manpowerDiscountPrice,
|
||||
remark, manpowerDiscount, multiaspectRuleDiscount, serialNo, manpowerGroupName,
|
||||
seriesName1, seriesGroupName, schemeName, isAiLossManpower, isHisManpower,
|
||||
isLock, insuranceCodes,data_sources1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (operationRecordListlossManpowerItemList != null && operationRecordListlossManpowerItemList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordListlossManpowerItemList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossManpowerItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 外修定损
|
||||
|
||||
JSONArray operationRecordListlossOuterFitsItemList = null;
|
||||
String idDcInsLossDetaillossOuterFitsItemList = "";
|
||||
if (lossOuterFitsItemList != null && lossOuterFitsItemList.size() != 0) {
|
||||
WaiXiuXiangMuDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : lossOuterFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
operationRecordListlossOuterFitsItemList = test.getJSONArray("operationRecordList");
|
||||
String outerGarage = test.getString("outerGarage");
|
||||
String createDate = test.getString("createDate");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
idDcInsLossDetaillossOuterFitsItemList = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
String isHisOuterFits = test.getString("isHisOuterFits");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
Double lossCompanyAmount = test.getDouble("lossCompanyAmount");
|
||||
|
||||
WaiXiuXiangMuDingSunTwoFour.add(reportNo, lossSeqNo, taskId, outerGarage, createDate, fitsSurveyPrice,
|
||||
idDcInsLossDetaillossOuterFitsItemList, auditDamagePrice, serialNo, fitsName, fitsCode, fitsReamrk,
|
||||
fitsMaterial, fitLabelCode, lossRemark, fitsFeeRateType, originalFitsDiscountPrice,
|
||||
originalFitsName, originalFitsCode, isHisOuterFits, isFitsUnique, fitsDiscount,
|
||||
fitsFee, fitsFeeRate, isLock, extendPrice, carLimitCount, dataSource,
|
||||
insuranceCodes, lossCompanyAmount,data_sources1,lossSeqNo+now);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (operationRecordListlossOuterFitsItemList != null && operationRecordListlossOuterFitsItemList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordListlossOuterFitsItemList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetaillossOuterFitsItemList, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1,lossSeqNo+now);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//2.2.2.5. 沟通信息communicationList
|
||||
if (communicationList != null && communicationList.size() != 0) {
|
||||
GouTongJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : communicationList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String operatorName = test.getString("operatorName");
|
||||
String operatorUm1 = test.getString("operatorUm");// 111111111
|
||||
String operatorRole1 = test.getString("operatorRole"); //111111111111
|
||||
String createDate = test.getString("createDate");
|
||||
String opinion = test.getString("opinion");
|
||||
String opinionDescribe1 = test.getString("opinionDescribe");//111111111111111
|
||||
Integer dataSource = test.getInteger("dataSource");
|
||||
String idDcCommunication = test.getString("idDcCommunication");
|
||||
String os = test.getString("os");
|
||||
|
||||
GouTongJiLuTwoFour.add(reportNo, lossSeqNo, taskId, operatorName, operatorUm1,
|
||||
operatorRole1, createDate, opinion, opinionDescribe1, dataSource,
|
||||
idDcCommunication, os,data_sources1,lossSeqNo+now);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//反渗漏结果
|
||||
JSONObject leakageMangementResult = jsonObject.getJSONObject("leakageMangementResult");
|
||||
JSONArray riskList = leakageMangementResult.getJSONArray("riskList");
|
||||
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
if (rescueFeeInfo != null) {
|
||||
Double trailerStartingFare = rescueFeeInfo.getDouble("trailerStartingFare");
|
||||
Double trailerMileagePrice = rescueFeeInfo.getDouble("trailerMileagePrice");
|
||||
Double trailerOverMileage = rescueFeeInfo.getDouble("trailerOverMileage");
|
||||
Double craneStartingFare = rescueFeeInfo.getDouble("craneStartingFare");
|
||||
Double cranePrice = rescueFeeInfo.getDouble("cranePrice");
|
||||
Double craneWorkTime = rescueFeeInfo.getDouble("craneWorkTime");
|
||||
Double otherFee = rescueFeeInfo.getDouble("otherFee");
|
||||
String remark = rescueFeeInfo.getString("remark");
|
||||
String insuranceCodes = rescueFeeInfo.getString("insuranceCodes");
|
||||
ShiJiuFeiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
|
||||
ShiJiuFeiTwoFour.add(reportNo, lossSeqNo, taskId, trailerStartingFare,
|
||||
trailerMileagePrice, trailerOverMileage, craneStartingFare,
|
||||
cranePrice, craneWorkTime, otherFee, remark,
|
||||
insuranceCodes,data_sources1,lossSeqNo+now);
|
||||
}
|
||||
Integer fxxx = 1;
|
||||
//2.2.2.9. 风险信息列表、锁死规则列表 riskList
|
||||
if (riskList != null && riskList.size() != 0) {
|
||||
FengXianXinXiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : riskList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String ruleName = test.getString("ruleName");
|
||||
Double overAmount = test.getDouble("overAmount");
|
||||
String lossName = test.getString("lossName");
|
||||
String requestId = test.getString("requestId");
|
||||
String riskClass = test.getString("riskClass");
|
||||
String riskCategory = test.getString("riskCategory");
|
||||
String riskClassCode = test.getString("riskClassCode");
|
||||
String riskCategoryCode = test.getString("riskCategoryCode");
|
||||
String isConfirmRisk = test.getString("isConfirmRisk");
|
||||
|
||||
FengXianXinXiTwoFour.add(reportNo, lossSeqNo, taskId, ruleName, overAmount, lossName,
|
||||
requestId, riskClass, riskCategory, riskClassCode, riskCategoryCode, isConfirmRisk,
|
||||
data_sources1,fxxx,lossSeqNo+now);
|
||||
fxxx += 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Integer wxdd = 1;
|
||||
//2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
if (repairOutsideFitList != null && repairOutsideFitList.size() != 0) {
|
||||
WaiXiuDingDanXinXiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : repairOutsideFitList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String idClmOuterRepairDetail = test.getString("idClmOuterRepairDetail");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String lossCompanyAmount = test.getString("lossCompanyAmount");
|
||||
String lossAmountInsurance = test.getString("lossAmountInsurance");
|
||||
String remark1 = test.getString("remark"); //11111111111111
|
||||
String status = test.getString("status");
|
||||
String idRepairOutsideInfo = test.getString("idRepairOutsideInfo");
|
||||
String garageName1 = test.getString("garageName"); //11111111111111
|
||||
String lossAmountReference = test.getString("lossAmountReference");
|
||||
|
||||
WaiXiuDingDanXinXiTwoFour.add(reportNo, lossSeqNo, taskId, idClmOuterRepairDetail, fitsName,
|
||||
fitsCode, lossCompanyAmount, lossAmountInsurance, remark1,
|
||||
status, idRepairOutsideInfo, garageName1, lossAmountReference,data_sources1,wxdd,lossSeqNo+now);
|
||||
wxdd += 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("200"+ "请求成功" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("code", 200);
|
||||
object.put("msg", "请求成功");
|
||||
object.put("respData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
return object;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
public class QuoTeGuidePage {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
|
||||
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
//
|
||||
// jsonObject.put("insuranceCompanyNo", "YJIC");
|
||||
// jsonObject.put("accessUm", "ZhuLiting");
|
||||
// jsonObject.put("lossSeqNo", "20250221000010szcsrw");
|
||||
// jsonObject.put("taskId", "ShG-20250221000010szcsrw001");
|
||||
//
|
||||
//
|
||||
// List<Object> jsonArray = new ArrayList<>();
|
||||
// JSONObject provinceCode = new JSONObject();
|
||||
// provinceCode.put("provinceCode", "110000");
|
||||
// jsonArray.add(provinceCode);
|
||||
// jsonObject.put("lossAreaList", jsonArray);
|
||||
|
||||
// String jsonString = jsonObject.toJSONString();
|
||||
String jsonString ="{\n" +
|
||||
"\n" +
|
||||
"\"accidentDate\": \"2021-07-31 18:00:00\",\n" +
|
||||
"\"actualValue\": 0.00,\n" +
|
||||
"\"carMark\": \"陕DD15\",\n" +
|
||||
"\"carMarkType\": \"02\",\n" +
|
||||
"\"damageType\": \"02\",\n" +
|
||||
"\"insuranceCodes\": \"C060101600,C51100\",\n" +
|
||||
"\"insuredName\": \"师\",\n" +
|
||||
"\"orgName\": \"安诚财产保险股份有限公司陕西分公司\",\n" +
|
||||
"\"reportNo\": \"BA030061002021005967\",\n" +
|
||||
"\"rescueFeeInfo\": {\n" +
|
||||
"\"cranePrice\": 0,\n" +
|
||||
"\"craneStartingFare\": 0,\n" +
|
||||
"\"craneWorkTime\": 0,\n" +
|
||||
"\"otherFee\": 0,\n" +
|
||||
"\"trailerMileagePrice\": 0,\n" +
|
||||
"\"trailerOverMileage\": 0,\n" +
|
||||
"\"trailerStartingFare\": 0\n" +
|
||||
"},\n" +
|
||||
"\n" +
|
||||
"\"communicationList\": [],\n" +
|
||||
"\"extensionBtnList\": [\n" +
|
||||
"{\n" +
|
||||
"\"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005967\",\n" +
|
||||
"\"btnLocation\": 0,\n" +
|
||||
"\"btnName\": \"流程图\",\n" +
|
||||
"\"openType\": 1,\n" +
|
||||
"\"seqNo\": 2\n" +
|
||||
"}\n" +
|
||||
"],\n" +
|
||||
"\"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
"\n" +
|
||||
"\"lossSeqNo\": \"21000702225\",\n" +
|
||||
"\"lossSeqNoHis\": \"\",\n" +
|
||||
"\"operatorDptCde\": \"61\",\n" +
|
||||
"\"operatorName\": \"李\",\n" +
|
||||
"\"operatorRole\": \"27\",\n" +
|
||||
"\"operatorUm\": \"1610073\"}\n";
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.quoteGuidepage(jsonString1);
|
||||
JSONObject jsonObject1 = JSON.parseObject(newlossplatform);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("respData");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
String code = jsonObject1.getString("code");
|
||||
boolean b = YiZhangUtil.verifySignature(code + msg + respData, KEY, signature);
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
System.out.println(result);
|
||||
System.out.println(b);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
57
src/main/java/com/example/sso/newcontroller/XiuGaiGuiZe.java
Normal file
57
src/main/java/com/example/sso/newcontroller/XiuGaiGuiZe.java
Normal file
@ -0,0 +1,57 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class XiuGaiGuiZe {
|
||||
@PostMapping("/xuigai")
|
||||
public JSONObject xiugaiu(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是修改规则参数 " + data.toJSONString());
|
||||
String jsonString = data.toJSONString();
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
// String jsonString = "{\n" +
|
||||
// "\t\"insuranceCompanyNo\" : \"YJIC\",\n" +
|
||||
// "\t\"operatorUm\" : \"03\",\n" +
|
||||
// "\t\"lossSeqNo\" : \"250708016901\",\n" +
|
||||
// "\t\"garageCode\" : \"YJIC110100106214\",\n" +
|
||||
// "\t\"carDealerCode\" : \"\",\n" +
|
||||
// "\t\"idDcInsuranceGarageRule\" : \"\"\n" +
|
||||
// "}\n";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
|
||||
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
JSONObject redis = new JSONObject();
|
||||
redis.put("reqData",s);
|
||||
redis.put("siteCode",id);
|
||||
redis.put("signature",signatureData);
|
||||
String jsonString2 = redis.toJSONString();
|
||||
String key = YiZhangUtil.key(jsonString2);
|
||||
|
||||
System.out.println("rediskey " + key);
|
||||
JSONObject jsonObject = JSON.parseObject(key);
|
||||
|
||||
String newlossplatform1 = YiZhangUtil.newlossplatform(id, s, signatureData);
|
||||
String replace = newlossplatform1.replace("GET ", "");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("url",replace);
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonObject1;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class XiuGaiGuiZe1 {
|
||||
@PostMapping("/xuigai1")
|
||||
public JSONObject xiugaiu(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是修改规则参数 " + data.toJSONString());
|
||||
String jsonString = data.toJSONString();
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
// String jsonString = "{\n" +
|
||||
// "\t\"insuranceCompanyNo\" : \"YJIC\",\n" +
|
||||
// "\t\"operatorUm\" : \"03\",\n" +
|
||||
// "\t\"lossSeqNo\" : \"250708016901\",\n" +
|
||||
// "\t\"garageCode\" : \"YJIC110100106214\",\n" +
|
||||
// "\t\"carDealerCode\" : \"\",\n" +
|
||||
// "\t\"idDcInsuranceGarageRule\" : \"\"\n" +
|
||||
// "}\n";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
|
||||
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
JSONObject redis = new JSONObject();
|
||||
redis.put("reqData",s);
|
||||
redis.put("siteCode",id);
|
||||
redis.put("signature",signatureData);
|
||||
String jsonString2 = redis.toJSONString();
|
||||
String key = YiZhangUtil.key(jsonString2);
|
||||
|
||||
System.out.println("rediskey " + key);
|
||||
JSONObject jsonObject = JSON.parseObject(key);
|
||||
|
||||
String newlossplatform1 = YiZhangUtil.newlossplatform1(id, s, signatureData);
|
||||
String replace = newlossplatform1.replace("GET ", "");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("url",replace);
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonObject1;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class XiuGaiGuiZe3 {
|
||||
@PostMapping("/xuigai2")
|
||||
public JSONObject xiugaiu(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是修改规则参数 " + data.toJSONString());
|
||||
String jsonString = data.toJSONString();
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
// String jsonString = "{\n" +
|
||||
// "\t\"insuranceCompanyNo\" : \"YJIC\",\n" +
|
||||
// "\t\"operatorUm\" : \"03\",\n" +
|
||||
// "\t\"lossSeqNo\" : \"250708016901\",\n" +
|
||||
// "\t\"garageCode\" : \"YJIC110100106214\",\n" +
|
||||
// "\t\"carDealerCode\" : \"\",\n" +
|
||||
// "\t\"idDcInsuranceGarageRule\" : \"\"\n" +
|
||||
// "}\n";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
|
||||
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
JSONObject redis = new JSONObject();
|
||||
redis.put("reqData",s);
|
||||
redis.put("siteCode",id);
|
||||
redis.put("signature",signatureData);
|
||||
String jsonString2 = redis.toJSONString();
|
||||
String key = YiZhangUtil.key(jsonString2);
|
||||
|
||||
System.out.println("rediskey " + key);
|
||||
JSONObject jsonObject = JSON.parseObject(key);
|
||||
|
||||
String newlossplatform1 = YiZhangUtil.newlossplatform2(id, s, signatureData);
|
||||
String replace = newlossplatform1.replace("GET ", "");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("url",replace);
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonObject1;
|
||||
}
|
||||
}
|
||||
146
src/main/java/com/example/sso/newcontroller/XiuGaiGuiZe4.java
Normal file
146
src/main/java/com/example/sso/newcontroller/XiuGaiGuiZe4.java
Normal file
@ -0,0 +1,146 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class XiuGaiGuiZe4 {
|
||||
@PostMapping("/xiugaiguize4")
|
||||
public JSONObject PageTwoOne(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("xiugaiguize4 " + data.toJSONString());
|
||||
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
// String string = data.getString("lossAreaList");
|
||||
// JSONArray jsonArray = JSON.parseArray(string);
|
||||
// data.put("lossAreaList",jsonArray);
|
||||
String jsonString = data.toJSONString();
|
||||
log.info("转换后的代码 " + jsonString);
|
||||
|
||||
// String jsonString ="{\n" +
|
||||
// " \"accessRole\": \"45\",\n" +
|
||||
// " \"accidentDate\": \"2021-07-25 16:20:00\",\n" +
|
||||
// " \"actualValue\": 14065.00,\n" +
|
||||
// " \"carMark\": \"晋H5748\",\n" +
|
||||
// " \"carMarkType\": \"01\",\n" +
|
||||
// " \"caseType\": \"1\",\n" +
|
||||
// " \"damageType\": \"01\",\n" +
|
||||
// " \"insuranceCodeList\": \"C060101200,C060101310\",\n" +
|
||||
// " \"insuranceCodes\": \"C060101200\",\n" +
|
||||
// " \"insuredName\": \"忠运输装卸服务队\",\n" +
|
||||
// " \"isYFast\": \"0\",\n" +
|
||||
// " \"orgName\": \"安诚财产保险股份有限公司榆林中心支公司\",\n" +
|
||||
// " \"reportNo\": \"BA030061002021005755\",\n" +
|
||||
// " \"rescueFeeInfo\": {\n" +
|
||||
// " \"cranePrice\": 0,\n" +
|
||||
// " \"craneStartingFare\": 0,\n" +
|
||||
// " \"craneWorkTime\": 0,\n" +
|
||||
// " \"otherFee\": 0,\n" +
|
||||
// " \"trailerMileagePrice\": 0,\n" +
|
||||
// " \"trailerOverMileage\": 0,\n" +
|
||||
// " \"trailerStartingFare\": 0\n" +
|
||||
// " },\n" +
|
||||
// " \"trafficMileage\": 20,\n" +
|
||||
// " \"vin\": \"LG6ZDCNH0GY2\",\n" +
|
||||
// " \n" +
|
||||
// " \"communicationList\": [],\n" +
|
||||
// " \"extensionBtnList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005755\",\n" +
|
||||
// " \"btnLocation\": 1,\n" +
|
||||
// " \"btnName\": \"流程图\",\n" +
|
||||
// " \"openType\": 1,\n" +
|
||||
// " \"seqNo\": 2\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
// " \"isSurvey\": \"N\",\n" +
|
||||
// " \"leakageMangement\": {\n" +
|
||||
// " \"caseTimes\": 1\n" +
|
||||
// " },\n" +
|
||||
// " \"lossFitsItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"adjustFitsFee\": 0.00,\n" +
|
||||
// " \"audit\": 0,\n" +
|
||||
// " \"auditDamagePrice\": 540.00,\n" +
|
||||
// " \"auditPrice\": 600.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"fitsCount\": 1,\n" +
|
||||
// " \"fitsFeeRateTypeEx\": 3,\n" +
|
||||
// " \"fitsName\": \"前挡风玻璃\",\n" +
|
||||
// " \"fitsSurveyPrice\": 1250.00,\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCBD8A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"recycle\": 0,\n" +
|
||||
// " \"reduceRemnant\": 0.00,\n" +
|
||||
// " \"verifyReduce\": 0.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossManpowerItemList\": [\n" +
|
||||
// " {\n" +
|
||||
// " \"auditDamagePrice\": 500.00,\n" +
|
||||
// " \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
// " \"idDcInsLossDetail\": \"C88A4CB3FCE18A4FE0530438210AE9BF\",\n" +
|
||||
// " \"isDel\": \"N\",\n" +
|
||||
// " \"manpowerItemName\": \"拆装更换发动机受损件 水箱 中冷器 风圈\",\n" +
|
||||
// " \"manpowerSurveyPrice\": 1000.00\n" +
|
||||
// " }\n" +
|
||||
// " ],\n" +
|
||||
// " \"lossOuterFitsItemList\": [],\n" +
|
||||
// " \"lossSeqNo\": \"21000678297\",\n" +
|
||||
// " \"lossSeqNoHis\": \"\",\n" +
|
||||
// " \"operatorDptCde\": \"61\",\n" +
|
||||
// " \"operatorName\": \"李\",\n" +
|
||||
// " \"operatorRole\": \"47\",\n" +
|
||||
// " \"operatorUm\": \"161021491\",\n" +
|
||||
// " \"opinionDescribe\": \"双证在查勘前端资料,总价协商13000,工时费低请老师调整按13000审核\",\n" +
|
||||
// " \"lossAreaList\":[{\n" +
|
||||
// " \"provinceCode\":\"610000\",\n" +
|
||||
// " \"cityList\": [\n" +
|
||||
// " \"610100\",\n" +
|
||||
// " \"610200\",\n" +
|
||||
// " \"610300\",\n" +
|
||||
// " \"610400\",\n" +
|
||||
// " \"610500\",\n" +
|
||||
// " \"610600\",\n" +
|
||||
// " \"610700\",\n" +
|
||||
// " \"610800\",\n" +
|
||||
// " \"610900\",\n" +
|
||||
// " \"611000\"\n" +
|
||||
// " ]\n" +
|
||||
// " }],\n" +
|
||||
// " \"readonly\": \"Y\"\n" +
|
||||
// "}\n" ;
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.guize4(jsonString1);
|
||||
String replace = newlossplatform.replace("GET ", "");
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("url",replace);
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonObject1;
|
||||
}
|
||||
}
|
||||
465
src/main/java/com/example/sso/newcontroller/test.java
Normal file
465
src/main/java/com/example/sso/newcontroller/test.java
Normal file
@ -0,0 +1,465 @@
|
||||
package com.example.sso.newcontroller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.*;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import static com.example.sso.util.YiZhangUtil.verifySignature;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class test {
|
||||
/* private final ExecutorService executorService = Executors.newFixedThreadPool(5);
|
||||
|
||||
@PostMapping("/api/quoteGuide/pushData")
|
||||
public JSONObject pushdata(@RequestBody JSONObject data) throws Exception {
|
||||
log.info("我是quoteGuide参数 " + data.toJSONString());
|
||||
String S = data.toJSONString();
|
||||
|
||||
|
||||
// 提交任务到线程池
|
||||
executorService.submit(() -> {
|
||||
// 在线程池中处理业务逻辑
|
||||
//String S = "{\"reqData\":\"eyJiYXNlSW5mbyI6eyJyZXBvcnRObyI6IjEyMjIyMjIyMjIiLCJpbnN1cmFuY2VDb2RlTGlzdCI6IjEyMzQ1NSwzMzQ1NjQiLCJ2aW4iOiJMVk4xMjMxMjMxMiJ9LCJhZGRyZXNzIjoi5rWL6K+V5Zyw5Z2AIiwiY291bnR5Q29kZSI6IjEwMDExMCIsInByZUNoZWNrU3RhdGUiOiIyIn0=\",\"siteCode\":\"YJIC\",\"signature\":\"YVIxcXVqMkwzQTBaQ285em9wQy8yYVZmWVc2SEVjVnpVNmttQzdmVlFhY0I5U3ZvcnNnNkZxbEVRTzdnRDh6T05oOHkzZ2pGdUQxSkJPd2NZM2Y5Z05uWVBleElYRWZNV3FudXRCQ1RTaU5BSnNVWGZzb0thZUdtQ2RsdWhycXJMK0ZWWGkxblN6QlQ4a3VsZXBKa2NYcGlTUE1SdHlKYVRlNTAzN2FrT3JXUDFMTGYweGVsWitPV1ppOU5RTU5ualFvYTlqZGU2RzRXM1d5RE9qNnI4YzVhUnJvS2piRVJ2bFRDSzR6ZGRTL2tXaGU1OGRwdTllQmJNbzVvTVVPYUcvZjJLVjJTUXRwMzd0NkJla0t4MTY2TFkvN0V5dkM0azFRKzAvdkxDWEpqUVM1SlllbG5tckhjZnF2UVpCb0JEN0I5YzBFcWZOcjZ0K01uMDFtbFJRPT0=\"}";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
JSONObject jsonObject1 = JSON.parseObject(S);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("reqData");
|
||||
String siteCode = jsonObject1.getString("siteCode");
|
||||
|
||||
boolean b = false;
|
||||
try {
|
||||
b = verifySignature(siteCode + respData, KEY, signature);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (b == true) {
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
log.info("我是转换后quoteGuide参数 " + result);
|
||||
|
||||
JSONObject jsonObject = JSON.parseObject(result);
|
||||
|
||||
//2.4.2.1. 配件定损项目lossFitsItemList
|
||||
JSONArray lossFitsItemList = jsonObject.getJSONArray("lossFitsItemList");
|
||||
|
||||
//2.4.2.1.2.4.2.2. 工时定损项目lossManpowerItemList
|
||||
JSONArray lossManpowerItemList = jsonObject.getJSONArray("lossManpowerItemList");
|
||||
|
||||
//22.4.2.3. 外修定损项目lossOuterFitsItemList
|
||||
JSONArray lossOuterFitsItemList = jsonObject.getJSONArray("lossOuterFitsItemList");
|
||||
|
||||
// 2.2.2.5. 沟通信息communicationList
|
||||
JSONArray communicationList = jsonObject.getJSONArray("communicationList");
|
||||
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
JSONObject rescueFeeInfo = jsonObject.getJSONObject("rescueFeeInfo");
|
||||
|
||||
// 2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
JSONArray repairOutsideFitList = jsonObject.getJSONArray("repairOutsideFitList");
|
||||
|
||||
|
||||
String data_sources1 = "";
|
||||
|
||||
|
||||
String reportNo = jsonObject.getString("reportNo");
|
||||
String lossSeqNo = jsonObject.getString("lossSeqNo");
|
||||
String taskId = jsonObject.getString("taskId");
|
||||
Double rescueFee = jsonObject.getDouble("rescueFee");
|
||||
Double verifyReduce = jsonObject.getDouble("verifyReduce");
|
||||
Double actualValue = jsonObject.getDouble("actualValue");
|
||||
Double surplusValue = jsonObject.getDouble("surplusValue");
|
||||
String auditType = jsonObject.getString("auditType");
|
||||
String operatorRole = jsonObject.getString("operatorRole");
|
||||
String operatorUm = jsonObject.getString("operatorUm");
|
||||
String opinionDescribe = jsonObject.getString("opinionDescribe");
|
||||
Double guideAmount = jsonObject.getDouble("guideAmount");
|
||||
String lossPosition2 = jsonObject.getString("lossPosition2");
|
||||
String pushQuoteInfoId = jsonObject.getString("pushQuoteInfoId");
|
||||
String pushQuoteDate = jsonObject.getString("pushQuoteDate");
|
||||
if (operatorRole.equals("3")) {
|
||||
data_sources1 = "核价";
|
||||
}
|
||||
if (operatorRole.equals("2")) {
|
||||
data_sources1 = "核损";
|
||||
}
|
||||
HeJiaHeSunJieGuo_.list(data_sources1,lossSeqNo);
|
||||
HeJiaHeSunJieGuo.add(reportNo, lossSeqNo, taskId, rescueFee, verifyReduce,
|
||||
actualValue, surplusValue, auditType, operatorRole,
|
||||
operatorUm, opinionDescribe, guideAmount, lossPosition2,
|
||||
pushQuoteInfoId, pushQuoteDate,data_sources1);
|
||||
|
||||
//配件定损项目lossFitsItemList
|
||||
if (lossFitsItemList != null && lossFitsItemList.size() != 0) {
|
||||
PeiJianDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : lossFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
JSONArray operationRecordList = test.getJSONArray("operationRecordList");
|
||||
Integer audit = test.getInteger("audit");
|
||||
Integer recycle = test.getInteger("recycle");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Integer fitsFeeRateTypeEx = test.getInteger("fitsFeeRateTypeEx");
|
||||
String createDate = test.getString("createDate");
|
||||
Double adjustFitsFee = test.getDouble("adjustFitsFee");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
Integer fitsCount = test.getInteger("fitsCount");
|
||||
String idDcInsLossDetail = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Double reduceRemnant = test.getDouble("reduceRemnant");
|
||||
Double verifyReduce2 = test.getDouble("verifyReduce"); //111111111111111111111111
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double upperLimitPrice = test.getDouble("upperLimitPrice");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String isAiLossFits = test.getString("isAiLossFits");
|
||||
String isHisFits = test.getString("isHisFits");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
String isMultipleFitsUnique = test.getString("isMultipleFitsUnique");
|
||||
Double auditPrice = test.getDouble("auditPrice");
|
||||
|
||||
|
||||
PeiJianDingSunTwoFour.add(reportNo, lossSeqNo, taskId, audit, recycle, fitsFeeRateType,
|
||||
fitsFeeRateTypeEx, createDate, adjustFitsFee, fitsSurveyPrice, fitsCount,
|
||||
idDcInsLossDetail, auditDamagePrice, reduceRemnant, verifyReduce2, fitsName,
|
||||
fitsCode, originalFitsName, originalFitsCode, originalFitsDiscountPrice,
|
||||
fitsFeeRate, fitLabelCode, lossRemark, serialNo, isFitsUnique, upperLimitPrice,
|
||||
fitsFee, fitsDiscount, fitsReamrk, fitsMaterial, isAiLossFits, isHisFits,
|
||||
isLock, extendPrice, carLimitCount, dataSource, insuranceCodes,
|
||||
isMultipleFitsUnique,data_sources1,auditPrice);
|
||||
|
||||
if (operationRecordList != null && operationRecordList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice1 = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetail, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice1,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//2.2.2.2. 工时定损项目
|
||||
if (lossManpowerItemList != null && lossManpowerItemList.size() != 0) {
|
||||
GongShiDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : lossManpowerItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
JSONArray operationRecordList = test.getJSONArray("operationRecordList");
|
||||
String createDate = test.getString("createDate");
|
||||
Double manpowerSurveyPrice = test.getDouble("manpowerSurveyPrice");
|
||||
String idDcInsLossDetail = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
String manpowerItemName = test.getString("manpowerItemName");
|
||||
String manpowerItemCode = test.getString("manpowerItemCode");
|
||||
Double manpowerDiscountPrice = test.getDouble("manpowerDiscountPrice");
|
||||
String remark = test.getString("remark");
|
||||
Double manpowerDiscount = test.getDouble("manpowerDiscount");
|
||||
Double multiaspectRuleDiscount = test.getDouble("multiaspectRuleDiscount");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String manpowerGroupName = test.getString("manpowerGroupName");
|
||||
String seriesName1 = test.getString("seriesName"); //111111111111111111111111
|
||||
String seriesGroupName = test.getString("seriesGroupName");
|
||||
String schemeName = test.getString("schemeName");
|
||||
String isAiLossManpower = test.getString("isAiLossManpower");
|
||||
String isHisManpower = test.getString("isHisManpower");
|
||||
String isLock = test.getString("isLock");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
|
||||
GongShiDingSunTwoFour.add(reportNo, lossSeqNo, taskId, createDate, manpowerSurveyPrice, idDcInsLossDetail,
|
||||
auditDamagePrice, manpowerItemName, manpowerItemCode, manpowerDiscountPrice,
|
||||
remark, manpowerDiscount, multiaspectRuleDiscount, serialNo, manpowerGroupName,
|
||||
seriesName1, seriesGroupName, schemeName, isAiLossManpower, isHisManpower,
|
||||
isLock, insuranceCodes,data_sources1);
|
||||
if (operationRecordList != null && operationRecordList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetail, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 外修定损
|
||||
|
||||
|
||||
if (lossOuterFitsItemList != null && lossOuterFitsItemList.size() != 0) {
|
||||
WaiXiuXiangMuDingSunTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : lossOuterFitsItemList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
JSONArray operationRecordList = test.getJSONArray("operationRecordList");
|
||||
String outerGarage = test.getString("outerGarage");
|
||||
String createDate = test.getString("createDate");
|
||||
Double fitsSurveyPrice = test.getDouble("fitsSurveyPrice");
|
||||
String idDcInsLossDetail = test.getString("idDcInsLossDetail");
|
||||
Double auditDamagePrice = test.getDouble("auditDamagePrice");
|
||||
Integer serialNo = test.getInteger("groupSerialNo");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String fitsReamrk = test.getString("fitsReamrk");
|
||||
String fitsMaterial = test.getString("fitsMaterial");
|
||||
String fitLabelCode = test.getString("fitLabelCode");
|
||||
String lossRemark = test.getString("lossRemark");
|
||||
Integer fitsFeeRateType = test.getInteger("fitsFeeRateType");
|
||||
Double originalFitsDiscountPrice = test.getDouble("originalFitsDiscountPrice");
|
||||
String originalFitsName = test.getString("originalFitsName");
|
||||
String originalFitsCode = test.getString("originalFitsCode");
|
||||
String isHisOuterFits = test.getString("isHisOuterFits");
|
||||
String isFitsUnique = test.getString("isFitsUnique");
|
||||
Double fitsDiscount = test.getDouble("fitsDiscount");
|
||||
Double fitsFee = test.getDouble("fitsFee");
|
||||
Double fitsFeeRate = test.getDouble("fitsFeeRate");
|
||||
String isLock = test.getString("isLock");
|
||||
Double extendPrice = test.getDouble("extendPrice");
|
||||
Integer carLimitCount = test.getInteger("carLimitCount");
|
||||
String dataSource = test.getString("dataSource");
|
||||
String insuranceCodes = test.getString("insuranceCodes");
|
||||
Double lossCompanyAmount = test.getDouble("lossCompanyAmount");
|
||||
|
||||
WaiXiuXiangMuDingSunTwoFour.add(reportNo, lossSeqNo, taskId, outerGarage, createDate, fitsSurveyPrice,
|
||||
idDcInsLossDetail, auditDamagePrice, serialNo, fitsName, fitsCode, fitsReamrk,
|
||||
fitsMaterial, fitLabelCode, lossRemark, fitsFeeRateType, originalFitsDiscountPrice,
|
||||
originalFitsName, originalFitsCode, isHisOuterFits, isFitsUnique, fitsDiscount,
|
||||
fitsFee, fitsFeeRate, isLock, extendPrice, carLimitCount, dataSource,
|
||||
insuranceCodes, lossCompanyAmount,data_sources1);
|
||||
if (operationRecordList != null && operationRecordList.size() != 0) {
|
||||
XiuGaiJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o1 : operationRecordList) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String orgName = test1.getString("orgName");
|
||||
String operatorName = test1.getString("operatorName");
|
||||
String operatorUm1 = test1.getString("operatorUm");//111111111111111111
|
||||
String operatorRole1 = test1.getString("operatorRole");//11111111111111111
|
||||
Double fitsSurveyPrice1 = test1.getDouble("fitsSurveyPrice");
|
||||
Double auditPrice = test1.getDouble("auditPrice");
|
||||
Double auditDamagePrice1 = test1.getDouble("auditDamagePrice");
|
||||
Double adjustFitsFee1 = test1.getDouble("adjustFitsFee");
|
||||
String createDate1 = test1.getString("createDate");
|
||||
Integer dataSource1 = test1.getInteger("dataSource");
|
||||
String idDcCarLossRecord = test1.getString("idDcCarLossRecord");
|
||||
Integer fitsCount1 = test1.getInteger("fitsCount");
|
||||
String isDel = test1.getString("isDel");
|
||||
Double reduceRemnant1 = test1.getDouble("reduceRemnant");
|
||||
Double verifyReduce1 = test1.getDouble("verifyReduce"); //1111111111111111
|
||||
|
||||
|
||||
XiuGaiJiLuTwoFour.add(reportNo, lossSeqNo, taskId, idDcInsLossDetail, operatorName,
|
||||
operatorUm1, operatorRole1, fitsSurveyPrice1, auditPrice,
|
||||
auditDamagePrice1, adjustFitsFee1, createDate1, dataSource1,
|
||||
idDcCarLossRecord, fitsCount1, isDel, reduceRemnant1, verifyReduce1, orgName,data_sources1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//2.2.2.5. 沟通信息communicationList
|
||||
if (communicationList != null && communicationList.size() != 0) {
|
||||
GouTongJiLuTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : communicationList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String operatorName = test.getString("operatorName");
|
||||
String operatorUm1 = test.getString("operatorUm");// 111111111
|
||||
String operatorRole1 = test.getString("operatorRole"); //111111111111
|
||||
String createDate = test.getString("createDate");
|
||||
String opinion = test.getString("opinion");
|
||||
String opinionDescribe1 = test.getString("opinionDescribe");//111111111111111
|
||||
Integer dataSource = test.getInteger("dataSource");
|
||||
String idDcCommunication = test.getString("idDcCommunication");
|
||||
String os = test.getString("os");
|
||||
|
||||
GouTongJiLuTwoFour.add(reportNo, lossSeqNo, taskId, operatorName, operatorUm1,
|
||||
operatorRole1, createDate, opinion, opinionDescribe1, dataSource,
|
||||
idDcCommunication, os,data_sources1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//反渗漏结果
|
||||
JSONObject leakageMangementResult = jsonObject.getJSONObject("leakageMangementResult");
|
||||
JSONArray riskList = leakageMangementResult.getJSONArray("riskList");
|
||||
|
||||
//2.2.2.7. 施救费rescueFeeInfo
|
||||
if (rescueFeeInfo != null) {
|
||||
Double trailerStartingFare = rescueFeeInfo.getDouble("trailerStartingFare");
|
||||
Double trailerMileagePrice = rescueFeeInfo.getDouble("trailerMileagePrice");
|
||||
Double trailerOverMileage = rescueFeeInfo.getDouble("trailerOverMileage");
|
||||
Double craneStartingFare = rescueFeeInfo.getDouble("craneStartingFare");
|
||||
Double cranePrice = rescueFeeInfo.getDouble("cranePrice");
|
||||
Double craneWorkTime = rescueFeeInfo.getDouble("craneWorkTime");
|
||||
Double otherFee = rescueFeeInfo.getDouble("otherFee");
|
||||
String remark = rescueFeeInfo.getString("remark");
|
||||
String insuranceCodes = rescueFeeInfo.getString("insuranceCodes");
|
||||
ShiJiuFeiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
ShiJiuFeiTwoFour.add(reportNo, lossSeqNo, taskId, trailerStartingFare,
|
||||
trailerMileagePrice, trailerOverMileage, craneStartingFare,
|
||||
cranePrice, craneWorkTime, otherFee, remark,
|
||||
insuranceCodes,data_sources1);
|
||||
}
|
||||
Integer fxxx = 1;
|
||||
//2.2.2.9. 风险信息列表、锁死规则列表 riskList
|
||||
if (riskList != null && riskList.size() != 0) {
|
||||
FengXianXinXiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : riskList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String ruleName = test.getString("ruleName");
|
||||
Double overAmount = test.getDouble("overAmount");
|
||||
String lossName = test.getString("lossName");
|
||||
String requestId = test.getString("requestId");
|
||||
String riskClass = test.getString("riskClass");
|
||||
String riskCategory = test.getString("riskCategory");
|
||||
String riskClassCode = test.getString("riskClassCode");
|
||||
String riskCategoryCode = test.getString("riskCategoryCode");
|
||||
String isConfirmRisk = test.getString("isConfirmRisk");
|
||||
|
||||
FengXianXinXiTwoFour.add(reportNo, lossSeqNo, taskId, ruleName, overAmount, lossName,
|
||||
requestId, riskClass, riskCategory, riskClassCode, riskCategoryCode, isConfirmRisk,
|
||||
data_sources1,fxxx);
|
||||
fxxx += 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Integer wxdd = 1;
|
||||
//2.2.2.10. 外修订单信息 repairOutsideFitList
|
||||
if (repairOutsideFitList != null && repairOutsideFitList.size() != 0) {
|
||||
WaiXiuDingDanXinXiTwoFour_.list(data_sources1,lossSeqNo);
|
||||
for (Object o : repairOutsideFitList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String idClmOuterRepairDetail = test.getString("idClmOuterRepairDetail");
|
||||
String fitsName = test.getString("fitsName");
|
||||
String fitsCode = test.getString("fitsCode");
|
||||
String lossCompanyAmount = test.getString("lossCompanyAmount");
|
||||
String lossAmountInsurance = test.getString("lossAmountInsurance");
|
||||
String remark1 = test.getString("remark"); //11111111111111
|
||||
String status = test.getString("status");
|
||||
String idRepairOutsideInfo = test.getString("idRepairOutsideInfo");
|
||||
String garageName1 = test.getString("garageName"); //11111111111111
|
||||
String lossAmountReference = test.getString("lossAmountReference");
|
||||
|
||||
WaiXiuDingDanXinXiTwoFour.add(reportNo, lossSeqNo, taskId, idClmOuterRepairDetail, fitsName,
|
||||
fitsCode, lossCompanyAmount, lossAmountInsurance, remark1,
|
||||
status, idRepairOutsideInfo, garageName1, lossAmountReference,data_sources1,wxdd);
|
||||
wxdd += 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("200"+ "请求成功" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("code", 200);
|
||||
object.put("msg", "请求成功");
|
||||
object.put("respData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
return object;
|
||||
}*/
|
||||
}
|
||||
71
src/main/java/com/example/sso/photo/PhotoController.java
Normal file
71
src/main/java/com/example/sso/photo/PhotoController.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.example.sso.photo;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.PhotoUpData;
|
||||
import com.example.sso.util.PhotoUtil;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class PhotoController {
|
||||
@PostMapping("xixi")
|
||||
public void ph(@RequestBody JSONObject data) throws Exception {
|
||||
JSONObject object = data.getJSONObject("data");
|
||||
String fpath = object.getString("fpath");
|
||||
String foldername = object.getString("foldername");
|
||||
String foldertemplatename = object.getString("foldertemplatename");
|
||||
String appId = object.getString("appId");
|
||||
String entryId = object.getString("entryId");
|
||||
String id = object.getString("_id");
|
||||
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
jsonObject.put("folderName",foldername);
|
||||
jsonObject.put("folderTemplateName",foldertemplatename);
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = PhotoUtil.createSign(jsonObject);
|
||||
String s = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + s);
|
||||
String s1 = PhotoUtil.sign(s);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String folder = PhotoUtil.createFolder(s1,"560703665a",a,fpath,foldername,foldertemplatename);
|
||||
System.out.println("返回 " + folder);
|
||||
JSONObject jsonObject1 = JSON.parseObject(folder);
|
||||
String innerShareUrl = jsonObject1.getJSONObject("data").getString("innerShareUrl");
|
||||
PhotoUpData.up(id,appId,entryId,innerShareUrl);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
275
src/main/java/com/example/sso/photo/WenJianController.java
Normal file
275
src/main/java/com/example/sso/photo/WenJianController.java
Normal file
@ -0,0 +1,275 @@
|
||||
package com.example.sso.photo;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.PhotoUtil;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@Async
|
||||
public class WenJianController {
|
||||
@Autowired
|
||||
@Qualifier("globalThreadPool")
|
||||
private ExecutorService executor;
|
||||
@PostMapping("/hahahah")
|
||||
public CompletableFuture<Integer> jiehsou(@RequestBody JSONObject data) throws Exception {
|
||||
|
||||
// 2. 提交耗时任务到线程池(不阻塞主线程)
|
||||
executor.execute(() -> {
|
||||
log.info("摘片参数 " +data );
|
||||
String fpath = data.getString("fpath");
|
||||
String file3 = data.getString("file3");
|
||||
String file2 = data.getString("file2");
|
||||
String file1 = data.getString("file1");
|
||||
if (file3.contains(" ")){
|
||||
String[] arr = file3.split(" ");
|
||||
for(String s : arr){
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(s);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}else {
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(file3);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
}
|
||||
if (file2.contains(" ")){
|
||||
String[] arr = file2.split(" ");
|
||||
for(String s : arr){
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(s);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
}
|
||||
}else {
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(file2);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
}
|
||||
if (file1.contains(" ")){
|
||||
String[] arr = file1.split(" ");
|
||||
for(String s : arr){
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(s);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
}
|
||||
}else {
|
||||
String downloads = null;
|
||||
try {
|
||||
downloads = PhotoUtil.download(file1);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
File download = new File(downloads);
|
||||
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath",fpath);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = null;
|
||||
try {
|
||||
sign = PhotoUtil.createSign(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String sig = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + sig);
|
||||
String s1 = PhotoUtil.sign(sig);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
String folder = PhotoUtil.upload(s1,"560703665a",a,fpath,download);
|
||||
System.out.println("返回 " + folder);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return CompletableFuture.completedFuture(200);
|
||||
}
|
||||
}
|
||||
156
src/main/java/com/example/sso/test/A.java
Normal file
156
src/main/java/com/example/sso/test/A.java
Normal file
@ -0,0 +1,156 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
@Slf4j
|
||||
public class A {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString ="{\n" +
|
||||
" \"accessRole\": \"45\",\n" +
|
||||
" \"accidentDate\": \"2021-07-25 16:20:00\",\n" +
|
||||
" \"actualValue\": 14065.00,\n" +
|
||||
" \"carMark\": \"晋H5748\",\n" +
|
||||
" \"carMarkType\": \"01\",\n" +
|
||||
" \"caseType\": \"1\",\n" +
|
||||
" \"damageType\": \"01\",\n" +
|
||||
" \"insuranceCodeList\": \"C060101200,C060101310\",\n" +
|
||||
" \"insuranceCodes\": \"C060101200\",\n" +
|
||||
" \"insuredName\": \"忠运输装卸服务队\",\n" +
|
||||
" \"isYFast\": \"0\",\n" +
|
||||
" \"orgName\": \"安诚财产保险股份有限公司榆林中心支公司\",\n" +
|
||||
" \"reportNo\": \"BA030061002021005755\",\n" +
|
||||
" \"rescueFeeInfo\": {\n" +
|
||||
" \"cranePrice\": 0,\n" +
|
||||
" \"craneStartingFare\": 0,\n" +
|
||||
" \"craneWorkTime\": 0,\n" +
|
||||
" \"otherFee\": 0,\n" +
|
||||
" \"trailerMileagePrice\": 0,\n" +
|
||||
" \"trailerOverMileage\": 0,\n" +
|
||||
" \"trailerStartingFare\": 0\n" +
|
||||
" },\n" +
|
||||
" \"trafficMileage\": 20,\n" +
|
||||
" \"vin\": \"LG6ZDCNH0GY2\",\n" +
|
||||
" \n" +
|
||||
" \"communicationList\": [],\n" +
|
||||
" \"extensionBtnList\": [\n" +
|
||||
" {\n" +
|
||||
" \"btnLink\": \"http://10.1.4.124/claim/jsp/claimflow/flowStatic.jsp?rptNo=BA030061002021005755\",\n" +
|
||||
" \"btnLocation\": 1,\n" +
|
||||
" \"btnName\": \"流程图\",\n" +
|
||||
" \"openType\": 1,\n" +
|
||||
" \"seqNo\": 2\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"insuranceCompanyNo\": \"ACIC\",\n" +
|
||||
" \"isSurvey\": \"N\",\n" +
|
||||
" \"leakageMangement\": {\n" +
|
||||
" \"caseTimes\": 1\n" +
|
||||
" },\n" +
|
||||
" \"lossFitsItemList\": [\n" +
|
||||
" {\n" +
|
||||
" \"adjustFitsFee\": 0.00,\n" +
|
||||
" \"audit\": 0,\n" +
|
||||
" \"auditDamagePrice\": 540.00,\n" +
|
||||
" \"auditPrice\": 600.00,\n" +
|
||||
" \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
" \"fitsCount\": 1,\n" +
|
||||
" \"fitsFeeRateTypeEx\": 3,\n" +
|
||||
" \"fitsName\": \"前挡风玻璃\",\n" +
|
||||
" \"fitsSurveyPrice\": 1250.00,\n" +
|
||||
" \"idDcInsLossDetail\": \"C88A4CB3FCBD8A4FE0530438210AE9BF\",\n" +
|
||||
" \"isDel\": \"N\",\n" +
|
||||
" \"recycle\": 0,\n" +
|
||||
" \"reduceRemnant\": 0.00,\n" +
|
||||
" \"verifyReduce\": 0.00\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"lossManpowerItemList\": [\n" +
|
||||
" {\n" +
|
||||
" \"auditDamagePrice\": 500.00,\n" +
|
||||
" \"createDate\": \"2021-08-02 09:48:04\",\n" +
|
||||
" \"idDcInsLossDetail\": \"C88A4CB3FCE18A4FE0530438210AE9BF\",\n" +
|
||||
" \"isDel\": \"N\",\n" +
|
||||
" \"manpowerItemName\": \"拆装更换发动机受损件 水箱 中冷器 风圈\",\n" +
|
||||
" \"manpowerSurveyPrice\": 1000.00\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"lossOuterFitsItemList\": [],\n" +
|
||||
" \"lossSeqNo\": \"21000678297\",\n" +
|
||||
" \"lossSeqNoHis\": \"\",\n" +
|
||||
" \"operatorDptCde\": \"61\",\n" +
|
||||
" \"operatorName\": \"李\",\n" +
|
||||
" \"operatorRole\": \"47\",\n" +
|
||||
" \"operatorUm\": \"161021491\",\n" +
|
||||
" \"opinionDescribe\": \"双证在查勘前端资料,总价协商13000,工时费低请老师调整按13000审核\",\n" +
|
||||
" \"lossAreaList\":[{\n" +
|
||||
" \"provinceCode\":\"610000\",\n" +
|
||||
" \"cityList\": [\n" +
|
||||
" \"610100\",\n" +
|
||||
" \"610200\",\n" +
|
||||
" \"610300\",\n" +
|
||||
" \"610400\",\n" +
|
||||
" \"610500\",\n" +
|
||||
" \"610600\",\n" +
|
||||
" \"610700\",\n" +
|
||||
" \"610800\",\n" +
|
||||
" \"610900\",\n" +
|
||||
" \"611000\"\n" +
|
||||
" ]\n" +
|
||||
" }],\n" +
|
||||
" \"readonly\": \"Y\"\n" +
|
||||
"}\n" ;
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("siteCode" , id);
|
||||
object.put("reqData" , s);
|
||||
object.put("signature" , signatureData);
|
||||
String jsonString1 = object.toJSONString();
|
||||
System.out.println("我是参数 " + jsonString1);
|
||||
|
||||
String newlossplatform = YiZhangUtil.page(jsonString1);
|
||||
JSONObject jsonObject1 = JSON.parseObject(newlossplatform);
|
||||
String signature = jsonObject1.getString("signature");
|
||||
String respData = jsonObject1.getString("respData");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
String code = jsonObject1.getString("code");
|
||||
boolean b = YiZhangUtil.verifySignature(code + msg + respData, KEY, signature);
|
||||
if (b == true) {
|
||||
byte[] bytes = Base64.decodeBase64(respData);
|
||||
String result = new String(bytes);
|
||||
log.info("返回的url " +result );
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url",result);
|
||||
|
||||
|
||||
}else {
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("url", "失败: "+msg + msg);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
49
src/main/java/com/example/sso/test/B.java
Normal file
49
src/main/java/com/example/sso/test/B.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.AnQuanUtil;
|
||||
import com.example.sso.util.V5utils;
|
||||
import com.example.sso.util.YiZhangUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
@Slf4j
|
||||
public class B {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
String id = "YJIC";
|
||||
String skey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6nzuQzigcBA7vy38odxTg+7Ez2Ah+WEz0FktbJhB9ZNQks001Y1Qf3gQr43V/eXefpOOToYYn7uXZ7PXoF4pSJSHRtkGag+8DL8WXSsPRe5ABTuSbic340oEZ0SzZEDVKqUlTAjKuCd/41sjVdbc2PHhaLH992RQOtzb40Bs/srJR2gX+qwJQFVtRfQEpsRqwpYtB7ESw7k6Ds9xpvWtzClyTL44xUL94pr0k9be2SXfedP5jgJzO2WQCYFbRTn+nP2gAqxXq36zaGUAo7J61s1h7G3b1mE1yc62WDSJfL3nBOoIOYlzbm7TuCYn79L+X0E8311w1cTqsYhAvjZEjAgMBAAECggEAHGHBHlmsEe6wEtoBAbdyjnDY10igqg5lza1iUn9sfJWMCfTW5iqwDZSnT8FtCjD/92CNV9N14rbbcBQwpdaGq82H4iv0uDoebH6kb0jolQBUu04zSFBh6dih17pPNsfXQv6R7zTjXkKUNHT94DDh5za1GwmvbgVInqBQlPCZZEtXX9xl/WBjkHo0reLru4H9rbrE0lI2si3cW7raxHRm5JlgLr0Gpigq3wXZ8dBYIXHmI2ru0DR4B0p2+Rlve4PvUx/7kYfp0QMed4Dvb3wXc+/UJNl+RvAebMi3sPB3CYqFbgU9byTvcmBkhcvuhJbMKpRl1Eg3vpYUPGaClNOXwQKBgQDplsLYs237nH3VRtbCsDPA8XRB06xmH/MNUuKSP5WNcCQZQXW9+YnZj5JgeV/q3WHCRPBxX4zuovpLDigf0Pc7+1HKvCoTLuF4xZsxiKaH3tANOzoOPnQEFcCFVshU9LAJg98XGFOtUdX8hvwKF2mssiXwSqF+6UCATGh+XEPmwwKBgQDMhuep+Tebs8cP46uSEUSbr9JQ7aUeR7bXowg+CJTWt4H+yhRKcmuC0FOZROpu0h+iw73fkA4UCxXGB3JtYJIp4e9yITNh5faqXjkYWYzTnyULe4ejNtYRMSkW5J+MGXlGXA8SL0yYskgFjgE9aD8hWRQNl1hVLGWrO/irz0bGIQKBgQCYvdJvLPUQAEZv/cBU0i8lTT2+BZHHvcCKx9YL17QNJnUUZq99J/0x3CXVG8jSpSxVggrPt7FKIhwUlA88rsHb4Pyc2umQXall9aEDhN2QHuxgmofd5IysVyTqi9K3asDpl+d7DJc60DZiyElqt+CL4nnYZJSxjgh1XIE/j0l/TQKBgCDZcg/sxS+u2kQFDyNwvpI61Q7GfIS2g/lyZ/p+qlkqNCjWEBg89GOYTjUJypVuDkK4KaDkpD434ZFi1NAYeKFddnXgOz54DvwiEg2FJIdAwlRrzMc8IXm1aaIRqkZ4OPBCDPGgwy6rQ8IQosZYHfufMQdVzYwwi0vLYA9IRVfBAoGBAIdl1XjIBd7mfpRMCI64yC5T9ITNbJlWcgvhd9VIHaoWSzX9xLKi19UNPQ6XY1UyfXfMCTQOv7LRJD3gTusQgHIArBaqXLXCoBJGf5/Zg8ywBfw1YGQPLiBBXuCaHdhzhVBAQwVVqjOkLZexL+QSBQ2p+HLNLp/ZJvJWitKdZukF";
|
||||
String jsonString = "{\n" +
|
||||
"\t\"insuranceCompanyNo\" : \"YJIC\",\n" +
|
||||
"\t\"operatorUm\" : \"03\",\n" +
|
||||
"\t\"lossSeqNo\" : \"250708016901\",\n" +
|
||||
"\t\"garageCode\" : \"YJIC110100106214\",\n" +
|
||||
"\t\"carDealerCode\" : \"\",\n" +
|
||||
"\t\"idDcInsuranceGarageRule\" : \"\"\n" +
|
||||
"}\n";
|
||||
String KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlvUJDbPFcmSznhckyikj16HCFeHHmjPfxxdUczC5kY6CuXkOmt/YOKmOWWZvLSrEMwBL8ljR7Vgq9xnKUqMXybWHUC2lWmoqhQhC/f4wndvcvzWeHnofgUByoavYQneEiNUfcMfQ44DvWSIU6hyzh+mHA1pwDKiHBA4XiAdFJpFoitVo97S3BJ915HAiH9gTDSC4Jy5f59MRqDgNaV5ooxfr+g5GWo2TCEsDYGTCj7OnoaZcK21MzlhfLWgIGpWvoi69i3AbdBV+vlNHgH23PCvEEcp7n7sPZ0lLFe/d6McdV0BqTbw/+bEP2QjCdhll8hVazECnMzItM6GDVLHYFQIDAQAB";
|
||||
String s = Base64.encodeBase64String(jsonString.getBytes("UTF-8"));
|
||||
|
||||
|
||||
|
||||
|
||||
String signatureData = YiZhangUtil.signatureData("YJIC" + Base64.encodeBase64String(jsonString.getBytes("UTF-8")), skey);
|
||||
JSONObject redis = new JSONObject();
|
||||
redis.put("reqData",s);
|
||||
redis.put("siteCode",id);
|
||||
redis.put("signature",signatureData);
|
||||
String jsonString2 = redis.toJSONString();
|
||||
String key = YiZhangUtil.key(jsonString2);
|
||||
|
||||
System.out.println("rediskey " + key);
|
||||
JSONObject jsonObject = JSON.parseObject(key);
|
||||
|
||||
String newlossplatform1 = YiZhangUtil.newlossplatform(id, s, signatureData);
|
||||
String replace = newlossplatform1.replace("GET ", "");
|
||||
System.out.println(replace);
|
||||
}
|
||||
}
|
||||
26
src/main/java/com/example/sso/test/C.java
Normal file
26
src/main/java/com/example/sso/test/C.java
Normal file
@ -0,0 +1,26 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.PeiJianDingSun_;
|
||||
import com.example.sso.dao.Result_;
|
||||
import com.example.sso.util.PhotoUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
public class C {
|
||||
public static void main(String[] args) throws IOException {
|
||||
String file3 = "https://www.jiyuankeshang.com/_/file/get_file?bucket=jdy-file&key=c87cafce-e2a5-498f-97af-f0d227b8920d&filename=IMG20250527202338.jpg&expires=1753689599&token=Ko7O1AqDnF3mL1LE:06tTELjIQtTpgBOEuhJvNaDjcTU= https://www.jiyuankeshang.com/_/file/get_file?bucket=jdy-file&key=ee914a27-a3c0-48dd-b463-3b073e6beedd&filename=IMG20250527202323.jpg&expires=1753689599&token=Ko7O1AqDnF3mL1LE:FPIz7WP9vBAEzJIBA-Q8ETFXf6I= https://www.jiyuankeshang.com/_/file/get_file?bucket=jdy-file&key=a30d16d0-0d12-4b33-a88c-ce2f9128922e&filename=IMG20250527202312.jpg&expires=1753689599&token=Ko7O1AqDnF3mL1LE:a26_uLMl68alFuwB3hCZftuswn4= https://www.jiyuankeshang.com/_/file/get_file?bucket=jdy-file&key=76b12639-94a7-4033-81a1-6438ca0afc58&filename=IMG20250527202310.jpg&expires=1753689599&token=Ko7O1AqDnF3mL1LE:FcyEKhpJw8io4T8gVTaCMu-c3lI=";
|
||||
|
||||
if (file3.contains(" ")){
|
||||
String[] arr = file3.split(" ");
|
||||
for(String s : arr){
|
||||
PhotoUtil.download(s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
47
src/main/java/com/example/sso/test/D.java
Normal file
47
src/main/java/com/example/sso/test/D.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import com.example.sso.util.PhotoUtil;
|
||||
import com.example.sso.util.TimeUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class D {
|
||||
public static void main(String[] args) throws Exception {
|
||||
Map<String, String> jsonObject = new HashMap<>();
|
||||
jsonObject.put("appid","560703665a");
|
||||
long time = TimeUtil.time();
|
||||
int a =(int)time;
|
||||
// System.out.println("我是时间戳 " + time);
|
||||
jsonObject.put("timestamp", String.valueOf(a));
|
||||
jsonObject.put("fpath","图库/test2/");
|
||||
|
||||
|
||||
|
||||
System.out.println("我是参数 " + jsonObject );
|
||||
|
||||
Map<String, String> sign = PhotoUtil.createSign(jsonObject);
|
||||
String s = PhotoUtil.mapToUrlEncodedString(sign);
|
||||
System.out.println("我是签名 " + s);
|
||||
String s1 = PhotoUtil.sign(s);
|
||||
System.out.println("我是加密 " + s1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File file = new File("D:\\下载模板\\新建 Microsoft PowerPoint 演示文稿.pptx");
|
||||
String absolutePath = file.getAbsolutePath();
|
||||
System.out.println("绝对路径: " + absolutePath);
|
||||
|
||||
String folder = E.upload(s1,"560703665a",a,"图库/test2/",file);
|
||||
System.out.println("返回 " + folder);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
138
src/main/java/com/example/sso/test/E.java
Normal file
138
src/main/java/com/example/sso/test/E.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.mime.HttpMultipartMode;
|
||||
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
||||
import org.apache.http.entity.mime.content.FileBody;
|
||||
import org.apache.http.entity.mime.content.StringBody;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class E {
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String apiUrl = "http://101.42.37.197/api/file/upload";
|
||||
// String appid = "560703665a";
|
||||
// String fpath = "图库/test2/";
|
||||
// String filePath = "D:\\下载模板\\OIP-C.jpg"; // 替换为实际文件路径
|
||||
// long timestamp = 1753755226l;
|
||||
//
|
||||
// // 调用上传方法
|
||||
// String response = uploadFile(apiUrl, appid, fpath, filePath, timestamp);
|
||||
// System.out.println("API响应结果: " + response);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// public static void main1(String s1, String appid, int time, String path, String fileAbsolutePath) {
|
||||
//// String apiUrl = "http://101.42.37.197/api/file/upload";
|
||||
//// String appid = "560703665a";
|
||||
//// String fpath = "图库/test2/";
|
||||
//// String filePath = "D:\\下载模板\\OIP-C.jpg"; // 替换为实际文件路径
|
||||
//// long timestamp = 1753755226l;
|
||||
//
|
||||
// // 调用上传方法
|
||||
// String response = uploadFile(s1, appid, appid, path, fileAbsolutePath, time);
|
||||
// System.out.println("API响应结果: " + response);
|
||||
// }
|
||||
|
||||
public static String upload(String authToken, String appid, int timestamp,
|
||||
String fpath, File file) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost("http://101.42.37.197/api/file/upload");
|
||||
|
||||
// 1. 构建Multipart请求体(form-data格式)
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.setCharset(java.nio.charset.StandardCharsets.UTF_8);
|
||||
|
||||
// 2. 添加文本参数(与图片中的参数完全一致)
|
||||
builder.addPart("appid", new StringBody(appid, ContentType.TEXT_PLAIN));
|
||||
builder.addPart("fpath", new StringBody(fpath, ContentType.TEXT_PLAIN));
|
||||
builder.addPart("timestamp", new StringBody(String.valueOf(timestamp), ContentType.TEXT_PLAIN));
|
||||
|
||||
// 3. 添加文件参数(关键修改)
|
||||
builder.addBinaryBody("file",new File(String.valueOf(file)));
|
||||
|
||||
// 4. 设置请求头
|
||||
httpPost.setHeader("Authorization", authToken);
|
||||
httpPost.setEntity(builder.build());
|
||||
|
||||
// 5. 发送请求并处理响应
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(entity, "UTF-8");
|
||||
System.out.println("响应状态码: " + response.getStatusLine().getStatusCode());
|
||||
System.out.println("响应内容: " + responseBody);
|
||||
return responseBody;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "上传失败: " + e.getMessage();
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String uploadFile(String s1, String appid, long timestamp, String fpath,
|
||||
String filePath ) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost("http://101.42.37.197/api/file/upload");
|
||||
|
||||
try {
|
||||
// 1. 验证文件是否存在
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
throw new IllegalArgumentException("文件不存在: " + filePath);
|
||||
}
|
||||
|
||||
httpPost.setHeader("Authorization", s1);
|
||||
|
||||
// 2. 构建Multipart请求体
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.setCharset(java.nio.charset.StandardCharsets.UTF_8);
|
||||
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
|
||||
|
||||
// 3. 添加文本参数(与图片中的参数完全一致)
|
||||
builder.addPart("appid", new StringBody(appid, ContentType.TEXT_PLAIN));
|
||||
builder.addPart("fpath", new StringBody(fpath, ContentType.TEXT_PLAIN));
|
||||
builder.addPart("timestamp", new StringBody(String.valueOf(timestamp), ContentType.TEXT_PLAIN));
|
||||
|
||||
// 4. 添加文件参数(字段名必须为"file")
|
||||
builder.addPart("file", new FileBody(file, ContentType.MULTIPART_FORM_DATA, file.getName()));
|
||||
|
||||
// 5. 设置请求体
|
||||
httpPost.setEntity(builder.build());
|
||||
|
||||
// 6. 发送请求并获取响应
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(entity, "UTF-8");
|
||||
System.out.println("响应状态码: " + response.getStatusLine().getStatusCode());
|
||||
return responseBody;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "上传失败: " + e.getMessage();
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
54
src/main/java/com/example/sso/test/FileSuccess.java
Normal file
54
src/main/java/com/example/sso/test/FileSuccess.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
||||
import org.apache.http.entity.mime.content.FileBody;
|
||||
import org.apache.http.entity.mime.content.StringBody;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class FileSuccess {
|
||||
public static String upload(String s1, String appid, int time, String path, File file) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost("http://101.42.37.197/api/file/upload");
|
||||
|
||||
// 使用MultipartEntityBuilder构建多部分表单
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addPart("appid", new StringBody(appid, StandardCharsets.UTF_8));
|
||||
builder.addPart("timestamp", new StringBody(String.valueOf(time), StandardCharsets.UTF_8));
|
||||
builder.addPart("fpath", new StringBody(path, StandardCharsets.UTF_8));
|
||||
|
||||
// 添加文件部分(关键修改)
|
||||
builder.addPart("file", new FileBody(file)); // FileBody会自动处理文件内容和MIME类型
|
||||
|
||||
// 设置请求头和实体
|
||||
httpPost.setEntity(builder.build());
|
||||
httpPost.setHeader("Authorization", s1);
|
||||
|
||||
// 发送请求并处理响应
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(entity, StandardCharsets.UTF_8);
|
||||
System.out.println("响应状态码: " + response.getStatusLine().getStatusCode());
|
||||
System.out.println("响应内容: " + responseBody);
|
||||
return responseBody; // 返回服务器响应内容更合理
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "上传失败: " + e.getMessage();
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
50
src/main/java/com/example/sso/test/HmacGenerator.java
Normal file
50
src/main/java/com/example/sso/test/HmacGenerator.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.example.sso.test;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
|
||||
public class HmacGenerator {
|
||||
public static void main(String[] args) {
|
||||
// 图片中的原始输入参数(注意包含URL编码的中文字符)
|
||||
String input = "11";
|
||||
// 图片中显示的完整密钥
|
||||
String secretKey = "717ff0996ac8ae530f3d710de6a2016b";
|
||||
|
||||
try {
|
||||
// 1. 计算HMAC-SHA256
|
||||
byte[] hmacSha256 = calculateHmacSha256(input, secretKey);
|
||||
|
||||
// 2. 输出HEX格式(与图片完全一致)
|
||||
String hexResult = bytesToHex(hmacSha256);
|
||||
System.out.println("计算结果(HEX):");
|
||||
System.out.println(hexResult);
|
||||
|
||||
// 3. 输出Base64格式(与图片完全一致)
|
||||
String base64Result = Base64.getEncoder().encodeToString(hmacSha256);
|
||||
System.out.println("\n计算结果(Base64):");
|
||||
System.out.println(base64Result);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] calculateHmacSha256(String data, String key) throws Exception {
|
||||
// 使用UTF-8编码(与图片设置一致)
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(secretKeySpec);
|
||||
return mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
private static String bytesToHex(byte[] bytes) {
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for (byte b : bytes) {
|
||||
String hex = String.format("%02x", b);
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
}
|
||||
}
|
||||
559
src/main/java/com/example/sso/util/APIUtils.java
Normal file
559
src/main/java/com/example/sso/util/APIUtils.java
Normal file
@ -0,0 +1,559 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.codec.Charsets;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.apache.http.ssl.TrustStrategy;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.*;
|
||||
|
||||
public class APIUtils {
|
||||
public static final String WEBSITE = "https://www.jiyuankeshang.com";
|
||||
private static boolean retryIfRateLimited = true;
|
||||
private String urlGetWidgets;
|
||||
private String urlGetFormData;
|
||||
private String urlRetrieveData;
|
||||
private String urlUpdateData;
|
||||
private String urlCreateData;
|
||||
private String urlDeleteData;
|
||||
private String urlCreateUSer;
|
||||
private String urlCreatePerson;
|
||||
private String urlCreatePersonAll;
|
||||
private String urlCreateDep;
|
||||
private String urlCreateDepAll;
|
||||
private String urlGetDepartment;
|
||||
private String urlGetPeople;
|
||||
private String urlDeletePeople;
|
||||
private String urlDataBatchCreate;
|
||||
private String urlGetWorkflow;
|
||||
|
||||
private static String apiKey;
|
||||
private static int i=1;
|
||||
/**
|
||||
* @param appId - 应用id
|
||||
* @param entryId - 表单id
|
||||
* @param apiKey - apiKey
|
||||
*/
|
||||
public APIUtils(String appId, String entryId, String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
this.initUrl(appId, entryId);
|
||||
}
|
||||
public Map<String, Object> createPerson (Map<String, Object> person) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreatePerson, person);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
public Map<String, Object> createDep (Map<String, Object> person) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreatePerson, person);
|
||||
data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private void initUrl (String appId, String entryId) {
|
||||
urlGetWidgets = WEBSITE + "/api/v1/app/" + appId + "/entry/" + entryId + "/widgets";
|
||||
urlGetFormData = WEBSITE + "/api/v1/app/" + appId + "/entry/" + entryId + "/data";
|
||||
urlRetrieveData = WEBSITE + "/api/v2/app/" + appId + "/entry/" + entryId + "/data_retrieve";
|
||||
urlUpdateData = WEBSITE + "/api/v4/app/" + appId + "/entry/" + entryId + "/data_update";
|
||||
urlCreateData = WEBSITE + "/api/v3/app/" + appId + "/entry/" + entryId + "/data_create";
|
||||
urlDeleteData = WEBSITE + "/api/v1/app/" + appId + "/entry/" + entryId + "/data_delete";
|
||||
urlCreatePerson=WEBSITE+"/api/v2/user/create";
|
||||
urlCreateUSer = WEBSITE + "/api/v2/user/create";
|
||||
urlCreateDep=WEBSITE+"/api/v2/department/create";
|
||||
urlCreateDepAll=WEBSITE+"/api/v2/department/import";
|
||||
urlCreatePersonAll=WEBSITE+"/api/v2/user/import";
|
||||
urlGetDepartment=WEBSITE+"/api/v2/department/1/department_list";
|
||||
urlGetPeople=WEBSITE + "/api/v2/department/1/member_list";
|
||||
urlDeletePeople=WEBSITE+"/api/v2/user/batch_delete";
|
||||
urlDataBatchCreate=WEBSITE+ "/api/v1/app/" + appId + "/entry/" + entryId + "/data_batch_create";
|
||||
urlGetWorkflow=WEBSITE+"/api/v3/workflow/instance/get";
|
||||
}
|
||||
|
||||
public static HttpClient getSSLHttpClient() throws Exception {
|
||||
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
|
||||
//信任所有
|
||||
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
|
||||
return true;
|
||||
}
|
||||
}).build();
|
||||
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext);
|
||||
return HttpClients.custom().setSSLSocketFactory(sslsf).build();
|
||||
}
|
||||
/**
|
||||
* 获取部门成员信息
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> deletePeopleBatch(Map<String,Object> map) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlDeletePeople, map);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
public Map<String, Object> urlGetWorkflow(String id) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
map.put("instance_id",id);
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlGetWorkflow,map);
|
||||
System.out.println(result);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* 获取请求头信息
|
||||
* @return
|
||||
*/
|
||||
public static Header[] getHttpHeaders() {
|
||||
List<Header> headerList = new ArrayList<Header>();
|
||||
headerList.add(new BasicHeader("Authorization", "Bearer " + apiKey));
|
||||
headerList.add(new BasicHeader("Content-Type", "application/json;charset=utf-8"));
|
||||
return headerList.toArray(new Header[headerList.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员信息
|
||||
* @param username - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> findPerson (String username) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",WEBSITE + "/api/v2/user/"+username+"/user_retrieve", new HashMap<>());
|
||||
data = (Map<String, Object>) result.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* 发送HTTP请求
|
||||
* @param method - HTTP动词 { GET|POST }
|
||||
* @param url - 请求路径
|
||||
* @param data - 请求的数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Object sendRequest (String method, String url, Map<String, Object> data) throws Exception {
|
||||
try {
|
||||
HttpClient client = getSSLHttpClient();
|
||||
Header[] headers = getHttpHeaders();
|
||||
HttpRequestBase request;
|
||||
method = method.toUpperCase();
|
||||
if ("GET".equals(method)) {
|
||||
// GET请求
|
||||
URIBuilder uriBuilder = new URIBuilder(url);
|
||||
if (data != null) {
|
||||
// 添加请求参数
|
||||
for(Map.Entry<String, Object> entry : data.entrySet()) {
|
||||
uriBuilder.addParameter(entry.getKey(), (String) entry.getValue());
|
||||
}
|
||||
}
|
||||
request = new HttpGet(uriBuilder.build());
|
||||
} else if ("POST".equals(method)) {
|
||||
// POST请求
|
||||
request = new HttpPost(url);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
HttpEntity entity = new StringEntity(mapper.writeValueAsString(data), Charsets.UTF_8);
|
||||
((HttpPost) request).setEntity(entity);
|
||||
} else {
|
||||
throw new RuntimeException("不支持的HTTP动词");
|
||||
}
|
||||
// 设置请求头
|
||||
request.setHeaders(headers);
|
||||
// 发送请求并获取返回结果
|
||||
HttpResponse response = client.execute(request);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Map<String, Object> result = (Map<String, Object>) mapper.readValue(response.getEntity().getContent(), Object.class);
|
||||
if (statusCode >= 400) {
|
||||
// 请求错误
|
||||
if ((Integer) result.get("code") == 8303 && retryIfRateLimited) {
|
||||
// 频率超限,1s后重试
|
||||
Thread.sleep(1000);
|
||||
return sendRequest(method, url, data);
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
// 处理返回结果
|
||||
return result;
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
// 请求异常,等等重试
|
||||
Thread.sleep(1000);
|
||||
if (i>=5){
|
||||
i=0;
|
||||
return 555;
|
||||
}else {
|
||||
i=i+1;
|
||||
return sendRequest(method, url, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取表单字段
|
||||
* @return 表单字段
|
||||
*/
|
||||
public List<Map<String, Object>> getFormWidgets () {
|
||||
List<Map<String, Object>> widgets = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST", urlGetWidgets, new HashMap<String, Object>());
|
||||
widgets = (List<Map<String, Object>>) result.get("widgets");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return widgets;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<Map<String, Object>> createUser(String username, String name, Integer[] departments){
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("username",username);
|
||||
requestData.put("name",name);
|
||||
requestData.put("departments",departments);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreateUSer, requestData);
|
||||
data = (Map<String, Object>) result.get("data");
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return (List<Map<String, Object>>) data;
|
||||
}
|
||||
/**
|
||||
* 按条件获取表单数据
|
||||
* @param limit - 数据条数
|
||||
* @param fields - 显示的字段
|
||||
* @param filter - 过滤条件
|
||||
* @param dataId - 上次取数的最后一个数据id
|
||||
* @return - 返回的数据
|
||||
*/
|
||||
public List<Map<String, Object>> getFormData (final int limit, final String[] fields, final Map<String, Object> filter, String dataId) {
|
||||
List<Map<String, Object>> data = null;
|
||||
try {
|
||||
// 构造请求数据
|
||||
Map<String, Object> requestData = new HashMap<String, Object>() {
|
||||
{
|
||||
put("limit", limit);
|
||||
put("fields", fields);
|
||||
put("filter", filter);
|
||||
}
|
||||
};
|
||||
if (dataId != null) {
|
||||
requestData.put("data_id", dataId);
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST", urlGetFormData, requestData);
|
||||
data = (List<Map<String, Object>>) result.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按条件获取全部表单数据
|
||||
* @return 表单数据
|
||||
*/
|
||||
public List<Map<String, Object>> getAllFormData (String[] fields, Map<String, Object> filter) {
|
||||
List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>();
|
||||
String offset = null;
|
||||
do {
|
||||
List<Map<String, Object>> data = this.getFormData(100, fields, filter, offset);
|
||||
// 获取返回的数据
|
||||
if (data == null || data.isEmpty()) {
|
||||
// 已经获取全部的数据
|
||||
offset = null;
|
||||
} else {
|
||||
// 获取最后一条数据的id
|
||||
offset = (String) data.get(data.size() - 1).get("_id");
|
||||
dataList.addAll(data);
|
||||
}
|
||||
} while (offset != null);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 搜索单条数据
|
||||
* @param dataId - 要查询的数据id
|
||||
* @return 表单数据
|
||||
*/
|
||||
public Map<String, Object> retrieveData (String dataId) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("data_id", dataId);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST", urlRetrieveData, requestData);
|
||||
data = (Map<String, Object>) result.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* 新增部门
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> createDataDep (Map<String, Object> requestData) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreateDep, requestData);
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量创建部门
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> createDataDepAll (Map<String, Object> requestData) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreateDepAll, requestData);
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量创建人员
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> createDataPersonAll (Map<String, Object> requestData) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreatePersonAll, requestData);
|
||||
System.out.println(result);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门信息
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> getDepartment() {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
map.put("has_child",1);
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlGetDepartment,map);
|
||||
System.out.println(result);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部门成员信息
|
||||
* @param - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> getDepartmentPerson(String dno) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
// map.put("has_child",1);
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",WEBSITE+"/api/v2/department/"+dno+"/member_list",map);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
public Map<String, Object> deleteDepartment(Integer no) {
|
||||
Map<String, Object> map=new HashMap<>();
|
||||
map.put("has_child",1);
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",WEBSITE+"/api/v2/department/"+no+"/delete",new HashMap<>());
|
||||
System.out.println(result);
|
||||
return result;
|
||||
// data = (Map<String, Object>) result.get("department");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
// * 新增部门
|
||||
// * @param - 创建数据内容
|
||||
// * @return 更新后的数据
|
||||
// */
|
||||
// public Map<String, Object> createDataDep (Map<String, Object> requestData) {
|
||||
// Map<String, Object> data = null;
|
||||
// try {
|
||||
// Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreateDep, requestData);
|
||||
// data = (Map<String, Object>) result.get("data");
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return data;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 创建单条数据
|
||||
* @param rawData - 创建数据内容
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public Map<String, Object> createData (Map<String, Object> rawData) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("data", rawData);
|
||||
requestData.put("is_start_trigger",true);
|
||||
requestData.put("is_start_workflow",true);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlCreateData, requestData);
|
||||
data = (Map<String, Object>) result.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有的人在简道云
|
||||
* @return 更新后的数据
|
||||
*/
|
||||
public List<Map<String,Object>> getAllPeople () {
|
||||
List<Map<String,Object>> data = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("has_child",true);
|
||||
// System.out.println("准备发起HTTP请求!"+urlGetPeople);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST",urlGetPeople, requestData);
|
||||
data = (List<Map<String,Object>>) result.get("users");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新单条数据
|
||||
* @return 更新结果
|
||||
*/
|
||||
public Map<String, Object> updateData (String dataId, Map<String, Object> update) {
|
||||
Map<String, Object> data = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("data_id", dataId);
|
||||
requestData.put("data", update);
|
||||
requestData.put("is_start_trigger",true);
|
||||
Map<String, Object> result = (Map<String, Object>) this.sendRequest("POST", urlUpdateData, requestData);
|
||||
data = (Map<String, Object>) result.get("data");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单条数据
|
||||
* @return 删除结果
|
||||
*/
|
||||
public Map<String, String> deleteData (String dataId) {
|
||||
Map<String, String> result = null;
|
||||
try {
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("data_id", dataId);
|
||||
result = (Map<String, String>) this.sendRequest("POST", urlDeleteData, requestData);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增数据
|
||||
* @return 新增结果
|
||||
*/
|
||||
public Map<String, String> dataBatchCreate (JSONArray data_list,Boolean is_start_workflow) {
|
||||
Map<String, String> result = null;
|
||||
try {
|
||||
UUID uuid = UUID.randomUUID();
|
||||
Map<String, Object> requestData = new HashMap<String, Object>();
|
||||
requestData.put("transaction_id", uuid.toString());
|
||||
requestData.put("data_list", data_list);
|
||||
requestData.put("is_start_workflow", is_start_workflow);
|
||||
result = (Map<String, String>) this.sendRequest("POST", urlDataBatchCreate, requestData);
|
||||
System.out.println(result);
|
||||
result.put("transaction_id",uuid.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
101
src/main/java/com/example/sso/util/AnQuanUtil.java
Normal file
101
src/main/java/com/example/sso/util/AnQuanUtil.java
Normal file
@ -0,0 +1,101 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class AnQuanUtil {
|
||||
//出单
|
||||
public static String chu(String jsonBody) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("http://cd.yinjian.com/api/open/insbill/add");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
//退单
|
||||
public static String tui(String jsonBody) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("http://cd.yinjian.com/api/open/insbill/abort");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
}
|
||||
42
src/main/java/com/example/sso/util/DataBatchUtil.java
Normal file
42
src/main/java/com/example/sso/util/DataBatchUtil.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.example.sso.util;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class DataBatchUtil {
|
||||
/**
|
||||
* 批量新增数据
|
||||
* @param appId 应用ID
|
||||
* @param entryId 表单ID
|
||||
* @param apiKey 秘钥
|
||||
* @param datas 原始数据源
|
||||
* @param fields 简道云字段别名
|
||||
* @param fields_data data里面的字段值key,需要与fields一一对应起来。
|
||||
*/
|
||||
public static Map<String, String> dataBatchCreate(String appId, String entryId, String apiKey, JSONArray datas, JSONArray fields, JSONArray fields_data){
|
||||
try {
|
||||
APIUtils apiUtils=new APIUtils(appId,entryId,apiKey);
|
||||
JSONArray data_list=new JSONArray();//封装修饰好的数据
|
||||
for (Object o1:datas){
|
||||
JSONObject o=(JSONObject)o1;
|
||||
Map<String,Object> map1=new HashMap<String,Object>(){
|
||||
{
|
||||
for (int i=0;i<fields.size();i++){
|
||||
int finalI = i;
|
||||
put(fields.getString(i),new HashMap<String, Object>() {{ put("value",o.get(fields_data.getString(finalI)));}});
|
||||
}
|
||||
}
|
||||
};
|
||||
data_list.add(map1);
|
||||
}
|
||||
return apiUtils.dataBatchCreate(data_list,false);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
216
src/main/java/com/example/sso/util/HttpUtil.java
Normal file
216
src/main/java/com/example/sso/util/HttpUtil.java
Normal file
@ -0,0 +1,216 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.Consts;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.config.Registry;
|
||||
import org.apache.http.config.RegistryBuilder;
|
||||
import org.apache.http.conn.socket.ConnectionSocketFactory;
|
||||
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
|
||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
/** * Http工具类,发送Http请求, Get请求请将参数放在url中 Post请求请将参数放在Map中 * * @author 程高伟 * @date 2017年1月5日 下午6:03:50 */
|
||||
public class HttpUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(HttpUtil.class);
|
||||
private static final CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||
private static final String userAgent = "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36";
|
||||
|
||||
public static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException {
|
||||
SSLContext sc = SSLContext.getInstance("SSLv3");
|
||||
|
||||
// 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法
|
||||
X509TrustManager trustManager = new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(
|
||||
java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
|
||||
String paramString) throws CertificateException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(
|
||||
java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
|
||||
String paramString) throws CertificateException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
sc.init(null, new TrustManager[] { trustManager }, null);
|
||||
return sc;
|
||||
}
|
||||
/** * 发送HttpGet请求 * * @param url * 请求地址 * @return 返回字符串 */
|
||||
public static String sendGet(String url) throws KeyManagementException, NoSuchAlgorithmException {
|
||||
SSLContext sslcontext = createIgnoreVerifySSL();
|
||||
|
||||
// 设置协议http和https对应的处理socket链接工厂的对象
|
||||
Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
|
||||
.register("http", PlainConnectionSocketFactory.INSTANCE)
|
||||
.register("https", new SSLConnectionSocketFactory(sslcontext))
|
||||
.build();
|
||||
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connManager).build();
|
||||
String result = null;
|
||||
CloseableHttpResponse response = null;
|
||||
try {
|
||||
HttpGet httpGet = new HttpGet(url);
|
||||
httpGet.setHeader("User-Agent", userAgent);
|
||||
response = httpClient.execute(httpGet);
|
||||
HttpEntity entity = response.getEntity();
|
||||
if (entity != null) {
|
||||
result = EntityUtils.toString(entity,"UTF-8");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("处理失败 {}" + e);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** * 发送HttpPost请求,参数为map * * @param url * 请求地址 * @param map * 请求参数 * @return 返回字符串 */
|
||||
public static String sendPost(String url, Map<String, String> map) {
|
||||
// 设置参数
|
||||
List<NameValuePair> formparams = new ArrayList<NameValuePair>();
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
formparams.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
// 编码
|
||||
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(formparams, Consts.UTF_8);
|
||||
// 取得HttpPost对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
// 防止被当成攻击添加的
|
||||
httpPost.setHeader("User-Agent", userAgent);
|
||||
// 参数放入Entity
|
||||
httpPost.setEntity(formEntity);
|
||||
CloseableHttpResponse response = null;
|
||||
String result = null;
|
||||
try {
|
||||
// 执行post请求
|
||||
response = httpclient.execute(httpPost);
|
||||
// 得到entity
|
||||
HttpEntity entity = response.getEntity();
|
||||
// 得到字符串
|
||||
result = EntityUtils.toString(entity);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
} finally {
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/** * 发送HttpPost请求,参数为json字符串 * * @param url * @param jsonStr * @return */
|
||||
public static String sendPost(String url, String jsonStr,String appkey) throws KeyManagementException, NoSuchAlgorithmException {
|
||||
//采用绕过验证的方式处理https请求
|
||||
SSLContext sslcontext = createIgnoreVerifySSL();
|
||||
|
||||
// 设置协议http和https对应的处理socket链接工厂的对象
|
||||
Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
|
||||
.register("http", PlainConnectionSocketFactory.INSTANCE)
|
||||
.register("https", new SSLConnectionSocketFactory(sslcontext))
|
||||
.build();
|
||||
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connManager).build();
|
||||
String result = null;
|
||||
// 字符串编码
|
||||
StringEntity entity = new StringEntity(jsonStr, Consts.UTF_8);
|
||||
// 设置content-type
|
||||
entity.setContentType("application/json");
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
// 防止被当成攻击添加的
|
||||
httpPost.setHeader("User-Agent", userAgent);
|
||||
httpPost.setHeader("Authorization", "Bearer "+appkey);
|
||||
// 接收参数设置
|
||||
httpPost.setHeader("Accept", "application/json");
|
||||
httpPost.setEntity(entity);
|
||||
CloseableHttpResponse response = null;
|
||||
try {
|
||||
response = httpClient.execute(httpPost);
|
||||
HttpEntity httpEntity = response.getEntity();
|
||||
result = EntityUtils.toString(httpEntity);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
} finally {
|
||||
// 关闭CloseableHttpResponse
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
response.getEntity() ;
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** * 发送不带参数的HttpPost请求 * * @param url * @return */
|
||||
public static String sendPost(String url) {
|
||||
String result = null;
|
||||
// 得到一个HttpPost对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
// 防止被当成攻击添加的
|
||||
httpPost.setHeader("User-Agent", userAgent);
|
||||
CloseableHttpResponse response = null;
|
||||
try {
|
||||
// 执行HttpPost请求,并得到一个CloseableHttpResponse
|
||||
response = httpclient.execute(httpPost);
|
||||
// 从CloseableHttpResponse中拿到HttpEntity
|
||||
HttpEntity entity = response.getEntity();
|
||||
// 将HttpEntity转换为字符串
|
||||
result = EntityUtils.toString(entity);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
} finally {
|
||||
// 关闭CloseableHttpResponse
|
||||
if (response != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
31
src/main/java/com/example/sso/util/MathUtil.java
Normal file
31
src/main/java/com/example/sso/util/MathUtil.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class MathUtil {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Double.valueOf(formatDouble5(111.159099)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保留两位小数,四舍五入的一个老土的方法
|
||||
* @param d
|
||||
* @return
|
||||
*/
|
||||
public static double formatDouble1(double d) {
|
||||
return (double)Math.round(d*100)/100;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 如果只是用于程序中的格式化数值然后输出,那么这个方法还是挺方便的。
|
||||
* 应该是这样使用:System.out.println(String.format("%.2f", d));
|
||||
* @param d
|
||||
* @return
|
||||
*/
|
||||
public static Double formatDouble5(double d) {
|
||||
return Double.valueOf(String.format("%.2f", d));
|
||||
}
|
||||
|
||||
}
|
||||
253
src/main/java/com/example/sso/util/PhotoUtil.java
Normal file
253
src/main/java/com/example/sso/util/PhotoUtil.java
Normal file
@ -0,0 +1,253 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.entity.mime.HttpMultipartMode;
|
||||
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
||||
import org.apache.http.entity.mime.content.FileBody;
|
||||
import org.apache.http.entity.mime.content.StringBody;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.*;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public class PhotoUtil {
|
||||
public static Map<String, String> createSign(Map<String, String> params) throws Exception {
|
||||
|
||||
// 2. 按逐字符顺序排序参数
|
||||
Map<String, String> sortParams = new TreeMap<>(params);
|
||||
sortParams.putAll(params);
|
||||
|
||||
|
||||
return sortParams;
|
||||
}
|
||||
|
||||
public static String mapToUrlEncodedString(Map<String, String> params) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (Map.Entry<String, String> entry : params.entrySet()) {
|
||||
try {
|
||||
if (result.length() > 0) {
|
||||
result.append("&");
|
||||
}
|
||||
result.append(URLEncoder.encode(entry.getKey(), "UTF-8"))
|
||||
.append("=")
|
||||
.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("URL编码失败", e);
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public static String calculateSHA256(String input) throws NoSuchAlgorithmException {
|
||||
MessageDigest md = MessageDigest.getInstance("SHA-256");
|
||||
byte[] hash = md.digest(input.getBytes());
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for (byte b : hash) {
|
||||
String hex = Integer.toHexString(0xff & b);
|
||||
if (hex.length() == 1) hexString.append('0');
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
}
|
||||
|
||||
public static String createFolder(String s1,String appid,int time,String path, String folderName, String folderTemplateName ) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost("http://101.42.37.197/api/file/createFolder");
|
||||
|
||||
// 构建表单参数(原GET参数移至请求体)
|
||||
List<NameValuePair> params = new ArrayList<>();
|
||||
params.add(new BasicNameValuePair("appid", appid));
|
||||
params.add(new BasicNameValuePair("timestamp", String.valueOf(time)));
|
||||
params.add(new BasicNameValuePair("fpath", path));
|
||||
params.add(new BasicNameValuePair("folderName", folderName));
|
||||
params.add(new BasicNameValuePair("folderTemplateName", folderTemplateName));
|
||||
|
||||
// 编码为表单格式并设置到请求体
|
||||
httpPost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
|
||||
|
||||
// 可选:设置请求头
|
||||
|
||||
httpPost.setHeader("Authorization", s1);
|
||||
|
||||
// 发送请求并处理响应
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
responseBody = EntityUtils.toString(entity, "UTF-8");
|
||||
System.out.println("响应状态码: " + response.getStatusLine().getStatusCode());
|
||||
System.out.println("响应内容: " + responseBody);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String upload(String s1, String appid, int time, String path, File file) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost("http://101.42.37.197/api/file/upload");
|
||||
|
||||
// 使用MultipartEntityBuilder构建多部分表单
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||
builder.addPart("appid", new StringBody(appid, StandardCharsets.UTF_8));
|
||||
builder.addPart("timestamp", new StringBody(String.valueOf(time), StandardCharsets.UTF_8));
|
||||
builder.addPart("fpath", new StringBody(path, StandardCharsets.UTF_8));
|
||||
|
||||
// 添加文件部分(关键修改)
|
||||
builder.addPart("file", new FileBody(file)); // FileBody会自动处理文件内容和MIME类型
|
||||
|
||||
// 设置请求头和实体
|
||||
httpPost.setEntity(builder.build());
|
||||
httpPost.setHeader("Authorization", s1);
|
||||
|
||||
// 发送请求并处理响应
|
||||
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
String responseBody = EntityUtils.toString(entity, StandardCharsets.UTF_8);
|
||||
System.out.println("响应状态码: " + response.getStatusLine().getStatusCode());
|
||||
System.out.println("响应内容: " + responseBody);
|
||||
return responseBody; // 返回服务器响应内容更合理
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "上传失败: " + e.getMessage();
|
||||
} finally {
|
||||
try {
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String sign(String input) {
|
||||
// 图片中的原始输入参数(注意包含URL编码的中文字符)
|
||||
//t = "11";
|
||||
// 图片中显示的完整密钥
|
||||
String secretKey = "717ff0996ac8ae530f3d710de6a2016b";
|
||||
|
||||
String base64Result = null;
|
||||
String hexResult = null;
|
||||
try {
|
||||
// 1. 计算HMAC-SHA256
|
||||
byte[] hmacSha256 = calculateHmacSha256(input, secretKey);
|
||||
|
||||
// 2. 输出HEX格式(与图片完全一致)
|
||||
hexResult = bytesToHex(hmacSha256);
|
||||
System.out.println("计算结果(HEX):");
|
||||
System.out.println(hexResult);
|
||||
|
||||
// 3. 输出Base64格式(与图片完全一致)
|
||||
base64Result = Base64.getEncoder().encodeToString(hmacSha256);
|
||||
System.out.println("\n计算结果(Base64):");
|
||||
System.out.println(base64Result);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return hexResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static byte[] calculateHmacSha256(String data, String key) throws Exception {
|
||||
// 使用UTF-8编码(与图片设置一致)
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(secretKeySpec);
|
||||
return mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
private static String bytesToHex(byte[] bytes) {
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for (byte b : bytes) {
|
||||
String hex = String.format("%02x", b);
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
}
|
||||
|
||||
|
||||
public static String download(String fileUrl) throws IOException {
|
||||
String path = "";
|
||||
// String fileUrl = "https://www.jiyuankeshang.com/_/file/get_file?bucket=jdy-file&key=518b56ae-3c68-4c61-bd68-b5eb18427d08&filename=%E6%BC%94%E7%A4%BA%E6%95%B0%E6%8D%AE.xlsx&expires=1742968799&token=Ko7O1AqDnF3mL1LE:r6gj1iTAgv2FTQSUALYf4_-uqSY="; // 替换为你要下载的文件URL
|
||||
String desktopPath = System.getProperty("user.home") + "/Desktop";
|
||||
String folderName = "bxfile";
|
||||
// String substringAfterThirdDot = V5utils.getSubstringAfterThirdDot(fileUrl, 3);
|
||||
String substringAfterThirdDot = "";
|
||||
if (fileUrl.contains(".png")) {
|
||||
substringAfterThirdDot = ".png";
|
||||
} else if (fileUrl.contains(".pdf")) {
|
||||
substringAfterThirdDot = ".pdf";
|
||||
} else if (fileUrl.contains(".xlsx")) {
|
||||
substringAfterThirdDot = ".xlsx";
|
||||
}else if (fileUrl.contains(".docx")){
|
||||
substringAfterThirdDot = ".docx";
|
||||
}else if (fileUrl.contains(".jpg")){
|
||||
substringAfterThirdDot = ".jpg";
|
||||
}
|
||||
|
||||
String uuid = String.valueOf(UUID.randomUUID());
|
||||
String fileName = uuid + substringAfterThirdDot; // 你可以根据URL动态生成文件名
|
||||
|
||||
|
||||
// 创建文件夹路径
|
||||
Path folderPath = Paths.get("/home/anquantongchou/file");
|
||||
|
||||
|
||||
// 创建文件路径
|
||||
Path filePath = folderPath.resolve(fileName);
|
||||
|
||||
|
||||
// 下载文件
|
||||
URL url = new URL(fileUrl);
|
||||
try (BufferedInputStream in = new BufferedInputStream(url.openStream());
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(filePath.toFile())) {
|
||||
byte[] dataBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {
|
||||
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("文件已下载到: " + filePath);
|
||||
|
||||
|
||||
return filePath.toString();
|
||||
}
|
||||
|
||||
}
|
||||
19
src/main/java/com/example/sso/util/StringUtil.java
Normal file
19
src/main/java/com/example/sso/util/StringUtil.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class StringUtil {
|
||||
/**
|
||||
* 判断是否包含特殊字段
|
||||
*
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isContainSpecialChar(String username) {
|
||||
String regEx = "^[0-9a-zA-Z_]{1,}$";
|
||||
Pattern p = Pattern.compile(regEx);
|
||||
Matcher m = p.matcher(username);
|
||||
return m.find();
|
||||
}
|
||||
}
|
||||
115
src/main/java/com/example/sso/util/Test.java
Normal file
115
src/main/java/com/example/sso/util/Test.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
selectGongBiaoZhun();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static JSONArray selectGongBiaoZhun() {
|
||||
//需要修改 appid entryid apikey
|
||||
APIUtils api = new APIUtils("628eeaace7f28c00089a60cc","62f0f3754af59a0007691522","AXtEol6d7l0w2l5dUuqvhbg2kjzfYv6r");
|
||||
final List<Map<String, Object>> condList = new ArrayList<Map<String, Object>>();
|
||||
//因为想查询大于50的数据,所以创建一个数组
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
//在这个数组里面放一个数值类型的数字,用来判断查询范围
|
||||
jsonArray.add("");
|
||||
condList.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("field", "chufa");//查新字段的名称/别名
|
||||
put("method", "empty");//判断的方法
|
||||
// put("value", jsonArray);//查询的条件
|
||||
}
|
||||
});
|
||||
Map<String, Object> filter = new HashMap<String, Object>() {
|
||||
{
|
||||
put("rel", "and");
|
||||
put("cond", condList);
|
||||
}
|
||||
};
|
||||
//字段别名
|
||||
List<Map<String, Object>> datas = api.getFormData(10000, new String[]{"chufa"},//身份证,公司,姓名,岗位补贴,燃油补贴,临时补贴,其他补贴
|
||||
filter, null);
|
||||
if (datas == null) {
|
||||
return null;
|
||||
}
|
||||
if (datas.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
for (Map<String,Object> map:datas){
|
||||
String id=(String)map.get("_id");
|
||||
updateFlowId(id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新客户报备数据
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void updateFlowId(String id) {
|
||||
try {
|
||||
APIUtils api = new APIUtils("628eeaace7f28c00089a60cc","62f0f3754af59a0007691522","AXtEol6d7l0w2l5dUuqvhbg2kjzfYv6r");
|
||||
Map<String,Object> map1;
|
||||
map1=new HashMap<String,Object>(){
|
||||
{
|
||||
put("chufa",new HashMap<String, Object>() {{ put("value","1");}});
|
||||
}
|
||||
};
|
||||
//把封装好的数据创建至简道云
|
||||
api.updateData(id,map1);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static JSONObject selectGongBiao() {
|
||||
//需要修改 appid entryid apikey
|
||||
APIUtils api = new APIUtils("628eeaace7f28c00089a60cc","62ef5405e022900008e9c7b5","AXtEol6d7l0w2l5dUuqvhbg2kjzfYv6r");
|
||||
final List<Map<String, Object>> condList = new ArrayList<Map<String, Object>>();
|
||||
//因为想查询大于50的数据,所以创建一个数组
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
//在这个数组里面放一个数值类型的数字,用来判断查询范围
|
||||
jsonArray.add("");
|
||||
condList.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("field", "fensi");//查新字段的名称/别名
|
||||
put("method", "not_empty");//判断的方法
|
||||
// put("value", jsonArray);//查询的条件
|
||||
}
|
||||
});
|
||||
Map<String, Object> filter = new HashMap<String, Object>() {
|
||||
{
|
||||
put("rel", "and");
|
||||
put("cond", condList);
|
||||
}
|
||||
};
|
||||
//字段别名
|
||||
List<Map<String, Object>> datas = api.getFormData(10000, new String[]{"id_card","gongsi","name","gangweibutie","ranliaobutie",
|
||||
"linshibutie","zhengfubutie","fensi","haopaihaoma","qita"},//身份证,公司,姓名,岗位补贴,燃油补贴,临时补贴,其他补贴
|
||||
filter, null);
|
||||
if (datas == null) {
|
||||
return null;
|
||||
}
|
||||
if (datas.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
for (Map<String,Object> map:datas){
|
||||
String id=(String)map.get("id_card");
|
||||
String fensi=(String)map.get("fensi");
|
||||
jsonObject.put(id,fensi);
|
||||
}
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
||||
98
src/main/java/com/example/sso/util/TimeUtil.java
Normal file
98
src/main/java/com/example/sso/util/TimeUtil.java
Normal file
@ -0,0 +1,98 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class TimeUtil {
|
||||
/**
|
||||
* 由于时区的原因,调整时区
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static String nowtime(){
|
||||
// 获取当前时间
|
||||
// 获取当前的日期和时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
// 向前推8个小时
|
||||
LocalDateTime eightHoursAgo = now.minusHours(8);
|
||||
|
||||
// 创建DateTimeFormatter来定义时间的格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
// 使用formatter格式化日期和时间
|
||||
String formattedDateTime = eightHoursAgo.format(formatter);
|
||||
|
||||
|
||||
|
||||
return formattedDateTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String two(){
|
||||
// 获取当前时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
// 向前推6个小时
|
||||
LocalDateTime adjustedDateTime = now.minusHours(6);
|
||||
|
||||
// 格式化输出
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
String formattedDateTime = adjustedDateTime.format(formatter);
|
||||
|
||||
|
||||
|
||||
return formattedDateTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String now(){
|
||||
// 获取当前时间
|
||||
Date now = new Date();
|
||||
|
||||
// 定义格式:yyyyMMddHHmmss
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
|
||||
// 格式化输出
|
||||
String formattedTime = sdf.format(now);
|
||||
|
||||
|
||||
|
||||
return formattedTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static long time(){
|
||||
// 获取当前时间
|
||||
long timestamp = System.currentTimeMillis();
|
||||
System.out.println("毫秒级时间戳:" + timestamp);
|
||||
long timestamps = timestamp/1000;
|
||||
|
||||
return timestamps;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
275
src/main/java/com/example/sso/util/V5utils.java
Normal file
275
src/main/java/com/example/sso/util/V5utils.java
Normal file
@ -0,0 +1,275 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class V5utils {
|
||||
/*
|
||||
查询多条数据
|
||||
*/
|
||||
public static String list(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/list");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String delete(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/delete");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
//新增
|
||||
public static String add(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/create");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String updata(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/update");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
public static String updatass(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/batch_update");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
public static String adds(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://www.jiyuankeshang.com/api/v5/app/entry/data/batch_create");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json");
|
||||
httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
}
|
||||
381
src/main/java/com/example/sso/util/YiZhangUtil.java
Normal file
381
src/main/java/com/example/sso/util/YiZhangUtil.java
Normal file
@ -0,0 +1,381 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.security.KeyFactory;
|
||||
import java.security.PrivateKey;
|
||||
import java.security.PublicKey;
|
||||
import java.security.Signature;
|
||||
import java.security.spec.PKCS8EncodedKeySpec;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
|
||||
public class YiZhangUtil {
|
||||
|
||||
public static String newlossplatform(String siteCode,String rediskey,String sign) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpGet httpGet = new HttpGet("https://jkalad.jryzt.com/aiclaimNewGarageinfo/garageRule.html?siteCode=" + siteCode+ "&reqData=" + rediskey + "&signature="+sign );
|
||||
String string = httpGet.toString();
|
||||
String responseBody = null;
|
||||
try {
|
||||
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpGet);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
public static String newlossplatform1(String siteCode,String rediskey,String sign) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpGet httpGet = new HttpGet("https://jkalad.jryzt.com/aiclaimNewGarageinfo/garageApproveList.html?siteCode=" + siteCode+ "&reqData=" + rediskey + "&signature="+sign );
|
||||
String string = httpGet.toString();
|
||||
String responseBody = null;
|
||||
try {
|
||||
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpGet);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
public static String newlossplatform2(String siteCode,String rediskey,String sign) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpGet httpGet = new HttpGet("https://jkalad.jryzt.com/aiclaimNewGarageinfo/garageList.html?siteCode=" + siteCode+ "&reqData=" + rediskey + "&signature="+sign );
|
||||
String string = httpGet.toString();
|
||||
String responseBody = null;
|
||||
try {
|
||||
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpGet);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String signatureData(String data, String priKeyStr) throws Exception {
|
||||
// 对私钥做base64解码
|
||||
byte[] keyBytes = Base64.decodeBase64(priKeyStr);
|
||||
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
|
||||
PrivateKey priKey = keyFactory.generatePrivate(pkcs8KeySpec);
|
||||
Signature signature = Signature.getInstance("MD5withRSA");
|
||||
signature.initSign(priKey);
|
||||
// data为要生成签名的源数据字节数组
|
||||
signature.update(data.getBytes("UTF-8"));
|
||||
return Base64.encodeBase64String(Base64.encodeBase64String(signature.sign()).getBytes());
|
||||
}
|
||||
|
||||
|
||||
public static boolean verifySignature(String data, String pubKeyStr, String signStr) throws Exception {
|
||||
// 对提供的公钥做base64解码
|
||||
byte[] publicKey = Base64.decodeBase64(pubKeyStr);
|
||||
// 签名需要做二次base64解码
|
||||
byte[] sign = Base64.decodeBase64(Base64.decodeBase64(signStr));
|
||||
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKey);
|
||||
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
|
||||
PublicKey pubKey = keyFactory.generatePublic(keySpec);
|
||||
Signature signature = Signature.getInstance("MD5withRSA");
|
||||
signature.initVerify(pubKey);
|
||||
signature.update(data.getBytes("UTF-8"));
|
||||
return signature.verify(sign);
|
||||
}
|
||||
|
||||
public static String key(String jsonBody) {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://icore-alad.pa18.com/alad/damage/outer/getRequestDataKey");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||
// httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String page(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://jkalad.jryzt.com/api/app/reviewdamage/outer/insLoss/pip/page");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
// httpPost.setHeader("Content-Type", "application/json");
|
||||
// httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
public static String guize4(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://jkalad.jryzt.com/api/app/carInsLoss/outer/garage/query");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
// httpPost.setHeader("Content-Type", "application/json");
|
||||
// httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String quoteGuidepage(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://jkalad.jryzt.com/api/app/reviewdamage/outer/quoteGuide/pip/page");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
// httpPost.setHeader("Content-Type", "application/json");
|
||||
// httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String xiuliguize(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://icore-alad.pa18.com/alad/garage/outer/SynOuterInsGarageRuleInfo");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
// httpPost.setHeader("Content-Type", "application/json");
|
||||
// httpPost.setHeader("Authorization", "Bearer " + "BkIyzlh1onqnqu9cQ3ralDQBjECn97ex");
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
243
src/main/java/com/example/sso/util/YunUtil.java
Normal file
243
src/main/java/com/example/sso/util/YunUtil.java
Normal file
@ -0,0 +1,243 @@
|
||||
package com.example.sso.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class YunUtil {
|
||||
|
||||
public static String token(){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://openapi.yunxuetang.cn/token?appId=ml8bfwvx02g&appSecret=MTRjZTBiYTU4YWQ1");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
JSONObject jsonObject = JSON.parseObject(responseBody);
|
||||
String string = jsonObject.getString("accessToken");
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String tokens(){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://openapi.yunxuetang.cn/token?appId=ml8bfwvx02g&appSecret=MTRjZTBiYTU4YWQ1");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
// 设置请求头
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
JSONObject jsonObject = JSON.parseObject(responseBody);
|
||||
String string = jsonObject.getString("accessToken");
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String tongbu(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://openapi.yunxuetang.cn/v1/udp/public/users/sync/batch");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
String token = token();
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||
httpPost.setHeader("Authorization", token);
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
public static String bumen(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://openapi.yunxuetang.cn/v1/udp/public/depts/sync");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
String token = token();
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||
httpPost.setHeader("Authorization", token);
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String alluser(String jsonBody){
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建 POST 请求对象
|
||||
HttpPost httpPost = new HttpPost("https://openapi.yunxuetang.cn/v1/rpt2open/public/o2o/project/student/sync/all");
|
||||
|
||||
String responseBody = null;
|
||||
try {
|
||||
String token = tokens();
|
||||
// 设置请求头
|
||||
httpPost.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||
httpPost.setHeader("Authorization", token);
|
||||
|
||||
|
||||
StringEntity entity = new StringEntity(jsonBody, ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(entity);
|
||||
|
||||
// 执行请求,获取响应对象
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
|
||||
try {
|
||||
// 从响应对象中获取响应实体
|
||||
HttpEntity responseEntity = response.getEntity();
|
||||
|
||||
// 处理响应数据
|
||||
responseBody = EntityUtils.toString(responseEntity);
|
||||
System.out.println(responseBody);
|
||||
} finally {
|
||||
// 关闭响应对象
|
||||
response.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
// 关闭 HttpClient
|
||||
httpClient.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
}
|
||||
5
src/main/resources/application.properties
Normal file
5
src/main/resources/application.properties
Normal file
@ -0,0 +1,5 @@
|
||||
server.port=8089
|
||||
server.ssl.key-store=classpath:oioioi.jiyuankeshang.com.jks
|
||||
server.ssl.key-store-password=2u75hg6v08
|
||||
server.ssl.key-store-type=JKS
|
||||
|
||||
BIN
src/main/resources/oioioi.jiyuankeshang.com.jks
Normal file
BIN
src/main/resources/oioioi.jiyuankeshang.com.jks
Normal file
Binary file not shown.
27
src/test/java/com/example/sso/SsoApplicationTests.java
Normal file
27
src/test/java/com/example/sso/SsoApplicationTests.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.example.sso;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SpringBootTest
|
||||
class SsoApplicationTests {
|
||||
|
||||
@Test
|
||||
void context() {
|
||||
String json = "[{\"name\":\"1111\",\"code\":\"123\"},{\"name\":\"1111\",\"code\":\"123\"},{\"name\":\"1234\",\"code\":\"111\"}]";
|
||||
List list = JSONObject.parseArray(json);
|
||||
HashSet hs = new HashSet(list);
|
||||
String jsonSet = JSON.toJSONString(hs);
|
||||
JSONArray newjsonarray= new JSONArray(Collections.singletonList(jsonSet));
|
||||
System.out.println(newjsonarray);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user