2022-10-13
This commit is contained in:
parent
fc0d91a4b7
commit
5cb6e69e5f
|
@ -0,0 +1,33 @@
|
|||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
|
@ -0,0 +1,316 @@
|
|||
#!/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 "$@"
|
|
@ -0,0 +1,188 @@
|
|||
@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,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.6</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.tx</groupId>
|
||||
<artifactId>MyDemo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>MyDemo</name>
|
||||
<description>MyDemo</description>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<!-- <scope>runtime</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
package com.tx.mydemo;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
//@MapperScan(value = "com.tx.mapper")
|
||||
public class MyDemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MyDemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.tx.mydemo.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class CorsConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOriginPatterns("*")
|
||||
.allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
.allowCredentials(true)
|
||||
.maxAge(3600)
|
||||
.allowedHeaders("*");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.tx.mydemo.controller;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Contract;
|
||||
import com.tx.mydemo.domain.Data;
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.service.ContractService;
|
||||
import com.tx.mydemo.service.InfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/contract")
|
||||
public class ContractController {
|
||||
@Autowired
|
||||
private ContractService contractService;
|
||||
|
||||
@PostMapping("/selectAllByPageAndCondition")
|
||||
public List<Contract> selectAllByPageAndCondition(@RequestBody HashMap<String, Object> datas) {
|
||||
Contract contract = new Contract();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
//可能会有起始时间
|
||||
contract.setContract_Start((String) datas.get("Start"));
|
||||
contract.setContract_End((String) datas.get("End"));
|
||||
String state = (String) datas.get("State");
|
||||
if (state != null) {
|
||||
if (state.equals("0")) {
|
||||
state = "已结算";
|
||||
} else if (state.equals("1")) {
|
||||
state = "未结算";
|
||||
}
|
||||
}
|
||||
|
||||
contract.setContract_State(state);
|
||||
List<Contract> contracts = contractService.selectAllByPageAndCondition(begin, contract);
|
||||
return contracts;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalContract")
|
||||
public Integer totalContract(@RequestBody HashMap<String, Object> datas) {
|
||||
Contract contract = new Contract();
|
||||
contract.setContract_Start((String) datas.get("Start"));
|
||||
contract.setContract_End((String) datas.get("End"));
|
||||
String state = (String) datas.get("State");
|
||||
if (state != null) {
|
||||
if (state.equals("0")) {
|
||||
state = "已结算";
|
||||
} else if (state.equals("1")) {
|
||||
state = "未结算";
|
||||
}
|
||||
}
|
||||
|
||||
contract.setContract_State(state);
|
||||
int totalCount = this.contractService.totalContract(contract);
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/selectById/{id}")
|
||||
public Contract selectById(@PathVariable("id") int id) {
|
||||
return contractService.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/updateContract")
|
||||
public int updateContract(@RequestBody Contract contract) {
|
||||
if (contractService.updateContract(contract) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,271 @@
|
|||
package com.tx.mydemo.controller;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Data;
|
||||
import com.tx.mydemo.service.DataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/data")
|
||||
public class DataController {
|
||||
|
||||
@Autowired
|
||||
private DataService dataService;
|
||||
|
||||
|
||||
/**
|
||||
* 添加数据
|
||||
*
|
||||
* @param datas
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addData")
|
||||
public int add(@RequestBody HashMap<String, Object> datas) {
|
||||
System.out.println(datas);
|
||||
Data data = new Data();
|
||||
data.setData_Time((String) datas.get("Data_Time"));
|
||||
data.setData_Amount((String) datas.get("Data_Amount"));
|
||||
data.setData_Info((String) datas.get("Data_Info"));
|
||||
data.setData_User((Integer) datas.get("Data_UserId"));
|
||||
int res = dataService.add(data);
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID删除订单
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public int deleteById(@PathVariable("id") Integer id) {
|
||||
//如果删除成功是会返回删除的ID,所以如果ID大于0的话肯定是删除成功了
|
||||
if (dataService.deleteById(id) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新数据,传进来的
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/updateData/{id}")
|
||||
public Data selectById(@PathVariable("id") Integer id) {
|
||||
return dataService.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateData")
|
||||
public int updateData(@RequestBody HashMap<String, Object> datas) {
|
||||
Data data = new Data();
|
||||
data.setData_Time((String) datas.get("data_Time"));
|
||||
data.setData_User((Integer) datas.get("data_User"));
|
||||
data.setData_Info((String) datas.get("data_Info"));
|
||||
data.setData_Amount((String) datas.get("data_Amount"));
|
||||
data.setData_Id((Integer) datas.get("data_Id"));
|
||||
if (dataService.updateData(data) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/selectAllByPage/{currentPage}")
|
||||
public List<Data> selectAllByPage(
|
||||
@PathVariable("currentPage") Integer currentPage) {
|
||||
int begin = (currentPage - 1) * 10;
|
||||
return dataService.selectAllByPage(begin);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/selectAllByPageAndCondition")
|
||||
public List<Data> selectAllByPageAndCondition(@RequestBody HashMap<String, Object> datas) {
|
||||
Data data = new Data();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
data.setData_Info((String) datas.get("Info"));
|
||||
data.setData_User((Integer) datas.get("UserId"));
|
||||
data.setData_Time((String) datas.get("Time"));
|
||||
List<Data> dataList = dataService.selectAllByPageAndCondition(begin, data);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
@PostMapping("/selectAllByPageAndConditionWithNull")
|
||||
public List<Data> selectAllByPageAndConditionWithNull(@RequestBody HashMap<String, Object> datas) {
|
||||
Data data = new Data();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
data.setData_Info((String) datas.get("Info"));
|
||||
data.setData_User((Integer) datas.get("UserId"));
|
||||
data.setData_Time((String) datas.get("Time"));
|
||||
List<Data> dataList = dataService.selectAllByPageAndConditionWithNull(begin, data);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalData")
|
||||
public Integer totalData(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
Data data = new Data();
|
||||
data.setData_Info((String) datas.get("Info"));
|
||||
data.setData_User((Integer) datas.get("UserId"));
|
||||
data.setData_Time((String) datas.get("Time"));
|
||||
int totalCount = this.dataService.totalData(data);
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
@PostMapping("/totalDataWithNull")
|
||||
public Integer totalDataWithNull(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
Data data = new Data();
|
||||
data.setData_Info((String) datas.get("Info"));
|
||||
data.setData_User((Integer) datas.get("UserId"));
|
||||
data.setData_Time((String) datas.get("Time"));
|
||||
int totalCount = this.dataService.totalDataWithNull(data);
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/totalByMonth/{start}/{end}")
|
||||
public int[] totalData(@PathVariable("start") String start, @PathVariable("end") String end) {
|
||||
|
||||
// start=2022-12;
|
||||
// end=2023-03
|
||||
|
||||
int countYear = Integer.parseInt(end.substring(0, 4)) - Integer.parseInt(start.substring(0, 4));
|
||||
int countMonth = Integer.parseInt(end.substring(5, 7)) - Integer.parseInt(start.substring(5, 7)) + countYear * 12 + 1;
|
||||
int[] sums = new int[countMonth];
|
||||
int j = 0;
|
||||
String StrStart = null;
|
||||
String StrEnd = null;
|
||||
String StrMonth = null;
|
||||
for (int i = Integer.parseInt(start.substring(5, 7)); i <= Integer.parseInt(start.substring(5, 7)) + countMonth; i++) {
|
||||
if (i <= 12) {
|
||||
if (i <= 9) {
|
||||
StrMonth = "0" + i;
|
||||
} else {
|
||||
StrMonth = String.valueOf(i);
|
||||
}
|
||||
StrStart = start.substring(0, 4) + "-" + StrMonth + "-01";
|
||||
StrEnd = start.substring(0, 4) + "-" + StrMonth + "-31";
|
||||
if (dataService.totalByMonth(StrStart, StrEnd) == null) {
|
||||
sums[j] = 0;
|
||||
} else {
|
||||
sums[j] = dataService.totalByMonth(StrStart, StrEnd);
|
||||
}
|
||||
if (j < countMonth - 1) {
|
||||
j++;
|
||||
}
|
||||
} else {
|
||||
if (i - 12 <= 9 && i - 12 > 0) {
|
||||
StrMonth = "0" + (i - 12);
|
||||
} else {
|
||||
StrMonth = String.valueOf(i - 12);
|
||||
}
|
||||
StrStart = end.substring(0, 4) + "-" + StrMonth + "-01";
|
||||
StrEnd = end.substring(0, 4) + "-" + StrMonth + "-31";
|
||||
if (dataService.totalByMonth(StrStart, StrEnd) == null) {
|
||||
sums[j] = 0;
|
||||
} else {
|
||||
sums[j] = dataService.totalByMonth(StrStart, StrEnd);
|
||||
}
|
||||
if (j < countMonth - 1) {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return sums;
|
||||
}
|
||||
|
||||
// //假如month=1
|
||||
// String Month=null;
|
||||
// String start=null;
|
||||
// String end=null;
|
||||
// String iStr=null;
|
||||
// int sum=0;
|
||||
// int iMonth;
|
||||
// int[] sums = new int[12];
|
||||
// for(int i=0;i<=11;i++){
|
||||
// sum=0;
|
||||
// iMonth=i+1;
|
||||
// if(iMonth<=9){
|
||||
// Month="0"+ iMonth;
|
||||
// }else {
|
||||
// Month= String.valueOf(iMonth);
|
||||
// }
|
||||
// start=year+"-"+Month+"-01";
|
||||
// end=year+"-"+Month+"-31";
|
||||
// sum=dataService.totalByMonth(start,end);
|
||||
// sums[i]=sum;
|
||||
// }
|
||||
// return sums;
|
||||
// }
|
||||
@GetMapping("/totalByMonthById/{start}/{end}/{name}")
|
||||
public int[] totalDataById(@PathVariable("start") String start,
|
||||
@PathVariable("end") String end,
|
||||
@PathVariable("name") String name) {
|
||||
|
||||
// start=2022-12;
|
||||
// end=2023-03
|
||||
int countYear = Integer.parseInt(end.substring(0, 4)) - Integer.parseInt(start.substring(0, 4));
|
||||
int countMonth = Integer.parseInt(end.substring(5, 7))
|
||||
- Integer.parseInt(start.substring(5, 7))
|
||||
+ countYear * 12 + 1;
|
||||
int[] sums = new int[countMonth];
|
||||
int j = 0;
|
||||
String StrStart = null;
|
||||
String StrEnd = null;
|
||||
String StrMonth = null;
|
||||
for (int i = Integer.parseInt(start.substring(5, 7));
|
||||
i < Integer.parseInt(start.substring(5, 7)) + countMonth;
|
||||
i++) {
|
||||
if (i <= 12) {
|
||||
if (i <= 9) {
|
||||
StrMonth = "0" + i;
|
||||
} else {
|
||||
StrMonth = String.valueOf(i);
|
||||
}
|
||||
StrStart = start.substring(0, 4) + "-" + StrMonth + "-01";
|
||||
StrEnd = start.substring(0, 4) + "-" + StrMonth + "-31";
|
||||
if (dataService.totalByMonthById(StrStart, StrEnd, name) == null) {
|
||||
sums[j] = 0;
|
||||
} else {
|
||||
sums[j] = dataService.totalByMonthById(StrStart, StrEnd, name);
|
||||
}
|
||||
if (j < countMonth - 1) {
|
||||
j++;
|
||||
}
|
||||
} else {
|
||||
if ((i - 12) <= 9 && i - 12 > 0) {
|
||||
StrMonth = "0" + (i - 12);
|
||||
} else {
|
||||
StrMonth = String.valueOf(i - 12);
|
||||
}
|
||||
StrStart = end.substring(0, 4) + "-" + StrMonth + "-01";
|
||||
StrEnd = end.substring(0, 4) + "-" + StrMonth + "-31";
|
||||
if (dataService.totalByMonthById(StrStart, StrEnd, name) == null) {
|
||||
sums[j] = 0;
|
||||
} else {
|
||||
sums[j] = dataService.totalByMonthById(StrStart, StrEnd, name);
|
||||
}
|
||||
if (j < countMonth - 1) {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < countMonth; i++) {
|
||||
System.out.println(sums[i]);
|
||||
}
|
||||
return sums;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
package com.tx.mydemo.controller;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.User;
|
||||
import com.tx.mydemo.service.InfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/info")
|
||||
public class InfoController {
|
||||
@Autowired
|
||||
private InfoService infoService;
|
||||
|
||||
@GetMapping("/selectAllInfo")
|
||||
public String[] InfoList() {
|
||||
|
||||
|
||||
List<Info> infos = infoService.InfoList();
|
||||
String[] name=new String[infos.size()];
|
||||
for(int i=0;i<infos.size();i++){
|
||||
name[i]= infos.get(i).getInfo_Name();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@PostMapping("/addInfo")
|
||||
public int add(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
Info info = new Info();
|
||||
info.setInfo_Name((String) datas.get("name"));
|
||||
info.setInfo_Phone((String) datas.get("phone"));
|
||||
info.setInfo_Type((String) datas.get("type"));
|
||||
info.setInfo_Cycle((String) datas.get("cycle"));
|
||||
info.setInfo_Address((String) datas.get("address"));
|
||||
info.setInfo_Others((String) datas.get("others"));
|
||||
int res = infoService.add(info);
|
||||
return res;
|
||||
}
|
||||
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public int deleteById(@PathVariable("id") Integer id) {
|
||||
if (infoService.deleteById(id) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/updateInfo/{id}")
|
||||
public Info selectById(@PathVariable("id") Integer id) {
|
||||
return infoService.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateInfo")
|
||||
public int update(@RequestBody Info info) {
|
||||
if (infoService.update(info) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/selectAllByPage/{currentPage}")
|
||||
public List<Info> selectAllByPage(
|
||||
@PathVariable("currentPage") Integer currentPage) {
|
||||
int begin = (currentPage - 1) * 10;
|
||||
return infoService.selectAllByPage(begin);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/selectAllByPageAndCondition")
|
||||
public List<Info> selectAllByPageAndCondition(@RequestBody HashMap<String, Object> datas) {
|
||||
Info info = new Info();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
info.setInfo_Name((String) datas.get("Name"));
|
||||
info.setInfo_Phone((String) datas.get("Phone"));
|
||||
|
||||
String type = (String) datas.get("Type");
|
||||
if (type != null) {
|
||||
if (type.equals("0")) {
|
||||
type = "常客户";
|
||||
} else if (type.equals("1")) {
|
||||
type = "临时客户";
|
||||
}
|
||||
}
|
||||
|
||||
info.setInfo_Type(type);
|
||||
List<Info> infos = infoService.selectAllByPageAndCondition(begin, info);
|
||||
return infos;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalInfo")
|
||||
public Integer totalInfo(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
Info info = new Info();
|
||||
info.setInfo_Name((String) datas.get("Name"));
|
||||
info.setInfo_Phone((String) datas.get("Phone"));
|
||||
String type = (String) datas.get("Type");
|
||||
if (type != null) {
|
||||
if (type.equals("0")) {
|
||||
type = "常客户";
|
||||
} else if (type.equals("1")) {
|
||||
type = "临时客户";
|
||||
}
|
||||
}
|
||||
|
||||
info.setInfo_Type(type);
|
||||
int totalCount = this.infoService.totalInfo(info);
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package com.tx.mydemo.controller;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.OverDate;
|
||||
import com.tx.mydemo.service.InfoService;
|
||||
import com.tx.mydemo.service.OverDateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/overdate")
|
||||
public class OverDateController {
|
||||
@Autowired
|
||||
private OverDateService overDateService;
|
||||
|
||||
@GetMapping("/selectAll")
|
||||
public List<OverDate> overDateList() {
|
||||
return this.overDateService.overDatelist();
|
||||
}
|
||||
|
||||
@PostMapping("/addOverDate")
|
||||
public int add(@RequestBody HashMap<String, Object> datas) {
|
||||
OverDate overDate = new OverDate();
|
||||
overDate.setOverDate_Name((String) datas.get("name"));
|
||||
overDate.setOverDate_Phone((String) datas.get("phone"));
|
||||
overDate.setOverDate_Type((String) datas.get("type"));
|
||||
overDate.setOverDate_Time((String) datas.get("time"));
|
||||
int res = overDateService.add(overDate);
|
||||
return res;
|
||||
}
|
||||
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public int deleteById(@PathVariable("id") Integer id) {
|
||||
if (overDateService.deleteById(id) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/updateOverDate/{id}")
|
||||
public OverDate selectById(@PathVariable("id") Integer id) {
|
||||
return overDateService.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateOverDate")
|
||||
public int update(@RequestBody OverDate overDate) {
|
||||
if (overDateService.update(overDate) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/selectAllByPage/{currentPage}")
|
||||
public List<OverDate> selectAllByPage(
|
||||
@PathVariable("currentPage") Integer currentPage) {
|
||||
int begin = (currentPage - 1) * 10;
|
||||
return overDateService.selectAllByPage(begin);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/selectAllByPageAndCondition")
|
||||
public List<OverDate> selectAllByPageAndCondition(@RequestBody HashMap<String, Object> datas) {
|
||||
OverDate overDate = new OverDate();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
overDate.setOverDate_Name((String) datas.get("Name"));
|
||||
overDate.setOverDate_Phone((String) datas.get("Phone"));
|
||||
|
||||
String type = (String) datas.get("Type");
|
||||
if (type != null) {
|
||||
if (type.equals("0")) {
|
||||
type = "常客户";
|
||||
} else if (type.equals("1")) {
|
||||
type = "临时客户";
|
||||
}
|
||||
}
|
||||
overDate.setOverDate_Type(type);
|
||||
List<OverDate> overDates = overDateService.selectAllByPageAndCondition(begin, overDate);
|
||||
return overDates;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalOverDate")
|
||||
public Integer totalOverDate(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
OverDate overDate = new OverDate();
|
||||
overDate.setOverDate_Name((String) datas.get("Name"));
|
||||
overDate.setOverDate_Phone((String) datas.get("Phone"));
|
||||
String type = (String) datas.get("Type");
|
||||
if (type != null) {
|
||||
if (type.equals("0")) {
|
||||
type = "常客户";
|
||||
} else if (type.equals("1")) {
|
||||
type = "临时客户";
|
||||
}
|
||||
}
|
||||
overDate.setOverDate_Type(type);
|
||||
int totalCount = this.overDateService.totalInfo(overDate);
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/checkOverDate")
|
||||
public Integer checkOverDate() {
|
||||
int totalCount = this.overDateService.checkOverDate();
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package com.tx.mydemo.controller;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.User;
|
||||
import com.tx.mydemo.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
|
||||
@GetMapping("/login/{username}/{password}")
|
||||
public String login(
|
||||
@PathVariable("username") String username,
|
||||
@PathVariable("password") String password) {
|
||||
User res = userService.login(username, password);
|
||||
if (res == null) {
|
||||
return "error";
|
||||
} else {
|
||||
String role = null;
|
||||
role = res.getRoles().getRole_Name();
|
||||
return role;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/findUserId/{username}")
|
||||
public int findUserId(@PathVariable("username") String username) {
|
||||
// System.out.println(username);
|
||||
// System.out.println(userService.findUserId(username));
|
||||
return userService.findUserId(username);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/selectAllByPageAndCondition")
|
||||
public List<User> selectAllByPageAndCondition(@RequestBody HashMap<String, Object> datas) {
|
||||
User user = new User();
|
||||
int currentPage = (Integer) datas.get("Page");
|
||||
int begin = (currentPage - 1) * 10;
|
||||
user.setUser_Name((String) datas.get("Name"));
|
||||
user.setUser_Role(String.valueOf(datas.get("Type")));
|
||||
List<User> users = userService.selectAllByPageAndCondition(begin, user);
|
||||
return users;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalUser")
|
||||
public Integer totalUser(@RequestBody HashMap<String, Object> datas) {
|
||||
|
||||
User user = new User();
|
||||
user.setUser_Name((String) datas.get("Name"));
|
||||
user.setUser_Role(String.valueOf(datas.get("Type")));
|
||||
int totalCount = this.userService.totalUser(user);
|
||||
return totalCount;
|
||||
}
|
||||
@GetMapping("/selectAllUser")
|
||||
public String[] UserList() {
|
||||
|
||||
|
||||
List<User> users = userService.UserList();
|
||||
String[] name=new String[users.size()];
|
||||
for(int i=0;i<users.size();i++){
|
||||
name[i]= users.get(i).getUser_Name();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@GetMapping("/updateUser/{id}")
|
||||
public User selectById(@PathVariable("id") Integer id) {
|
||||
return userService.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateUser")
|
||||
public int updateUser(@RequestBody User user) {
|
||||
if (userService.updateUser(user) >= 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
public class Contract {
|
||||
private int Contract_Id;
|
||||
private String Contract_Info;
|
||||
private String Contract_Start;
|
||||
private String Contract_End;
|
||||
private String Contract_Describe;
|
||||
private String Contract_State;
|
||||
private String Contract_Amount;
|
||||
|
||||
public int getContract_Id() {
|
||||
return Contract_Id;
|
||||
}
|
||||
|
||||
public void setContract_Id(int contract_Id) {
|
||||
Contract_Id = contract_Id;
|
||||
}
|
||||
|
||||
public String getContract_Info() {
|
||||
return Contract_Info;
|
||||
}
|
||||
|
||||
public void setContract_Info(String contract_Info) {
|
||||
Contract_Info = contract_Info;
|
||||
}
|
||||
|
||||
public String getContract_Start() {
|
||||
return Contract_Start;
|
||||
}
|
||||
|
||||
public void setContract_Start(String contract_Start) {
|
||||
Contract_Start = contract_Start;
|
||||
}
|
||||
|
||||
public String getContract_End() {
|
||||
return Contract_End;
|
||||
}
|
||||
|
||||
public void setContract_End(String contract_End) {
|
||||
Contract_End = contract_End;
|
||||
}
|
||||
|
||||
public String getContract_Describe() {
|
||||
return Contract_Describe;
|
||||
}
|
||||
|
||||
public void setContract_Describe(String contract_Describe) {
|
||||
Contract_Describe = contract_Describe;
|
||||
}
|
||||
|
||||
public String getContract_State() {
|
||||
return Contract_State;
|
||||
}
|
||||
|
||||
public void setContract_State(String contract_State) {
|
||||
Contract_State = contract_State;
|
||||
}
|
||||
|
||||
public String getContract_Amount() {
|
||||
return Contract_Amount;
|
||||
}
|
||||
|
||||
public void setContract_Amount(String contract_Amount) {
|
||||
Contract_Amount = contract_Amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Contract{" +
|
||||
"Contract_Id=" + Contract_Id +
|
||||
", Contract_Info='" + Contract_Info + '\'' +
|
||||
", Contract_Start='" + Contract_Start + '\'' +
|
||||
", Contract_End='" + Contract_End + '\'' +
|
||||
", Contract_Describe='" + Contract_Describe + '\'' +
|
||||
", Contract_State='" + Contract_State + '\'' +
|
||||
", Contract_Amount='" + Contract_Amount + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Data {
|
||||
String Data_Time;
|
||||
int Data_Id;
|
||||
String Data_Info;
|
||||
int Data_User;
|
||||
String Data_Amount;
|
||||
private User users;
|
||||
|
||||
|
||||
|
||||
public String getData_Time() {
|
||||
return Data_Time;
|
||||
}
|
||||
|
||||
public void setData_Time(String data_Time) {
|
||||
Data_Time = data_Time;
|
||||
}
|
||||
|
||||
public int getData_Id() {
|
||||
return Data_Id;
|
||||
}
|
||||
|
||||
public void setData_Id(int data_Id) {
|
||||
Data_Id = data_Id;
|
||||
}
|
||||
|
||||
public String getData_Info() {
|
||||
return Data_Info;
|
||||
}
|
||||
|
||||
public void setData_Info(String data_Info) {
|
||||
Data_Info = data_Info;
|
||||
}
|
||||
|
||||
public int getData_User() {
|
||||
return Data_User;
|
||||
}
|
||||
|
||||
public void setData_User(int data_User) {
|
||||
Data_User = data_User;
|
||||
}
|
||||
|
||||
public String getData_Amount() {
|
||||
return Data_Amount;
|
||||
}
|
||||
|
||||
public void setData_Amount(String data_Amount) {
|
||||
Data_Amount = data_Amount;
|
||||
}
|
||||
|
||||
public User getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(User users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Data{" +
|
||||
"Data_Time='" + Data_Time + '\'' +
|
||||
", Data_Id=" + Data_Id +
|
||||
", Data_Info='" + Data_Info + '\'' +
|
||||
", Data_User=" + Data_User +
|
||||
", Data_Amount='" + Data_Amount + '\'' +
|
||||
", users=" + users +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
//客户
|
||||
public class Info {
|
||||
private int Info_Id;
|
||||
private String Info_Name;
|
||||
private String Info_Phone;
|
||||
private String Info_Type;
|
||||
private String Info_Cycle;
|
||||
private String Info_Address;
|
||||
private String Info_Others;
|
||||
|
||||
public int getInfo_Id() {
|
||||
return Info_Id;
|
||||
}
|
||||
|
||||
public void setInfo_Id(int info_Id) {
|
||||
Info_Id = info_Id;
|
||||
}
|
||||
|
||||
public String getInfo_Name() {
|
||||
return Info_Name;
|
||||
}
|
||||
|
||||
public void setInfo_Name(String info_Name) {
|
||||
Info_Name = info_Name;
|
||||
}
|
||||
|
||||
public String getInfo_Phone() {
|
||||
return Info_Phone;
|
||||
}
|
||||
|
||||
public void setInfo_Phone(String info_Phone) {
|
||||
Info_Phone = info_Phone;
|
||||
}
|
||||
|
||||
public String getInfo_Type() {
|
||||
return Info_Type;
|
||||
}
|
||||
|
||||
public void setInfo_Type(String info_Type) {
|
||||
Info_Type = info_Type;
|
||||
}
|
||||
|
||||
public String getInfo_Cycle() {
|
||||
return Info_Cycle;
|
||||
}
|
||||
|
||||
public void setInfo_Cycle(String info_Cycle) {
|
||||
Info_Cycle = info_Cycle;
|
||||
}
|
||||
|
||||
public String getInfo_Address() {
|
||||
return Info_Address;
|
||||
}
|
||||
|
||||
public void setInfo_Address(String info_Address) {
|
||||
Info_Address = info_Address;
|
||||
}
|
||||
|
||||
public String getInfo_Others() {
|
||||
return Info_Others;
|
||||
}
|
||||
|
||||
public void setInfo_Others(String info_Others) {
|
||||
Info_Others = info_Others;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Info{" +
|
||||
"Info_Id=" + Info_Id +
|
||||
", Info_Name='" + Info_Name + '\'' +
|
||||
", Info_Phone='" + Info_Phone + '\'' +
|
||||
", Info_Type='" + Info_Type + '\'' +
|
||||
", Info_Cycle='" + Info_Cycle + '\'' +
|
||||
", Info_Address='" + Info_Address + '\'' +
|
||||
", Info_Others='" + Info_Others + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
public class OverDate {
|
||||
int OverDate_Id;
|
||||
String OverDate_Name;
|
||||
String OverDate_Phone;
|
||||
String OverDate_Type;
|
||||
String OverDate_Time;
|
||||
|
||||
public int getOverDate_Id() {
|
||||
return OverDate_Id;
|
||||
}
|
||||
|
||||
public void setOverDate_Id(int overDate_Id) {
|
||||
OverDate_Id = overDate_Id;
|
||||
}
|
||||
|
||||
public String getOverDate_Name() {
|
||||
return OverDate_Name;
|
||||
}
|
||||
|
||||
public void setOverDate_Name(String overDate_Name) {
|
||||
OverDate_Name = overDate_Name;
|
||||
}
|
||||
|
||||
public String getOverDate_Phone() {
|
||||
return OverDate_Phone;
|
||||
}
|
||||
|
||||
public void setOverDate_Phone(String overDate_Phone) {
|
||||
OverDate_Phone = overDate_Phone;
|
||||
}
|
||||
|
||||
public String getOverDate_Type() {
|
||||
return OverDate_Type;
|
||||
}
|
||||
|
||||
public void setOverDate_Type(String overDate_Type) {
|
||||
OverDate_Type = overDate_Type;
|
||||
}
|
||||
|
||||
public String getOverDate_Time() {
|
||||
return OverDate_Time;
|
||||
}
|
||||
|
||||
public void setOverDate_Time(String overDate_Time) {
|
||||
OverDate_Time = overDate_Time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OverDate{" +
|
||||
"OverDate_Id=" + OverDate_Id +
|
||||
", OverDate_Name='" + OverDate_Name + '\'' +
|
||||
", OverDate_Phone='" + OverDate_Phone + '\'' +
|
||||
", OverDate_Type='" + OverDate_Type + '\'' +
|
||||
", OverDate_Time='" + OverDate_Time + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
public class Role {
|
||||
int Role_Id;
|
||||
String Role_Name;
|
||||
|
||||
public int getRole_Id() {
|
||||
return Role_Id;
|
||||
}
|
||||
|
||||
public void setRole_Id(int role_Id) {
|
||||
Role_Id = role_Id;
|
||||
}
|
||||
|
||||
public String getRole_Name() {
|
||||
return Role_Name;
|
||||
}
|
||||
|
||||
public void setRole_Name(String role_Name) {
|
||||
Role_Name = role_Name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Role{" +
|
||||
"Role_Id=" + Role_Id +
|
||||
", Role_Name='" + Role_Name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.tx.mydemo.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//员工
|
||||
public class User {
|
||||
private int User_Id;
|
||||
private String User_Name;
|
||||
private String User_Pass;
|
||||
private String User_Role;
|
||||
private String User_Phone;
|
||||
private String User_Address;
|
||||
private Role roles;
|
||||
|
||||
public int getUser_Id() {
|
||||
return User_Id;
|
||||
}
|
||||
|
||||
public void setUser_Id(int user_Id) {
|
||||
User_Id = user_Id;
|
||||
}
|
||||
|
||||
public String getUser_Name() {
|
||||
return User_Name;
|
||||
}
|
||||
|
||||
public void setUser_Name(String user_Name) {
|
||||
User_Name = user_Name;
|
||||
}
|
||||
|
||||
public String getUser_Pass() {
|
||||
return User_Pass;
|
||||
}
|
||||
|
||||
public void setUser_Pass(String user_Pass) {
|
||||
User_Pass = user_Pass;
|
||||
}
|
||||
|
||||
public String getUser_Role() {
|
||||
return User_Role;
|
||||
}
|
||||
|
||||
public void setUser_Role(String user_Role) {
|
||||
User_Role = user_Role;
|
||||
}
|
||||
|
||||
public String getUser_Phone() {
|
||||
return User_Phone;
|
||||
}
|
||||
|
||||
public void setUser_Phone(String user_Phone) {
|
||||
User_Phone = user_Phone;
|
||||
}
|
||||
|
||||
public String getUser_Address() {
|
||||
return User_Address;
|
||||
}
|
||||
|
||||
public void setUser_Address(String user_Address) {
|
||||
User_Address = user_Address;
|
||||
}
|
||||
|
||||
public Role getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(Role roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"User_Id=" + User_Id +
|
||||
", User_Name='" + User_Name + '\'' +
|
||||
", User_Pass='" + User_Pass + '\'' +
|
||||
", User_Role='" + User_Role + '\'' +
|
||||
", User_Phone='" + User_Phone + '\'' +
|
||||
", User_Address='" + User_Address + '\'' +
|
||||
", roles=" + roles +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.tx.mydemo.mapper;
|
||||
|
||||
import com.tx.mydemo.domain.Contract;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface ContractXmlMapper {
|
||||
|
||||
List<Contract> selectAllByPageAndCondition(int begin, Contract contract);
|
||||
|
||||
int totalContract(Contract contract);
|
||||
|
||||
Contract selectById(Integer id);
|
||||
|
||||
int updateContract(Contract contract);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.tx.mydemo.mapper;
|
||||
|
||||
import com.tx.mydemo.domain.Data;
|
||||
import com.tx.mydemo.domain.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DataXmlMapper {
|
||||
|
||||
int add(Data data);
|
||||
|
||||
int totalData(Data data);
|
||||
|
||||
List<Data> selectAllByPageAndCondition(int begin, Data data1);
|
||||
|
||||
List<Data> selectAllByPage(int begin);
|
||||
|
||||
int updateData(Data data);
|
||||
|
||||
Data selectById(Integer id);
|
||||
|
||||
int deleteById(Integer id);
|
||||
|
||||
List<Data> selectAllByPageAndConditionWithNull(int begin, Data data1);
|
||||
|
||||
int totalDataWithNull(Data data);
|
||||
|
||||
Integer totalByMonth(@Param("start") String start,@Param("end") String end);
|
||||
|
||||
Integer totalByMonthById(String strStart, String strEnd, String name);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.tx.mydemo.mapper;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TuXXX
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface InfoXmlMapper {
|
||||
public List<Info> selectAll();
|
||||
int add(Info info);
|
||||
int deleteById(int id);
|
||||
Info selectById(Integer id);
|
||||
|
||||
int update(Info info);
|
||||
|
||||
List<Info> selectAllByPageAndCondition(
|
||||
@Param("begin") int begin,
|
||||
@Param("name")String name,
|
||||
@Param("phone")String phone,
|
||||
@Param("type")String type
|
||||
);
|
||||
|
||||
int totalInfo(Info info);
|
||||
|
||||
List<Info> selectAllByPage(int begin);
|
||||
|
||||
List<Info> selectAllByPageAndCondition(int begin,Info info);
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.tx.mydemo.mapper;
|
||||
|
||||
|
||||
import com.tx.mydemo.domain.OverDate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TuXXX
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface OverDateXmlMapper {
|
||||
public List<OverDate> selectAll();
|
||||
int add(OverDate overDate);
|
||||
int deleteById(int id);
|
||||
OverDate selectById(Integer id);
|
||||
|
||||
int update(OverDate overDate);
|
||||
|
||||
List<OverDate> selectAllByPageAndCondition(
|
||||
@Param("begin") int begin,
|
||||
@Param("name")String name,
|
||||
@Param("phone")String phone,
|
||||
@Param("time")String Time
|
||||
);
|
||||
|
||||
int totalInfo(OverDate overDate);
|
||||
|
||||
List<OverDate> selectAllByPage(int begin);
|
||||
|
||||
List<OverDate> selectAllByPageAndCondition(int begin,OverDate overDate);
|
||||
|
||||
int checkOverDate();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.tx.mydemo.mapper;
|
||||
|
||||
import com.tx.mydemo.domain.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface UserXmlMapper {
|
||||
|
||||
User login(@Param("User_Name") String username, @Param("User_Pass") String password);
|
||||
int findUserId(String username);
|
||||
|
||||
List<User> selectAllByPageAndCondition(int begin, User user);
|
||||
|
||||
int totalUser(User user);
|
||||
|
||||
List<User> UserList();
|
||||
|
||||
User selectById(Integer id);
|
||||
|
||||
int updateUser(User user);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.tx.mydemo.service;
|
||||
|
||||
import com.tx.mydemo.domain.Contract;
|
||||
import com.tx.mydemo.domain.Info;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ContractService {
|
||||
|
||||
List<Contract> selectAllByPageAndCondition(int begin, Contract contract);
|
||||
|
||||
int totalContract(Contract contract);
|
||||
|
||||
Contract selectById(Integer id);
|
||||
|
||||
int updateContract(Contract contract);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.tx.mydemo.service;
|
||||
|
||||
import com.tx.mydemo.domain.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DataService {
|
||||
int add(Data data);
|
||||
|
||||
int deleteById(Integer id);
|
||||
|
||||
Data selectById(Integer id);
|
||||
|
||||
int updateData(Data data);
|
||||
|
||||
List<Data> selectAllByPage(int begin);
|
||||
|
||||
List<Data> selectAllByPageAndCondition(int begin, Data data);
|
||||
|
||||
int totalData(Data data);
|
||||
|
||||
List<Data> selectAllByPageAndConditionWithNull(int begin, Data data);
|
||||
|
||||
int totalDataWithNull(Data data);
|
||||
|
||||
Integer totalByMonth(String start,String end);
|
||||
|
||||
Integer totalByMonthById(String strStart, String strEnd, String name);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.tx.mydemo.service;
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface InfoService {
|
||||
// public UserVO findByPage(Integer page);
|
||||
//
|
||||
// public Integer save(User user);
|
||||
//
|
||||
// public Integer deleteById(Integer id);
|
||||
//
|
||||
// public User findById(Integer id);
|
||||
//
|
||||
// public Integer update(User user);
|
||||
|
||||
|
||||
List<Info> InfoList();
|
||||
|
||||
int add(Info info);
|
||||
|
||||
int deleteById(Integer id);
|
||||
|
||||
Info selectById(Integer id);
|
||||
|
||||
int update(Info info);
|
||||
|
||||
List<Info> selectAllByPageAndCondition(int begin,Info info);
|
||||
|
||||
|
||||
int totalInfo(Info info);
|
||||
|
||||
List<Info> selectAllByPage(int begin);
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.tx.mydemo.service;
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.OverDate;
|
||||
import com.tx.mydemo.domain.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OverDateService {
|
||||
// public UserVO findByPage(Integer page);
|
||||
//
|
||||
// public Integer save(User user);
|
||||
//
|
||||
// public Integer deleteById(Integer id);
|
||||
//
|
||||
// public User findById(Integer id);
|
||||
//
|
||||
// public Integer update(User user);
|
||||
|
||||
|
||||
List<OverDate> overDatelist();
|
||||
|
||||
int add(OverDate overDate);
|
||||
|
||||
int deleteById(Integer id);
|
||||
|
||||
OverDate selectById(Integer id);
|
||||
|
||||
int update(OverDate overDate);
|
||||
|
||||
List<OverDate> selectAllByPageAndCondition(int begin,OverDate overDate);
|
||||
|
||||
|
||||
int totalInfo(OverDate overDate);
|
||||
|
||||
List<OverDate> selectAllByPage(int begin);
|
||||
|
||||
int checkOverDate();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.tx.mydemo.service;
|
||||
|
||||
import com.tx.mydemo.domain.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserService {
|
||||
User login(String username,String password);
|
||||
int findUserId(String username);
|
||||
|
||||
List<User> selectAllByPageAndCondition(int begin, User user);
|
||||
|
||||
int totalUser(User user);
|
||||
|
||||
List<User> UserList();
|
||||
|
||||
User selectById(Integer id);
|
||||
|
||||
int updateUser(User user);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.tx.mydemo.service.impl;
|
||||
|
||||
import com.tx.mydemo.domain.Contract;
|
||||
import com.tx.mydemo.mapper.ContractXmlMapper;
|
||||
import com.tx.mydemo.service.ContractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class ContractServiceImlp implements ContractService {
|
||||
|
||||
@Autowired
|
||||
private ContractXmlMapper contractXmlMapper;
|
||||
|
||||
@Override
|
||||
public List<Contract> selectAllByPageAndCondition(int begin, Contract contract) {
|
||||
return contractXmlMapper.selectAllByPageAndCondition(begin,contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalContract(Contract contract) {
|
||||
return contractXmlMapper.totalContract(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Contract selectById(Integer id) {
|
||||
return contractXmlMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateContract(Contract contract) {
|
||||
return contractXmlMapper.updateContract(contract);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.tx.mydemo.service.impl;
|
||||
|
||||
import com.tx.mydemo.domain.Data;
|
||||
import com.tx.mydemo.mapper.DataXmlMapper;
|
||||
import com.tx.mydemo.service.DataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DataServiceImpl implements DataService {
|
||||
@Autowired
|
||||
private DataXmlMapper dataXmlService;
|
||||
|
||||
|
||||
@Override
|
||||
public int add(Data data) {
|
||||
return dataXmlService.add(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return dataXmlService.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Data selectById(Integer id) {
|
||||
return dataXmlService.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateData(Data data) {
|
||||
return dataXmlService.updateData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Data> selectAllByPage(int begin) {
|
||||
return dataXmlService.selectAllByPage(begin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Data> selectAllByPageAndCondition(int begin, Data data) {
|
||||
return dataXmlService.selectAllByPageAndCondition( begin, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalData(Data data) {
|
||||
return dataXmlService.totalData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Data> selectAllByPageAndConditionWithNull(int begin, Data data) {
|
||||
return dataXmlService.selectAllByPageAndConditionWithNull( begin, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalDataWithNull(Data data) {
|
||||
return dataXmlService.totalDataWithNull(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer totalByMonth(String start,String end) {
|
||||
return dataXmlService.totalByMonth(start,end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer totalByMonthById(String strStart, String strEnd, String name) {
|
||||
return dataXmlService.totalByMonthById(strStart,strEnd,name);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.tx.mydemo.service.impl;
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.mapper.InfoXmlMapper;
|
||||
import com.tx.mydemo.service.InfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class InfoServiceImlp implements InfoService {
|
||||
// private UserRepository userRepository;
|
||||
|
||||
// private Integer limit = 10;
|
||||
|
||||
// @Override
|
||||
// public UserVO findByPage(Integer page) {
|
||||
// Integer index = (page-1)*limit;
|
||||
// UserVO userVO = new UserVO();
|
||||
// userVO.setData(userRepository.find(index,limit));
|
||||
// userVO.setTotal(userRepository.count());
|
||||
// userVO.setPageSize(limit);
|
||||
// return userVO;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public Integer save(User user) {
|
||||
// return userRepository.save(user);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Integer deleteById(Integer id) {
|
||||
// return userRepository.deleteById(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public User findById(Integer id) {
|
||||
// return userRepository.findById(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Integer update(User user) {
|
||||
// return userRepository.update(user);
|
||||
// }
|
||||
|
||||
// SqlSessionFactory factory = SqlSessionFactoryUtils.getSqlSessionFactory();
|
||||
@Autowired
|
||||
private InfoXmlMapper infoXmlService;
|
||||
|
||||
@Override
|
||||
public List<Info> InfoList() {
|
||||
|
||||
List<Info> infos = infoXmlService.selectAll();
|
||||
//4. 调用方法
|
||||
return infos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int add(Info info) {
|
||||
return infoXmlService.add(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
System.out.println(infoXmlService.deleteById(id));
|
||||
return infoXmlService.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Info selectById(Integer id) {
|
||||
return infoXmlService.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Info info) {
|
||||
return infoXmlService.update(info);
|
||||
}
|
||||
@Override
|
||||
public List<Info> selectAllByPageAndCondition(int begin,Info info){
|
||||
return infoXmlService.selectAllByPageAndCondition(begin,info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Info> selectAllByPage(int begin) {
|
||||
return infoXmlService.selectAllByPage(begin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalInfo(Info info){
|
||||
return infoXmlService.totalInfo(info);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.tx.mydemo.service.impl;
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.domain.OverDate;
|
||||
import com.tx.mydemo.mapper.InfoXmlMapper;
|
||||
import com.tx.mydemo.mapper.OverDateXmlMapper;
|
||||
import com.tx.mydemo.service.OverDateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class OverDateServiceImlp implements OverDateService {
|
||||
// SqlSessionFactory factory = SqlSessionFactoryUtils.getSqlSessionFactory();
|
||||
@Autowired
|
||||
private OverDateXmlMapper overDateXmlService;
|
||||
|
||||
@Override
|
||||
public List<OverDate> overDatelist() {
|
||||
|
||||
List<OverDate> overDates = overDateXmlService.selectAll();
|
||||
//4. 调用方法
|
||||
return overDates;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int add(OverDate overDate) {
|
||||
return overDateXmlService.add(overDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
System.out.println(overDateXmlService.deleteById(id));
|
||||
return overDateXmlService.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OverDate selectById(Integer id) {
|
||||
return overDateXmlService.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(OverDate overDate) {
|
||||
return overDateXmlService.update(overDate);
|
||||
}
|
||||
@Override
|
||||
public List<OverDate> selectAllByPageAndCondition(int begin,OverDate overDate){
|
||||
return overDateXmlService.selectAllByPageAndCondition(begin,overDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OverDate> selectAllByPage(int begin) {
|
||||
return overDateXmlService.selectAllByPage(begin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkOverDate() {
|
||||
return overDateXmlService.checkOverDate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalInfo(OverDate overDate){
|
||||
return overDateXmlService.totalInfo(overDate);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.tx.mydemo.service.impl;
|
||||
|
||||
import com.tx.mydemo.domain.User;
|
||||
import com.tx.mydemo.mapper.UserXmlMapper;
|
||||
import com.tx.mydemo.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
@Autowired
|
||||
private UserXmlMapper userXmlService;
|
||||
|
||||
|
||||
@Override
|
||||
public User login(String username, String password) {
|
||||
|
||||
return userXmlService.login(username, password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int findUserId(String username) {
|
||||
return userXmlService.findUserId(username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> selectAllByPageAndCondition(int begin, User user) {
|
||||
return userXmlService.selectAllByPageAndCondition(begin,user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int totalUser(User user) {
|
||||
return userXmlService.totalUser(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> UserList() {
|
||||
return userXmlService.UserList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User selectById(Integer id) {
|
||||
return userXmlService.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateUser(User user) {
|
||||
return userXmlService.updateUser(user);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#server:
|
||||
#port: 8181
|
||||
#spring:
|
||||
#datasource:
|
||||
#url: jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||
#username: root
|
||||
#password: 123456
|
||||
#driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
##mybatis:
|
||||
##mapper-locations: classpath:/mapping/*.xml
|
||||
##type-aliases-package: com.tx.domain
|
||||
##logging:
|
||||
##level:
|
||||
##com.southwind.repository.*: debug
|
||||
#
|
|
@ -0,0 +1,14 @@
|
|||
server:
|
||||
port: 8181
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
mybatis:
|
||||
mapper-locations: classpath:/mapper/*.xml
|
||||
type-aliases-package: com.tx.mydemo.domain
|
||||
logging:
|
||||
level:
|
||||
com.southwind.repository.*: debug
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tx.mydemo.mapper.ContractXmlMapper">
|
||||
<update id="updateContract">
|
||||
update contract
|
||||
set contract_Info=#{Contract_Info},
|
||||
contract_Start=#{Contract_Start},
|
||||
contract_End=#{Contract_End},
|
||||
contract_Describe=#{Contract_Describe},
|
||||
contract_State=#{Contract_State},
|
||||
contract_Amount=#{Contract_Amount}
|
||||
where contract_Id = #{Contract_Id};
|
||||
</update>
|
||||
|
||||
<select id="selectAllByPageAndCondition" resultType="com.tx.mydemo.domain.Contract">
|
||||
select *
|
||||
from contract
|
||||
<where>
|
||||
<if test="contract.Contract_State != null and contract.Contract_State != '' ">
|
||||
and contract_State = #{contract.Contract_State}
|
||||
</if>
|
||||
<if test="contract.Contract_Start != null and contract.Contract_Start != '' ">
|
||||
and contract_Start <![CDATA[ >= ]]> #{contract.Contract_Start}
|
||||
</if>
|
||||
<if test="contract.Contract_End != null and contract.Contract_End != '' ">
|
||||
and contract_End <![CDATA[ <= ]]> #{contract.Contract_End}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
<select id="totalContract" resultType="java.lang.Integer">
|
||||
select count(*) from contract
|
||||
<where>
|
||||
<if test="Contract_Start != null and Contract_Start != '' ">
|
||||
and contract_Start <![CDATA[ >= ]]> #{Contract_Start}
|
||||
</if>
|
||||
<if test="Contract_End != null and Contract_End != '' ">
|
||||
and contract_End <![CDATA[ <= ]]> #{Contract_End}
|
||||
</if>
|
||||
<if test="Contract_State != null and Contract_State != '' ">
|
||||
and contract_State = #{Contract_State}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectById" resultType="com.tx.mydemo.domain.Contract">
|
||||
select *
|
||||
from contract
|
||||
where contract_Id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,192 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tx.mydemo.mapper.DataXmlMapper">
|
||||
<!-- <resultMap id="DataMap" type="data">-->
|
||||
<!-- <association property="user" column="User_Id" select="selectAllByPageAndCondition"></association>-->
|
||||
<!-- <association property="user" column="User_Id" select="totalData"></association>-->
|
||||
<!-- </resultMap>-->
|
||||
<resultMap id="dataWithUser" type="com.tx.mydemo.domain.Data">
|
||||
<id column="data_Id" property="Data_Id"></id>
|
||||
<result column="data_Time" property="Data_Time"></result>
|
||||
<result column="data_Amount" property="Data_Amount"></result>
|
||||
<result column="data_Info" property="Data_Info"></result>
|
||||
<result column="data_User" property="Data_User"></result>
|
||||
<association property="users" javaType="user">
|
||||
<id column="User_Id" property="User_Id"></id>
|
||||
<result column="User_Name" property="User_Name"></result>
|
||||
<result column="User_Pass" property="User_Pass"></result>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="TotalDataWithUser" type="com.tx.mydemo.domain.Data">
|
||||
<id column="data_Id" property="Data_Id"></id>
|
||||
<result column="data_Time" property="Data_Time"></result>
|
||||
<result column="data_Amount" property="Data_Amount"></result>
|
||||
<result column="data_Info" property="Data_Info"></result>
|
||||
<result column="data_User" property="Data_User"></result>
|
||||
<association property="users" javaType="user">
|
||||
<id column="User_Id" property="User_Id"></id>
|
||||
<result column="User_Name" property="User_Name"></result>
|
||||
<result column="User_Pass" property="User_Pass"></result>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<insert id="add">
|
||||
insert into data
|
||||
values (null, #{Data_Time}, #{Data_Amount}, #{Data_Info}, #{Data_User})
|
||||
</insert>
|
||||
<update id="updateData">
|
||||
update data
|
||||
set data_Time=#{Data_Time},
|
||||
data_Info=#{Data_Info},
|
||||
data_Amount=#{Data_Amount}
|
||||
where data_Id = #{Data_Id};
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from data
|
||||
where data_Id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- <select id="totalData" resultType="java.lang.Integer">-->
|
||||
<!-- select count(*) from data-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="Data_Time != null and Data_Time != '' ">-->
|
||||
<!-- and data_Time like #{Data_Time}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="Data_Info != null and Data_Info != '' ">-->
|
||||
<!-- and data_Info like #{Data_Info}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="Data_User != null and Data_User != '' ">-->
|
||||
<!-- and user_Id = #{data.Data_User}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="totalData" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from data
|
||||
inner join user on User_Id= data_User
|
||||
<where>
|
||||
<if test="Data_User != null and Data_User != '' ">
|
||||
and data_User=#{Data_User}
|
||||
</if>
|
||||
<if test="Data_Time != null and Data_Time != '' ">
|
||||
and data_Time like #{Data_Time}
|
||||
</if>
|
||||
|
||||
<if test="Data_Info != null and Data_Info != '' ">
|
||||
and data_Info like #{Data_Info}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- <select id="selectAllByPageAndCondition" resultType="com.tx.mydemo.domain.Data">-->
|
||||
<!-- select *-->
|
||||
<!-- from data-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="data.Data_Time != null and data.Data_Time != '' ">-->
|
||||
<!-- and data_Time like #{data.Data_Time}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="data.Data_Info != null and data.Data_Info != '' ">-->
|
||||
<!-- and data_Info like #{data.Data_Info}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="data.Data_User != null and data.Data_User != '' ">-->
|
||||
<!-- and user_Id = #{data.Data_User}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
|
||||
<!-- limit #{begin} , 10-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<select id="selectAllByPageAndCondition" parameterType="int" resultMap="dataWithUser">
|
||||
select *
|
||||
from data
|
||||
inner join user on User_Id= data_User
|
||||
<where>
|
||||
<if test="data1.Data_User != 0 ">
|
||||
and data_User=#{data1.Data_User}
|
||||
</if>
|
||||
<if test="data1.Data_Time != null and data1.Data_Time != '' ">
|
||||
and data_Time like #{data1.Data_Time}
|
||||
</if>
|
||||
|
||||
<if test="data1.Data_Info != null and data1.Data_Info != '' ">
|
||||
and data_Info like #{data1.Data_Info}
|
||||
</if>
|
||||
</where>
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAllByPage" resultType="com.tx.mydemo.domain.Data">
|
||||
select *
|
||||
from data limit #{begin} , 10
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectById" resultMap="dataWithUser">
|
||||
select *
|
||||
from data
|
||||
inner join user on User_Id = data_User
|
||||
where data_Id = #{id}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAllByPageAndConditionWithNull" parameterType="int" resultMap="dataWithUser">
|
||||
select *
|
||||
from data
|
||||
inner join user on User_Id= data_User
|
||||
<where>
|
||||
<if test="data1.Data_Time != null and data1.Data_Time != '' ">
|
||||
and data_Time <![CDATA[ >= ]]> #{data1.Data_Time}
|
||||
</if>
|
||||
|
||||
<if test="data1.Data_Info != null and data1.Data_Info != '' ">
|
||||
and data_Info like #{data1.Data_Info}
|
||||
</if>
|
||||
</where>
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
|
||||
|
||||
<select id="totalDataWithNull" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from data
|
||||
inner join user on User_Id= data_User
|
||||
<where>
|
||||
<if test="Data_Time != null and Data_Time != '' ">
|
||||
and data_Time <![CDATA[ >= ]]> #{Data_Time}
|
||||
</if>
|
||||
|
||||
<if test="Data_Info != null and Data_Info != '' ">
|
||||
and data_Info like #{Data_Info}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="totalByMonth" resultType="java.lang.Integer">
|
||||
select sum(data_Amount)
|
||||
from data
|
||||
where data_Time <![CDATA[ >= ]]> #{start}
|
||||
and data_Time <![CDATA[ <= ]]> #{end}
|
||||
</select>
|
||||
<select id="totalByMonthById" resultType="java.lang.Integer">
|
||||
select sum(data_Amount)
|
||||
from data
|
||||
where data_Time <![CDATA[ >= ]]> #{strStart}
|
||||
and data_Time <![CDATA[ <= ]]> #{strEnd}
|
||||
and data_Info = #{name}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tx.mydemo.mapper.InfoXmlMapper">
|
||||
<update id="update">
|
||||
update info
|
||||
set info_Name=#{Info_Name},
|
||||
info_Phone=#{Info_Phone},
|
||||
info_Phone=#{Info_Phone},
|
||||
info_Type=#{Info_Type},
|
||||
info_Cycle=#{Info_Cycle},
|
||||
info_Others=#{Info_Others}
|
||||
where info_Id = #{Info_Id};
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from info
|
||||
where info_Id = #{id}
|
||||
</delete>
|
||||
<select id="selectAll" resultType="info">
|
||||
select *
|
||||
from info
|
||||
</select>
|
||||
<select id="selectById" resultType="com.tx.mydemo.domain.Info">
|
||||
select *
|
||||
from info
|
||||
where info_Id = #{id}
|
||||
</select>
|
||||
<select id="selectAllByPage" resultType="com.tx.mydemo.domain.Info">
|
||||
select *
|
||||
from info limit #{begin} , 10
|
||||
</select>
|
||||
<select id="totalInfo" resultType="java.lang.Integer">
|
||||
select count(*) from info
|
||||
<where>
|
||||
<if test="Info_Name != null and Info_Name != '' ">
|
||||
and info_Name like #{Info_Name}
|
||||
</if>
|
||||
|
||||
<if test="Info_Phone != null and Info_Phone != '' ">
|
||||
and info_Phone like #{Info_Phone}
|
||||
</if>
|
||||
|
||||
<if test="Info_Type != null and Info_Type != '' ">
|
||||
and info_Type like #{Info_Type}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectAllByPageAndCondition" resultType="com.tx.mydemo.domain.Info">
|
||||
select *
|
||||
from info
|
||||
<where>
|
||||
<if test="info.Info_Name != null and info.Info_Name != '' ">
|
||||
and info_Name like #{info.Info_Name}
|
||||
</if>
|
||||
|
||||
<if test="info.Info_Phone != null and info.Info_Phone != '' ">
|
||||
and info_Phone like #{info.Info_Phone}
|
||||
</if>
|
||||
|
||||
<if test="info.Info_Type != null and info.Info_Type != '' ">
|
||||
and info_Type like #{info.Info_Type}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
<insert id="add">
|
||||
insert into info
|
||||
values (null, #{Info_Name}, #{Info_Phone}, #{Info_Type}, #{Info_Cycle},#{Info_Address},#{Info_Others})
|
||||
</insert>
|
||||
</mapper>
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tx.mydemo.mapper.OverDateXmlMapper">
|
||||
<update id="update">
|
||||
update overdate
|
||||
set overdate_Name=#{OverDate_Name},
|
||||
overdate_Phone=#{OverDate_Phone},
|
||||
overdate_Type=#{OverDate_Type},
|
||||
overdate_Time=#{OverDate_Time}
|
||||
where overdate_Id = #{OverDate_Id};
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from overdate
|
||||
where overdate_Id = #{id}
|
||||
</delete>
|
||||
<select id="selectAll" resultType="overdate">
|
||||
select *
|
||||
from overdate
|
||||
</select>
|
||||
<select id="selectById" resultType="com.tx.mydemo.domain.OverDate">
|
||||
select *
|
||||
from overdate
|
||||
where overdate_Id = #{id}
|
||||
</select>
|
||||
<select id="selectAllByPage" resultType="com.tx.mydemo.domain.OverDate">
|
||||
select *
|
||||
from overdate limit #{begin} , 10
|
||||
</select>
|
||||
<select id="totalInfo" resultType="java.lang.Integer">
|
||||
select count(*) from overdate
|
||||
<where>
|
||||
<if test="OverDate_Name != null and OverDate_Name != '' ">
|
||||
and overdate_Name like #{OverDate_Name}
|
||||
</if>
|
||||
|
||||
<if test="OverDate_Type != null and OverDate_Type != '' ">
|
||||
and overdate_Type like #{OverDate_Type}
|
||||
</if>
|
||||
|
||||
<if test="OverDate_Phone != null and OverDate_Phone!= '' ">
|
||||
and overdate_Phone like #{OverDate_Phone}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="selectAllByPageAndCondition" resultType="com.tx.mydemo.domain.OverDate">
|
||||
select *
|
||||
from overdate
|
||||
<where>
|
||||
<if test="overDate.OverDate_Name != null and overDate.OverDate_Name != '' ">
|
||||
and overdate_Name like #{overDate.OverDate_Name}
|
||||
</if>
|
||||
|
||||
<if test="overDate.OverDate_Phone != null and overDate.OverDate_Phone != '' ">
|
||||
and overdate_Phone like #{overDate.OverDate_Phone}
|
||||
</if>
|
||||
|
||||
<if test="overDate.OverDate_Type != null and overDate.OverDate_Type != '' ">
|
||||
and overdate_Type like #{overDate.OverDate_Type}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
<select id="checkOverDate" resultType="java.lang.Integer">
|
||||
select count(*) from contract
|
||||
</select>
|
||||
<insert id="add">
|
||||
insert into overdate
|
||||
values (null, #{Info_Name}, #{Info_Phone}, #{Info_Type}, #{Info_Cycle})
|
||||
</insert>
|
||||
</mapper>
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tx.mydemo.mapper.UserXmlMapper">
|
||||
<resultMap id="userWithRole" type="com.tx.mydemo.domain.User">
|
||||
<id column="User_Id" property="User_Id"></id>
|
||||
<result column="User_Name" property="User_Name"></result>
|
||||
<result column="User_Pass" property="User_Pass"></result>
|
||||
<result column="User_Role" property="User_Role"></result>
|
||||
<result column="User_Phone" property="User_Phone"></result>
|
||||
<result column="User_Address" property="User_Address"></result>
|
||||
<association property="roles" javaType="role">
|
||||
<id column="Role_Id" property="role_Id"></id>
|
||||
<result column="Role_Name" property="role_Name"></result>
|
||||
</association>
|
||||
</resultMap>
|
||||
<update id="updateUser">
|
||||
update user
|
||||
set User_Name=#{User_Name},
|
||||
User_Pass=#{User_Pass},
|
||||
User_Phone=#{User_Phone},
|
||||
User_Address=#{User_Address},
|
||||
User_Role=#{User_Role}
|
||||
where User_Id = #{User_Id};
|
||||
</update>
|
||||
|
||||
|
||||
<!-- <select id="login" resultType="com.tx.mydemo.domain.User">-->
|
||||
<!-- select *-->
|
||||
<!-- from user-->
|
||||
<!-- where User_Name = #{User_Name}-->
|
||||
<!-- and User_Pass = #{User_Pass};-->
|
||||
<!-- </select>-->
|
||||
|
||||
|
||||
<select id="login" resultMap="userWithRole">
|
||||
select *
|
||||
from user
|
||||
INNER JOIN role on User_Role = role_Id
|
||||
where User_Name = #{User_Name}
|
||||
and User_Pass = #{User_Pass};
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findUserId" resultType="java.lang.Integer">
|
||||
select User_Id
|
||||
from user
|
||||
where User_Name = #{username}
|
||||
</select>
|
||||
<select id="selectAllByPageAndCondition" resultMap="userWithRole">
|
||||
select * from user inner join role on User_Role=role_Id
|
||||
<where>
|
||||
<if test="user.User_Name != null and user.User_Name != '' ">
|
||||
and User_Name like #{user.User_Name}
|
||||
</if>
|
||||
<if test="user.User_Role != null and user.User_Role != ''">
|
||||
and User_Role = #{user.User_Role}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
limit #{begin} , 10
|
||||
</select>
|
||||
<select id="totalUser" resultType="java.lang.Integer">
|
||||
select count(*) from user
|
||||
<where>
|
||||
<if test="User_Name != null and User_Name != '' ">
|
||||
and User_Name like #{User_Name}
|
||||
</if>
|
||||
|
||||
<if test="User_Role != null and User_Role != '' ">
|
||||
and User_Role = #{User_Role}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="UserList" resultType="com.tx.mydemo.domain.User">
|
||||
select *
|
||||
from user
|
||||
</select>
|
||||
<select id="selectById" resultType="com.tx.mydemo.domain.User">
|
||||
select * from user where User_Id=#{id}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,35 @@
|
|||
package com.tx.mydemo;
|
||||
|
||||
import com.tx.mydemo.domain.Info;
|
||||
import com.tx.mydemo.mapper.InfoXmlMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SpringBootTest
|
||||
class MyDemoApplicationTests {
|
||||
|
||||
@Autowired
|
||||
// private InfoMapper infoMapper;
|
||||
|
||||
private InfoXmlMapper infoXmlMapper;
|
||||
|
||||
|
||||
// @Test
|
||||
// public void testFindAll(){
|
||||
// List<Info> all = infoMapper.selectAll();
|
||||
// System.out.println(all);
|
||||
// }
|
||||
|
||||
@Test
|
||||
public void testFindAll2(){
|
||||
List<Info> all = infoXmlMapper.selectAll();
|
||||
System.out.println(all);
|
||||
int i = 0;
|
||||
System.out.println(i);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
|
@ -0,0 +1,19 @@
|
|||
# myvue1
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "myvue1",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.26.1",
|
||||
"core-js": "^3.8.3",
|
||||
"echarts": "^5.3.2",
|
||||
"element-ui": "^2.15.8",
|
||||
"v-charts-v2": "^2.0.9",
|
||||
"v-viewer": "^1.6.4",
|
||||
"vue": "^2.6.14",
|
||||
"vue-echarts": "^6.0.2",
|
||||
"vue-photo-preview": "^1.1.3",
|
||||
"vue-router": "^3.5.1",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"vue-directive-image-previewer": "^2.2.2",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<nav>
|
||||
</nav>
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 0px;
|
||||
}
|
||||
body{
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0
|
||||
}
|
||||
nav {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
nav a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,61 @@
|
|||
"use strict";
|
||||
|
||||
import Vue from 'vue';
|
||||
import axios from "axios";
|
||||
|
||||
// Full config: https://github.com/axios/axios#request-config
|
||||
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
|
||||
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
||||
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
|
||||
let config = {
|
||||
// baseURL: process.env.baseURL || process.env.apiUrl || ""
|
||||
// timeout: 60 * 1000, // Timeout
|
||||
// withCredentials: true, // Check cross-site Access-Control
|
||||
};
|
||||
|
||||
const _axios = axios.create(config);
|
||||
|
||||
_axios.interceptors.request.use(
|
||||
function(config) {
|
||||
// Do something before request is sent
|
||||
return config;
|
||||
},
|
||||
function(error) {
|
||||
// Do something with request error
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// Add a response interceptor
|
||||
_axios.interceptors.response.use(
|
||||
function(response) {
|
||||
// Do something with response data
|
||||
return response;
|
||||
},
|
||||
function(error) {
|
||||
// Do something with response error
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
Plugin.install = function(Vue, options) {
|
||||
Vue.axios = _axios;
|
||||
window.axios = _axios;
|
||||
Object.defineProperties(Vue.prototype, {
|
||||
axios: {
|
||||
get() {
|
||||
return _axios;
|
||||
}
|
||||
},
|
||||
$axios: {
|
||||
get() {
|
||||
return _axios;
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Vue.use(Plugin)
|
||||
|
||||
export default Plugin;
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
import Vue from 'vue'
|
||||
import Element from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
Vue.use(Element)
|
Binary file not shown.
After Width: | Height: | Size: 5.8 MiB |
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,34 @@
|
|||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import Element from "element-ui"
|
||||
import "element-ui/lib/theme-chalk/index.css"
|
||||
import axios from 'axios'
|
||||
Vue.prototype.$axios=axios
|
||||
|
||||
import VueDirectiveImagePreviewer from 'vue-directive-image-previewer'
|
||||
import 'vue-directive-image-previewer/dist/assets/style.css'
|
||||
Vue.use(VueDirectiveImagePreviewer)
|
||||
Vue.use(Element)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
import preview from 'vue-photo-preview'
|
||||
import 'vue-photo-preview/dist/skin.css'
|
||||
Vue.use(preview,{
|
||||
fullscreenEl: false, //控制是否显示右上角全屏按钮
|
||||
closeEl: false, //控制是否显示右上角关闭按钮
|
||||
tapToClose: true, //点击滑动区域应关闭图库
|
||||
shareEl: false, //控制是否显示分享按钮
|
||||
zoomEl: false, //控制是否显示放大缩小按钮
|
||||
counterEl: false, //控制是否显示左上角图片数量按钮
|
||||
arrowEl: true, //控制如图的左右箭头(pc浏览器模拟手机时)
|
||||
tapToToggleControls: true, //点击应切换控件的可见性
|
||||
clickToCloseNonZoomable: true //点击图片应关闭图库,仅当图像小于视口的大小时
|
||||
})
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
|
@ -0,0 +1,58 @@
|
|||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import Form from '../views/Form.vue'
|
||||
import Contract from "@/views/Contract";
|
||||
import Role from "@/views/Role";
|
||||
import ContractById from "@/views/ContractById";
|
||||
import OverDate from "@/views/OverDate";
|
||||
import TotalByTime from "@/views/TotalByTime";
|
||||
import TotalByUser from "@/views/TotalByUser";
|
||||
import updateOverDate from "@/views/UpdateOverDate";
|
||||
import Data from "@/views/Data";
|
||||
import UpdateData from "@/views/UpdateData";
|
||||
import UpdateInfo from "@/views/UpdateInfo";
|
||||
import AddData from "@/views/AddData";
|
||||
import Info from "@/views/Info";
|
||||
import UpdateUser from "@/views/UpdateUser";
|
||||
import Empower from "@/views/Empower";
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/home',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
children: [
|
||||
{path: '/selectAllInfo', component: Info, name: '查询用户', menuShow: true},
|
||||
{path: '/add', component: Form, name: '添加用户', menuShow: true},
|
||||
{path: '/warn', component: OverDate, name: '超期报警', menuShow: true},
|
||||
{path: '/updateOverDate', component: updateOverDate, name: '修改超期报警数据', menuShow: false},
|
||||
{path: '/contract', component: Contract, name: '合同管理', menuShow: true},
|
||||
{path: '/contractById', component: ContractById, name: '合同详情', menuShow: false},
|
||||
{path: '/updateInfo', component: UpdateInfo, name: '修改用户', menuShow: false},
|
||||
{path: '/totalByTime', component: TotalByTime, name: '时间统计', menuShow: true},
|
||||
{path: '/totalByUser', component: TotalByUser, name: '用户统计', menuShow: true},
|
||||
{path: '/data', component: Data, name: '供气记录', menuShow: true},
|
||||
{path: '/addData', component: AddData, name: '新增记录', menuShow: false},
|
||||
{path: '/updateData', component: UpdateData, name: '修改供气记录', menuShow: false},
|
||||
{path: '/roleByUser', component: Role, name: '权限管理', menuShow: true},
|
||||
{path: '/updateUser', component: UpdateUser, name: '修改员工信息', menuShow: false},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
name: 'Login',
|
||||
component: () => import( '../views/Login.vue')
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
|
@ -0,0 +1,17 @@
|
|||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>ECharts</title>
|
||||
<!-- 引入刚刚下载的 ECharts 文件 -->
|
||||
<script src="echarts.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
|
||||
<div id="main" style="width: 600px;height:400px;"></div>
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById('main'));
|
||||
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: {
|
||||
text: 'ECharts 入门示例'
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
data: ['销量']
|
||||
},
|
||||
xAxis: {
|
||||
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
||||
},
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
name: '销量',
|
||||
type: 'bar',
|
||||
data: [5, 20, 36, 10, 10, 20]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,191 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="供气人" prop="Data_Info">
|
||||
<!-- <el-input v-model="ruleForm.Data_Info"></el-input>-->
|
||||
<el-select
|
||||
v-model="ruleForm.Data_Info"
|
||||
placeholder="姓名"
|
||||
clearable filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.listName"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气时间" prop="Data_time">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.Data_time"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气数量" prop="Data_Amount">
|
||||
<el-input v-model="ruleForm.Data_Amount"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供气人" prop="Data_Info">-->
|
||||
<!-- <el-input v-model="ruleForm.Data_Info"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="客户接待人" prop="Data_User">
|
||||
<el-input v-model="ruleForm.Data_User" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">记录</el-button>
|
||||
<el-button @click="resetForm('ruleForm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now();
|
||||
}, shortcuts: [{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
picker.$emit('pick', new Date());
|
||||
}
|
||||
}, {
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}, {
|
||||
text: '一周前',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}]
|
||||
},
|
||||
listName:["小明","小红"]
|
||||
,
|
||||
ruleForm: {
|
||||
Data_Time: '',
|
||||
Data_Amount: '',
|
||||
Data_Info: '',
|
||||
Data_User: '',
|
||||
Data_time: '',
|
||||
Data_UserId: ''
|
||||
},
|
||||
rules: {
|
||||
Data_Time: [
|
||||
{required: true, message: '时间不能为空', trigger: 'blur'}
|
||||
],
|
||||
Data_Amount: [
|
||||
{required: true, message: '数量不能为空', trigger: 'blur'}
|
||||
],
|
||||
Data_Info: [
|
||||
{required: true, message: '客户不能为空', trigger: 'change'}
|
||||
],
|
||||
Data_User: [
|
||||
{required: true, message: '员工不能为空', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
data: {
|
||||
Info: '',
|
||||
User: "",
|
||||
UserId: 0,
|
||||
Time: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
findUserId() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/user/findUserId/' + _this.ruleForm.Data_User).then(function (resp) {
|
||||
//查找到员工的ID,方便待会进行多表查询
|
||||
_this.ruleForm.Data_UserId = parseInt(resp.data);
|
||||
})
|
||||
},
|
||||
selectAllInfo() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/info/selectAllInfo').then(function (resp) {
|
||||
//设置表格数据
|
||||
console.log("resp.data"+resp.data)
|
||||
_this.listName = resp.data;
|
||||
})
|
||||
}
|
||||
,
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
//年
|
||||
var year = this.ruleForm.Data_time.getFullYear();
|
||||
//月
|
||||
var month = this.ruleForm.Data_time.getMonth() + 1;
|
||||
//日
|
||||
var strDate = this.ruleForm.Data_time.getDate();
|
||||
//如果月份和日期小于10的话要在前面加个0,拼凑成XXXX-XX-XX的格式,方便查找
|
||||
month = month > 9 ? month : '0' + month
|
||||
|
||||
strDate = strDate > 9 ? strDate : '0' + strDate
|
||||
|
||||
this.ruleForm.Data_Time = year + '-' + month + '-' + strDate;
|
||||
|
||||
const _this = this
|
||||
//将要添加的数据POST回后端,后端成功返回1,只需要判断返回数值即可知道是否添加成功
|
||||
this.$axios.post('http://localhost:8181/data/addData', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('数据记录成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/data")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
},
|
||||
created(key) {
|
||||
var Name = localStorage.getItem('access-user');
|
||||
//除去首尾的双引号
|
||||
var str1 = Name.replace("\"", "").replace("\"", "");
|
||||
this.ruleForm.Data_User = str1
|
||||
this.selectAllInfo();
|
||||
this.findUserId();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<!--搜索表单-->
|
||||
<el-form :inline="true" :model="contract" class="demo-form-inline">
|
||||
|
||||
<el-form-item label="合同状态">
|
||||
<el-select v-model="contract.State" placeholder="是否结算">
|
||||
<el-option label="已结算" value="0"></el-option>
|
||||
<el-option label="未结算" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="contract.Start" placeholder="XXXX-XX-XX"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="contract.End" placeholder="XXXX-XX-XX"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 75%;margin-left: 200px;margin-top: 30px;font-size: 18px"
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="contract_Id"
|
||||
label="编号"
|
||||
width="100"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contract_Info"
|
||||
label="客户姓名"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contract_Start"
|
||||
label="开始时间"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contract_End"
|
||||
label="结束时间"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contract_Amount"
|
||||
label="供气总量"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contract_State"
|
||||
label="结算状态"
|
||||
width="100"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="180"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="checkById(scope.$index)" type="primary" size="medium " round>查看</el-button>
|
||||
<el-button @click="deleteById(scope.$index)" type="danger" size="medium " round v-show="isShow">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
:page-size="pageSize"
|
||||
:current-page="currentPage"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
selectAll(config) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/contract/selectAllByPageAndCondition', _this.contract).then(function (resp) {
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
//将当前页设置为当前值
|
||||
this.currentPage = val
|
||||
//这是后端需要的数值
|
||||
this.contract.Page = val;
|
||||
//改变之后再一次调用SELECTALL函数
|
||||
this.selectAll();
|
||||
},
|
||||
|
||||
|
||||
//查看具体合同详情,只是多了个描述,但是不能进行修改
|
||||
checkById(rows) {
|
||||
this.$router.push('/contractById?id=' + this.tableData[rows].contract_Id);
|
||||
},
|
||||
|
||||
//获取合同总数,方便进行分页
|
||||
TotalCount() {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/contract/totalContract', _this.contract).then(function (resp) {
|
||||
//返回的值是合同的总数
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
}
|
||||
,
|
||||
query() {
|
||||
//由于每次查询后肯定会有新的数据,所以要把原来的页数都设为1,否则会出现明明查出来的数据只有1页但是当前页码为3的情况
|
||||
this.contract.Page = 1;
|
||||
this.currentPage = 1;
|
||||
this.TotalCount();
|
||||
this.selectAll();
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
isShow: true,
|
||||
totalCount: 100,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
|
||||
|
||||
tableData: [{
|
||||
contract_Id: 1,
|
||||
contract_Info: '',
|
||||
contract_Start: '2011',
|
||||
contract_End: '1231231',
|
||||
contract_Amount: '200吨',
|
||||
contract_State: "未结算",
|
||||
contract_Describe: "好好好"
|
||||
}, {
|
||||
contract_Id: 2,
|
||||
contract_Info: '',
|
||||
contract_Start: '2011',
|
||||
contract_End: '1231231',
|
||||
contract_Amount: '200吨',
|
||||
contract_State: "未结算",
|
||||
contract_Describe: "好好好"
|
||||
}, {
|
||||
contract_Id: 3,
|
||||
contract_Info: '',
|
||||
contract_Start: '2011',
|
||||
contract_End: '1231231',
|
||||
contract_Amount: '200吨',
|
||||
contract_State: "未结算",
|
||||
contract_Describe: "好好好"
|
||||
}, {
|
||||
contract_Id: 4,
|
||||
contract_Info: '',
|
||||
contract_Start: '2011',
|
||||
contract_End: '1231231',
|
||||
contract_Amount: '200吨',
|
||||
contract_State: "未结算",
|
||||
contract_Describe: "好好好"
|
||||
}],
|
||||
|
||||
contract: {
|
||||
Page: 1,
|
||||
State: '',
|
||||
Start: '',
|
||||
End: ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//进来就先调用一次这个函数,显示出所有的合同
|
||||
this.selectAll();
|
||||
this.TotalCount()
|
||||
|
||||
let role = JSON.parse(window.localStorage.getItem('role'))
|
||||
if (role === "admin")
|
||||
this.isShow = true;
|
||||
else if (role === "user"&&window.localStorage.getItem('changeContract')==="true")
|
||||
this.isShow = true;
|
||||
else
|
||||
this.isShow = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="form-container" label-width="80px">
|
||||
<el-form-item label="客户姓名" prop="contract_Info">
|
||||
<el-input v-model="ruleForm.contract_Info"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="contract_Start">
|
||||
<el-input v-model="ruleForm.contract_Start"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="contract_End">
|
||||
<el-input v-model="ruleForm.contract_End"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气总量" prop="contract_Amount">
|
||||
<el-input v-model="ruleForm.contract_Amount" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="contract_Start">
|
||||
<el-input v-model="ruleForm.contract_Start"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="contract_State">
|
||||
<el-select v-model="ruleForm.contract_State" placeholder="合同状态">
|
||||
<el-option label="已结算" value="0"></el-option>
|
||||
<el-option label="未结算" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同描述" prop="contract_Describe">
|
||||
<el-input v-model="ruleForm.contract_Describe" type="textarea"
|
||||
resize="none"
|
||||
:autosize="{ minRows: 1, maxRows: 5 }"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="合同图片">
|
||||
<!-- <img v-image-preview src="src/images/合同1.jpg" id="contractPhoto1"/>-->
|
||||
<img v-image-preview :src="require(''+'@/images/合同1.jpg'+'')" id="contractPhoto1"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="danger" @click="updateContract('ruleForm')" v-show="isShow">修改</el-button>
|
||||
<el-button type="primary" @click="goBack()">返回</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isShow: true
|
||||
,
|
||||
ruleForm: {
|
||||
contract_Id: 0,
|
||||
contract_Info: '',
|
||||
contract_Start: '',
|
||||
contract_End: '',
|
||||
contract_Amount: '',
|
||||
contract_Describe: '',
|
||||
contract_State: ''
|
||||
},
|
||||
rules: {
|
||||
contract_Id: [
|
||||
{required: true, message: '无编号', trigger: 'blur'}
|
||||
],
|
||||
contract_Start: [
|
||||
{required: true, message: '无开始时间', trigger: 'blur'}
|
||||
],
|
||||
contract_End: [
|
||||
{required: true, message: '无结束时间', trigger: 'blur'}
|
||||
],
|
||||
contract_Amount: [
|
||||
{required: true, message: '无具体数量', trigger: 'change'}
|
||||
],
|
||||
contract_Describe: [
|
||||
{required: true, message: '无描述', trigger: 'blur'}
|
||||
],
|
||||
contract_State: [
|
||||
{required: true, message: '无描述', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectById() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/contract/selectById/' + _this.ruleForm.contract_Id).then(function (resp) {
|
||||
//返回的是一个集合,由于这个集合直接对应数值怎么都对应不上,干脆就直接挨个赋值了。
|
||||
_this.ruleForm.contract_Id = resp.data.contract_Id
|
||||
_this.ruleForm.contract_Info = resp.data.contract_Info
|
||||
_this.ruleForm.contract_Start = resp.data.contract_Start
|
||||
_this.ruleForm.contract_End = resp.data.contract_End
|
||||
_this.ruleForm.contract_Amount = resp.data.contract_Amount
|
||||
_this.ruleForm.contract_Describe = resp.data.contract_Describe
|
||||
_this.ruleForm.contract_State = resp.data.contract_State
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
//返回原来的合同页面
|
||||
this.$router.replace("/contract")
|
||||
},
|
||||
updateContract(formName) {
|
||||
console.log(this.ruleForm)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/contract/updateContract', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('合同编号: ' + _this.ruleForm.contract_Id + ' 修改成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/contract")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//一进来先让传过来的ID值等于待会要查询的id值
|
||||
this.ruleForm.contract_Id = this.$route.query.id;
|
||||
this.selectById();
|
||||
let role = JSON.parse(window.localStorage.getItem('role'))
|
||||
console.log(role)
|
||||
if (role === "admin")
|
||||
this.isShow = true;
|
||||
else
|
||||
this.isShow = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#contractPhoto1 {
|
||||
height: 50px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,232 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<!--搜索表单-->
|
||||
<el-form :inline="true" :model="data" class="demo-form-inline">
|
||||
|
||||
|
||||
<el-form-item label="客户姓名">
|
||||
<el-input v-model="data.Info" placeholder="客户姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="data.User" placeholder="员工姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-input v-model="data.Time" placeholder="仅展示选定时间之后的数据"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
<el-button type="primary" @click="add">添加</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
border
|
||||
style="width: 70%;margin: auto;font-size: 18px"
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="data_Id"
|
||||
label="编号"
|
||||
width="120"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="data_Time"
|
||||
label="时间"
|
||||
width="200"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="data_Amount"
|
||||
label="供气总量(m³)"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="data_Info"
|
||||
label="客户姓名"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="users.user_Name"
|
||||
label="员工姓名"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="150"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="update(scope.$index)" type="danger" size="small" round>修改</el-button>
|
||||
<el-button @click="deleteById(scope.$index)" type="primary" size="small" round>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
:page-size="pageSize"
|
||||
:current-page="currentPage"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
findUserId() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/user/findUserId/' + _this.data.User).then(function (resp) {
|
||||
//查找到员工的ID,方便待会进行多表查询
|
||||
_this.data.UserId = parseInt(resp.data);
|
||||
})
|
||||
_this.selectAll();
|
||||
},
|
||||
selectAll(config) {
|
||||
const _this = this
|
||||
//如果UserId==0的话,说明没有进行员工姓名的输入,此时就不要把员工的ID传过去了,传过去会导致查询不到结果,因为UserId没有=0的员工
|
||||
if (_this.data.UserId == 0) {
|
||||
this.$axios.post('http://localhost:8181/data/selectAllByPageAndConditionWithNull', _this.data).then(function (resp) {
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
} else {
|
||||
this.$axios.post('http://localhost:8181/data/selectAllByPageAndCondition', _this.data).then(function (resp) {
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
//将当前页设置为当前值
|
||||
this.currentPage = val
|
||||
//这是后端需要的数值
|
||||
this.data.Page = val;
|
||||
//改变之后再一次调用SELECTALL函数
|
||||
this.selectAll();
|
||||
},
|
||||
|
||||
update(rows) {
|
||||
this.$router.push('/updateData?id=' + this.tableData[rows].data_Id);
|
||||
},
|
||||
TotalCount() {
|
||||
const _this = this
|
||||
if (_this.data.UserId == 0) {
|
||||
this.$axios.post('http://localhost:8181/data/totalDataWithNull', _this.data).then(function (resp) {
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
} else {
|
||||
this.$axios.post('http://localhost:8181/data/totalData', _this.data).then(function (resp) {
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
}
|
||||
}
|
||||
,
|
||||
deleteById(index) {
|
||||
console.log(this.tableData[index])
|
||||
this.$confirm('确定删除客户:' + this.tableData[index].data_Info + ' ?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/data/deleteById/' + this.tableData[index].data_Id).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('删除成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
//删除成功之后相对应的数据总数就少一条,直接-1
|
||||
_this.totalCount--;
|
||||
//将原来的页码全部设为1,实现刷新操作
|
||||
_this.currentPage = 1;
|
||||
_this.data.Page = 1;
|
||||
_this.selectAll();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
query() {
|
||||
//查询之后也是将所有页码都设为1,实现刷新
|
||||
this.data.Page = 1;
|
||||
this.currentPage = 1;
|
||||
if (this.data.User != null&&this.data.User!=='') {
|
||||
this.findUserId();
|
||||
}else{
|
||||
this.data.UserId=0;
|
||||
}
|
||||
this.selectAll();
|
||||
this.TotalCount();
|
||||
},
|
||||
add() {
|
||||
//都可以,replace也行
|
||||
this.$router.push('/addData');
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
odCount: 0,
|
||||
totalCount: 100,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
|
||||
|
||||
tableData: [{
|
||||
data_Id: 0,
|
||||
data_Info: '华为',
|
||||
data_Time: '1231231',
|
||||
data_User: 0,
|
||||
data_Amount: "1",
|
||||
data_UserName: "",
|
||||
users: {
|
||||
data: null,
|
||||
user_Id: 1,
|
||||
user_Name: "涂迅",
|
||||
user_Pass: "123"
|
||||
}
|
||||
}],
|
||||
|
||||
data: {
|
||||
Page: 1,
|
||||
Info: '',
|
||||
User: "",
|
||||
UserId: 0,
|
||||
Time: ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
//初始化
|
||||
this.selectAll();
|
||||
this.TotalCount()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,51 @@
|
|||
<template>
|
||||
<div style="border: black solid 1px;height: 500px;width: 500px;margin: auto">
|
||||
<div style="margin-bottom: 50px;font-size: 30px">请选择普通员工的权限</div>
|
||||
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
||||
<div style="margin: 15px 0;"></div>
|
||||
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
||||
<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-button @click="empower" type="primary" size="small" round>授权</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const cityOptions = ['修改合同信息', '删除合同'];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checkAll: false,
|
||||
checkedCities: ['修改合同信息', '删除合同'],
|
||||
cities: cityOptions,
|
||||
isIndeterminate: true
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
empower(){
|
||||
console.log(this.checkedCities)
|
||||
localStorage.setItem('changeContract', false);
|
||||
localStorage.setItem('deleteContract', false);
|
||||
for(var i=0;i<this.checkedCities.length;i++){
|
||||
if(this.checkedCities[i]=="修改合同信息"){
|
||||
localStorage.setItem('changeContract', true);
|
||||
}
|
||||
if(this.checkedCities[i]=="删除合同"){
|
||||
localStorage.setItem('deleteContract', true);
|
||||
}
|
||||
}
|
||||
console.log(localStorage.getItem('deleteContract'))
|
||||
console.log(localStorage.getItem('changeContract'))
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
this.checkedCities = val ? cityOptions : [];
|
||||
this.isIndeterminate = false;
|
||||
},
|
||||
handleCheckedCitiesChange(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll = checkedCount === this.cities.length;
|
||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,122 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="姓名" prop="Info_Name">
|
||||
<el-input v-model="ruleForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="Info_Phone">
|
||||
<el-input v-model="ruleForm.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户类型" prop="Info_Type">
|
||||
<el-select style="margin-left: -280px;" v-model="ruleForm.type" placeholder="请选择客户类型">
|
||||
<el-option v-for="(item,index) in userData" :label="item.value" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气周期" prop="Info_Cycle">
|
||||
<el-input v-model="ruleForm.cycle"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="家庭住址" prop="Info_Cycle">
|
||||
<el-input v-model="ruleForm.address"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="Info_Cycle">
|
||||
<el-input v-model="ruleForm.others"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">添加</el-button>
|
||||
<el-button @click="resetForm('ruleForm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userData: [
|
||||
{
|
||||
value: '常客户'
|
||||
},
|
||||
{
|
||||
value: '临时客户'
|
||||
}
|
||||
],
|
||||
ruleForm: {
|
||||
name: '',
|
||||
phone: '',
|
||||
type: '',
|
||||
cycle: '',
|
||||
address:'',
|
||||
others:''
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '请输入姓名', trigger: 'blur'}
|
||||
],
|
||||
phone: [
|
||||
{required: true, message: '请输入电话', trigger: 'blur'}
|
||||
],
|
||||
type: [
|
||||
{required: true, message: '请选择客户类型', trigger: 'change'}
|
||||
],
|
||||
cycle: [
|
||||
{required: true, message: '请输入供气周期', trigger: 'blur'}
|
||||
],
|
||||
address: [
|
||||
{required: true, message: '请输入家庭住址', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const _this = this
|
||||
//添加用户,添加完成之后返回1代表添加成功,返回0代表失败
|
||||
this.$axios.post('http://localhost:8181/info/addInfo', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('客户: ' + _this.ruleForm.name + ' 添加成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/selectAllInfo")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
//重置表单,实现清空操作
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<el-container class="home_container">
|
||||
<el-header>
|
||||
<div class="home_title" style="">
|
||||
<img :src="require('../images/logo.jpg')" alt="" id="logo"/>
|
||||
<span style="color: white;font-size: 30px;margin-left: 10px">液化气站客户管理系统</span>
|
||||
<span style="color: white;font-size: 30px;margin-left: 500px" >员工版</span>
|
||||
</div>
|
||||
<div class="home_userinfoContainer">
|
||||
<el-dropdown @command="handleCommand">
|
||||
<span class="el-dropdown-link home_userinfo" style="font-size: 20px">
|
||||
{{ currentUserName }}<i class="el-icon-arrow-down el-icon--right home_userinfo"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown" style="font-size: 20px">
|
||||
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-container>
|
||||
<el-aside width="200px" style="background-color:#4e6379">
|
||||
<el-menu router background-color=#3b6596 >
|
||||
<el-submenu :index="1">
|
||||
<template slot="title" >
|
||||
<i class="el-icon-user-solid">
|
||||
</i>
|
||||
<span style="color: white;font-size: 15px">客户管理</span>
|
||||
</template>
|
||||
<el-menu-item index="/selectAllInfo">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-user"></i>
|
||||
<span style="color: white;font-size: 15px">查询用户</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/add">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-circle-plus"></i>
|
||||
<span style="color: white;font-size: 15px">添加用户</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-submenu :index="2">
|
||||
<template slot="title"><i class="el-icon-notebook-2"></i>
|
||||
<span style="color: white;font-size: 15px">数据管理</span>
|
||||
</template>
|
||||
<el-menu-item index="/data">
|
||||
<div style="position: relative;left: 20px" id="data">
|
||||
<i class="el-icon-s-goods"></i>
|
||||
<span style="color: white;font-size: 15px">供气记录</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/warn">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-warning"></i>
|
||||
<span style="color: white;font-size: 15px">超期报警</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/contract">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-s-goods"></i>
|
||||
<span style="color: white;font-size: 15px">合同管理</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
<el-submenu :index="3">
|
||||
<template slot="title"><i class="el-icon-s-data"></i>
|
||||
<span style="color: white;font-size: 15px">报表统计</span>
|
||||
</template>
|
||||
<el-menu-item index="/totalByTime">
|
||||
<div style="position: relative;left: 20px;">
|
||||
<i class="el-icon-date"></i>
|
||||
<span style="color: white;font-size: 15px">时间统计</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/totalByUser">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-s-custom"></i>
|
||||
<span style="color: white;font-size: 15px">客户统计</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-submenu :index="4" v-show="this.isShow">
|
||||
<template slot="title"><i class="el-icon-user-solid"></i>
|
||||
<span style="color: white;font-size: 15px">权限管理</span>
|
||||
</template>
|
||||
<el-menu-item index="/roleByUser">
|
||||
<div style="position: relative;left: 20px">
|
||||
<i class="el-icon-user"></i>
|
||||
<span style="color: white;font-size: 15px">员工管理</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">
|
||||
<span style="color: black;font-size: 20px">首页</span>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item v-text="this.$router.currentRoute.name" style="font-size: 20px"></el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<router-view></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
|
||||
//检查是否存在超期预警的客户,如果存在的话就会蹦出来弹窗提醒员工
|
||||
checkOverDate(){
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/overdate/checkOverDate',_this.OverDate).then(function (resp) {
|
||||
console.log('total:' + resp.data);
|
||||
_this.odCount = resp.data;
|
||||
if(_this.odCount!=0){
|
||||
_this.$confirm('有超期供气客户,请及时处理!', '提示', {
|
||||
confirmButtonText: '处理',
|
||||
cancelButtonText: '稍后',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
//如果确定的话就跳转到超期预警的界面。
|
||||
_this.$router.replace('/warn');
|
||||
}, function () {
|
||||
//取消
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCommand(command) {
|
||||
var _this = this;
|
||||
if (command == 'logout') {
|
||||
this.$confirm('注销登录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
localStorage.removeItem('access-user');
|
||||
_this.currentUserName = '游客';
|
||||
_this.$router.replace('/');
|
||||
}, function () {
|
||||
//取消
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//加载的时候就进行超期预警的检查,有就弹窗
|
||||
this.checkOverDate();
|
||||
},
|
||||
mounted: function () {
|
||||
let user = JSON.parse(window.localStorage.getItem('access-user'))
|
||||
let role = JSON.parse(window.localStorage.getItem('role'))
|
||||
if(role==="user")
|
||||
this.isShow=false;
|
||||
else if(role==="admin")
|
||||
this.isShow=true;
|
||||
this.currentUserName = user
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow:true,
|
||||
currentUserRole:'',
|
||||
currentUserName: '',
|
||||
defaultActiveIndex: "0",
|
||||
collapsed: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
#logo{
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
|
||||
.home_container {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-header {
|
||||
background-color: #4e6379;
|
||||
/*color: #333;*/
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.el-aside {
|
||||
background-color: #575c72;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.home_title {
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.home_userinfo {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.home_userinfoContainer {
|
||||
display: inline;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,227 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<!--搜索表单-->
|
||||
<el-form :inline="true" :model="info" class="demo-form-inline">
|
||||
|
||||
<el-form-item label="客户类型" id="type">
|
||||
<el-select v-model="info.Type" placeholder="客户类型">
|
||||
<el-option label="常客户" value="0"></el-option>
|
||||
<el-option label="临时客户" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户姓名">
|
||||
<!-- <el-input v-model="User.Name" placeholder="员工姓名"></el-input>-->
|
||||
<el-select
|
||||
v-model="info.Name"
|
||||
placeholder="姓名"
|
||||
clearable filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.listName"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="电话">
|
||||
<el-input v-model="info.Phone" placeholder="电话"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
border
|
||||
style="width: 80%;margin: auto;font-size: 18px"
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="info_Id"
|
||||
label="编号"
|
||||
width="100"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Name"
|
||||
label="姓名"
|
||||
width="100"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Phone"
|
||||
label="电话号码"
|
||||
width="200"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Type"
|
||||
label="客户类型"
|
||||
width="130"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Cycle"
|
||||
label="供气周期"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Address"
|
||||
label="家庭住址"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="info_Others"
|
||||
label="备注"
|
||||
width="190"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="150"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="update(scope.$index)" type="danger" size="small" round>修改</el-button>
|
||||
<el-button @click="deleteById(scope.$index)" type="primary" size="small" round>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
:page-size="pageSize"
|
||||
:current-page="currentPage"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
selectAll(config) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/info/selectAllByPageAndCondition', _this.info).then(function (resp) {
|
||||
console.log('data:' + resp.data)
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
this.info.Page = val;
|
||||
this.selectAll();
|
||||
},
|
||||
selectAllUser() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/info/selectAllInfo').then(function (resp) {
|
||||
//设置表格数据
|
||||
_this.listName = resp.data;
|
||||
})
|
||||
},
|
||||
update(rows) {
|
||||
this.$router.push('/updateInfo?id=' + this.tableData[rows].info_Id);
|
||||
},
|
||||
TotalCount() {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/info/totalInfo', _this.info).then(function (resp) {
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
}
|
||||
,
|
||||
deleteById(index) {
|
||||
console.log(this.tableData[index])
|
||||
this.$confirm('确定删除客户:' + this.tableData[index].info_Name + ' ?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/info/deleteById/' + this.tableData[index].info_Id).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('删除成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
_this.totalCount--;
|
||||
// _this.$router.replace("/selectAllBook")
|
||||
_this.currentPage = 1;
|
||||
_this.info.Page = 1;
|
||||
_this.selectAll();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
query() {
|
||||
// console.log(this.info)
|
||||
// console.log("yeyeyey:"+this.currentPage)
|
||||
this.info.Page = 1;
|
||||
this.currentPage = 1;
|
||||
this.TotalCount();
|
||||
this.selectAll();
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
odCount: 0,
|
||||
totalCount: 100,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
|
||||
|
||||
tableData: [{
|
||||
info_Id: 0,
|
||||
info_Name: '华为',
|
||||
info_Phone: '1231231',
|
||||
info_Type: '华为科技有限公司',
|
||||
info_Cycle: "1",
|
||||
info_Address: "",
|
||||
info_Others: ""
|
||||
}],
|
||||
|
||||
info: {
|
||||
Page: 1,
|
||||
Name: '',
|
||||
Phone: '',
|
||||
Type: ''
|
||||
},
|
||||
listName: ["小明", "小红"]
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.selectAll();
|
||||
this.TotalCount()
|
||||
this.selectAllUser();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,121 @@
|
|||
<template>
|
||||
<div id='building'>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="login-container" label-position="left"
|
||||
label-width="0px" v-loading="loading">
|
||||
<h2 class="login_title">液化气站客户管理系统登录</h2>
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="ruleForm.username" auto-complete="off" placeholder="账号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="ruleForm.password" auto-complete="off" placeholder="密码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">登录</el-button>
|
||||
<el-button @click="resetForm('ruleForm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
rolename: ''
|
||||
},
|
||||
rules: {
|
||||
username: [
|
||||
{required: true, message: '请输入帐号', trigger: 'blur'},
|
||||
{message: '长度在 3 到 5 个字符', trigger: 'blur'}
|
||||
],
|
||||
password: [
|
||||
{required: true, message: '请输入密码', trigger: 'change'},
|
||||
{message: '长度 3 位', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
submitForm(formName) {
|
||||
// console.log(1112321)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
// console.log(1)
|
||||
if (valid) {
|
||||
// console.log(2)
|
||||
var _this = this
|
||||
this.loading = true
|
||||
this.$axios.get('http://localhost:8181/user/login/' + this.ruleForm.username + "/" + this.ruleForm.password).then(function (resp) {
|
||||
if (resp.data !== 'error') {
|
||||
// console.log(666)
|
||||
_this.loading = false
|
||||
_this.ruleForm.rolename = resp.data;
|
||||
localStorage.setItem('access-user', JSON.stringify(_this.ruleForm.username));
|
||||
localStorage.setItem('role', JSON.stringify(_this.ruleForm.rolename));
|
||||
// _this.$router.push({ path: '/home' })
|
||||
_this.$router.replace({path: '/home'})
|
||||
// console.log(666)
|
||||
} else {
|
||||
_this.loading = false
|
||||
_this.$alert('登录失败!', '失败!');
|
||||
_this.resetForm(formName);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
document.onkeydown = function (e) {
|
||||
e = window.event || e;
|
||||
// console.log(e.code)
|
||||
if ((e.code == 'Enter' || e.code == 'enter' || e.code == 'NumpadEnter')) {//验证在登录界面和按得键是回车键enter
|
||||
that.submitForm('ruleForm');//登录函数
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0
|
||||
}
|
||||
#building{
|
||||
background:url("/src/images/Login.png");
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
background-size:100% 100%;
|
||||
}
|
||||
.login-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 180px auto;
|
||||
width: 350px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
|
@ -0,0 +1,196 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<!--搜索表单-->
|
||||
<el-form :inline="true" :model=" OverDate" class="demo-form-inline">
|
||||
|
||||
<el-form-item label="客户类型">
|
||||
<el-select v-model="OverDate.Type" placeholder="客户类型">
|
||||
<el-option label="常客户" value="0"></el-option>
|
||||
<el-option label="临时客户" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户姓名">
|
||||
<el-input v-model="OverDate.Name" placeholder="客户姓名"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="电话">
|
||||
<el-input v-model="OverDate.Phone" placeholder="电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
border
|
||||
style="width: 70%;margin: auto;font-size: 18px"
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="overDate_Id"
|
||||
label="编号"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="overDate_Name"
|
||||
label="姓名"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="overDate_Phone"
|
||||
label="电话号码"
|
||||
width="220"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="overDate_Type"
|
||||
label="客户类型"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="overDate_Time"
|
||||
label="超期时间"
|
||||
width="150"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="150"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="update(scope.$index)" type="danger" size="small" round>修改</el-button>
|
||||
<el-button @click="deleteById(scope.$index)" type="primary" size="small" round>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
:page-size="pageSize"
|
||||
:current-page="currentPage"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
selectAll(config) {
|
||||
console.log('页码:' + this.OverDate.Page);
|
||||
const _this = this
|
||||
console.log("对象"+this.OverDate)
|
||||
this.$axios.post('http://localhost:8181/overdate/selectAllByPageAndCondition', _this.OverDate).then(function (resp) {
|
||||
console.log('data:' +resp.data.rows)
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
console.log('tableData:' +_this.tableData)
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
this.OverDate.Page=val;
|
||||
this.selectAll();
|
||||
},
|
||||
|
||||
update(rows) {
|
||||
this.$router.push('/updateOverDate?id=' + this.tableData[rows].overDate_Id);
|
||||
},
|
||||
TotalCount() {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/overdate/totalOverDate',_this.OverDate).then(function (resp) {
|
||||
console.log('total:' + resp.data);
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
}
|
||||
,
|
||||
deleteById(index) {
|
||||
console.log(this.tableData[index])
|
||||
this.$confirm('确定删除客户:' + this.tableData[index].overDate_Name + ' ?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/overdate/deleteById/' + this.tableData[index].OverDate_Id).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('删除成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
_this.totalCount--;
|
||||
// _this.$router.replace("/selectAllBook")
|
||||
_this.currentPage=1;
|
||||
_this.OverDate.Page=1;
|
||||
_this.selectAll();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
query() {
|
||||
console.log(this.OverDate)
|
||||
this.OverDate.Page=1;
|
||||
this.currentPage=1;
|
||||
this.TotalCount();
|
||||
this.selectAll();
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
totalCount: 100,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
|
||||
|
||||
tableData: [{
|
||||
overDate_Id: 0,
|
||||
overDate_Name: '华为',
|
||||
overDate_Phone: '1231231',
|
||||
overDate_Type: '华为科技有限公司',
|
||||
overDate_Time: "1天"
|
||||
}],
|
||||
|
||||
OverDate: {
|
||||
Page:1,
|
||||
Name: '',
|
||||
Phone: '',
|
||||
Type: ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.selectAll();
|
||||
this.TotalCount()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,231 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<!--搜索表单-->
|
||||
<el-form :inline="true" :model="User" class="demo-form-inline">
|
||||
|
||||
<el-form-item label="员工类型">
|
||||
<el-select v-model="User.Type" placeholder="客户类型">
|
||||
<el-option label="管理员" value="1"></el-option>
|
||||
<el-option label="普通员工" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="员工姓名">
|
||||
<!-- <el-input v-model="User.Name" placeholder="员工姓名"></el-input>-->
|
||||
<el-select
|
||||
v-model="User.Name"
|
||||
placeholder="姓名"
|
||||
clearable filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.listName"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
border
|
||||
style="width: 80%;margin: auto;font-size: 18px"
|
||||
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="user_Id"
|
||||
label="编号"
|
||||
width="170"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="user_Name"
|
||||
label="姓名"
|
||||
width="180"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="roles.role_Name"
|
||||
label="权限类型"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="user_Phone"
|
||||
label="电话号码"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="user_Address"
|
||||
label="家庭住址"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="220"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="update(scope.$index)" type="danger" size="small" round>修改</el-button>
|
||||
<el-button @click="deleteById(scope.$index)" type="primary" size="small" round>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="totalCount"
|
||||
:page-size="pageSize"
|
||||
:current-page="currentPage"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
handleCheckChange(data, checked, indeterminate) {
|
||||
console.log(data, checked, indeterminate);
|
||||
},
|
||||
empower(roleId){
|
||||
this.roleFormVisible=true;
|
||||
},
|
||||
selectAll(config) {
|
||||
const _this = this
|
||||
console.log(this.User)
|
||||
this.$axios.post('http://localhost:8181/user/selectAllByPageAndCondition', _this.User).then(function (resp) {
|
||||
console.log('data:' + resp.data)
|
||||
//设置表格数据
|
||||
_this.tableData = resp.data.rows; // {rows:[],totalCount:100}
|
||||
_this.tableData = resp.data
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
this.User.Page = val;
|
||||
this.selectAll();
|
||||
},
|
||||
|
||||
update(rows) {
|
||||
this.$router.push('/updateUser?id=' + this.tableData[rows].user_Id);
|
||||
},
|
||||
TotalCount() {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/user/totalUser', _this.User).then(function (resp) {
|
||||
_this.totalCount = resp.data;
|
||||
})
|
||||
}
|
||||
,
|
||||
deleteById(index) {
|
||||
this.$confirm('确定删除客户:' + this.tableData[index].User_Name + ' ?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/user/deleteById/' + this.tableData[index].User_Id).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('删除成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
_this.totalCount--;
|
||||
// _this.$router.replace("/selectAllBook")
|
||||
_this.currentPage = 1;
|
||||
_this.User.Page = 1;
|
||||
_this.selectAll();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'user',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
query() {
|
||||
this.User.Page = 1;
|
||||
this.currentPage = 1;
|
||||
this.TotalCount();
|
||||
this.selectAll();
|
||||
},
|
||||
selectAllUser() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/user/selectAllUser').then(function (resp) {
|
||||
//设置表格数据
|
||||
_this.listName = resp.data;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
MenuData: [{
|
||||
id: 1,
|
||||
label: '一级 1',
|
||||
children: [{
|
||||
id: 4,
|
||||
label: '二级 1-1',
|
||||
children: [{
|
||||
id: 9,
|
||||
label: '三级 1-1-1'
|
||||
}, {
|
||||
id: 10,
|
||||
label: '三级 1-1-2'
|
||||
}]
|
||||
}]
|
||||
}],
|
||||
odCount: 0,
|
||||
totalCount: 100,
|
||||
roleFormVisible:false,
|
||||
pageSize: 10,
|
||||
form:{},
|
||||
currentPage: 1,
|
||||
listName: ["小明", "小红"]
|
||||
,
|
||||
tableData: [{
|
||||
user_Id: 0,
|
||||
user_Name: '华为',
|
||||
user_Type: '华为科技有限公司',
|
||||
user_Phone: '18176951312',
|
||||
user_Address: ""
|
||||
}],
|
||||
|
||||
User: {
|
||||
Page: 1,
|
||||
Name: '',
|
||||
Type: ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.selectAll();
|
||||
this.TotalCount()
|
||||
this.selectAllUser();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,178 @@
|
|||
<template>
|
||||
<!-- echarts容器 默认宽高为0 如果不进行设置 页面不显示-->
|
||||
<div>
|
||||
<span class="demonstration">选择日期 </span>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="monthrange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
style="width: 300px;margin-right: 50px;margin-left: 20px">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
<div ref="mychart" id="demoDiv"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
const myEcharts = echarts.init(this.$refs.mychart)
|
||||
//设置参数
|
||||
let xData = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"];
|
||||
//默认参数,后期要改的地方
|
||||
let yData = [6300, 4800, 3150, 1350, 6300, 4800, 3150, 1350, 6300, 4800, 3150, 1350];
|
||||
|
||||
console.log("yData:" + yData)
|
||||
let option = {
|
||||
title: {
|
||||
//标题
|
||||
text: "液化气站供气总量时间统计",
|
||||
x: "center",
|
||||
textStyle: {
|
||||
fontSize: 30
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
name: "月份",
|
||||
data: xData
|
||||
},
|
||||
yAxis: {
|
||||
name: "供气总量(m³)"
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow"
|
||||
}
|
||||
},
|
||||
series: {//系列
|
||||
name: "供气总量(m³)",
|
||||
type: "bar",
|
||||
data: yData
|
||||
}
|
||||
}
|
||||
myEcharts.setOption(option)
|
||||
//从后端获取数据
|
||||
var _this = this
|
||||
this.$axios.get('http://localhost:8181/data/totalByMonth/' + 2022).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
yData = resp.data
|
||||
console.log("sndajdns:" + yData)
|
||||
myEcharts.setOption({
|
||||
series: [
|
||||
{
|
||||
data: yData//赋值
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
query(){
|
||||
const myEcharts = echarts.init(this.$refs.mychart)
|
||||
this.Start=this.value2[0];
|
||||
this.End=this.value2[1];
|
||||
//年
|
||||
var Syear = this.Start.getFullYear();
|
||||
//月
|
||||
var Smonth = this.Start.getMonth() + 1;
|
||||
|
||||
//如果月份和日期小于10的话要在前面加个0,拼凑成XXXX-XX-XX的格式,方便查找
|
||||
Smonth = Smonth > 9 ? Smonth : '0' + Smonth
|
||||
|
||||
|
||||
var StrStart = Syear + '-' + Smonth;
|
||||
//年
|
||||
var Eyear = this.End.getFullYear();
|
||||
//月
|
||||
var Emonth = this.End.getMonth() + 1;
|
||||
|
||||
//如果月份和日期小于10的话要在前面加个0,拼凑成XXXX-XX-XX的格式,方便查找
|
||||
Emonth = Emonth > 9 ? Emonth : '0' + Emonth
|
||||
|
||||
|
||||
var StrEnd= Eyear + '-' + Emonth;
|
||||
|
||||
var countYear=Eyear-Syear;
|
||||
var countMonth= this.End.getMonth() - this.Start.getMonth() +countYear*12;
|
||||
var xData=[];
|
||||
var j=0;
|
||||
for(var i = (this.Start.getMonth() + 1);i<=countMonth+(this.Start.getMonth() + 1);i++){
|
||||
if(i>12){
|
||||
xData[j++]=(i-12)+"月"
|
||||
}else{
|
||||
xData[j++]=i+"月"
|
||||
}
|
||||
}
|
||||
console.log(xData)
|
||||
|
||||
var yData=[];
|
||||
var _this = this
|
||||
this.$axios.get('http://localhost:8181/data/totalByMonth/' + StrStart+"/"+StrEnd).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
yData = resp.data
|
||||
console.log("sndajdns11:" + yData)
|
||||
myEcharts.setOption({
|
||||
xAxis: {
|
||||
data: xData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData//赋值
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
Page: 1,
|
||||
Name: '',
|
||||
Phone: '',
|
||||
Type: ''
|
||||
},
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '今年至今',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date(new Date().getFullYear(), 0);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近六个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setMonth(start.getMonth() - 6);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
value2: '',
|
||||
Start:'',
|
||||
End:''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
#demoDiv {
|
||||
width: 800px;
|
||||
height: 500px;
|
||||
border: 1px solid #7e7e7e;
|
||||
margin: 80px auto;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<!-- echarts容器 默认宽高为0 如果不进行设置 页面不显示-->
|
||||
<div>
|
||||
<el-select
|
||||
v-model="ruleForm.Data_Info"
|
||||
placeholder="姓名"
|
||||
clearable filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.listName"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="value2"
|
||||
type="monthrange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
style="width: 300px;margin-right: 50px;margin-left: 20px">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
|
||||
<div ref="mychart" id="demoDiv"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.selectAllInfo();
|
||||
const myEcharts = echarts.init(this.$refs.mychart)
|
||||
//设置参数
|
||||
let xData = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"];
|
||||
//默认参数,后期要改的地方
|
||||
let yData = [6300, 4800, 3150, 1350, 6300, 4800, 3150, 1350, 6300, 4800, 3150, 1350];
|
||||
|
||||
console.log("yData:" + yData)
|
||||
let option = {
|
||||
title: {
|
||||
//标题
|
||||
text: "液化气站供气客户统计",
|
||||
x: "center",
|
||||
textStyle: {
|
||||
fontSize: 30
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
name: "月份",
|
||||
data: xData
|
||||
},
|
||||
yAxis: {
|
||||
name: "供气总量(m³)"
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow"
|
||||
}
|
||||
},
|
||||
series: {//系列
|
||||
name: "供气总量(m³)",
|
||||
type: "bar",
|
||||
data: yData
|
||||
}
|
||||
}
|
||||
myEcharts.setOption(option)
|
||||
},
|
||||
methods: {
|
||||
selectAllInfo() {
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/info/selectAllInfo').then(function (resp) {
|
||||
//设置表格数据
|
||||
console.log("resp.data"+resp.data)
|
||||
_this.listName = resp.data;
|
||||
})
|
||||
},
|
||||
query(){
|
||||
const myEcharts = echarts.init(this.$refs.mychart)
|
||||
this.Start=this.value2[0];
|
||||
this.End=this.value2[1];
|
||||
//年
|
||||
var Syear = this.Start.getFullYear();
|
||||
//月
|
||||
var Smonth = this.Start.getMonth() + 1;
|
||||
|
||||
//如果月份和日期小于10的话要在前面加个0,拼凑成XXXX-XX-XX的格式,方便查找
|
||||
Smonth = Smonth > 9 ? Smonth : '0' + Smonth
|
||||
|
||||
|
||||
var StrStart = Syear + '-' + Smonth;
|
||||
//年
|
||||
var Eyear = this.End.getFullYear();
|
||||
//月
|
||||
var Emonth = this.End.getMonth() + 1;
|
||||
|
||||
//如果月份和日期小于10的话要在前面加个0,拼凑成XXXX-XX-XX的格式,方便查找
|
||||
Emonth = Emonth > 9 ? Emonth : '0' + Emonth
|
||||
|
||||
|
||||
var StrEnd= Eyear + '-' + Emonth;
|
||||
|
||||
var countYear=Eyear-Syear;
|
||||
var countMonth= this.End.getMonth() - this.Start.getMonth() +countYear*12;
|
||||
var xData=[];
|
||||
var j=0;
|
||||
for(var i = (this.Start.getMonth() + 1);i<=countMonth+(this.Start.getMonth() + 1);i++){
|
||||
if(i>12){
|
||||
xData[j++]=(i-12)+"月"
|
||||
}else{
|
||||
xData[j++]=i+"月"
|
||||
}
|
||||
}
|
||||
console.log(xData)
|
||||
|
||||
var yData=[];
|
||||
var _this = this
|
||||
this.$axios.get('http://localhost:8181/data/totalByMonthById/' + StrStart+"/"+StrEnd+"/"+this.ruleForm.Data_Info).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
yData = resp.data
|
||||
console.log("sndajdns11:" + yData)
|
||||
myEcharts.setOption({
|
||||
xAxis: {
|
||||
data: xData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData//赋值
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
Page: 1,
|
||||
Name: '',
|
||||
Phone: '',
|
||||
Type: ''
|
||||
},
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '今年至今',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date(new Date().getFullYear(), 0);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近六个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setMonth(start.getMonth() - 6);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
value2: '',
|
||||
Start:'',
|
||||
End:'',
|
||||
listName:["小明","小红"]
|
||||
,
|
||||
ruleForm: {
|
||||
Data_Time: '',
|
||||
Data_Amount: '',
|
||||
Data_Info: '',
|
||||
Data_User: '',
|
||||
Data_time: ''
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
#demoDiv {
|
||||
width: 800px;
|
||||
height: 500px;
|
||||
border: 1px solid #7e7e7e;
|
||||
margin: 80px auto;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,163 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="供气编号" prop="data_Id">
|
||||
<el-input v-model="ruleForm.data_Id" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气时间" prop="data_time">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.data_time"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气数量" prop="data_Amount">
|
||||
<el-input v-model="ruleForm.data_Amount"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气人(客户)" prop="data_Info">
|
||||
<el-input v-model="ruleForm.data_Info"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户接收人员(员工)" prop="data_User">
|
||||
<el-input v-model="ruleForm.users.user_Name" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now();
|
||||
}, shortcuts: [{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
picker.$emit('pick', new Date());
|
||||
}
|
||||
}, {
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}, {
|
||||
text: '一周前',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}]
|
||||
},
|
||||
ruleForm: {
|
||||
data_Id:0,
|
||||
data_Time: '',
|
||||
data_Amount: '',
|
||||
data_Info: '',
|
||||
data_User: '',
|
||||
data_time:''
|
||||
},
|
||||
rules: {
|
||||
data_time: [
|
||||
{required: true, message: '时间不能为空', trigger: 'blur'}
|
||||
],
|
||||
data_Amount: [
|
||||
{required: true, message: '数量不能为空', trigger: 'blur'}
|
||||
],
|
||||
data_Info: [
|
||||
{required: true, message: '客户不能为空', trigger: 'change'}
|
||||
],
|
||||
data_User: [
|
||||
{required: true, message: '员工不能为空', trigger: 'blur'}
|
||||
],
|
||||
data_Id: [
|
||||
{required: true, message: '编号不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectById(){
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/data/updateData/'+this.ruleForm.Data_Id).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
_this.ruleForm = resp.data
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
//年
|
||||
var year = this.ruleForm.data_time.getFullYear();
|
||||
//月
|
||||
var month = this.ruleForm.data_time.getMonth() + 1;
|
||||
//日
|
||||
var strDate = this.ruleForm.data_time.getDate();
|
||||
|
||||
month = month > 9 ? month : '0' + month
|
||||
|
||||
strDate = strDate > 9 ? strDate : '0' + strDate
|
||||
|
||||
this.ruleForm.data_Time = year + '-' + month + '-' + strDate;
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/data/updateData', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('供气编号: ' + _this.ruleForm.data_Id + ' 修改成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/data")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
cancel(){
|
||||
this.$router.replace("/data")
|
||||
}
|
||||
},
|
||||
created(){
|
||||
// console.log(this.$route.query.id)
|
||||
this.ruleForm.Data_Id=this.$route.query.id;
|
||||
this.selectById();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,132 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="编号" prop="Info_Id">
|
||||
<el-input v-model="ruleForm.info_Id" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="Info_Name">
|
||||
<el-input v-model="ruleForm.info_Name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="Info_Phone">
|
||||
<el-input v-model="ruleForm.info_Phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户类型" prop="Info_Type">
|
||||
<el-select style="margin-left: -280px;" v-model="ruleForm.info_Type" placeholder="请选择客户类型">
|
||||
<el-option v-for="(item,index) in userData" :label="item.value" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气周期" prop="Info_Cycle">
|
||||
<el-input v-model="ruleForm.info_Cycle"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userData: [
|
||||
{
|
||||
value: '常客户'
|
||||
},
|
||||
{
|
||||
value: '临时客户'
|
||||
}
|
||||
],
|
||||
ruleForm: {
|
||||
info_Id:0,
|
||||
info_Name: '',
|
||||
info_Phone: '',
|
||||
info_Type: '',
|
||||
info_Cycle: ''
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{required: true, message: '请输入编号', trigger: 'blur'}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: '请输入姓名', trigger: 'blur'}
|
||||
],
|
||||
phone: [
|
||||
{required: true, message: '请输入电话', trigger: 'blur'}
|
||||
],
|
||||
type: [
|
||||
{required: true, message: '请选择客户类型', trigger: 'change'}
|
||||
],
|
||||
cycle: [
|
||||
{required: true, message: '请输入供气周期', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectById(){
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/info/updateInfo/'+this.ruleForm.Info_Id).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
_this.ruleForm = resp.data
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
console.log(this.ruleForm)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/info/updateInfo', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('客户编号: ' + _this.ruleForm.info_Name + ' 修改成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/selectAllInfo")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
cancel(){
|
||||
this.$router.replace("/selectAllInfo")
|
||||
}
|
||||
},
|
||||
created(){
|
||||
// console.log(this.$route.query.id)
|
||||
this.ruleForm.Info_Id=this.$route.query.id;
|
||||
this.selectById();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,130 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="编号" prop="overDate_Id">
|
||||
<el-input v-model="ruleForm.overDate_Id" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="overDate_Name">
|
||||
<el-input v-model="ruleForm.overDate_Name" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="Info_Phone">
|
||||
<el-input v-model="ruleForm.overDate_Phone" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户类型" prop="overDate_Type">
|
||||
<el-input v-model="ruleForm.overDate_Type" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供气周期" prop="overDate_Time">
|
||||
<el-input v-model="ruleForm.overDate_Time"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userData: [
|
||||
{
|
||||
value: '常客户'
|
||||
},
|
||||
{
|
||||
value: '临时客户'
|
||||
}
|
||||
],
|
||||
ruleForm: {
|
||||
overDate_Id:0,
|
||||
overDate_Name: '',
|
||||
overDate_Phone: '',
|
||||
overDate_Type: '',
|
||||
overDate_Time: ''
|
||||
},
|
||||
rules: {
|
||||
overDate_Id: [
|
||||
{required: true, message: '请输入编号', trigger: 'blur'}
|
||||
],
|
||||
overDate_Name: [
|
||||
{required: true, message: '请输入姓名', trigger: 'blur'}
|
||||
],
|
||||
overDate_Phone: [
|
||||
{required: true, message: '请输入电话', trigger: 'blur'}
|
||||
],
|
||||
overDate_Type: [
|
||||
{required: true, message: '请选择客户类型', trigger: 'change'}
|
||||
],
|
||||
overDate_Time: [
|
||||
{required: true, message: '请输入供气周期', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectById(){
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/overdate/updateOverDate/'+this.ruleForm.Info_Id).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
_this.ruleForm = resp.data
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
console.log(this.ruleForm)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/overdate/updateOverDate', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('客户编号: ' + _this.ruleForm.overDate_Name + ' 修改成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/warn")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
cancel(){
|
||||
this.$router.replace("/warn")
|
||||
}
|
||||
},
|
||||
created(){
|
||||
// console.log(this.$route.query.id)
|
||||
this.ruleForm.Info_Id=this.$route.query.id;
|
||||
this.selectById();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,144 @@
|
|||
<template>
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="form-container">
|
||||
<el-form-item label="编号" prop="user_Id">
|
||||
<el-input v-model="ruleForm.user_Id" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="user_Name">
|
||||
<el-input v-model="ruleForm.user_Name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="user_Name">
|
||||
<el-input v-model="ruleForm.user_Pass"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="user_Phone">
|
||||
<el-input v-model="ruleForm.user_Phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限类型">
|
||||
<el-select v-model="ruleForm.user_Type" placeholder="权限类型">
|
||||
<el-option label="管理员" value="1"></el-option>
|
||||
<el-option label="普通员工" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="家庭住址" prop="user_Address">
|
||||
<el-input v-model="ruleForm.user_Address"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userData: [
|
||||
{
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
value: '临时客户'
|
||||
}
|
||||
],
|
||||
ruleForm: {
|
||||
user_Id: 1,
|
||||
user_Name: '华为',
|
||||
user_Pass:'123',
|
||||
user_Phone: '',
|
||||
user_Role:'',
|
||||
user_Type: '华为科技有限公司',
|
||||
user_Cycle: "1",
|
||||
user_Address: ""
|
||||
},
|
||||
rules: {
|
||||
user_Id: [
|
||||
{required: true, message: '请输入编号', trigger: 'blur'}
|
||||
],
|
||||
user_Name: [
|
||||
{required: true, message: '请输入姓名', trigger: 'blur'}
|
||||
],
|
||||
user_Phone: [
|
||||
{required: true, message: '请输入电话', trigger: 'blur'}
|
||||
],
|
||||
user_Type: [
|
||||
{required: true, message: '请选择客户类型', trigger: 'change'}
|
||||
],
|
||||
cycle: [
|
||||
{required: true, message: '请输入供气周期', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectById(){
|
||||
const _this = this
|
||||
this.$axios.get('http://localhost:8181/user/updateUser/'+this.ruleForm.Info_Id).then(function (resp) {
|
||||
console.log(resp.data)
|
||||
_this.ruleForm = resp.data
|
||||
if(_this.ruleForm.user_Role=="1"){
|
||||
_this.ruleForm.user_Type="管理员"
|
||||
}else if(_this.ruleForm.user_Role=="2"){
|
||||
_this.ruleForm.user_Type="普通员工"
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
console.log(this.ruleForm)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const _this = this
|
||||
this.$axios.post('http://localhost:8181/user/updateUser', this.ruleForm).then(function (resp) {
|
||||
if (resp.data == 1) {
|
||||
_this.$alert('客户编号: ' + _this.ruleForm.user_Name + ' 修改成功!', '', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
_this.$router.push("/roleByUser")
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
cancel(){
|
||||
this.$router.replace("/roleByUser")
|
||||
}
|
||||
},
|
||||
created(){
|
||||
// console.log(this.$route.query.id)
|
||||
this.ruleForm.Info_Id=this.$route.query.id;
|
||||
this.selectById();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-container {
|
||||
border-radius: 15px;
|
||||
background-clip: padding-box;
|
||||
margin: 0px auto;
|
||||
width: 600px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.login_title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.login_remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,4 @@
|
|||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
|
@ -0,0 +1,324 @@
|
|||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : localhost_3306
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50737
|
||||
Source Host : localhost:3306
|
||||
Source Schema : mydb
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50737
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 19/05/2022 14:42:12
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for contract
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `contract`;
|
||||
CREATE TABLE `contract` (
|
||||
`contract_Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`contract_Info` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`contract_Start` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`contract_End` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`contract_Describe` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`contract_State` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`contract_Amount` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`contract_Id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of contract
|
||||
-- ----------------------------
|
||||
INSERT INTO `contract` VALUES (1, '陈博', '2019-09-09', '2020-09-09', 'WWWXX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '200吨');
|
||||
INSERT INTO `contract` VALUES (2, '陈俊龙', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (3, '陈俊鑫', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '202吨');
|
||||
INSERT INTO `contract` VALUES (4, '陈琪', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '203吨');
|
||||
INSERT INTO `contract` VALUES (5, '成相璋', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '204吨');
|
||||
INSERT INTO `contract` VALUES (6, '仇天硕', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '205吨');
|
||||
INSERT INTO `contract` VALUES (7, '杜闯', '2019-05-04', '2019-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '206吨');
|
||||
INSERT INTO `contract` VALUES (8, '范清清', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '207吨');
|
||||
INSERT INTO `contract` VALUES (9, '冯镇', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '208吨');
|
||||
INSERT INTO `contract` VALUES (10, '伏子豪', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (11, '傅嘉恒', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '210吨');
|
||||
INSERT INTO `contract` VALUES (12, '苟晶晶', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '211吨');
|
||||
INSERT INTO `contract` VALUES (13, '郭泽泰', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (14, '胡惠琴', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '213吨');
|
||||
INSERT INTO `contract` VALUES (15, '黄明水', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '214吨');
|
||||
INSERT INTO `contract` VALUES (16, '贾爱玲', '2019-05-04', '2019-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '206吨');
|
||||
INSERT INTO `contract` VALUES (17, '李程远', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '216吨');
|
||||
INSERT INTO `contract` VALUES (18, '李珍平', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '217吨');
|
||||
INSERT INTO `contract` VALUES (19, '陆海洋', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '218吨');
|
||||
INSERT INTO `contract` VALUES (20, '彭博', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '219吨');
|
||||
INSERT INTO `contract` VALUES (21, '彭璇', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '220吨');
|
||||
INSERT INTO `contract` VALUES (22, '曲宇赫', '2019-05-04', '2019-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '206吨');
|
||||
INSERT INTO `contract` VALUES (23, '谭鑫', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '222吨');
|
||||
INSERT INTO `contract` VALUES (24, '涂迅', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (25, '王学兵', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '224吨');
|
||||
INSERT INTO `contract` VALUES (26, '王逸者', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '225吨');
|
||||
INSERT INTO `contract` VALUES (27, '吴辰昊', '2019-05-04', '2019-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '206吨');
|
||||
INSERT INTO `contract` VALUES (28, '吴霜', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '227吨');
|
||||
INSERT INTO `contract` VALUES (29, '杨友森', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '228吨');
|
||||
INSERT INTO `contract` VALUES (30, '杨哲', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (31, '叶盛', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '230吨');
|
||||
INSERT INTO `contract` VALUES (32, '张戈旭', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '231吨');
|
||||
INSERT INTO `contract` VALUES (33, '郑玮琪', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '232吨');
|
||||
INSERT INTO `contract` VALUES (34, '邹珊珊', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '233吨');
|
||||
INSERT INTO `contract` VALUES (35, '林睿', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '234吨');
|
||||
INSERT INTO `contract` VALUES (36, '陈湘', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '235吨');
|
||||
INSERT INTO `contract` VALUES (37, '蒋莹', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '236吨');
|
||||
INSERT INTO `contract` VALUES (38, '张荣轩', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '237吨');
|
||||
INSERT INTO `contract` VALUES (39, '曹集翔', '2019-10-10', '2021-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '201吨');
|
||||
INSERT INTO `contract` VALUES (40, '赵辰阳', '2019-10-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '未结算', '239吨');
|
||||
INSERT INTO `contract` VALUES (41, '仇天硕', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '240吨');
|
||||
INSERT INTO `contract` VALUES (42, '郑然', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '241吨');
|
||||
INSERT INTO `contract` VALUES (43, '秦超凡', '2019-05-04', '2019-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '206吨');
|
||||
INSERT INTO `contract` VALUES (44, '江华明', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '243吨');
|
||||
INSERT INTO `contract` VALUES (45, '秦伟泽', '2019-09-09', '2020-09-09', 'XX大学与XX供气站合作,XX大学工作人员可持XX大学专属供气卡前来供气,供气总量为200吨,合同时间为1年', '已结算', '244吨');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for data
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `data`;
|
||||
CREATE TABLE `data` (
|
||||
`data_Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`data_Time` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`data_Amount` int(11) NULL DEFAULT NULL,
|
||||
`data_Info` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`data_User` int(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`data_Id`) USING BTREE,
|
||||
INDEX `User_Data`(`data_User`) USING BTREE,
|
||||
CONSTRAINT `User_Data` FOREIGN KEY (`data_User`) REFERENCES `user` (`User_Id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of data
|
||||
-- ----------------------------
|
||||
INSERT INTO `data` VALUES (1, '2022-04-10', 668, '陈博', 1);
|
||||
INSERT INTO `data` VALUES (2, '2022-04-17', 123, '陈俊龙', 1);
|
||||
INSERT INTO `data` VALUES (3, '2019-09-09', 123, '陈俊鑫', 1);
|
||||
INSERT INTO `data` VALUES (4, '2022-04-17', 123, '陈琪', 2);
|
||||
INSERT INTO `data` VALUES (5, '2022-04-17', 123, '成相璋', 2);
|
||||
INSERT INTO `data` VALUES (6, '2022-05-01', 57, '仇天硕', 1);
|
||||
INSERT INTO `data` VALUES (7, '2022-06-01', 58, '杜闯', 2);
|
||||
INSERT INTO `data` VALUES (8, '2022-07-01', 59, '范清清', 1);
|
||||
INSERT INTO `data` VALUES (9, '2022-08-01', 60, '冯镇', 2);
|
||||
INSERT INTO `data` VALUES (10, '2022-09-01', 61, '伏子豪', 1);
|
||||
INSERT INTO `data` VALUES (11, '2022-10-01', 62, '傅嘉恒', 2);
|
||||
INSERT INTO `data` VALUES (12, '2022-11-01', 63, '苟晶晶', 1);
|
||||
INSERT INTO `data` VALUES (13, '2022-12-01', 64, '郭泽泰', 2);
|
||||
INSERT INTO `data` VALUES (14, '2022-01-01', 65, '胡惠琴', 2);
|
||||
INSERT INTO `data` VALUES (15, '2022-02-01', 66, '黄明水', 2);
|
||||
INSERT INTO `data` VALUES (16, '2022-03-01', 67, '贾爱玲', 1);
|
||||
INSERT INTO `data` VALUES (17, '2022-04-01', 68, '李程远', 2);
|
||||
INSERT INTO `data` VALUES (18, '2022-05-01', 69, '李珍平', 1);
|
||||
INSERT INTO `data` VALUES (19, '2022-06-01', 70, '陆海洋', 2);
|
||||
INSERT INTO `data` VALUES (20, '2022-07-01', 71, '彭博', 1);
|
||||
INSERT INTO `data` VALUES (21, '2022-08-01', 72, '彭璇', 2);
|
||||
INSERT INTO `data` VALUES (22, '2022-09-01', 73, '曲宇赫', 1);
|
||||
INSERT INTO `data` VALUES (23, '2022-10-01', 74, '谭鑫', 2);
|
||||
INSERT INTO `data` VALUES (24, '2022-11-01', 75, '涂迅', 1);
|
||||
INSERT INTO `data` VALUES (25, '2022-12-01', 76, '王学兵', 1);
|
||||
INSERT INTO `data` VALUES (26, '2022-01-01', 77, '王逸者', 1);
|
||||
INSERT INTO `data` VALUES (27, '2022-02-01', 78, '吴辰昊', 1);
|
||||
INSERT INTO `data` VALUES (28, '2022-03-01', 79, '吴霜', 2);
|
||||
INSERT INTO `data` VALUES (29, '2022-04-01', 80, '杨友森', 1);
|
||||
INSERT INTO `data` VALUES (30, '2022-05-01', 81, '杨哲', 2);
|
||||
INSERT INTO `data` VALUES (31, '2022-06-01', 82, '叶盛', 1);
|
||||
INSERT INTO `data` VALUES (32, '2022-07-01', 83, '张戈旭', 2);
|
||||
INSERT INTO `data` VALUES (33, '2022-08-01', 84, '郑玮琪', 1);
|
||||
INSERT INTO `data` VALUES (34, '2022-09-01', 85, '邹珊珊', 2);
|
||||
INSERT INTO `data` VALUES (35, '2022-03-22', 123, '陈博', 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `info`;
|
||||
CREATE TABLE `info` (
|
||||
`info_Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`info_Name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`info_Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`info_Type` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`info_Cycle` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`info_Address` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`info_Others` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`info_Id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of info
|
||||
-- ----------------------------
|
||||
INSERT INTO `info` VALUES (1, '陈博', '18176951312', '临时客户', '9', 'whut', '1');
|
||||
INSERT INTO `info` VALUES (2, '陈俊龙', '18176951312', '常客户', '9', 'whut', '2');
|
||||
INSERT INTO `info` VALUES (3, '陈俊鑫', '18176951312', '常客户', '9', 'whut', '3');
|
||||
INSERT INTO `info` VALUES (4, '陈琪', '18176951312', '常客户', '9', 'whut', '4');
|
||||
INSERT INTO `info` VALUES (5, '成相璋', '18176951312', '常客户', '9', 'whut', '5');
|
||||
INSERT INTO `info` VALUES (6, '仇天硕', '18176951312', '常客户', '9', 'whut', '6');
|
||||
INSERT INTO `info` VALUES (7, '杜闯', '18176951312', '常客户', '9', 'whut', '7');
|
||||
INSERT INTO `info` VALUES (8, '范清清', '18176951312', '常客户', '9', 'whut', '8');
|
||||
INSERT INTO `info` VALUES (9, '冯镇', '18176951312', '常客户', '9', 'whut', '9');
|
||||
INSERT INTO `info` VALUES (10, '伏子豪', '18176951312', '常客户', '9', 'whut', '10');
|
||||
INSERT INTO `info` VALUES (11, '傅嘉恒', '18176951312', '常客户', '9', 'whut', '11');
|
||||
INSERT INTO `info` VALUES (12, '苟晶晶', '18176951312', '常客户', '9', 'whut', '12');
|
||||
INSERT INTO `info` VALUES (13, '郭泽泰', '18176951312', '常客户', '9', 'whut', '13');
|
||||
INSERT INTO `info` VALUES (14, '胡惠琴', '18176951312', '常客户', '9', 'whut', '14');
|
||||
INSERT INTO `info` VALUES (15, '黄明水', '18176951312', '常客户', '9', 'whut', '15');
|
||||
INSERT INTO `info` VALUES (16, '贾爱玲', '18176951312', '常客户', '9', 'whut', '16');
|
||||
INSERT INTO `info` VALUES (17, '李程远', '18176951312', '常客户', '9', 'whut', '17');
|
||||
INSERT INTO `info` VALUES (18, '李珍平', '18176951312', '常客户', '9', 'whut', '18');
|
||||
INSERT INTO `info` VALUES (19, '陆海洋', '18176951312', '临时客户', '9', 'whut', '19');
|
||||
INSERT INTO `info` VALUES (20, '彭博', '18176951312', '临时客户', '9', 'whut', '20');
|
||||
INSERT INTO `info` VALUES (21, '彭璇', '18176951312', '临时客户', '9', 'whut', '21');
|
||||
INSERT INTO `info` VALUES (22, '曲宇赫', '18176951312', '临时客户', '9', 'whut', '22');
|
||||
INSERT INTO `info` VALUES (23, '谭鑫', '18176951312', '常客户', '9', 'whut', '23');
|
||||
INSERT INTO `info` VALUES (24, '涂迅', '18176951312', '常客户', '9', 'whut', '24');
|
||||
INSERT INTO `info` VALUES (25, '王学兵', '18176951312', '常客户', '9', 'whut', '25');
|
||||
INSERT INTO `info` VALUES (26, '王逸者', '18176951312', '临时客户', '9', 'whut', '26');
|
||||
INSERT INTO `info` VALUES (27, '吴辰昊', '18176951312', '临时客户', '9', 'whut', '27');
|
||||
INSERT INTO `info` VALUES (28, '吴霜', '18176951312', '临时客户', '9', 'whut', '28');
|
||||
INSERT INTO `info` VALUES (29, '杨友森', '123', '常客户', '123', 'whut', '29');
|
||||
INSERT INTO `info` VALUES (30, '杨哲', '18176951312', '临时客户', '9', 'whut', '30');
|
||||
INSERT INTO `info` VALUES (31, '叶盛', '18176951312', '常客户', '9', 'whut', '31');
|
||||
INSERT INTO `info` VALUES (32, '张戈旭', '123', '临时客户', '123', 'whut', '32');
|
||||
INSERT INTO `info` VALUES (33, '郑玮琪', '123', '常客户', '123', 'whut', '33');
|
||||
INSERT INTO `info` VALUES (34, '邹珊珊', '123', '常客户', '5', 'whut', '34');
|
||||
INSERT INTO `info` VALUES (35, '陈湘', '15215248454', '常客户', '123', 'whut', '35');
|
||||
INSERT INTO `info` VALUES (36, '林睿', '15252564752', '临时客户', '5', 'dlut', '36');
|
||||
INSERT INTO `info` VALUES (37, '邓春芳', '123', '常客户', '12', '中南财经政法大学', '123');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for overdate
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `overdate`;
|
||||
CREATE TABLE `overdate` (
|
||||
`overdate_Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`overdate_Name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`overdate_Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`overdate_Type` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`overdate_Time` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`overdate_Id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of overdate
|
||||
-- ----------------------------
|
||||
INSERT INTO `overdate` VALUES (1, '陈博', '18176951312', '临时客户', '5天');
|
||||
INSERT INTO `overdate` VALUES (2, '陈俊龙', '18176951312', '临时客户', '3天');
|
||||
INSERT INTO `overdate` VALUES (3, '陈俊鑫', '18176951312', '临时客户', '2天');
|
||||
INSERT INTO `overdate` VALUES (4, '陈琪', '18176951312', '常客户', '4天');
|
||||
INSERT INTO `overdate` VALUES (5, '成相璋', '18176951312', '常客户', '5天');
|
||||
INSERT INTO `overdate` VALUES (6, '仇天硕', '18176951311', '常客户', '6天');
|
||||
INSERT INTO `overdate` VALUES (7, '杜闯', '18176951312', '常客户', '7天');
|
||||
INSERT INTO `overdate` VALUES (8, '范清清', '18176951312', '常客户', '8天');
|
||||
INSERT INTO `overdate` VALUES (9, '冯镇', '18176951312', '临时客户', '9天');
|
||||
INSERT INTO `overdate` VALUES (10, '伏子豪', '18176951312', '临时客户', '10天');
|
||||
INSERT INTO `overdate` VALUES (11, '傅嘉恒', '18176951312', '临时客户', '11天');
|
||||
INSERT INTO `overdate` VALUES (12, '苟晶晶', '18176951312', '常客户', '12天');
|
||||
INSERT INTO `overdate` VALUES (13, '郭泽泰', '18176951312', '常客户', '13天');
|
||||
INSERT INTO `overdate` VALUES (14, '胡惠琴', '18176951312', '常客户', '14天');
|
||||
INSERT INTO `overdate` VALUES (15, '黄明水', '18176951312', '常客户', '15天');
|
||||
INSERT INTO `overdate` VALUES (16, '贾爱玲', '18176951312', '常客户', '16天');
|
||||
INSERT INTO `overdate` VALUES (17, '李程远', '18176951312', '常客户', '17天');
|
||||
INSERT INTO `overdate` VALUES (18, '李珍平', '18176951312', '常客户', '18天');
|
||||
INSERT INTO `overdate` VALUES (19, '陆海洋', '18176951312', '常客户', '19天');
|
||||
INSERT INTO `overdate` VALUES (20, '彭博', '18176951312', '常客户', '20天');
|
||||
INSERT INTO `overdate` VALUES (21, '彭璇', '18176951312', '常客户', '21天');
|
||||
INSERT INTO `overdate` VALUES (22, '曲宇赫', '18176951312', '常客户', '22天');
|
||||
INSERT INTO `overdate` VALUES (23, '谭鑫', '18176951312', '常客户', '23天');
|
||||
INSERT INTO `overdate` VALUES (24, '涂迅', '18176951312', '常客户', '20天');
|
||||
INSERT INTO `overdate` VALUES (25, '王学兵', '18176951312', '常客户', '25天');
|
||||
INSERT INTO `overdate` VALUES (26, '王逸者', '18176951312', '常客户', '26天');
|
||||
INSERT INTO `overdate` VALUES (27, '吴辰昊', '18176951312', '常客户', '27天');
|
||||
INSERT INTO `overdate` VALUES (28, '吴霜', '18176951312', '常客户', '28天');
|
||||
INSERT INTO `overdate` VALUES (29, '杨友森', '18176951312', '临时客户', '29天');
|
||||
INSERT INTO `overdate` VALUES (30, '杨哲', '18176951312', '临时客户', '30天');
|
||||
INSERT INTO `overdate` VALUES (31, '叶盛', '18176951312', '临时客户', '31天');
|
||||
INSERT INTO `overdate` VALUES (32, '张戈旭', '18176951312', '临时客户', '32天');
|
||||
INSERT INTO `overdate` VALUES (33, '郑玮琪', '18176951312', '常客户', '33天');
|
||||
INSERT INTO `overdate` VALUES (34, '邹珊珊', '18176951312', '常客户', '34天');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for role
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `role`;
|
||||
CREATE TABLE `role` (
|
||||
`role_Id` int(11) NOT NULL,
|
||||
`role_Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`role_Id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of role
|
||||
-- ----------------------------
|
||||
INSERT INTO `role` VALUES (1, 'admin');
|
||||
INSERT INTO `role` VALUES (2, 'user');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE `user` (
|
||||
`User_Id` int(11) NOT NULL,
|
||||
`User_Name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`User_Pass` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`User_Phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`User_Address` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`User_Role` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`User_Id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user
|
||||
-- ----------------------------
|
||||
INSERT INTO `user` VALUES (1, '涂迅', '123', '18176951312', 'whut1999', '1');
|
||||
INSERT INTO `user` VALUES (2, '谭鑫', '123', '18176951312', 'whut2', '2');
|
||||
INSERT INTO `user` VALUES (3, '陈博', '123', '18176951312', 'whut3', '1');
|
||||
INSERT INTO `user` VALUES (4, '陈俊龙', '123', '18176951312', 'whut4', '1');
|
||||
INSERT INTO `user` VALUES (5, '陈俊鑫', '123', '18176951312', 'whut5', '1');
|
||||
INSERT INTO `user` VALUES (6, '陈琪', '123', '18176951312', 'whut6', '2');
|
||||
INSERT INTO `user` VALUES (7, '成相璋', '123', '18176951312', 'whut7', '1');
|
||||
INSERT INTO `user` VALUES (8, '仇天硕', '123', '18176951312', 'whut8', '2');
|
||||
INSERT INTO `user` VALUES (9, '杜闯', '123', '18176951312', 'whut9', '1');
|
||||
INSERT INTO `user` VALUES (10, '范清清', '123', '18176951312', 'whut10', '2');
|
||||
INSERT INTO `user` VALUES (11, '冯镇', '123', '18176951312', 'whut11', '2');
|
||||
INSERT INTO `user` VALUES (12, '伏子豪', '123', '18176951312', 'whut12', '2');
|
||||
INSERT INTO `user` VALUES (13, '傅嘉恒', '123', '18176951312', 'whut13', '2');
|
||||
INSERT INTO `user` VALUES (14, '苟晶晶', '123', '18176951312', 'whut14', '2');
|
||||
INSERT INTO `user` VALUES (15, '郭泽泰', '123', '18176951312', 'whut15', '2');
|
||||
INSERT INTO `user` VALUES (16, '胡惠琴', '123', '18176951312', 'whut16', '2');
|
||||
INSERT INTO `user` VALUES (17, '黄明水', '123', '18176951312', 'whut17', '2');
|
||||
INSERT INTO `user` VALUES (18, '贾爱玲', '123', '18176951312', 'whut18', '2');
|
||||
INSERT INTO `user` VALUES (19, '李程远', '123', '18176951312', 'whut19', '2');
|
||||
INSERT INTO `user` VALUES (20, '李珍平', '123', '18176951312', 'whut20', '2');
|
||||
INSERT INTO `user` VALUES (21, '陆海洋', '123', '18176951312', 'whut21', '2');
|
||||
INSERT INTO `user` VALUES (22, '彭博', '123', '18176951312', 'whut22', '2');
|
||||
INSERT INTO `user` VALUES (23, '彭璇', '123', '18176951312', 'whut23', '2');
|
||||
INSERT INTO `user` VALUES (24, '曲宇赫', '123', '18176951312', 'whut24', '2');
|
||||
INSERT INTO `user` VALUES (25, '王学兵', '123', '18176951312', 'whut25', '2');
|
||||
INSERT INTO `user` VALUES (26, '王逸者', '123', '18176951312', 'whut26', '2');
|
||||
INSERT INTO `user` VALUES (27, '吴辰昊', '123', '18176951312', 'whut27', '2');
|
||||
INSERT INTO `user` VALUES (28, '吴霜', '123', '18176951312', 'whut28', '2');
|
||||
INSERT INTO `user` VALUES (29, '杨友森', '123', '18176951312', 'whut29', '2');
|
||||
INSERT INTO `user` VALUES (30, '杨哲', '123', '18176951312', 'whut30', '2');
|
||||
INSERT INTO `user` VALUES (31, '叶盛', '123', '18176951312', 'whut31', '2');
|
||||
INSERT INTO `user` VALUES (32, '张戈旭', '123', '18176951312', 'whut32', '2');
|
||||
INSERT INTO `user` VALUES (33, '郑玮琪', '123', '18176951312', 'whut33', '2');
|
||||
INSERT INTO `user` VALUES (34, '邹珊珊', '123', '18176951312', 'whut34', '2');
|
||||
INSERT INTO `user` VALUES (35, '林睿', '123', '18176951312', 'whut35', '1');
|
||||
INSERT INTO `user` VALUES (36, '陈湘', '123', '18176951312', 'whut36', '2');
|
||||
INSERT INTO `user` VALUES (37, '蒋莹', '123', '18176951312', 'whut37', '2');
|
||||
INSERT INTO `user` VALUES (38, '张荣轩', '123', '18176951312', 'whut38', '2');
|
||||
INSERT INTO `user` VALUES (39, '曹集翔', '123', '18176951312', 'whut39', '2');
|
||||
INSERT INTO `user` VALUES (40, '赵辰阳', '123', '18176951312', 'whut40', '2');
|
||||
INSERT INTO `user` VALUES (41, '仇天硕', '123', '18176951312', 'whut41', '2');
|
||||
INSERT INTO `user` VALUES (42, '郑然', '123', '18176951312', 'whut42', '2');
|
||||
INSERT INTO `user` VALUES (43, '秦超凡', '123', '18176951312', 'whut43', '2');
|
||||
INSERT INTO `user` VALUES (44, '江华明', '123', '18176951312', 'whut44', '2');
|
||||
INSERT INTO `user` VALUES (45, '秦伟泽', '123', '18176951312', 'whut45', '2');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
Binary file not shown.
Loading…
Reference in New Issue