Compare commits
46 Commits
Author | SHA1 | Date |
---|---|---|
|
6bab1e8f3f | 4 weeks ago |
|
31f626cd67 | 4 weeks ago |
|
d1179bf563 | 4 weeks ago |
|
b66e7d0956 | 3 months ago |
|
569e6b471a | 3 months ago |
|
b4d7a88631 | 3 months ago |
|
65842c1603 | 4 months ago |
|
69d1ccab40 | 8 months ago |
|
09ef690186 | 9 months ago |
|
178b680dee | 9 months ago |
|
2023d76f91 | 9 months ago |
|
09868ce503 | 9 months ago |
|
c30c5291bf | 9 months ago |
|
9e5f283984 | 9 months ago |
|
260d88a383 | 9 months ago |
|
b22476dfad | 9 months ago |
|
778a779510 | 9 months ago |
|
6d0d1e1277 | 9 months ago |
|
91ddd6483c | 9 months ago |
|
068f16f603 | 9 months ago |
|
997ea95114 | 9 months ago |
|
391badf2aa | 1 year ago |
|
27be46be4d | 1 year ago |
|
421e81282f | 1 year ago |
|
5ee190e5a4 | 1 year ago |
|
7844f44ce1 | 1 year ago |
|
2fa1b5df03 | 1 year ago |
|
abcabde513 | 1 year ago |
|
192cb6fad4 | 1 year ago |
|
237446039d | 1 year ago |
|
60fb1bf5d7 | 2 years ago |
|
771a61629e | 2 years ago |
|
a534352e01 | 2 years ago |
|
86b3317c26 | 2 years ago |
|
53720f250f | 2 years ago |
|
7ddd07d908 | 2 years ago |
|
d7820a3ec1 | 2 years ago |
|
09c8cad166 | 2 years ago |
|
05c1f4e40b | 2 years ago |
|
4a586fc9de | 2 years ago |
|
8a1a9b6432 | 2 years ago |
|
d31e24ecce | 2 years ago |
|
481e8af7c5 | 2 years ago |
|
d0908dfd28 | 2 years ago |
|
94f87fc159 | 2 years ago |
|
829a9833c4 | 2 years ago |
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
# 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.
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
|
@ -1,316 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||
. /usr/local/etc/mavenrc
|
||||
fi
|
||||
|
||||
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="`\\unset -f command; \\command -v 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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
else
|
||||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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" || rm -f "$wrapperJarPath"
|
||||
else
|
||||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$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 \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
@ -1,188 +0,0 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\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/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
|
||||
FOR /F "usebackq 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%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.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 "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\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%
|
||||
|
||||
cmd /C exit /B %ERROR_CODE%
|
@ -0,0 +1,18 @@
|
||||
CREATE TABLE `terminal_main_favors` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
CREATE TABLE `terminal_favors` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`main_id` int DEFAULT NULL COMMENT '一级文件夹id',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
# 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.
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
|
@ -0,0 +1,87 @@
|
||||
package com.shxy.xymanager_admin.controller;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.shxy.xymanager_common.annotation.Log;
|
||||
import com.shxy.xymanager_common.base.BaseController;
|
||||
import com.shxy.xymanager_common.base.ResponseReult;
|
||||
import com.shxy.xymanager_common.bean.ServiceBody;
|
||||
import com.shxy.xymanager_common.bean.ServiceStatus;
|
||||
import com.shxy.xymanager_common.model.OpenTerminalsModel;
|
||||
import com.shxy.xymanager_common.model.TerminalPhotoListForOpenModel;
|
||||
import com.shxy.xymanager_common.model.TerminalStatisticsModel;
|
||||
import com.shxy.xymanager_common.util.xinyin.HeaderUtil;
|
||||
import com.shxy.xymanager_common.vo.*;
|
||||
import com.shxy.xymanager_service.service.OpenService;
|
||||
import com.shxy.xymanager_service.service.TerminalPhotoService;
|
||||
import com.shxy.xymanager_service.service.TerminalService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(value = "新疆平台接口", tags = "新疆平台相关")
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class OpenXJController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
TerminalPhotoService terminalPhotoService;
|
||||
|
||||
@Autowired
|
||||
TerminalService terminalService;
|
||||
|
||||
@Autowired
|
||||
OpenService openService;
|
||||
|
||||
@ApiOperation(value = "新疆设备列表接口", notes = "新疆设备列表接口", httpMethod = "POST")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
@RequestMapping("/getXJDeviceList")
|
||||
@Log(title = "设备列表接口", type = "查询")
|
||||
public ResponseReult<List<OpenTerminalsModel>> getDeviceListForXJ() {
|
||||
ServiceBody<List<OpenTerminalsModel>> serviceBody = openService.getDeviceListForXJ();
|
||||
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||
return ResponseReult.success(serviceBody.getData());
|
||||
} else {
|
||||
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新疆图片查询", notes = "新疆图片查询", httpMethod = "POST")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
@RequestMapping("/getXJPhotoList")
|
||||
@Log(title = "对外图片查询", type = "查询")
|
||||
public ResponseReult<TerminalPhotoListForOpenModel> getXJPhotoList(@RequestHeader HttpHeaders headers, @RequestBody @Validated OpenTerminalAndTimeVo vo) {
|
||||
String requestIp = HeaderUtil.getAddress();
|
||||
ServiceBody<TerminalPhotoListForOpenModel> serviceBody = terminalPhotoService.getPhotoListForOpen(requestIp, vo);
|
||||
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||
return ResponseReult.success(serviceBody.getData());
|
||||
} else {
|
||||
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新疆远程拍照(短视频)控制", notes = "新疆远程拍照(短视频)控制接口", httpMethod = "POST")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 1, message = "设备参数缺少"), @ApiResponse(code = 2, message = "设备不存在")})
|
||||
@RequestMapping("/ctrlXJCmaDeviceCapture")
|
||||
@Log(title = "远程拍照(短视频)控制", type = "查询")
|
||||
public ResponseReult<String> ctrlCmaDeviceCapture(@RequestBody @Validated OpenXJDeviceCaptureVo vo) {
|
||||
ServiceBody<String> serviceBody = openService.ctrlXJCmaDeviceCapture(vo);
|
||||
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||
return ResponseReult.success(serviceBody.getData());
|
||||
} else {
|
||||
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,57 +1,36 @@
|
||||
package com.shxy.xymanager_admin.controller;
|
||||
|
||||
import com.shxy.xymanager_common.annotation.Log;
|
||||
|
||||
import com.shxy.xymanager_common.base.BaseController;
|
||||
import com.shxy.xymanager_common.base.ResponseReult;
|
||||
import com.shxy.xymanager_framework.socket.WebSocketServer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(value = "测试接口", tags = "测试接口tags")
|
||||
@Controller
|
||||
@RestController
|
||||
@Api(tags = {"测试接口"})
|
||||
@RequestMapping("test")
|
||||
@Slf4j
|
||||
public class TestController {
|
||||
public class TestController extends BaseController {
|
||||
|
||||
@ApiOperation(value = "测试", notes = "测试notes", httpMethod = "POST")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
@RequestMapping("/user/login")
|
||||
@Log(title = "测试", type = "查询")
|
||||
public String gettest() {
|
||||
log.info("有一个沙雕点了链接");
|
||||
return "/api/index2";
|
||||
}
|
||||
@Resource
|
||||
WebSocketServer webSocketServer;
|
||||
|
||||
@GetMapping("/user/logins")
|
||||
@Log(title = "测试", type = "查询")
|
||||
public String hhtest() {
|
||||
log.info("有一个沙雕点了链接");
|
||||
return "/api/index2.html";
|
||||
@GetMapping("sendMsg")
|
||||
@ApiOperation("发送消息")
|
||||
public void sendMsg(String msg) {
|
||||
webSocketServer.sendNotice(null, msg);
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "登录", notes = "登录", httpMethod = "POST")
|
||||
//// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||
// @RequestMapping("/login")
|
||||
// @Log(title = "登录", type = "查询")
|
||||
// public String login(String username, String password) {
|
||||
// //获取主题对象
|
||||
// Subject subject = SecurityUtils.getSubject();
|
||||
// try {
|
||||
// subject.login(new UsernamePasswordToken(username,password));
|
||||
// System.out.println("登录成功!!!");
|
||||
// return "登录成功";
|
||||
// } catch (UnknownAccountException e) {
|
||||
// e.printStackTrace();
|
||||
// System.out.println("用户错误!!!");
|
||||
// } catch (IncorrectCredentialsException e) {
|
||||
// System.out.println("密码错误!!!");
|
||||
// }
|
||||
// return "登录失败";
|
||||
// }
|
||||
|
||||
@GetMapping("test")
|
||||
@ApiOperation("test")
|
||||
public ResponseReult<String> test() {
|
||||
return ResponseReult.success("OK");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@Data
|
||||
public class GroupAlarmType implements Serializable {
|
||||
|
||||
private BigInteger num;
|
||||
|
||||
private Integer label;
|
||||
|
||||
private String name;
|
||||
|
||||
private String enname;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LastPicTimeDto implements Serializable {
|
||||
|
||||
private BigInteger photoTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import com.shxy.xymanager_common.enums.CommonStatus;
|
||||
import com.shxy.xymanager_common.util.MyDateUtils;
|
||||
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "对外设备列表", description = "对外设备列表")
|
||||
public class OpenTerminalsAndStatusDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "id", example = "123456")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "装置编号", example = "123456")
|
||||
private String cmdid;
|
||||
|
||||
@ApiModelProperty(value = "装置原始编号", example = "123456")
|
||||
private Short orgId;
|
||||
|
||||
@ApiModelProperty(value = "装置名称", example = "123456")
|
||||
private String equipName;
|
||||
|
||||
@ApiModelProperty(value = "装置显示名称", example = "123456")
|
||||
private String displayName;
|
||||
|
||||
private String model;
|
||||
|
||||
@ApiModelProperty(value = "装置出厂版本", example = "123456")
|
||||
private String essentialInfoVersion;
|
||||
|
||||
private Integer hasPan;
|
||||
|
||||
@ApiModelProperty(value = "装置生产厂家", example = "123456")
|
||||
private String bsManufacturer;
|
||||
|
||||
@ApiModelProperty(value = "装置生产日期", example = "123456")
|
||||
private Date bsProductionDate;
|
||||
|
||||
@ApiModelProperty(value = "装置出厂编号", example = "123456")
|
||||
private String bsIdentifier;
|
||||
|
||||
@ApiModelProperty(value = "纬度", example = "123456")
|
||||
private Double latitude;
|
||||
|
||||
@ApiModelProperty(value = "经度", example = "123456")
|
||||
private Double longitude;
|
||||
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "规约编号", example = "123456")
|
||||
private Integer protocol;
|
||||
|
||||
private Short signalStrength4g;
|
||||
|
||||
private BigInteger bootTime;
|
||||
|
||||
private float batteryCapacity;
|
||||
|
||||
private float batteryVoltage;
|
||||
|
||||
private BigInteger lastHeartbeat;
|
||||
|
||||
@ApiModelProperty(value = "在线状态", example = "0--掉线1--在线")
|
||||
private Integer onlinestatus;
|
||||
|
||||
public Integer getOnlinestatus() {
|
||||
if (lastHeartbeat == null) {
|
||||
return CommonStatus.DELETE.value();
|
||||
}
|
||||
long time = MyDateUtils.TimeSecond2MillSecond(lastHeartbeat.longValue());
|
||||
DateTime date = MyDateUtils.date(time);
|
||||
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
|
||||
if (between > TerminalUtils.hearttime) {
|
||||
return CommonStatus.DELETE.value();
|
||||
} else {
|
||||
return CommonStatus.EFFECTIVE.value();
|
||||
}
|
||||
}
|
||||
private String sim;
|
||||
private Date workingDate;
|
||||
private Integer netType;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@Data
|
||||
public class TerminalImgAlarmsAndPhotoDto implements Serializable {
|
||||
|
||||
private BigInteger id;
|
||||
|
||||
private Integer termId;
|
||||
|
||||
private Integer channelId;
|
||||
|
||||
private Integer presetId;
|
||||
|
||||
private BigInteger photoOrgId;
|
||||
|
||||
private BigInteger alarmTime;
|
||||
|
||||
private Integer label;
|
||||
|
||||
private String name;
|
||||
|
||||
private String enname;
|
||||
|
||||
private Float prob;
|
||||
|
||||
private Float x;
|
||||
|
||||
private Float y;
|
||||
|
||||
private Float width;
|
||||
|
||||
private Float height;
|
||||
|
||||
private Integer isread;
|
||||
|
||||
private Integer mediaType;
|
||||
|
||||
private Integer photowidth;
|
||||
|
||||
private Integer photoheight;
|
||||
|
||||
private Integer fileSize;
|
||||
|
||||
private BigInteger photoTime;
|
||||
|
||||
private BigInteger recvTime;
|
||||
|
||||
private String path;
|
||||
|
||||
private String thumb;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TerminalsAndPositionDto implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer towerId;
|
||||
|
||||
private String cmdId;
|
||||
|
||||
private Double latitude;
|
||||
|
||||
private Double longitude;
|
||||
|
||||
private Integer radius;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.shxy.xymanager_common.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TerminalsAndStatusAndLastPicDto implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer towerId;
|
||||
|
||||
private String cmdId;
|
||||
|
||||
private String displayName;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer signalStrength4g;
|
||||
|
||||
private BigInteger bootTime;
|
||||
|
||||
private float batteryCapacity;
|
||||
|
||||
private float batteryVoltage;
|
||||
|
||||
private BigInteger lastHeartbeat;
|
||||
|
||||
private Double latitude;
|
||||
|
||||
private Double longitude;
|
||||
|
||||
private Integer radius;
|
||||
|
||||
private List<LastPicTimeDto> list;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class Protocols implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String version;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TerminalFavors implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private Integer mainId;
|
||||
|
||||
private String mainname;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,511 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalFavorsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TerminalFavorsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdIsNull() {
|
||||
addCriterion("main_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdIsNotNull() {
|
||||
addCriterion("main_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdEqualTo(Integer value) {
|
||||
addCriterion("main_id =", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdNotEqualTo(Integer value) {
|
||||
addCriterion("main_id <>", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdGreaterThan(Integer value) {
|
||||
addCriterion("main_id >", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("main_id >=", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdLessThan(Integer value) {
|
||||
addCriterion("main_id <", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("main_id <=", value, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdIn(List<Integer> values) {
|
||||
addCriterion("main_id in", values, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdNotIn(List<Integer> values) {
|
||||
addCriterion("main_id not in", values, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("main_id between", value1, value2, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMainIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("main_id not between", value1, value2, "mainId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TerminalFavs implements Serializable {
|
||||
|
||||
private Integer termId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TerminalMainFavors implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,451 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalMainFavorsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TerminalMainFavorsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TerminalPhotoMarkPaths implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer markId;
|
||||
|
||||
private Float x1;
|
||||
|
||||
private Float y1;
|
||||
|
||||
private Float x2;
|
||||
|
||||
private Float y2;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,560 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalPhotoMarkPathsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TerminalPhotoMarkPathsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdIsNull() {
|
||||
addCriterion("mark_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdIsNotNull() {
|
||||
addCriterion("mark_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdEqualTo(Integer value) {
|
||||
addCriterion("mark_id =", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdNotEqualTo(Integer value) {
|
||||
addCriterion("mark_id <>", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdGreaterThan(Integer value) {
|
||||
addCriterion("mark_id >", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("mark_id >=", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdLessThan(Integer value) {
|
||||
addCriterion("mark_id <", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("mark_id <=", value, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdIn(List<Integer> values) {
|
||||
addCriterion("mark_id in", values, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdNotIn(List<Integer> values) {
|
||||
addCriterion("mark_id not in", values, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("mark_id between", value1, value2, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMarkIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("mark_id not between", value1, value2, "markId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1IsNull() {
|
||||
addCriterion("x1 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1IsNotNull() {
|
||||
addCriterion("x1 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1EqualTo(Float value) {
|
||||
addCriterion("x1 =", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1NotEqualTo(Float value) {
|
||||
addCriterion("x1 <>", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1GreaterThan(Float value) {
|
||||
addCriterion("x1 >", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1GreaterThanOrEqualTo(Float value) {
|
||||
addCriterion("x1 >=", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1LessThan(Float value) {
|
||||
addCriterion("x1 <", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1LessThanOrEqualTo(Float value) {
|
||||
addCriterion("x1 <=", value, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1In(List<Float> values) {
|
||||
addCriterion("x1 in", values, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1NotIn(List<Float> values) {
|
||||
addCriterion("x1 not in", values, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1Between(Float value1, Float value2) {
|
||||
addCriterion("x1 between", value1, value2, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX1NotBetween(Float value1, Float value2) {
|
||||
addCriterion("x1 not between", value1, value2, "x1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1IsNull() {
|
||||
addCriterion("y1 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1IsNotNull() {
|
||||
addCriterion("y1 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1EqualTo(Float value) {
|
||||
addCriterion("y1 =", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1NotEqualTo(Float value) {
|
||||
addCriterion("y1 <>", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1GreaterThan(Float value) {
|
||||
addCriterion("y1 >", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1GreaterThanOrEqualTo(Float value) {
|
||||
addCriterion("y1 >=", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1LessThan(Float value) {
|
||||
addCriterion("y1 <", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1LessThanOrEqualTo(Float value) {
|
||||
addCriterion("y1 <=", value, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1In(List<Float> values) {
|
||||
addCriterion("y1 in", values, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1NotIn(List<Float> values) {
|
||||
addCriterion("y1 not in", values, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1Between(Float value1, Float value2) {
|
||||
addCriterion("y1 between", value1, value2, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY1NotBetween(Float value1, Float value2) {
|
||||
addCriterion("y1 not between", value1, value2, "y1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2IsNull() {
|
||||
addCriterion("x2 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2IsNotNull() {
|
||||
addCriterion("x2 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2EqualTo(Float value) {
|
||||
addCriterion("x2 =", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2NotEqualTo(Float value) {
|
||||
addCriterion("x2 <>", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2GreaterThan(Float value) {
|
||||
addCriterion("x2 >", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2GreaterThanOrEqualTo(Float value) {
|
||||
addCriterion("x2 >=", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2LessThan(Float value) {
|
||||
addCriterion("x2 <", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2LessThanOrEqualTo(Float value) {
|
||||
addCriterion("x2 <=", value, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2In(List<Float> values) {
|
||||
addCriterion("x2 in", values, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2NotIn(List<Float> values) {
|
||||
addCriterion("x2 not in", values, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2Between(Float value1, Float value2) {
|
||||
addCriterion("x2 between", value1, value2, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andX2NotBetween(Float value1, Float value2) {
|
||||
addCriterion("x2 not between", value1, value2, "x2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2IsNull() {
|
||||
addCriterion("y2 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2IsNotNull() {
|
||||
addCriterion("y2 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2EqualTo(Float value) {
|
||||
addCriterion("y2 =", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2NotEqualTo(Float value) {
|
||||
addCriterion("y2 <>", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2GreaterThan(Float value) {
|
||||
addCriterion("y2 >", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2GreaterThanOrEqualTo(Float value) {
|
||||
addCriterion("y2 >=", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2LessThan(Float value) {
|
||||
addCriterion("y2 <", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2LessThanOrEqualTo(Float value) {
|
||||
addCriterion("y2 <=", value, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2In(List<Float> values) {
|
||||
addCriterion("y2 in", values, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2NotIn(List<Float> values) {
|
||||
addCriterion("y2 not in", values, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2Between(Float value1, Float value2) {
|
||||
addCriterion("y2 between", value1, value2, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andY2NotBetween(Float value1, Float value2) {
|
||||
addCriterion("y2 not between", value1, value2, "y2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class TerminalPhotoMarks implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer termId;
|
||||
|
||||
private Integer channelId;
|
||||
|
||||
private Integer width;
|
||||
|
||||
private Integer height;
|
||||
|
||||
private String color;
|
||||
|
||||
private Integer boderWidth;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,751 @@
|
||||
package com.shxy.xymanager_common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class TerminalPhotoMarksExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TerminalPhotoMarksExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdIsNull() {
|
||||
addCriterion("term_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdIsNotNull() {
|
||||
addCriterion("term_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdEqualTo(Integer value) {
|
||||
addCriterion("term_id =", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotEqualTo(Integer value) {
|
||||
addCriterion("term_id <>", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdGreaterThan(Integer value) {
|
||||
addCriterion("term_id >", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("term_id >=", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdLessThan(Integer value) {
|
||||
addCriterion("term_id <", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("term_id <=", value, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdIn(List<Integer> values) {
|
||||
addCriterion("term_id in", values, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotIn(List<Integer> values) {
|
||||
addCriterion("term_id not in", values, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("term_id between", value1, value2, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTermIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("term_id not between", value1, value2, "termId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdIsNull() {
|
||||
addCriterion("channel_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdIsNotNull() {
|
||||
addCriterion("channel_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdEqualTo(Integer value) {
|
||||
addCriterion("channel_id =", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdNotEqualTo(Integer value) {
|
||||
addCriterion("channel_id <>", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdGreaterThan(Integer value) {
|
||||
addCriterion("channel_id >", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("channel_id >=", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdLessThan(Integer value) {
|
||||
addCriterion("channel_id <", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("channel_id <=", value, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdIn(List<Integer> values) {
|
||||
addCriterion("channel_id in", values, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdNotIn(List<Integer> values) {
|
||||
addCriterion("channel_id not in", values, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("channel_id between", value1, value2, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andChannelIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("channel_id not between", value1, value2, "channelId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthIsNull() {
|
||||
addCriterion("width is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthIsNotNull() {
|
||||
addCriterion("width is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthEqualTo(Integer value) {
|
||||
addCriterion("width =", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthNotEqualTo(Integer value) {
|
||||
addCriterion("width <>", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthGreaterThan(Integer value) {
|
||||
addCriterion("width >", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("width >=", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthLessThan(Integer value) {
|
||||
addCriterion("width <", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("width <=", value, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthIn(List<Integer> values) {
|
||||
addCriterion("width in", values, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthNotIn(List<Integer> values) {
|
||||
addCriterion("width not in", values, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthBetween(Integer value1, Integer value2) {
|
||||
addCriterion("width between", value1, value2, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWidthNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("width not between", value1, value2, "width");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightIsNull() {
|
||||
addCriterion("height is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightIsNotNull() {
|
||||
addCriterion("height is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightEqualTo(Integer value) {
|
||||
addCriterion("height =", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightNotEqualTo(Integer value) {
|
||||
addCriterion("height <>", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightGreaterThan(Integer value) {
|
||||
addCriterion("height >", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("height >=", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightLessThan(Integer value) {
|
||||
addCriterion("height <", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("height <=", value, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightIn(List<Integer> values) {
|
||||
addCriterion("height in", values, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightNotIn(List<Integer> values) {
|
||||
addCriterion("height not in", values, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightBetween(Integer value1, Integer value2) {
|
||||
addCriterion("height between", value1, value2, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andHeightNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("height not between", value1, value2, "height");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorIsNull() {
|
||||
addCriterion("color is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorIsNotNull() {
|
||||
addCriterion("color is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorEqualTo(String value) {
|
||||
addCriterion("color =", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorNotEqualTo(String value) {
|
||||
addCriterion("color <>", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorGreaterThan(String value) {
|
||||
addCriterion("color >", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("color >=", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorLessThan(String value) {
|
||||
addCriterion("color <", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorLessThanOrEqualTo(String value) {
|
||||
addCriterion("color <=", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorLike(String value) {
|
||||
addCriterion("color like", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorNotLike(String value) {
|
||||
addCriterion("color not like", value, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorIn(List<String> values) {
|
||||
addCriterion("color in", values, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorNotIn(List<String> values) {
|
||||
addCriterion("color not in", values, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorBetween(String value1, String value2) {
|
||||
addCriterion("color between", value1, value2, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andColorNotBetween(String value1, String value2) {
|
||||
addCriterion("color not between", value1, value2, "color");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthIsNull() {
|
||||
addCriterion("boder_width is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthIsNotNull() {
|
||||
addCriterion("boder_width is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthEqualTo(Integer value) {
|
||||
addCriterion("boder_width =", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthNotEqualTo(Integer value) {
|
||||
addCriterion("boder_width <>", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthGreaterThan(Integer value) {
|
||||
addCriterion("boder_width >", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("boder_width >=", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthLessThan(Integer value) {
|
||||
addCriterion("boder_width <", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("boder_width <=", value, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthIn(List<Integer> values) {
|
||||
addCriterion("boder_width in", values, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthNotIn(List<Integer> values) {
|
||||
addCriterion("boder_width not in", values, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthBetween(Integer value1, Integer value2) {
|
||||
addCriterion("boder_width between", value1, value2, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBoderWidthNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("boder_width not between", value1, value2, "boderWidth");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shxy.xymanager_common.enums;
|
||||
|
||||
|
||||
/**
|
||||
* 下发状态
|
||||
* "0---未知 1---成功 2---失败"
|
||||
*
|
||||
* @author 晶晶
|
||||
*/
|
||||
public enum TakePicStatus {
|
||||
UNKONW("UNKONW", 0), SUCCESS("SUCCESS", 1), FAIL("FAIL", 2);
|
||||
|
||||
private String name;
|
||||
private Integer value;
|
||||
|
||||
TakePicStatus(String name, Integer value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value + "_" + this.name;
|
||||
}
|
||||
|
||||
public Integer value() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.shxy.xymanager_common.excelbean;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 设备信息和最新心跳和最后一张图片上传时间列表
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备信息和最新心跳和最后一张图片上传时间列表excel", description = "设备信息和最新心跳和最后一张图片上传时间列表excel")
|
||||
public class TerminalAndLastPicListExcelModel implements Serializable {
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("线路名称")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private String lineName;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("杆塔名称")
|
||||
@ApiModelProperty(value = "杆塔名称", example = "123456")
|
||||
private String towerName;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("设备编号")
|
||||
@ApiModelProperty(value = "设备编号", example = "123456")
|
||||
private String cmdId;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("是否在线")
|
||||
@ApiModelProperty(value = "是否在线", example = "21321")
|
||||
private String isonline;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("最新心跳时间")
|
||||
@ApiModelProperty(value = "最新心跳时间", example = "213")
|
||||
private String hearttime;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("最新照片上传时间")
|
||||
@ApiModelProperty(value = "最新照片上传时间", example = "123456")
|
||||
private String pictime;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("纬度")
|
||||
@ApiModelProperty(value = "纬度", example = "21321")
|
||||
private Double latitude;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("经度")
|
||||
@ApiModelProperty(value = "经度", example = "213")
|
||||
private Double longitude;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("半径")
|
||||
@ApiModelProperty(value = "经度", example = "123456")
|
||||
private Integer radius;
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.shxy.xymanager_common.excelbean;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息列表
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备列表excel", description = "设备列表excel")
|
||||
public class TerminalListExcelModel implements Serializable {
|
||||
|
||||
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("线路名称")
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private String lineName;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("杆塔名称")
|
||||
@ApiModelProperty(value = "杆塔名称", example = "123456")
|
||||
private String towerName;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("设备编号")
|
||||
@ApiModelProperty(value = "设备编号", example = "123456")
|
||||
private String cmdId;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("纬度")
|
||||
@ApiModelProperty(value = "纬度", example = "21321")
|
||||
private Double latitude;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("经度")
|
||||
@ApiModelProperty(value = "经度", example = "213")
|
||||
private Double longitude;
|
||||
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("半径")
|
||||
@ApiModelProperty(value = "经度", example = "123456")
|
||||
private Integer radius;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 全局参数对象
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "全局参数对象", description = "全局参数对象")
|
||||
public class GlobalParamsModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "图像标志", example = "123456")
|
||||
private Integer imgMark;
|
||||
|
||||
@ApiModelProperty(value = "告警通道", example = "123456")
|
||||
private Integer alarmChannel;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MessageModel {
|
||||
int type;
|
||||
String content;
|
||||
String action;
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import com.shxy.xymanager_common.enums.CommonStatus;
|
||||
import com.shxy.xymanager_common.util.MyDateUtils;
|
||||
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "对外设备列表", description = "对外设备列表")
|
||||
public class OpenTerminalsModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "id", example = "123456")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "装置编号", example = "123456")
|
||||
private String cmdid;
|
||||
|
||||
@ApiModelProperty(value = "线路编号", example = "123456")
|
||||
private Integer lineid;
|
||||
|
||||
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||
private String linename;
|
||||
|
||||
@ApiModelProperty(value = "杆塔编号", example = "123456")
|
||||
private Integer towerid;
|
||||
|
||||
@ApiModelProperty(value = "杆塔名称", example = "123456")
|
||||
private String towername;
|
||||
|
||||
@ApiModelProperty(value = "装置显示名称", example = "123456")
|
||||
private String displayName;
|
||||
|
||||
@ApiModelProperty(value = "装置出厂版本", example = "123456")
|
||||
private String essentialInfoVersion;
|
||||
|
||||
@ApiModelProperty(value = "装置生产厂家", example = "123456")
|
||||
private String bsManufacturer;
|
||||
|
||||
@ApiModelProperty(value = "装置生产日期", example = "123456")
|
||||
private Date bsProductionDate;
|
||||
|
||||
@ApiModelProperty(value = "装置出厂编号", example = "123456")
|
||||
private String bsIdentifier;
|
||||
|
||||
@ApiModelProperty(value = "纬度", example = "123456")
|
||||
private Double latitude;
|
||||
|
||||
@ApiModelProperty(value = "经度", example = "123456")
|
||||
private Double longitude;
|
||||
|
||||
@ApiModelProperty(value = "规约编号", example = "123456")
|
||||
private Integer protocol;
|
||||
|
||||
@ApiModelProperty(value = "最后一次心跳时间", example = "123456")
|
||||
private BigInteger lastHeartbeat;
|
||||
|
||||
@ApiModelProperty(value = "在线状态", example = "0--掉线1--在线")
|
||||
private Integer onlinestatus;
|
||||
|
||||
public Integer getOnlinestatus() {
|
||||
if (lastHeartbeat == null) {
|
||||
return CommonStatus.DELETE.value();
|
||||
}
|
||||
long time = MyDateUtils.TimeSecond2MillSecond(lastHeartbeat.longValue());
|
||||
DateTime date = MyDateUtils.date(time);
|
||||
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
|
||||
if (between > TerminalUtils.hearttime) {
|
||||
return CommonStatus.DELETE.value();
|
||||
} else {
|
||||
return CommonStatus.EFFECTIVE.value();
|
||||
}
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 主动拍照的返回对象
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "主动拍照的返回对象", description = "主动拍照的返回对象")
|
||||
public class TakePIcModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "请求编号", example = "123456")
|
||||
private Integer requestId;
|
||||
|
||||
@ApiModelProperty(value = "拍照时间", example = "AAAA")
|
||||
private Date taketime;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 主动拍照下发指令的返回对象
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "主动拍照下发指令的返回对象", description = "主动拍照下发指令的返回对象")
|
||||
public class TakePIcStatusModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "指令状态", example = "123456")
|
||||
private Integer cmaStatus;
|
||||
|
||||
@ApiModelProperty(value = "照片状态", example = "AAAA")
|
||||
private Boolean picStatus;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "记录拍照装置通道信息", description = "记录拍照装置通道信息描述")
|
||||
public class TermChannelModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "装置id", example = "123456")
|
||||
private Integer termId;
|
||||
|
||||
@ApiModelProperty(value = "通道id", example = "123456")
|
||||
private Integer channelId;
|
||||
|
||||
@ApiModelProperty(value = "拍照时间", example = "123456")
|
||||
private Long photoTime;
|
||||
|
||||
@ApiModelProperty(value = "当前时间", example = "123456")
|
||||
private Long currentTime;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
* 设备统计表
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备统计表", description = "设备统计表返回")
|
||||
public class TerminalStatisticsModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "装置总数", example = "123456")
|
||||
private Integer totalNum;
|
||||
|
||||
@ApiModelProperty(value = "装置在线数量", example = "123456")
|
||||
private Integer onlineNum;
|
||||
|
||||
@ApiModelProperty(value = "装置不在线数量", example = "123456")
|
||||
private Integer offlineNum;
|
||||
|
||||
@ApiModelProperty(value = "装置在线数量百分比", example = "12345678")
|
||||
private double onlinePercent;
|
||||
|
||||
@ApiModelProperty(value = "装置不在线数量百分比", example = "12345678")
|
||||
private double offlinePercent;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备当日分类告警统计
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备当日分类告警统计", description = "设备当日分类告警统计返回")
|
||||
public class TerminalTodayAlarmStatisticsModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "告警列表", example = "123456")
|
||||
private List<TodayAlarmItem> list;
|
||||
|
||||
@Data
|
||||
public static class TodayAlarmItem {
|
||||
@ApiModelProperty(value = "告警类型名称", example = "123456")
|
||||
private String enname;
|
||||
|
||||
@ApiModelProperty(value = "告警数量", example = "AAAA")
|
||||
private BigInteger num;
|
||||
|
||||
@ApiModelProperty(value = "告警类型", example = "123456")
|
||||
private Integer label;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.shxy.xymanager_common.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备7天告警统计
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "设备7天告警统计", description = "设备7天告警统计返回")
|
||||
public class TerminalWeekAlarmStatisticsModel implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "告警列表", example = "123456")
|
||||
private List<AlarmItem> list;
|
||||
|
||||
@Data
|
||||
public static class AlarmItem {
|
||||
@ApiModelProperty(value = "日期", example = "123456")
|
||||
private Date date;
|
||||
|
||||
@ApiModelProperty(value = "告警数量", example = "AAAA")
|
||||
private BigInteger num;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,220 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
|
||||
import com.alibaba.excel.write.handler.RowWriteHandler;
|
||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
|
||||
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
|
||||
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EasyExcelUtil implements RowWriteHandler {
|
||||
|
||||
private int mergeRowIndex;//从哪一行开始合并
|
||||
private int[] mergeColumnIndex;//excel合并的列
|
||||
private int[] signNum;//合并的唯一标识
|
||||
private int total;//总行数
|
||||
private int lastRow;
|
||||
private int firstCol;
|
||||
private int lastCol;
|
||||
private int firstRow;
|
||||
private int mergeCount = 1;
|
||||
|
||||
private EasyExcelUtil(){}
|
||||
|
||||
private EasyExcelUtil(int mergeRowIndex, int[] mergeColumnIndex, int[] signNum, int total) {
|
||||
this.mergeRowIndex = mergeRowIndex;
|
||||
this.mergeColumnIndex = mergeColumnIndex;
|
||||
this.signNum = signNum;
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param response
|
||||
* @param fileName 文件名称
|
||||
* @param exportList 导出数据
|
||||
* @param clazz 导出实体bean class对象
|
||||
* @param <T>
|
||||
* @throws IOException
|
||||
*/
|
||||
public static <T> void createExcel(HttpServletResponse response, String fileName, List<T> exportList,
|
||||
Class<T> clazz)
|
||||
throws IOException {
|
||||
createExcel(response,fileName,exportList,clazz,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param response
|
||||
* @param fileName 文件名称
|
||||
* @param exportList 导出数据
|
||||
* @param clazz 导出实体bean class对象
|
||||
* @param cellMerge 单元格合并规则
|
||||
* @param <T>
|
||||
* @throws IOException
|
||||
*/
|
||||
public static <T> void createExcel(HttpServletResponse response, String fileName, List<T> exportList,
|
||||
Class<T> clazz, CellMerge cellMerge)
|
||||
throws IOException {
|
||||
// 设置下载信息
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xlsx");
|
||||
|
||||
//定义ExcelWriterSheetBuilder
|
||||
ExcelWriterSheetBuilder excelWriterSheetBuilder = EasyExcel
|
||||
.write(response.getOutputStream(), clazz)
|
||||
.sheet(fileName);
|
||||
|
||||
//合并单元格
|
||||
if (cellMerge != null) {
|
||||
// 从那一行开始合并
|
||||
int mergeRowIndex = 1;
|
||||
EasyExcelUtil
|
||||
excelMergeRowByRowStrategy = new EasyExcelUtil(mergeRowIndex, cellMerge.getMergeColumIndex(),
|
||||
cellMerge.getMergeRuleColumIndex(), exportList.size());
|
||||
excelWriterSheetBuilder.registerWriteHandler(excelMergeRowByRowStrategy);
|
||||
}
|
||||
|
||||
//设置头样式
|
||||
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
//设置内容格式
|
||||
WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
HorizontalCellStyleStrategy horizontalCellStyleStrategy =
|
||||
new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);
|
||||
//设计内容居中
|
||||
contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
//设置内容自动换行
|
||||
contentWriteCellStyle.setWrapped(true);
|
||||
excelWriterSheetBuilder.registerWriteHandler(horizontalCellStyleStrategy);
|
||||
|
||||
//调用doWrite方法
|
||||
excelWriterSheetBuilder.doWrite(exportList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Integer integer, Integer integer1, Boolean aBoolean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer integer, Boolean aBoolean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row,
|
||||
Integer relativeRowIndex, Boolean isHead) {
|
||||
//当前行
|
||||
int curRowIndex = row.getRowNum();
|
||||
//每一行的最大列数
|
||||
short lastCellNum = row.getLastCellNum();
|
||||
|
||||
if (curRowIndex == 1) {
|
||||
//赋初值 第一行
|
||||
firstRow = curRowIndex;
|
||||
}
|
||||
//开始合并位置
|
||||
if (curRowIndex > mergeRowIndex && !row.getCell(0).getStringCellValue().equals("")) {
|
||||
for (int i = 0; i < lastCellNum; i++) {
|
||||
if (i == mergeColumnIndex[i]) {
|
||||
//当前行号 当前行对象 合并的标识位
|
||||
mergeWithPrevAnyRow(writeSheetHolder.getSheet(), curRowIndex, row, signNum);
|
||||
break;//已经进入到合并单元格操作里面了,执行一次就行
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void mergeWithPrevAnyRow(Sheet sheet, int curRowIndex, Row row, int[] signNum) {
|
||||
Row preRow = row.getSheet().getRow(curRowIndex - 1);
|
||||
List<String> rowDataList = new ArrayList<>();
|
||||
List<String> preDataList = new ArrayList<>();
|
||||
|
||||
for (int i : signNum) {
|
||||
Object currentData =
|
||||
row.getCell(i).getCellTypeEnum() == CellType.STRING ? row.getCell(i).getStringCellValue() :
|
||||
row.getCell(i).getNumericCellValue();
|
||||
Object preData =
|
||||
preRow.getCell(i).getCellTypeEnum() == CellType.STRING ? preRow.getCell(i).getStringCellValue() :
|
||||
preRow.getCell(i).getNumericCellValue();
|
||||
rowDataList.add(String.valueOf(currentData));
|
||||
preDataList.add(String.valueOf(preData));
|
||||
}
|
||||
|
||||
String rowDataStr = String.join(",", rowDataList);
|
||||
String preDataStr = String.join(",", preDataList);
|
||||
|
||||
//判断是否合并单元格
|
||||
boolean curEqualsPre = rowDataStr.equals(preDataStr);
|
||||
//判断前一个和后一个相同 并且 标识位相同
|
||||
if (curEqualsPre) {
|
||||
lastRow = curRowIndex;
|
||||
mergeCount++;
|
||||
}
|
||||
//excel过程中合并
|
||||
if (!curEqualsPre && mergeCount > 1) {
|
||||
mergeSheet(firstRow, lastRow, mergeColumnIndex, sheet);
|
||||
mergeCount = 1;
|
||||
}
|
||||
|
||||
//excel结尾处合并
|
||||
if (mergeCount > 1 && total == curRowIndex) {
|
||||
mergeSheet(firstRow, lastRow, mergeColumnIndex, sheet);
|
||||
mergeCount = 1;
|
||||
}
|
||||
|
||||
if (!curEqualsPre) {
|
||||
firstRow = curRowIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void mergeSheet(int firstRow, int lastRow, int[] mergeColumnIndex, Sheet sheet) {
|
||||
for (int colNum : mergeColumnIndex) {
|
||||
firstCol = colNum;
|
||||
lastCol = colNum;
|
||||
CellRangeAddress cellRangeAddress = new CellRangeAddress(firstRow, lastRow, firstCol, lastCol);
|
||||
sheet.addMergedRegion(cellRangeAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单元格合并类
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CellMerge {
|
||||
private int[] mergeColumIndex;
|
||||
private int[] mergeRuleColumIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置单元格合并规则
|
||||
* @param mergeColumIndex
|
||||
* @param mergeRuleColumIndex
|
||||
* @return
|
||||
*/
|
||||
public static CellMerge setCellMerge(int[] mergeColumIndex,int[] mergeRuleColumIndex){
|
||||
EasyExcelUtil excelUtil = new EasyExcelUtil();
|
||||
CellMerge cellMerge = excelUtil.new CellMerge();
|
||||
cellMerge.setMergeColumIndex(mergeColumIndex);
|
||||
cellMerge.setMergeRuleColumIndex(mergeRuleColumIndex);
|
||||
return cellMerge;
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
public class JSONProcessor {
|
||||
|
||||
|
||||
public Map<String, Object> fromJSON2Map(String json) throws JsonParseException, JsonMappingException, IOException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> productMap = mapper.readValue(json, Map.class);
|
||||
return productMap;
|
||||
}
|
||||
|
||||
public Map<String, Object> fromJSON2Map(Object obj) throws JsonParseException, JsonMappingException, IOException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> productMap = mapper.convertValue(obj, Map.class);
|
||||
return productMap;
|
||||
}
|
||||
|
||||
public String buildJSONFromJSONObject(Object obj) {
|
||||
String jsonInString = null;
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
|
||||
mapper.setSerializationInclusion(Include.NON_NULL);
|
||||
jsonInString = mapper.writeValueAsString(obj);
|
||||
} catch (Exception e) {
|
||||
// LOG.error("JSON transform failed. ", e);
|
||||
}
|
||||
return jsonInString;
|
||||
}
|
||||
|
||||
public String buildJSONFromJSONObject(Object obj, boolean prettyPrinter) {
|
||||
String jsonInString = null;
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
|
||||
mapper.setSerializationInclusion(Include.NON_NULL);
|
||||
if (prettyPrinter) {
|
||||
jsonInString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj);
|
||||
} else {
|
||||
jsonInString = mapper.writeValueAsString(obj);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// LOG.error("JSON transform failed. ", e);
|
||||
}
|
||||
return jsonInString;
|
||||
}
|
||||
|
||||
public <T> T buildJSONObjectFromJSON(String json, Class<T> clazz) throws Exception {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
return mapper.readValue(json, clazz);
|
||||
} catch (UnrecognizedPropertyException e) {
|
||||
throw new Exception(e.getPropertyName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T buildJSONObjectFromJSON(File file, Class<T> clazz) throws Exception {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
return mapper.readValue(file, clazz);
|
||||
} catch (UnrecognizedPropertyException e) {
|
||||
throw new Exception(e.getPropertyName(), e);
|
||||
} catch (Exception e) {
|
||||
throw new Exception("JSON Object transform failed. ", e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @author roger - Sep 9, 2016
|
||||
* @version 2.0
|
||||
* file name: JSONProcessor.java
|
||||
* package name: com.roam2free.rest.util
|
||||
*/
|
||||
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class JSONUtil {
|
||||
|
||||
private static JSONProcessor jSONProcessor = new JSONProcessor();
|
||||
|
||||
public static String object2Json(Object obj) {
|
||||
return jSONProcessor.buildJSONFromJSONObject(obj);
|
||||
}
|
||||
|
||||
public static String object2Json(Object obj, boolean prettyPrinter) {
|
||||
return jSONProcessor.buildJSONFromJSONObject(obj, prettyPrinter);
|
||||
}
|
||||
|
||||
public static <T> T json2Object(String json, Class<T> clazz) throws Exception {
|
||||
return jSONProcessor.buildJSONObjectFromJSON(json, clazz);
|
||||
}
|
||||
|
||||
public static <T> T file2Object(File file, Class<T> clazz) throws Exception {
|
||||
return jSONProcessor.buildJSONObjectFromJSON(file, clazz);
|
||||
}
|
||||
|
||||
public static Map<String, Object> object2Map(Object obj) {
|
||||
try {
|
||||
return jSONProcessor.fromJSON2Map(obj);
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* 执行指令
|
||||
* @author cy
|
||||
*/
|
||||
@Slf4j
|
||||
public class ProcessExecUtils
|
||||
{
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*
|
||||
*/
|
||||
public static Integer exec(String cmd) {
|
||||
String line = "";
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String result = "";
|
||||
Integer sendToCode = -1;
|
||||
try {
|
||||
Process ps = Runtime.getRuntime().exec(cmd);
|
||||
log.info("传入cmd信息:{}",cmd);
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(ps.getInputStream()));
|
||||
sendToCode = ps.waitFor();
|
||||
log.info("进程返回结果:{}",sendToCode);
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
result = sb.toString();
|
||||
if(StringUtils.isNotBlank(result)){
|
||||
log.info("查询最新结果:{}",result);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("IOException",e);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("InterruptedException",e);
|
||||
}
|
||||
return sendToCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,243 +0,0 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shxy.xymanager_common.dto.PhotoTimeResultDto;
|
||||
import com.shxy.xymanager_common.dto.ScheduleDetailsDto;
|
||||
import com.shxy.xymanager_common.entity.ScheduleDetails;
|
||||
import com.shxy.xymanager_common.model.TerminalScheduleRuleModel;
|
||||
import com.shxy.xymanager_common.model.TerminalScheduleRuleTimeListModel;
|
||||
import com.shxy.xymanager_common.vo.ScheduleRuleVo;
|
||||
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拍照时间表工具类
|
||||
* jingjing
|
||||
*/
|
||||
public class ScheduleListUtils {
|
||||
/**
|
||||
* 将前端时间格式转换为湖南规约标准的数据库格式
|
||||
*
|
||||
* @param beans 规则列表
|
||||
* @param scheduleid 规则编号
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<ScheduleDetails> getScheduleDetailsses(List<ScheduleRuleVo> beans, Integer scheduleid) {
|
||||
ArrayList<ScheduleDetails> list = new ArrayList<>();
|
||||
for (ScheduleRuleVo item : beans) {
|
||||
|
||||
ScheduleDetails startrule = new ScheduleDetails();
|
||||
startrule.setScheduleId(scheduleid);
|
||||
Time startTime = item.getStartTime();
|
||||
startrule.setHour(MyDateUtils.hour(startTime, true));
|
||||
startrule.setMinute(MyDateUtils.minute(startTime));
|
||||
startrule.setPreset(255);
|
||||
list.add(startrule);
|
||||
|
||||
ScheduleDetails endrule = new ScheduleDetails();
|
||||
endrule.setScheduleId(scheduleid);
|
||||
Time endTime = item.getEndTime();
|
||||
endrule.setHour(MyDateUtils.hour(endTime, true));
|
||||
endrule.setMinute(MyDateUtils.minute(endTime));
|
||||
endrule.setPreset(255);
|
||||
list.add(endrule);
|
||||
|
||||
Integer span = item.getSpan();
|
||||
ScheduleDetails spanrule = new ScheduleDetails();
|
||||
spanrule.setScheduleId(scheduleid);
|
||||
spanrule.setHour(XyNumberUtils.delivery(span, 60));
|
||||
spanrule.setMinute(XyNumberUtils.remainder(span, 60));
|
||||
spanrule.setPreset(255);
|
||||
list.add(spanrule);
|
||||
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 将前端时间格式转换为CMA时间表下发标准的字符串
|
||||
*
|
||||
* @param dtoList
|
||||
* @param offset
|
||||
* @return
|
||||
*/
|
||||
public static String relateTime(List<ScheduleDetailsDto> dtoList, int offset) {
|
||||
StringBuffer timestr = new StringBuffer();
|
||||
short perset = dtoList.get(0).getPreset().shortValue();
|
||||
int index = 0;
|
||||
String startstring = "";
|
||||
String endstring = "";
|
||||
String spanstring = "";
|
||||
for (int i = 0; i < dtoList.size(); i++) {
|
||||
short startHour = 0;
|
||||
short startMin = 0;
|
||||
short endHour = 0;
|
||||
short endMin = 0;
|
||||
short spanHour = 0;
|
||||
short spanMin = 0;
|
||||
|
||||
if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
index = i + 2;
|
||||
Number add = XyNumberUtils.add((Number) dtoList.get(i).getMinute(), offset);
|
||||
if (add.intValue() >= 60) {
|
||||
Number add1 = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1);
|
||||
if (add1.intValue() >= 24) {
|
||||
startHour = Integer.valueOf(24).shortValue();
|
||||
startMin = Integer.valueOf(0).shortValue();
|
||||
} else {
|
||||
startHour = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1).shortValue();
|
||||
startMin = XyNumberUtils.sub(add, 60).shortValue();
|
||||
}
|
||||
} else {
|
||||
startHour = dtoList.get(i).getHour().shortValue();
|
||||
startMin = add.shortValue();
|
||||
}
|
||||
startstring = " --hour" + index + "=" + startHour + " --min" + index + "=" + startMin + " --preset" + index + "=" + perset;
|
||||
} else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
index = i + 2;
|
||||
Number add = XyNumberUtils.add((Number) dtoList.get(i).getMinute(), offset);
|
||||
if (add.intValue() >= 60) {
|
||||
Number add1 = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1);
|
||||
if (add1.intValue() >= 24) {
|
||||
endHour = Integer.valueOf(24).shortValue();
|
||||
endMin = Integer.valueOf(0).shortValue();
|
||||
} else {
|
||||
endHour = add1.shortValue();
|
||||
endMin = XyNumberUtils.sub(add, 60).shortValue();
|
||||
}
|
||||
} else {
|
||||
endHour = dtoList.get(i).getHour().shortValue();
|
||||
endMin = add.shortValue();
|
||||
}
|
||||
endstring = " --hour" + index + "=" + endHour + " --min" + index + "=" + endMin + " --preset" + index + "=" + perset;
|
||||
} else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
index = i - 1;
|
||||
spanHour = dtoList.get(i).getHour().shortValue();
|
||||
spanMin = dtoList.get(i).getMinute().shortValue();
|
||||
spanstring = " --hour" + index + "=" + spanHour + " --min" + index + "=" + spanMin + " --preset" + index + "=" + perset;
|
||||
if (StrUtil.isNotEmpty(spanstring) && StrUtil.isNotEmpty(startstring) && StrUtil.isNotEmpty(endstring)) {
|
||||
timestr.append(spanstring).append(startstring).append(endstring);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return timestr.toString();
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 将数据库标准转为前端的时间列表
|
||||
// *
|
||||
// * @param details
|
||||
// * @return
|
||||
// */
|
||||
// public static ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> getScheduleRuleBeans(List<ScheduleDetailsDto> details) {
|
||||
// ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> detailsBeans = new ArrayList<>();
|
||||
// for (int i = 0; i < details.size(); i++) {
|
||||
// TerminalScheduleRuleModel.ScheduleRuleBean scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
// if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setStartTime(time);
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setEndTime(time);
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
// Number add = XyNumberUtils.add(mul, minute);
|
||||
// scheduleDetailsBean.setSpan(add.intValue());
|
||||
// }
|
||||
// detailsBeans.add(scheduleDetailsBean);
|
||||
// }
|
||||
// return detailsBeans;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 将数据库标准转为前端时间列表为数组
|
||||
*
|
||||
* @param details
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> getScheduleDetailsBeans(List<ScheduleDetailsDto> details) {
|
||||
ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> detailsBeans = new ArrayList<>();
|
||||
TerminalScheduleRuleModel.ScheduleRuleBean scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
for (int i = 0; i < details.size(); i++) {
|
||||
ScheduleDetailsDto dto = details.get(i);
|
||||
if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
Integer hour = dto.getHour();
|
||||
Integer minute = dto.getMinute();
|
||||
Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
scheduleDetailsBean.setId(dto.getId());
|
||||
scheduleDetailsBean.setScheduleId(dto.getScheduleId());
|
||||
scheduleDetailsBean.setStartTime(time);
|
||||
} else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
Integer hour = dto.getHour();
|
||||
Integer minute = dto.getMinute();
|
||||
Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
scheduleDetailsBean.setEndTime(time);
|
||||
} else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
Integer hour = dto.getHour();
|
||||
Integer minute = dto.getMinute();
|
||||
Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
Number add = XyNumberUtils.add(mul, minute);
|
||||
scheduleDetailsBean.setSpan(add.intValue());
|
||||
detailsBeans.add(scheduleDetailsBean);
|
||||
}
|
||||
}
|
||||
return detailsBeans;
|
||||
}
|
||||
|
||||
/*
|
||||
* 讲查询转为前端的时间字符串
|
||||
* */
|
||||
public static List<String> getResultDetails(List<PhotoTimeResultDto> resultDtoList) {
|
||||
List<String> resultList = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(resultDtoList)) {
|
||||
DateTime starttime = null;
|
||||
Integer span = null;
|
||||
DateTime endtime;
|
||||
for (int j = 0; j < resultDtoList.size(); j++) {
|
||||
if (XyNumberUtils.remainder(j, 3) == 0) {//时间间隔
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
Number add = XyNumberUtils.add(mul, minute);
|
||||
span = add.intValue();
|
||||
} else if (XyNumberUtils.remainder(j, 3) == 1) {//开始时间
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
starttime = MyDateUtils.HHMMToDate(hour, minute);
|
||||
} else if (XyNumberUtils.remainder(j, 3) == 2) {//结束时间
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
endtime = MyDateUtils.HHMMToDate(hour, minute);
|
||||
if (starttime != null && endtime != null && span != null) {
|
||||
List<DateTime> dateTimes = MyDateUtils.rangeToList(starttime, endtime, DateField.MINUTE, span);
|
||||
for (DateTime data : dateTimes) {
|
||||
String dateTime = DateUtil.formatTime(data);
|
||||
resultList.add(dateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
package com.shxy.xymanager_common.util;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*
|
||||
* @author cy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class TerminalUtils {
|
||||
|
||||
private static Integer hearttime;
|
||||
|
||||
private static String photoaddress;
|
||||
|
||||
private static String videoaddress;
|
||||
|
||||
|
||||
@Value("${heart.time}")
|
||||
public void setHearttime(Integer time) {
|
||||
TerminalUtils.hearttime = time;
|
||||
}
|
||||
|
||||
@Value("${photo.address}")
|
||||
public void setPhotoaddress(String photoaddress) {
|
||||
TerminalUtils.photoaddress = photoaddress;
|
||||
}
|
||||
|
||||
@Value("${video.address}")
|
||||
public void setVideoaddress(String videoaddress) {
|
||||
TerminalUtils.videoaddress = videoaddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断装置是否在线
|
||||
*
|
||||
* @param lastHeartbeat
|
||||
*/
|
||||
public static boolean judgeTerminalStatus(BigInteger lastHeartbeat) {
|
||||
if (lastHeartbeat == null) {
|
||||
return false;
|
||||
}
|
||||
long time = MyDateUtils.TimeSecond2MillSecond(lastHeartbeat.longValue());
|
||||
DateTime date = MyDateUtils.date(time);
|
||||
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
|
||||
if (between > hearttime) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回图片视频地址
|
||||
*/
|
||||
public static String getPhotoPath(Integer mediaType, String requestIp, String path) {
|
||||
if (mediaType != null) {
|
||||
if (mediaType.intValue() == 0) {
|
||||
return requestIp + photoaddress + path;
|
||||
} else if (mediaType == 1) {
|
||||
return requestIp + videoaddress + path;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 返回图片视频缩略地址
|
||||
*/
|
||||
public static String getThumbPhotoPath(Integer mediaType, String requestIp, String path) {
|
||||
if (mediaType.intValue() == 0) {
|
||||
if (StringUtils.isNotBlank(path)) {
|
||||
return requestIp + videoaddress + path;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.shxy.xymanager_common.util.xinyin;
|
||||
|
||||
import com.shxy.xymanager_common.constant.Constants;
|
||||
import com.shxy.xymanager_common.util.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*
|
||||
* @author cy
|
||||
*/
|
||||
@Slf4j
|
||||
public class ProcessExecUtils {
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*
|
||||
*/
|
||||
public static Integer exec(String cmd) {
|
||||
String line = "";
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String result = "";
|
||||
Integer sendToCode = -1;
|
||||
try {
|
||||
Process ps = Runtime.getRuntime().exec(cmd);
|
||||
log.info("传入cmd信息:{}",cmd);
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(ps.getInputStream()));
|
||||
sendToCode = ps.waitFor();
|
||||
log.info("进程返回结果:{}",sendToCode);
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
result = sb.toString();
|
||||
if(StringUtils.isNotBlank(result)){
|
||||
log.info("查询最新结果:{}",result);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("IOException",e);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("InterruptedException",e);
|
||||
}
|
||||
return sendToCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*/
|
||||
public static Integer execArray(List<String> cmd) {
|
||||
String[] strings = new String[cmd.size()];
|
||||
String[] cmdstring = cmd.toArray(strings);
|
||||
String line = "";
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String result = "";
|
||||
Integer sendToCode = -1;
|
||||
try {
|
||||
Process ps = Runtime.getRuntime().exec(cmdstring);
|
||||
log.info("传入cmd信息:{}", cmd.toString());
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(ps.getInputStream()));
|
||||
sendToCode = ps.waitFor();
|
||||
log.info("进程返回结果:{}", sendToCode);
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line).append("\n");
|
||||
}
|
||||
result = sb.toString();
|
||||
if (StringUtils.isNotBlank(result)) {
|
||||
log.info("查询最新结果:{}", result);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("IOException", e);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("InterruptedException", e);
|
||||
}
|
||||
return sendToCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,283 @@
|
||||
package com.shxy.xymanager_common.util.xinyin;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.shxy.xymanager_common.dto.PhotoTimeResultDto;
|
||||
import com.shxy.xymanager_common.dto.ScheduleDetailsDto;
|
||||
import com.shxy.xymanager_common.entity.ScheduleDetails;
|
||||
import com.shxy.xymanager_common.model.TerminalScheduleRuleModel;
|
||||
import com.shxy.xymanager_common.util.MyDateUtils;
|
||||
import com.shxy.xymanager_common.util.XyNumberUtils;
|
||||
import com.shxy.xymanager_common.vo.ScheduleRuleVo;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拍照时间表工具类
|
||||
* jingjing
|
||||
*/
|
||||
public class ScheduleListUtils {
|
||||
/**
|
||||
* 将前端时间格式转换为湖南规约标准的数据库格式
|
||||
*
|
||||
* @param beans 规则列表
|
||||
* @param scheduleid 规则编号
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<ScheduleDetails> getScheduleDetailsses(List<ScheduleRuleVo> beans, Integer scheduleid) {
|
||||
ArrayList<ScheduleDetails> list = new ArrayList<>();
|
||||
for (ScheduleRuleVo item : beans) {
|
||||
|
||||
// Integer span = item.getSpan();
|
||||
// ScheduleDetails spanrule = new ScheduleDetails();
|
||||
// spanrule.setScheduleId(scheduleid);
|
||||
// spanrule.setHour(XyNumberUtils.delivery(span, 60));
|
||||
// spanrule.setMinute(XyNumberUtils.remainder(span, 60));
|
||||
// spanrule.setPreset(255);
|
||||
// list.add(spanrule);
|
||||
//
|
||||
|
||||
// ScheduleDetails startrule = new ScheduleDetails();
|
||||
// startrule.setScheduleId(scheduleid);
|
||||
// Time startTime = item.getStartTime();
|
||||
// startrule.setHour(MyDateUtils.hour(startTime, true));
|
||||
// startrule.setMinute(MyDateUtils.minute(startTime));
|
||||
// startrule.setPreset(255);
|
||||
// list.add(startrule);
|
||||
//
|
||||
// ScheduleDetails endrule = new ScheduleDetails();
|
||||
// endrule.setScheduleId(scheduleid);
|
||||
// Time endTime = item.getEndTime();
|
||||
|
||||
// endrule.setHour(MyDateUtils.hour(endTime, true));
|
||||
// endrule.setMinute(MyDateUtils.minute(endTime));
|
||||
// endrule.setPreset(255);
|
||||
// list.add(endrule);
|
||||
|
||||
ScheduleDetails rule = new ScheduleDetails();
|
||||
Integer hour = item.getHour();
|
||||
Integer minute = item.getMinute();
|
||||
Integer preset = item.getPreset();
|
||||
rule.setScheduleId(scheduleid);
|
||||
rule.setHour(hour);
|
||||
rule.setMinute(minute);
|
||||
rule.setPreset(preset);
|
||||
list.add(rule);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 将前端时间格式转换为CMA时间表下发标准的字符串
|
||||
*
|
||||
* @param dtoList
|
||||
* @return
|
||||
*/
|
||||
public static String relateTime(List<ScheduleRuleVo> dtoList) {
|
||||
StringBuffer timestr = new StringBuffer();
|
||||
if (CollectionUtil.isNotEmpty(dtoList)) {
|
||||
short perset = dtoList.get(0).getPreset().shortValue();
|
||||
int index = 0;
|
||||
String spanstring = "";
|
||||
for (int i = 0; i < dtoList.size(); i++) {
|
||||
index = i + 1;
|
||||
short spanHour = dtoList.get(i).getHour().shortValue();
|
||||
short spanMin = dtoList.get(i).getMinute().shortValue();
|
||||
spanstring = " --hour" + index + "=" + spanHour + " --min" + index + "=" + spanMin + " --preset" + index + "=" + perset;
|
||||
timestr.append(spanstring);
|
||||
}
|
||||
}
|
||||
return timestr.toString();
|
||||
}
|
||||
|
||||
// public static String relateTime(List<ScheduleDetailsDto> dtoList, int offset) {
|
||||
// StringBuffer timestr = new StringBuffer();
|
||||
// short perset = dtoList.get(0).getPreset().shortValue();
|
||||
// int index = 0;
|
||||
// String startstring = "";
|
||||
// String endstring = "";
|
||||
// String spanstring = "";
|
||||
// for (int i = 0; i < dtoList.size(); i++) {
|
||||
// short startHour = 0;
|
||||
// short startMin = 0;
|
||||
// short endHour = 0;
|
||||
// short endMin = 0;
|
||||
// short spanHour = 0;
|
||||
// short spanMin = 0;
|
||||
// if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
// index = i + 1;
|
||||
// spanHour = dtoList.get(i).getHour().shortValue();
|
||||
// spanMin = dtoList.get(i).getMinute().shortValue();
|
||||
// spanstring = " --hour" + index + "=" + spanHour + " --min" + index + "=" + spanMin + " --preset" + index + "=" + perset;
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
// index = i + 1;
|
||||
// Number add = XyNumberUtils.add((Number) dtoList.get(i).getMinute(), offset);
|
||||
// if (add.intValue() >= 60) {
|
||||
// Number add1 = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1);
|
||||
// if (add1.intValue() >= 24) {
|
||||
// startHour = Integer.valueOf(24).shortValue();
|
||||
// startMin = Integer.valueOf(0).shortValue();
|
||||
// } else {
|
||||
// startHour = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1).shortValue();
|
||||
// startMin = XyNumberUtils.sub(add, 60).shortValue();
|
||||
// }
|
||||
// } else {
|
||||
// startHour = dtoList.get(i).getHour().shortValue();
|
||||
// startMin = add.shortValue();
|
||||
// }
|
||||
// startstring = " --hour" + index + "=" + startHour + " --min" + index + "=" + startMin + " --preset" + index + "=" + perset;
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
// index = i + 1;
|
||||
// Number add = XyNumberUtils.add((Number) dtoList.get(i).getMinute(), offset);
|
||||
// if (add.intValue() >= 60) {
|
||||
// Number add1 = XyNumberUtils.add((Number) dtoList.get(i).getHour(), 1);
|
||||
// if (add1.intValue() >= 24) {
|
||||
// endHour = Integer.valueOf(24).shortValue();
|
||||
// endMin = Integer.valueOf(0).shortValue();
|
||||
// } else {
|
||||
// endHour = add1.shortValue();
|
||||
// endMin = XyNumberUtils.sub(add, 60).shortValue();
|
||||
// }
|
||||
// } else {
|
||||
// endHour = dtoList.get(i).getHour().shortValue();
|
||||
// endMin = add.shortValue();
|
||||
// }
|
||||
// endstring = " --hour" + index + "=" + endHour + " --min" + index + "=" + endMin + " --preset" + index + "=" + perset;
|
||||
// if (StrUtil.isNotEmpty(spanstring) && StrUtil.isNotEmpty(startstring) && StrUtil.isNotEmpty(endstring)) {
|
||||
// timestr.append(spanstring).append(startstring).append(endstring);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return timestr.toString();
|
||||
// }
|
||||
|
||||
|
||||
// /**
|
||||
// * 将数据库标准转为前端的时间列表
|
||||
// *
|
||||
// * @param details
|
||||
// * @return
|
||||
// */
|
||||
// public static ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> getScheduleRuleBeans(List<ScheduleDetailsDto> details) {
|
||||
// ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> detailsBeans = new ArrayList<>();
|
||||
// for (int i = 0; i < details.size(); i++) {
|
||||
// TerminalScheduleRuleModel.ScheduleRuleBean scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
// if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setStartTime(time);
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setEndTime(time);
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
// Integer hour = details.get(i).getHour();
|
||||
// Integer minute = details.get(i).getMinute();
|
||||
// Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
// Number add = XyNumberUtils.add(mul, minute);
|
||||
// scheduleDetailsBean.setSpan(add.intValue());
|
||||
// }
|
||||
// detailsBeans.add(scheduleDetailsBean);
|
||||
// }
|
||||
// return detailsBeans;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 将数据库标准转为前端时间列表为数组
|
||||
*
|
||||
* @param details
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> getScheduleDetailsBeans(List<ScheduleDetailsDto> details) {
|
||||
// ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> detailsBeans = new ArrayList<>();
|
||||
// TerminalScheduleRuleModel.ScheduleRuleBean scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
// for (int i = 0; i < details.size(); i++) {
|
||||
// ScheduleDetailsDto dto = details.get(i);
|
||||
// if (XyNumberUtils.remainder(i, 3) == 0) {
|
||||
// scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
// Integer hour = dto.getHour();
|
||||
// Integer minute = dto.getMinute();
|
||||
// Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
// Number add = XyNumberUtils.add(mul, minute);
|
||||
// scheduleDetailsBean.setId(dto.getId());
|
||||
// scheduleDetailsBean.setScheduleId(dto.getScheduleId());
|
||||
// scheduleDetailsBean.setSpan(add.intValue());
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 1) {
|
||||
// Integer hour = dto
|
||||
// .getHour();
|
||||
// Integer minute = dto.getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setStartTime(time);
|
||||
// } else if (XyNumberUtils.remainder(i, 3) == 2) {
|
||||
// Integer hour = dto.getHour();
|
||||
// Integer minute = dto.getMinute();
|
||||
// Time time = MyDateUtils.HHMMToTime(hour, minute);
|
||||
// scheduleDetailsBean.setEndTime(time);
|
||||
// detailsBeans.add(scheduleDetailsBean);
|
||||
// }
|
||||
// }
|
||||
|
||||
ArrayList<TerminalScheduleRuleModel.ScheduleRuleBean> detailsBeans = new ArrayList<>();
|
||||
for (int i = 0; i < details.size(); i++) {
|
||||
ScheduleDetailsDto dto = details.get(i);
|
||||
TerminalScheduleRuleModel.ScheduleRuleBean scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
|
||||
Integer hour = dto.getHour();
|
||||
Integer minute = dto.getMinute();
|
||||
Integer preset = dto.getPreset();
|
||||
scheduleDetailsBean.setId(dto.getId());
|
||||
scheduleDetailsBean.setScheduleId(dto.getScheduleId());
|
||||
scheduleDetailsBean.setHour(hour);
|
||||
scheduleDetailsBean.setMinute(minute);
|
||||
scheduleDetailsBean.setPreset(preset);
|
||||
detailsBeans.add(scheduleDetailsBean);
|
||||
}
|
||||
|
||||
return detailsBeans;
|
||||
}
|
||||
|
||||
/*
|
||||
* 讲查询转为前端的时间字符串
|
||||
* */
|
||||
public static List<String> getResultDetails(List<PhotoTimeResultDto> resultDtoList) {
|
||||
List<String> resultList = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(resultDtoList)) {
|
||||
DateTime starttime = null;
|
||||
Integer span = null;
|
||||
DateTime endtime;
|
||||
for (int j = 0; j < resultDtoList.size(); j++) {
|
||||
if (XyNumberUtils.remainder(j, 3) == 0) {//时间间隔
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
Number mul = XyNumberUtils.mul((Number) hour, 60);
|
||||
Number add = XyNumberUtils.add(mul, minute);
|
||||
span = add.intValue();
|
||||
} else if (XyNumberUtils.remainder(j, 3) == 1) {//开始时间
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
starttime = MyDateUtils.HHMMToDate(hour, minute);
|
||||
} else if (XyNumberUtils.remainder(j, 3) == 2) {//结束时间
|
||||
Integer hour = resultDtoList.get(j).getHour();
|
||||
Integer minute = resultDtoList.get(j).getMinute();
|
||||
endtime = MyDateUtils.HHMMToDate(hour, minute);
|
||||
if (starttime != null && endtime != null && span != null) {
|
||||
List<DateTime> dateTimes = MyDateUtils.rangeToList(starttime, endtime, DateField.MINUTE, span);
|
||||
for (DateTime data : dateTimes) {
|
||||
String dateTime = DateUtil.formatTime(data);
|
||||
resultList.add(dateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,472 @@
|
||||
package com.shxy.xymanager_common.util.xinyin;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
|
||||
import com.shxy.xymanager_common.dto.TerminalImgAlarmsDto;
|
||||
import com.shxy.xymanager_common.dto.TowerDto;
|
||||
import com.shxy.xymanager_common.entity.TerminalChannelMapper;
|
||||
import com.shxy.xymanager_common.entity.TerminalChannels;
|
||||
import com.shxy.xymanager_common.entity.TerminalPhoto;
|
||||
import com.shxy.xymanager_common.entity.Terminals;
|
||||
import com.shxy.xymanager_common.enums.CommonStatus;
|
||||
import com.shxy.xymanager_common.model.TerminalPhotoListModel;
|
||||
import com.shxy.xymanager_common.model.TerminalPhotoSelectListModel;
|
||||
import com.shxy.xymanager_common.model.TerminalPhotosModel;
|
||||
import com.shxy.xymanager_common.util.MyDateUtils;
|
||||
import com.shxy.xymanager_common.util.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 执行指令
|
||||
*
|
||||
* @author jingjing
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class TerminalUtils {
|
||||
|
||||
public static Integer hearttime;
|
||||
|
||||
public static String photoaddress;
|
||||
|
||||
public static String videoaddress;
|
||||
|
||||
|
||||
@Value("${heart.time}")
|
||||
public void setHearttime(Integer time) {
|
||||
TerminalUtils.hearttime = time;
|
||||
}
|
||||
|
||||
@Value("${photo.address}")
|
||||
public void setPhotoaddress(String photoaddress) {
|
||||
TerminalUtils.photoaddress = photoaddress;
|
||||
}
|
||||
|
||||
@Value("${video.address}")
|
||||
public void setVideoaddress(String videoaddress) {
|
||||
TerminalUtils.videoaddress = videoaddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断装置是否在线
|
||||
*
|
||||
* @param lastHeartbeat
|
||||
*/
|
||||
public static boolean judgeTerminalStatus(BigInteger lastHeartbeat) {
|
||||
if (lastHeartbeat == null) {
|
||||
return false;
|
||||
}
|
||||
long time = MyDateUtils.TimeSecond2MillSecond(lastHeartbeat.longValue());
|
||||
DateTime date = MyDateUtils.date(time);
|
||||
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
|
||||
if (between > hearttime) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成装置超时时间
|
||||
*/
|
||||
public static BigInteger generateOnlineTime() {
|
||||
DateTime offset = MyDateUtils.offset(new Date(), DateField.MINUTE, -hearttime);
|
||||
long l = MyDateUtils.TimeMillSecond2Second(offset);
|
||||
BigInteger bigInteger = BigInteger.valueOf(l);
|
||||
return bigInteger;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回图片视频地址
|
||||
*/
|
||||
public static String getPhotoPath(Integer mediaType, String requestIp, String path) {
|
||||
if (mediaType != null) {
|
||||
if (mediaType.intValue() == 0) {
|
||||
return requestIp + photoaddress + path;
|
||||
} else if (mediaType == 1) {
|
||||
return requestIp + videoaddress + path;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 返回图片视频缩略地址
|
||||
*/
|
||||
public static String getThumbPhotoPath(Integer mediaType, String requestIp, String path) {
|
||||
if (mediaType.intValue() == 1) {
|
||||
if (StringUtils.isNotBlank(path)) {
|
||||
return requestIp + videoaddress + path;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片轮询统一处理方法 轮询是不展示无图片的装置
|
||||
*
|
||||
* @param requestIp
|
||||
* @param list
|
||||
* @param lineMap
|
||||
* @param termchannelMapMap
|
||||
* @param terminalMap
|
||||
* @param termchannelMap
|
||||
* @param towerMap
|
||||
* @param photoList
|
||||
* @return
|
||||
*/
|
||||
public static List<TerminalPhotosModel.PhotosBean> setPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, LineAndDyNameDto> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList,List<TerminalImgAlarmsDto> imgarlarmsList) {
|
||||
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
|
||||
for (TerminalChannelMapper item : list) {
|
||||
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
|
||||
Integer termid = item.getTermId();
|
||||
Integer channelid = item.getChannelId();
|
||||
BigInteger photoId = item.getPhotoId();
|
||||
Integer lineid = null;
|
||||
photosBean.setTermid(termid);
|
||||
Terminals terminals = terminalMap.get(termid);
|
||||
if (terminals != null) {
|
||||
lineid = terminals.getLineid();
|
||||
photosBean.setLineid(lineid);
|
||||
photosBean.setDisplayname(terminals.getDisplayName());
|
||||
photosBean.setCmdid(terminals.getCmdid());
|
||||
Integer towerid = terminals.getTowerid();
|
||||
TowerDto towerDto = towerMap.get(towerid);
|
||||
if (towerDto != null) {
|
||||
photosBean.setTowername(towerDto.getName());
|
||||
photosBean.setAddress(towerDto.getAddress());
|
||||
}
|
||||
}
|
||||
photosBean.setChannelid(channelid);
|
||||
photosBean.setChannnelname(termchannelMap.get(channelid).getChannelName());
|
||||
|
||||
if (termchannelMapMap != null) {
|
||||
TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(termid + "#" + channelid);
|
||||
if (terminalChannelMapper != null) {
|
||||
photosBean.setAlias(terminalChannelMapper.getAlias());
|
||||
} else {
|
||||
photosBean.setAlias("");
|
||||
}
|
||||
} else {
|
||||
photosBean.setAlias("");
|
||||
}
|
||||
if (lineid != null) {
|
||||
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineid);
|
||||
if (lineAndDyNameDto != null) {
|
||||
photosBean.setLinename(lineAndDyNameDto.getName());
|
||||
} else {
|
||||
photosBean.setLinename("");
|
||||
}
|
||||
}
|
||||
for (int y = 0; y < photoList.size(); y++) {
|
||||
TerminalPhoto terminalPhoto = photoList.get(y);
|
||||
if (BeanUtil.isNotEmpty(terminalPhoto)) {
|
||||
if (terminalPhoto.getId() != null && photoId != null) {
|
||||
if (terminalPhoto.getId().longValue() == photoId.longValue()) {
|
||||
Integer mediatype = terminalPhoto.getMediaType();
|
||||
if (mediatype != null && (mediatype.intValue() == 0 || mediatype.intValue() == 1)) {
|
||||
photosBean.setPath(terminalPhoto.getPath());
|
||||
long recvtime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getRecvTime().longValue());
|
||||
photosBean.setRecvTime(MyDateUtils.date(recvtime));
|
||||
long phototime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getPhotoTime().longValue());
|
||||
photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
||||
photosBean.setMediatype(mediatype);
|
||||
String thumbPhotoPath = TerminalUtils.getThumbPhotoPath(mediatype, requestIp, terminalPhoto.getThumb());
|
||||
if (StringUtils.isNotBlank(thumbPhotoPath)) {
|
||||
photosBean.setThumb(thumbPhotoPath);
|
||||
}
|
||||
String photoPath = TerminalUtils.getPhotoPath(mediatype, requestIp, terminalPhoto.getPath());
|
||||
photosBean.setPath(photoPath);
|
||||
photosBean.setOrginalid(terminalPhoto.getOrginalId());
|
||||
photosBean.setPresetId(terminalPhoto.getPresetId());
|
||||
}
|
||||
ArrayList<TerminalPhotoListModel.AlarmItemBean> photoalarmlist = new ArrayList<>();
|
||||
if (imgarlarmsList != null && imgarlarmsList.size() > 0) {
|
||||
Integer termId1 = terminalPhoto.getTermId();
|
||||
BigInteger orginalid = terminalPhoto.getOrginalId();
|
||||
for (TerminalImgAlarmsDto dto : imgarlarmsList) {
|
||||
BigInteger photoOrgId = dto.getPhotoOrgId();
|
||||
Integer termId = dto.getTermId();
|
||||
if (photoOrgId!= null && orginalid!=null && termId1!=null && termId!=null){
|
||||
if(photoOrgId.intValue() == orginalid.intValue() && termId1.intValue() == termId.intValue()) {
|
||||
TerminalPhotoListModel.AlarmItemBean alarmItemBean = new TerminalPhotoListModel.AlarmItemBean();
|
||||
alarmItemBean.setEnname(dto.getEnname());
|
||||
alarmItemBean.setName(dto.getName());
|
||||
alarmItemBean.setHeight(dto.getHeight());
|
||||
alarmItemBean.setWidth(dto.getWidth());
|
||||
alarmItemBean.setProb(dto.getProb());
|
||||
alarmItemBean.setX(dto.getX());
|
||||
alarmItemBean.setY(dto.getY());
|
||||
alarmItemBean.setPhotoWidth(terminalPhoto.getWidth());
|
||||
alarmItemBean.setPhotoHeight(terminalPhoto.getHeight());
|
||||
photoalarmlist.add(alarmItemBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (photoalarmlist == null || photoalarmlist.size() == 0) {
|
||||
photosBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
} else {
|
||||
photosBean.setIsAlarm(CommonStatus.EFFECTIVE.value());
|
||||
}
|
||||
photosBean.setAlarmlist(photoalarmlist);
|
||||
} else {
|
||||
photosBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
photosBean.setAlarmlist(photoalarmlist);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
beans.add(photosBean);
|
||||
}
|
||||
return beans;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 杆塔列表图片统一处理方法 (展示图片的数量)
|
||||
*
|
||||
* @param requestIp
|
||||
* @param list
|
||||
* @param lineMap
|
||||
* @param termchannelMapMap
|
||||
* @param terminalMap
|
||||
* @param termchannelMap
|
||||
* @param towerMap
|
||||
* @param photoList
|
||||
* @return
|
||||
*/
|
||||
public static List<TerminalPhotosModel.PhotosBean> setTowerPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, LineAndDyNameDto> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList, List<TerminalImgAlarmsDto> imgarlarmsList) {
|
||||
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
|
||||
for (TerminalChannelMapper item : list) {
|
||||
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
|
||||
Integer termid = item.getTermId();
|
||||
Integer channelid = item.getChannelId();
|
||||
BigInteger photoId = item.getPhotoId();
|
||||
Integer lineid = null;
|
||||
photosBean.setTermid(termid);
|
||||
Terminals terminals = terminalMap.get(termid);
|
||||
if (terminals != null) {
|
||||
lineid = terminals.getLineid();
|
||||
photosBean.setLineid(lineid);
|
||||
photosBean.setDisplayname(terminals.getDisplayName());
|
||||
photosBean.setCmdid(terminals.getCmdid());
|
||||
Integer towerid = terminals.getTowerid();
|
||||
TowerDto towerDto = towerMap.get(towerid);
|
||||
if (towerDto != null) {
|
||||
photosBean.setTowername(towerDto.getName());
|
||||
photosBean.setAddress(towerDto.getAddress());
|
||||
}
|
||||
}
|
||||
photosBean.setChannelid(channelid);
|
||||
if (termchannelMap != null) {
|
||||
TerminalChannels terminalChannels = termchannelMap.get(channelid);
|
||||
if (terminalChannels != null) {
|
||||
photosBean.setChannnelname(terminalChannels.getChannelName());
|
||||
}
|
||||
}
|
||||
|
||||
if (termchannelMapMap != null) {
|
||||
TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(termid + "#" + channelid);
|
||||
if (terminalChannelMapper != null) {
|
||||
photosBean.setAlias(terminalChannelMapper.getAlias());
|
||||
} else {
|
||||
photosBean.setAlias("");
|
||||
}
|
||||
} else {
|
||||
photosBean.setAlias("");
|
||||
}
|
||||
if (lineid != null) {
|
||||
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineid);
|
||||
if (lineAndDyNameDto != null) {
|
||||
photosBean.setLinename(lineAndDyNameDto.getName());
|
||||
} else {
|
||||
photosBean.setLinename("");
|
||||
}
|
||||
}
|
||||
if (photoId == null) {
|
||||
photosBean.setPath(null);
|
||||
} else {
|
||||
for (int y = 0; y < photoList.size(); y++) {
|
||||
TerminalPhoto terminalPhoto = photoList.get(y);
|
||||
if (BeanUtil.isNotEmpty(terminalPhoto)) {
|
||||
if (terminalPhoto.getId() != null) {
|
||||
if (terminalPhoto.getId().longValue() == photoId.longValue()) {
|
||||
Integer mediatype = terminalPhoto.getMediaType();
|
||||
if (mediatype != null && (mediatype.intValue() == 0 || mediatype.intValue() == 1)) {
|
||||
photosBean.setPath(terminalPhoto.getPath());
|
||||
long recvtime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getRecvTime().longValue());
|
||||
photosBean.setRecvTime(MyDateUtils.date(recvtime));
|
||||
long phototime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getPhotoTime().longValue());
|
||||
photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
||||
photosBean.setMediatype(mediatype);
|
||||
String thumbPhotoPath = TerminalUtils.getThumbPhotoPath(mediatype, requestIp, terminalPhoto.getThumb());
|
||||
if (StringUtils.isNotBlank(thumbPhotoPath)) {
|
||||
photosBean.setThumb(thumbPhotoPath);
|
||||
}
|
||||
String photoPath = TerminalUtils.getPhotoPath(mediatype, requestIp, terminalPhoto.getPath());
|
||||
photosBean.setPath(photoPath);
|
||||
photosBean.setOrginalid(terminalPhoto.getOrginalId());
|
||||
photosBean.setPresetId(terminalPhoto.getPresetId());
|
||||
ArrayList<TerminalPhotoListModel.AlarmItemBean> photoalarmlist = new ArrayList<>();
|
||||
if (imgarlarmsList != null && imgarlarmsList.size() > 0) {
|
||||
Integer termId1 = terminalPhoto.getTermId();
|
||||
BigInteger orginalid = terminalPhoto.getOrginalId();
|
||||
for (TerminalImgAlarmsDto dto : imgarlarmsList) {
|
||||
BigInteger photoOrgId = dto.getPhotoOrgId();
|
||||
Integer termId = dto.getTermId();
|
||||
if (photoOrgId!= null && orginalid!=null && termId1!=null && termId!=null){
|
||||
if(photoOrgId.intValue() == orginalid.intValue() && termId1.intValue() == termId.intValue()) {
|
||||
TerminalPhotoListModel.AlarmItemBean alarmItemBean = new TerminalPhotoListModel.AlarmItemBean();
|
||||
alarmItemBean.setEnname(dto.getEnname());
|
||||
alarmItemBean.setName(dto.getName());
|
||||
alarmItemBean.setHeight(dto.getHeight());
|
||||
alarmItemBean.setWidth(dto.getWidth());
|
||||
alarmItemBean.setProb(dto.getProb());
|
||||
alarmItemBean.setX(dto.getX());
|
||||
alarmItemBean.setY(dto.getY());
|
||||
alarmItemBean.setPhotoWidth(terminalPhoto.getWidth());
|
||||
alarmItemBean.setPhotoHeight(terminalPhoto.getHeight());
|
||||
photoalarmlist.add(alarmItemBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (photoalarmlist == null || photoalarmlist.size() == 0) {
|
||||
photosBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
} else {
|
||||
photosBean.setIsAlarm(CommonStatus.EFFECTIVE.value());
|
||||
}
|
||||
photosBean.setAlarmlist(photoalarmlist);
|
||||
} else {
|
||||
photosBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
photosBean.setAlarmlist(photoalarmlist);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
beans.add(photosBean);
|
||||
}
|
||||
return beans;
|
||||
}
|
||||
|
||||
|
||||
public static List<TerminalPhotoSelectListModel.PhotoBean> examPhotoBean(String requestIp, List<TerminalPhoto> list, Map<Integer, Terminals> terminalMap, Map<Integer, LineAndDyNameDto> lineMap, Map<Integer, TowerDto> towerMap, Map<Integer, TerminalChannels> termchannelMap, Map<String, TerminalChannelMapper> termchannelMapMap, List<TerminalImgAlarmsDto> imgarlarmsList) {
|
||||
List<TerminalPhotoSelectListModel.PhotoBean> beans = new ArrayList<>();
|
||||
for (TerminalPhoto item : list) {
|
||||
TerminalPhotoSelectListModel.PhotoBean photoBean = new TerminalPhotoSelectListModel.PhotoBean();
|
||||
photoBean.setTermid(item.getTermId());
|
||||
Terminals terminals = terminalMap.get(item.getTermId());
|
||||
if (!BeanUtil.isEmpty(terminals)) {
|
||||
Integer mediaType = item.getMediaType();
|
||||
if (mediaType != null && (mediaType.intValue() == 0 || mediaType.intValue() == 1)) {
|
||||
photoBean.setDisplayname(terminals.getDisplayName());
|
||||
Integer towerid = terminals.getTowerid();
|
||||
if (towerMap != null) {
|
||||
TowerDto towerDto = towerMap.get(towerid);
|
||||
Integer lineId = towerDto.getLineId();
|
||||
photoBean.setLineid(lineId);
|
||||
if (lineMap != null) {
|
||||
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId);
|
||||
if (lineAndDyNameDto != null) {
|
||||
photoBean.setLinename(lineAndDyNameDto.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer channelId = item.getChannelId();
|
||||
BigInteger picid = item.getId();
|
||||
photoBean.setPicid(picid);
|
||||
photoBean.setChannelid(channelId);
|
||||
photoBean.setCmdid(terminals.getCmdid());
|
||||
if (termchannelMap != null) {
|
||||
TerminalChannels terminalChannels = termchannelMap.get(channelId);
|
||||
if (terminalChannels != null) {
|
||||
photoBean.setChannnelname(terminalChannels.getChannelName());
|
||||
}
|
||||
}
|
||||
if (termchannelMapMap != null) {
|
||||
TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(item.getTermId() + "#" + channelId);
|
||||
if (terminalChannelMapper != null) {
|
||||
photoBean.setAlias(terminalChannelMapper.getAlias());
|
||||
}
|
||||
}
|
||||
photoBean.setMediaType(item.getMediaType());
|
||||
photoBean.setOrginalid(item.getOrginalId());
|
||||
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
||||
photoBean.setPath(photoPath);
|
||||
String thumbPhotoPath = TerminalUtils.getThumbPhotoPath(item.getMediaType(), requestIp, item.getThumb());
|
||||
if (StringUtils.isNotBlank(thumbPhotoPath)) {
|
||||
photoBean.setThumb(thumbPhotoPath);
|
||||
}
|
||||
photoBean.setPresetId(item.getPresetId());
|
||||
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
||||
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
||||
long rectime = MyDateUtils.TimeSecond2MillSecond(item.getRecvTime().longValue());
|
||||
photoBean.setRecvTime(MyDateUtils.date(rectime));
|
||||
|
||||
ArrayList<TerminalPhotoListModel.AlarmItemBean> photoalarmlist = new ArrayList<>();
|
||||
if (imgarlarmsList != null && imgarlarmsList.size() > 0) {
|
||||
Integer termId1 = item.getTermId();
|
||||
BigInteger orginalid = item.getOrginalId();
|
||||
for (TerminalImgAlarmsDto dto : imgarlarmsList) {
|
||||
BigInteger photoOrgId = dto.getPhotoOrgId();
|
||||
Integer termId = dto.getTermId();
|
||||
if (photoOrgId!= null && orginalid!=null && termId1!=null && termId!=null) {
|
||||
if (photoOrgId.intValue() == orginalid.intValue() && termId1.intValue() == termId.intValue()) {
|
||||
TerminalPhotoListModel.AlarmItemBean alarmItemBean = new TerminalPhotoListModel.AlarmItemBean();
|
||||
alarmItemBean.setEnname(dto.getEnname());
|
||||
alarmItemBean.setName(dto.getName());
|
||||
alarmItemBean.setHeight(dto.getHeight());
|
||||
alarmItemBean.setWidth(dto.getWidth());
|
||||
alarmItemBean.setProb(dto.getProb());
|
||||
alarmItemBean.setX(dto.getX());
|
||||
alarmItemBean.setY(dto.getY());
|
||||
alarmItemBean.setPhotoWidth(item.getWidth());
|
||||
alarmItemBean.setPhotoHeight(item.getHeight());
|
||||
photoalarmlist.add(alarmItemBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (photoalarmlist == null || photoalarmlist.size() == 0) {
|
||||
photoBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
} else {
|
||||
photoBean.setIsAlarm(CommonStatus.EFFECTIVE.value());
|
||||
}
|
||||
photoBean.setAlarmlist(photoalarmlist);
|
||||
} else {
|
||||
photoBean.setIsAlarm(CommonStatus.DELETE.value());
|
||||
photoBean.setAlarmlist(photoalarmlist);
|
||||
}
|
||||
|
||||
beans.add(photoBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
return beans;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "删除图片对象", description = "删除图片对象描述")
|
||||
public class DeletePicVo {
|
||||
|
||||
@NotEmpty(message = "不能传入空值")
|
||||
@ApiModelProperty(value = "删除图片对象数组", required = true, example = "A0001")
|
||||
private List<Integer> list;
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "收藏对象", description = "收藏对象描述")
|
||||
public class FavorVo {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "是否收藏", example = "0--删除收藏 1--收藏")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "是否收藏", example = "0--删除收藏 1--收藏")
|
||||
private Integer termid;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "最新杆塔请求", description = "最新杆塔请求")
|
||||
public class LastTowerVo {
|
||||
@ApiModelProperty(value = "编号", example = "电压编号 线路编号")
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "查询类型不能缺少")
|
||||
@ApiModelProperty(value = "查询类型", example = "1--电压 2--线路 ")
|
||||
private Integer type;
|
||||
|
||||
@Min(value = 1, message = "分页位置最小从1开始")
|
||||
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
|
||||
private int pageindex;
|
||||
|
||||
@Min(value = 1, message = "分页大小最小为1")
|
||||
@ApiModelProperty(value = "分页大小", required = true, example = "1")
|
||||
private int pagesize;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "新疆抓拍参数", description = "新疆抓拍参数描述")
|
||||
public class OpenXJDeviceCaptureVo {
|
||||
|
||||
@ApiModelProperty(value = "装置编号", example = "123455")
|
||||
private String cmdId;
|
||||
|
||||
@ApiModelProperty(value = "操作", example = "1--拍照 2--拍视频")
|
||||
private Integer operateType;
|
||||
|
||||
}
|
@ -1,21 +1,24 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "返回图片查询", description = "返回图片查询")
|
||||
public class ReturnedPhotoVo {
|
||||
|
||||
@NotNull(message = "查询编号不能缺少")
|
||||
@ApiModelProperty(value = "查询编号", example = "123455")
|
||||
private Integer requestid;
|
||||
|
||||
@NotNull(message = "不能传入空值")
|
||||
@ApiModelProperty(value = "装置id", required = true, example = "A0001")
|
||||
private Integer termId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "手动拍照时间", required = true, example = "A0001")
|
||||
private DateTime photoTime;
|
||||
private BigInteger photoTime;
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.shxy.xymanager_common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
@Data
|
||||
@Validated
|
||||
@ApiModel(value = "杆塔和线路模糊查询对象", description = "杆塔和线路模糊查询对象")
|
||||
public class SelectVo {
|
||||
|
||||
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
|
||||
private String search;
|
||||
|
||||
@Min(value = 1, message = "分页位置最小从1开始")
|
||||
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
|
||||
private int pageindex;
|
||||
|
||||
@Min(value = 1, message = "分页大小最小为1")
|
||||
@ApiModelProperty(value = "分页大小", required = true, example = "1")
|
||||
private int pagesize;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue