初始化提交
commit
c9a6728b0c
src/main/java/com/zcloud
mapper/datasource
hidden
service
hidden
notice
|
@ -0,0 +1,25 @@
|
|||
/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/build/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
|
@ -0,0 +1,225 @@
|
|||
#!/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
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Migwn, 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)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=`cd "$wdir/.."; pwd`
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
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
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
|
@ -0,0 +1,143 @@
|
|||
@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 http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
|
@ -0,0 +1,457 @@
|
|||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.zcloud</groupId>
|
||||
<artifactId>integrated_whb_scheduled</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging><!-- 以war运行是改成war -->
|
||||
|
||||
<name>zcloud-scheduled</name>
|
||||
<description>zcloud-scheduled for Spring Boot</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.2.RELEASE</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<shiro.version>1.4.0</shiro.version>
|
||||
<activiti.version>6.0.0</activiti.version>
|
||||
<batik.version>1.7</batik.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<!-- 移除嵌入式tomcat插件 war包方式部署时,解开注释 -->
|
||||
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- DevTools 热部署 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- war包方式部署时,解开注释 -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- activiti -->
|
||||
<!-- <dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-spring-boot-starter-basic</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>de.odysseus.juel</groupId>
|
||||
<artifactId>juel-spi</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>de.odysseus.juel</groupId>
|
||||
<artifactId>juel-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-json-converter</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency> -->
|
||||
<!-- batik start -->
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-anim -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-anim</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-awt-util -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-awt-util</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-bridge -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-bridge</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-codec -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-codec</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-css -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-css</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-dom -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-dom</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-ext -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-ext</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-gvt -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-gvt</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-js -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-js</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-parser -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-parser</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-script -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-script</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svg-dom -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svg-dom</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svggen</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-transcoder -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-transcoder</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-util -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-util</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-xml -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-xml</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- jstl -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
</dependency>
|
||||
<!-- jasper -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-jasper</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch</artifactId>
|
||||
<version>0.1.54</version>
|
||||
</dependency>
|
||||
<!-- freemarker -->
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- druid 数据库连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.1.12</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>jconsole</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>tools</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--shiro start-->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-ehcache</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<!--shiro end-->
|
||||
|
||||
<!-- Spring Boot缓存启动器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- unipush-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Ehcache -->
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis启动器 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mysql数据库驱动 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- sqlserver数据库驱动 -->
|
||||
<dependency>
|
||||
<groupId>com.hynnet</groupId>
|
||||
<artifactId>sqljdbc4-chs</artifactId>
|
||||
<version>4.0.2206.100</version>
|
||||
</dependency>
|
||||
|
||||
<!-- websocket即时通讯 -->
|
||||
<dependency>
|
||||
<groupId>org.java-websocket</groupId>
|
||||
<artifactId>Java-WebSocket</artifactId>
|
||||
<version>1.3.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- BASE64处理 -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 上传文件依赖 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- OSS -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.10.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- alibabajson处理 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.44</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 百度富文本编辑器 ueditor -->
|
||||
<dependency>
|
||||
<groupId>com.gitee.qdbp.thirdparty</groupId>
|
||||
<artifactId>ueditor</artifactId>
|
||||
<version>1.4.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 电子邮件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 根据汉字解析出拼音 -->
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- quartz定时任务 -->
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务器硬件使用情况检查 -->
|
||||
<dependency>
|
||||
<groupId>org.fusesource</groupId>
|
||||
<artifactId>sigar</artifactId>
|
||||
<version>1.6.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib -->
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-examples -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-examples</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-excelant -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-excelant</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-scratchpad -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
<version>3.17</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- <finalName>zcloud-scheduled</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>1.4.2.RELEASE</version>springboot项目打jar包运行 插件版本只能是1.4.2.RELEASE
|
||||
<configuration>
|
||||
<mainClass>com.zcloud.SpringBootStartApplication</mainClass>入口类
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<targetPath>META-INF/resources</targetPath>
|
||||
<includes>
|
||||
<include>**/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources> -->
|
||||
<finalName>zcloud-scheduled</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,45 @@
|
|||
package com.zcloud;
|
||||
|
||||
import com.alibaba.druid.support.http.StatViewServlet;
|
||||
import com.alibaba.druid.support.http.WebStatFilter;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 说明:druid数据库连接池的配置类(必须与启动类包目录同级)
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Configuration
|
||||
public class DruidConfiguration {
|
||||
|
||||
@Bean
|
||||
public ServletRegistrationBean<StatViewServlet> statViewServlet() {
|
||||
// 创建servlet注册实体
|
||||
ServletRegistrationBean<StatViewServlet> servletRegistrationBean = new ServletRegistrationBean<StatViewServlet>(new StatViewServlet(), "/druid/*");
|
||||
// 设置ip白名单
|
||||
//servletRegistrationBean.addInitParameter("allow", "127.0.0.1");
|
||||
// 设置ip黑名单,如果allow与deny共同存在时,deny优先于allow
|
||||
//servletRegistrationBean.addInitParameter("deny", "192.168.0.1");
|
||||
// 设置控制台管理用户
|
||||
//servletRegistrationBean.addInitParameter("loginUsername", "druid");
|
||||
//servletRegistrationBean.addInitParameter("loginPassword", "fhadmin");
|
||||
// 是否可以重置数据
|
||||
servletRegistrationBean.addInitParameter("resetEnable", "false");
|
||||
return servletRegistrationBean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<WebStatFilter> statFilter() {
|
||||
// 创建过滤器
|
||||
FilterRegistrationBean<WebStatFilter> filterRegistrationBean = new FilterRegistrationBean<WebStatFilter>(new WebStatFilter());
|
||||
// 设置过滤器过滤路径
|
||||
filterRegistrationBean.addUrlPatterns("/*");
|
||||
// 忽略过滤的形式
|
||||
filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* 说明:启动类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@SpringBootApplication//去除冲突
|
||||
@MapperScan("com.zcloud.mapper")
|
||||
@EnableCaching
|
||||
@EnableScheduling // 2.开启定时任务
|
||||
public class FHmainApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FHmainApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
/**
|
||||
* 说明:项目以war包方式运行时用到
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class SpringBootStartApplication extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
return builder.sources(FHmainApplication.class); //这里要指向原先用main方法执行的FHmainApplication启动类
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.http.HttpCookie;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* 说明:跨域访问处理
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Component
|
||||
public class CORSFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
|
||||
throws IOException, ServletException {
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
response.setContentType("textml;charset=UTF-8");
|
||||
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
|
||||
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
|
||||
response.setHeader("Access-Control-Max-Age", "0");
|
||||
response.setHeader("Access-Control-Allow-Headers","Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true"); // 是否支持cookie跨域
|
||||
response.setHeader("XDomainRequestAllowed", "1");
|
||||
// 下两行代码作用不明,暂时将此部分代码注释掉,不然无法登录
|
||||
// HttpCookie cookie = CookieUtils.generateSetCookie(request, "JSESSIONID", request.getSession().getId(), Duration.ofHours(1));
|
||||
// response.setHeader(HttpHeaders.SET_COOKIE, cookie.toString());
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.filter.CharacterEncodingFilter;
|
||||
|
||||
/**
|
||||
* 说明:字符编码
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Configuration
|
||||
public class EncodingFilterConfig {
|
||||
@Bean
|
||||
public FilterRegistrationBean<CharacterEncodingFilter> filterRegistrationBean() {
|
||||
FilterRegistrationBean<CharacterEncodingFilter> registrationBean = new FilterRegistrationBean<CharacterEncodingFilter>();
|
||||
CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter();
|
||||
characterEncodingFilter.setForceEncoding(true);
|
||||
characterEncodingFilter.setEncoding("UTF-8");
|
||||
registrationBean.setFilter(characterEncodingFilter);
|
||||
return registrationBean;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
|
||||
|
||||
/**
|
||||
* 说明:错误异常拦截处理
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Configuration
|
||||
public class ExceptionConfiguration implements HandlerExceptionResolver {
|
||||
|
||||
@Override
|
||||
public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler,
|
||||
Exception ex) {
|
||||
ModelAndView mv = new ModelAndView(new MappingJackson2JsonView()); //返回json
|
||||
|
||||
String exInfo = ex.toString().replaceAll("\n", "<br/>");
|
||||
String msg = "";
|
||||
|
||||
boolean status = exInfo.contains("Subject does not have permission");
|
||||
|
||||
if(status){
|
||||
exInfo = "[没有此页面的访问权限]" + exInfo;
|
||||
msg = "无此权限";
|
||||
}else {
|
||||
System.out.println("==============异常开始=============");
|
||||
ex.printStackTrace();
|
||||
System.out.println("==============异常结束=============");
|
||||
}
|
||||
mv.addObject("exception", exInfo);
|
||||
mv.addObject("msg", msg);
|
||||
mv.addObject("result", "exception");
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
|
||||
/**
|
||||
* 说明:第一数据源配置
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan(basePackages = MasterDataSourceConfig.PACKAGE, sqlSessionFactoryRef = "masterSqlSessionFactory") //扫描 Mapper 接口并容器管理
|
||||
public class MasterDataSourceConfig {
|
||||
|
||||
static final String PACKAGE = "com.zcloud.mapper.datasource"; //master 目录
|
||||
static final String MAPPER_LOCATION = "classpath:mybatis/datasource/*/*.xml"; //扫描的 xml 目录
|
||||
static final String CONFIG_LOCATION = "classpath:mybatis/datasource/mybatis-config.xml"; //自定义的mybatis config 文件位置
|
||||
static final String TYPE_ALIASES_PACKAGE = "com.zcloud.entity"; //扫描的 实体类 目录
|
||||
|
||||
@Value("${datasource.no1.url}")
|
||||
private String url;
|
||||
|
||||
@Value("${datasource.no1.username}")
|
||||
private String user;
|
||||
|
||||
@Value("${datasource.no1.password}")
|
||||
private String password;
|
||||
|
||||
@Value("${datasource.no1.driver-class-name}")
|
||||
private String driverClass;
|
||||
|
||||
@Bean(name = "masterDataSource")
|
||||
@Primary
|
||||
public DataSource masterDataSource() {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
dataSource.setDriverClassName(driverClass);
|
||||
dataSource.setUrl(url);
|
||||
dataSource.setUsername(user);
|
||||
dataSource.setPassword(password);
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
@Bean(name = "masterTransactionManager")
|
||||
@Primary
|
||||
public DataSourceTransactionManager masterTransactionManager() {
|
||||
return new DataSourceTransactionManager(masterDataSource());
|
||||
}
|
||||
|
||||
@Bean(name = "masterSqlSessionFactory")
|
||||
@Primary
|
||||
public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource masterDataSource)throws Exception {
|
||||
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
||||
sessionFactory.setDataSource(masterDataSource);
|
||||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(MasterDataSourceConfig.MAPPER_LOCATION));
|
||||
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(MasterDataSourceConfig.CONFIG_LOCATION));
|
||||
sessionFactory.setTypeAliasesPackage(MasterDataSourceConfig.TYPE_ALIASES_PACKAGE);
|
||||
return sessionFactory.getObject();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import org.apache.shiro.mgt.SecurityManager;
|
||||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||
import org.apache.shiro.web.filter.mgt.FilterChainManager;
|
||||
import org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver;
|
||||
import org.apache.shiro.web.mgt.WebSecurityManager;
|
||||
import org.apache.shiro.web.servlet.AbstractShiroFilter;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 说明:MyShiroFilterFactoryBean
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class MyShiroFilterFactoryBean extends ShiroFilterFactoryBean {
|
||||
|
||||
private Set<String> ignoreExt; // ShiroFilter将直接忽略的请求
|
||||
|
||||
public MyShiroFilterFactoryBean() {
|
||||
super();
|
||||
ignoreExt = new HashSet<String>();
|
||||
ignoreExt.add(".jpg");
|
||||
ignoreExt.add(".png");
|
||||
ignoreExt.add(".gif");
|
||||
ignoreExt.add(".bmp");
|
||||
ignoreExt.add(".js");
|
||||
ignoreExt.add(".css");
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动时加载
|
||||
*/
|
||||
@Override
|
||||
protected AbstractShiroFilter createInstance() throws Exception {
|
||||
SecurityManager securityManager = getSecurityManager();
|
||||
if (securityManager == null) {
|
||||
throw new BeanInitializationException("SecurityManager property must be set.");
|
||||
}
|
||||
|
||||
if (!(securityManager instanceof WebSecurityManager)) {
|
||||
throw new BeanInitializationException(
|
||||
"The security manager does not implement the WebSecurityManager interface.");
|
||||
}
|
||||
|
||||
PathMatchingFilterChainResolver chainResolver = new PathMatchingFilterChainResolver();
|
||||
FilterChainManager chainManager = createFilterChainManager();
|
||||
chainResolver.setFilterChainManager(chainManager);
|
||||
return new MySpringShiroFilter((WebSecurityManager) securityManager, chainResolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动时加载
|
||||
*/
|
||||
private class MySpringShiroFilter extends AbstractShiroFilter {
|
||||
public MySpringShiroFilter(WebSecurityManager securityManager, PathMatchingFilterChainResolver chainResolver) {
|
||||
super();
|
||||
if (securityManager == null) {
|
||||
throw new IllegalArgumentException("WebSecurityManager property cannot be null.");
|
||||
}
|
||||
setSecurityManager(securityManager);
|
||||
if (chainResolver != null) {
|
||||
setFilterChainResolver(chainResolver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面上传输的url先进入此方法验证
|
||||
*/
|
||||
@Override
|
||||
protected void doFilterInternal(ServletRequest servletRequest, ServletResponse servletResponse,
|
||||
FilterChain chain) throws ServletException, IOException {
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
String str = request.getRequestURI().toLowerCase();
|
||||
boolean flag = true;
|
||||
int idx = 0;
|
||||
if ((idx = str.lastIndexOf(".")) > 0) {
|
||||
str = str.substring(idx);
|
||||
if (ignoreExt.contains(str.toLowerCase())) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
super.doFilterInternal(servletRequest, servletResponse, chain);
|
||||
} else {
|
||||
chain.doFilter(servletRequest, servletResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
//package com.zcloud.config;
|
||||
//
|
||||
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.context.annotation.Profile;
|
||||
//import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
||||
//import org.springframework.scheduling.config.CronTask;
|
||||
//import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
//
|
||||
//import java.lang.reflect.Field;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.Objects;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
//@Configuration
|
||||
//public class ScheduleRunConf implements SchedulingConfigurer {
|
||||
// @Override
|
||||
// public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
|
||||
// Field[] declaredFields = taskRegistrar.getClass().getDeclaredFields();
|
||||
// List<Field> list = Arrays.stream(declaredFields)
|
||||
// .filter(f -> List.class.isAssignableFrom(f.getType()))
|
||||
// .collect(Collectors.toList());
|
||||
// for (Field f : list) {
|
||||
// try {
|
||||
// //access sec
|
||||
// f.setAccessible(true);
|
||||
// List<CronTask> tasks = (List<CronTask>) f.get(taskRegistrar);
|
||||
// if (Objects.nonNull(tasks)) {
|
||||
// for (CronTask task : tasks) {
|
||||
// try {
|
||||
// task.getRunnable().run();
|
||||
// } catch (ClassCastException ex) {
|
||||
// CronTask cronTask = (CronTask) task;
|
||||
// cronTask.getRunnable().run();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } catch (Throwable e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import org.java_websocket.WebSocketImpl;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 说明:web服务器启动后立即执行
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Component
|
||||
@Order(value = 1) // 1 代表启动顺序
|
||||
public class StartWebsocketServer implements ApplicationRunner{
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments var1) throws Exception{
|
||||
System.out.println("-------------------定时任务系统启动成功-------------------");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,265 @@
|
|||
package com.zcloud.entity;
|
||||
|
||||
import com.zcloud.util.Const;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.shiro.session.Session;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 说明:分页类
|
||||
|
||||
|
||||
*/
|
||||
public class Page implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int showCount; //每页显示记录数
|
||||
private int totalPage; //总页数
|
||||
private int totalResult; //总记录数
|
||||
private int currentPage; //当前页
|
||||
private int currentResult; //当前记录起始索引
|
||||
private boolean entityOrField; //true:需要分页的地方,传入的参数就是Page实体;false:需要分页的地方,传入的参数所代表的实体拥有Page属性
|
||||
private String pageStr; //最终页面显示的底部翻页导航,详细见:getPageStr();
|
||||
private String pageStrSimplify; //最终页面显示的底部翻页导航,详细见:getPageStrSimplify();
|
||||
private String pageStrSimplify2; //最终页面显示的底部翻页导航,详细见:getPageStrSimplify2();
|
||||
private PageData pd = new PageData();
|
||||
|
||||
public Page(){
|
||||
try {
|
||||
Session session = Jurisdiction.getSession();
|
||||
this.showCount = null != session.getAttribute(Const.SHOWCOUNT)?Integer.parseInt(session.getAttribute(Const.SHOWCOUNT).toString()):10;
|
||||
} catch (Exception e) {
|
||||
this.showCount = 10;
|
||||
}
|
||||
}
|
||||
|
||||
public int getTotalPage() {
|
||||
if(totalResult%showCount==0)
|
||||
totalPage = totalResult/showCount;
|
||||
else
|
||||
totalPage = totalResult/showCount+1;
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
public void setTotalPage(int totalPage) {
|
||||
this.totalPage = totalPage;
|
||||
}
|
||||
|
||||
public int getTotalResult() {
|
||||
return totalResult;
|
||||
}
|
||||
|
||||
public void setTotalResult(int totalResult) {
|
||||
this.totalResult = totalResult;
|
||||
}
|
||||
|
||||
public int getCurrentPage() {
|
||||
if(currentPage<=0)
|
||||
currentPage = 1;
|
||||
if(currentPage>getTotalPage())
|
||||
currentPage = getTotalPage();
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(int currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
//拼接分页 页面及JS函数
|
||||
public String getPageStr() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(totalResult>0){
|
||||
sb.append(" <ul class=\"pagination pull-right no-margin\">\n");
|
||||
if(currentPage==1){
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a>共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:36px;padding-top:5px;border-left-width:0px;border-top-width:0px;border-right-width:0px;border-bottom: 1px solid #dbdbdb\" /></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.toTZ();\" > 跳转 </a></li>\n");
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 首页 </a></li>\n");
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 上页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li><input type=\"number\" value=\"\" id=\"toGoPage\" style=\"width:36px;padding-top:5px;border-left-width:0px;border-top-width:0px;border-right-width:0px;border-bottom: 1px solid #dbdbdb\" /></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.toTZ();\" > 跳转 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage(1)\"> 首页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+(currentPage-1)+")\"> 上页 </a></li>\n");
|
||||
}
|
||||
int showTag = 5;//分页标签显示数量
|
||||
int startTag = 1;
|
||||
if(currentPage>showTag){
|
||||
startTag = currentPage-1;
|
||||
}
|
||||
int endTag = startTag+showTag-1;
|
||||
for(int i=startTag; i<=totalPage && i<=endTag; i++){
|
||||
if(currentPage==i)
|
||||
sb.append("<li style=\"padding-top:10px;\" class=\"active\"><a><font color=\"#3F4D67\"> <b>"+i+"</b></font></a></li>\n");
|
||||
else
|
||||
sb.append(" <li style=\"padding-top:10px;\" style=\"cursor:pointer;\"><a style=\"cursor:pointer;\" onclick=\"vm.nextPage("+i+")\"> "+i+"</a></li>\n");
|
||||
}
|
||||
if(currentPage==totalPage){
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 下页 </a></li>\n");
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 尾页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+(currentPage+1)+")\"> 下页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+totalPage+")\"> 尾页 </a></li>\n");
|
||||
}
|
||||
sb.append(" <li style=\"padding-top:10px;\"><a> 共"+totalPage+"页 </a></li>\n");
|
||||
sb.append(" <li style=\"padding-top:10px;\"><select title='显示条数' style=\"cursor:pointer;width:39px;float:left;margin-top:0px;border:none;background-color: rgba(255,255,255,0.6);\" onchange=\"vm.changeCount(this.value)\">\n");
|
||||
sb.append(" <option value='"+showCount+"'>"+showCount+"</option>\n");
|
||||
if(10 != showCount) {
|
||||
sb.append(" <option value='10'>10</option>\n");
|
||||
}
|
||||
sb.append(" <option value='20'>20</option>\n");
|
||||
sb.append(" <option value='30'>30</option>\n");
|
||||
sb.append(" <option value='40'>40</option>\n");
|
||||
sb.append(" <option value='50'>50</option>\n");
|
||||
sb.append(" <option value='60'>60</option>\n");
|
||||
sb.append(" <option value='70'>70</option>\n");
|
||||
sb.append(" <option value='80'>80</option>\n");
|
||||
sb.append(" <option value='90'>90</option>\n");
|
||||
sb.append(" <option value='99'>99</option>\n");
|
||||
sb.append(" </select>\n");
|
||||
sb.append(" </li>\n");
|
||||
sb.append("</ul>\n");
|
||||
}
|
||||
pageStr = sb.toString();
|
||||
return pageStr;
|
||||
}
|
||||
|
||||
public void setPageStr(String pageStr) {
|
||||
this.pageStr = pageStr;
|
||||
}
|
||||
|
||||
//拼接分页 页面及JS函数
|
||||
public String getPageStrSimplify() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(totalResult>0){
|
||||
sb.append(" <ul class=\"pagination pull-right no-margin\">\n");
|
||||
if(currentPage==1){
|
||||
sb.append(" <li><a>共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li><a> 首页 </a></li>\n");
|
||||
sb.append(" <li><a> 上页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li><a> 共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage(1)\"> 首页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+(currentPage-1)+")\"> 上页 </a></li>\n");
|
||||
}
|
||||
int showTag = 2;//分页标签显示数量
|
||||
int startTag = 1;
|
||||
if(currentPage>showTag){
|
||||
startTag = currentPage-1;
|
||||
}
|
||||
int endTag = startTag+showTag-1;
|
||||
for(int i=startTag; i<=totalPage && i<=endTag; i++){
|
||||
if(currentPage==i)
|
||||
sb.append("<li class=\"active\"><a><font color=\"#3F4D67\"> <b>"+i+"</b></font></a></li>\n");
|
||||
else
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a style=\"cursor:pointer;\" onclick=\"vm.nextPage("+i+")\"> "+i+"</a></li>\n");
|
||||
}
|
||||
if(currentPage==totalPage){
|
||||
sb.append(" <li><a> 下页 </a></li>\n");
|
||||
sb.append(" <li><a> 尾页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+(currentPage+1)+")\"> 下页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+totalPage+")\"> 尾页 </a></li>\n");
|
||||
}
|
||||
sb.append(" <li><a> 共"+totalPage+"页 </a></li>\n");
|
||||
sb.append("</ul>\n");
|
||||
}
|
||||
pageStrSimplify = sb.toString();
|
||||
return pageStrSimplify;
|
||||
}
|
||||
|
||||
public void setPageStrSimplify(String pageStrSimplify) {
|
||||
this.pageStrSimplify = pageStrSimplify;
|
||||
}
|
||||
|
||||
//拼接分页 页面及JS函数
|
||||
public String getPageStrSimplify2() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(totalResult>0){
|
||||
sb.append(" <ul class=\"pagination pull-right no-margin\">\n");
|
||||
if(currentPage==1){
|
||||
sb.append(" <li><a>共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li><a> 首页 </a></li>\n");
|
||||
sb.append(" <li><a> 上页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li><a> 共"+totalResult+"条 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage(1)\"> 首页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage-1)+")\"> 上页 </a></li>\n");
|
||||
}
|
||||
int showTag = 2;//分页标签显示数量
|
||||
int startTag = 1;
|
||||
if(currentPage>showTag){
|
||||
startTag = currentPage-1;
|
||||
}
|
||||
int endTag = startTag+showTag-1;
|
||||
for(int i=startTag; i<=totalPage && i<=endTag; i++){
|
||||
if(currentPage==i)
|
||||
sb.append("<li class=\"active\"><a><font color=\"#3F4D67\"> <b>"+i+"</b></font></a></li>\n");
|
||||
else
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a style=\"cursor:pointer;\" onclick=\"nextPage("+i+")\"> "+i+"</a></li>\n");
|
||||
}
|
||||
if(currentPage==totalPage){
|
||||
sb.append(" <li><a> 下页 </a></li>\n");
|
||||
sb.append(" <li><a> 尾页 </a></li>\n");
|
||||
}else{
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage+1)+")\"> 下页 </a></li>\n");
|
||||
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+totalPage+")\"> 尾页 </a></li>\n");
|
||||
}
|
||||
sb.append(" <li><a> 共"+totalPage+"页 </a></li>\n");
|
||||
sb.append("</ul>\n");
|
||||
}
|
||||
pageStrSimplify2 = sb.toString();
|
||||
return pageStrSimplify2;
|
||||
}
|
||||
public void setPageStrSimplify2(String pageStrSimplify2) {
|
||||
this.pageStrSimplify2 = pageStrSimplify2;
|
||||
}
|
||||
|
||||
public int getShowCount() {
|
||||
return showCount;
|
||||
}
|
||||
|
||||
public void setShowCount(int showCount) {
|
||||
if(-1 == showCount) {
|
||||
try {
|
||||
Session session = Jurisdiction.getSession();
|
||||
this.showCount = null != session.getAttribute(Const.SHOWCOUNT)?Integer.parseInt(session.getAttribute(Const.SHOWCOUNT).toString()):10;
|
||||
} catch (Exception e) {
|
||||
this.showCount = 10;
|
||||
}
|
||||
}else {
|
||||
this.showCount = showCount;
|
||||
}
|
||||
}
|
||||
|
||||
public int getCurrentResult() {
|
||||
currentResult = (getCurrentPage()-1)*getShowCount();
|
||||
if(currentResult<0)
|
||||
currentResult = 0;
|
||||
return currentResult;
|
||||
}
|
||||
|
||||
public void setCurrentResult(int currentResult) {
|
||||
this.currentResult = currentResult;
|
||||
}
|
||||
|
||||
public boolean isEntityOrField() {
|
||||
return entityOrField;
|
||||
}
|
||||
|
||||
public void setEntityOrField(boolean entityOrField) {
|
||||
this.entityOrField = entityOrField;
|
||||
}
|
||||
|
||||
public PageData getPd() {
|
||||
return pd;
|
||||
}
|
||||
|
||||
public void setPd(PageData pd) {
|
||||
this.pd = pd;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
package com.zcloud.entity;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.Reader;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.alibaba.druid.proxy.jdbc.ClobProxyImpl;
|
||||
|
||||
/**
|
||||
* 说明:参数封装Map
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class PageData extends HashMap<Object, Object> implements Map<Object, Object> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
Map<Object, Object> map = null;
|
||||
HttpServletRequest request;
|
||||
|
||||
public PageData(HttpServletRequest request) {
|
||||
this.request = request;
|
||||
Map properties = request.getParameterMap();
|
||||
Map<Object, Object> returnMap = new HashMap<Object, Object>();
|
||||
Iterator<Object> entries = properties.entrySet().iterator();
|
||||
Map.Entry<Object, Object> entry;
|
||||
String name = "";
|
||||
String value = "";
|
||||
while (entries.hasNext()) {
|
||||
entry = (Map.Entry<Object, Object>) entries.next();
|
||||
name = (String) entry.getKey();
|
||||
Object valueObj = entry.getValue();
|
||||
if (null == valueObj) {
|
||||
value = "";
|
||||
} else if (valueObj instanceof String[]) {
|
||||
String[] values = (String[]) valueObj;
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
value = values[i] + ",";
|
||||
}
|
||||
value = value.substring(0, value.length() - 1);
|
||||
} else {
|
||||
value = valueObj.toString();
|
||||
}
|
||||
returnMap.put(name, value);
|
||||
}
|
||||
map = returnMap;
|
||||
}
|
||||
|
||||
public PageData() {
|
||||
map = new HashMap<Object, Object>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(Object key) {
|
||||
Object obj = null;
|
||||
if (map.get(key) instanceof Object[]) {
|
||||
Object[] arr = (Object[]) map.get(key);
|
||||
obj = request == null ? arr : (request.getParameter((String) key) == null ? arr : arr[0]);
|
||||
} else {
|
||||
obj = map.get(key);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public String getString(Object key) {
|
||||
return get(key) == null ? "" : get(key).toString().trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object put(Object key, Object value) {
|
||||
if (value instanceof ClobProxyImpl) { // 读取oracle Clob类型数据
|
||||
try {
|
||||
ClobProxyImpl cpi = (ClobProxyImpl) value;
|
||||
Reader is = cpi.getCharacterStream(); // 获取流
|
||||
BufferedReader br = new BufferedReader(is);
|
||||
String str = br.readLine();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
while (str != null) { // 循环读取数据拼接到字符串
|
||||
sb.append(str);
|
||||
sb.append("\n");
|
||||
str = br.readLine();
|
||||
}
|
||||
value = sb.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return map.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object remove(Object key) {
|
||||
return map.remove(key);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
map.clear();
|
||||
}
|
||||
|
||||
public boolean containsKey(Object key) {
|
||||
// TODO Auto-generated method stub
|
||||
return map.containsKey(key);
|
||||
}
|
||||
|
||||
public boolean containsValue(Object value) {
|
||||
// TODO Auto-generated method stub
|
||||
return map.containsValue(value);
|
||||
}
|
||||
|
||||
public Set entrySet() {
|
||||
// TODO Auto-generated method stub
|
||||
return map.entrySet();
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
// TODO Auto-generated method stub
|
||||
return map.isEmpty();
|
||||
}
|
||||
|
||||
public Set keySet() {
|
||||
// TODO Auto-generated method stub
|
||||
return map.keySet();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void putAll(Map t) {
|
||||
// TODO Auto-generated method stub
|
||||
map.putAll(t);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
// TODO Auto-generated method stub
|
||||
return map.size();
|
||||
}
|
||||
|
||||
public Collection values() {
|
||||
// TODO Auto-generated method stub
|
||||
return map.values();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.zcloud.entity;
|
||||
|
||||
public class TemplateData {
|
||||
|
||||
//keyword1:订单类型,keyword2:下单金额,keyword3:配送地址,keyword4:取件地址,keyword5备注
|
||||
private String value;//,,依次排下去
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* 小程序推送所需数据
|
||||
* */
|
||||
public class WxMssVo {
|
||||
private String touser;//用户openid
|
||||
private String template_id;//模版id
|
||||
private String page = "index";//默认跳到小程序首页
|
||||
private String url = "";//默认跳到小程序首页
|
||||
// private String form_id;//收集到的用户formid
|
||||
private String emphasis_keyword = "keyword1.DATA";//放大那个推送字段
|
||||
private Map<String,TemplateData> data;//推送文字
|
||||
|
||||
public String getTouser() {
|
||||
return touser;
|
||||
}
|
||||
public void setTouser(String touser) {
|
||||
this.touser = touser;
|
||||
}
|
||||
public String getTemplate_id() {
|
||||
return template_id;
|
||||
}
|
||||
public void setTemplate_id(String template_id) {
|
||||
this.template_id = template_id;
|
||||
}
|
||||
public String getPage() {
|
||||
return page;
|
||||
}
|
||||
public void setPage(String page) {
|
||||
this.page = page;
|
||||
}
|
||||
// public String getForm_id() {
|
||||
// return form_id;
|
||||
// }
|
||||
// public void setForm_id(String form_id) {
|
||||
// this.form_id = form_id;
|
||||
// }
|
||||
public String getEmphasis_keyword() {
|
||||
return emphasis_keyword;
|
||||
}
|
||||
public void setEmphasis_keyword(String emphasis_keyword) {
|
||||
this.emphasis_keyword = emphasis_keyword;
|
||||
}
|
||||
public Map<String,TemplateData> getData() {
|
||||
return data;
|
||||
}
|
||||
public void setData(Map<String,TemplateData> data) {
|
||||
this.data = data;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.mapper.datasource.check;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CheckRecordMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**清单逾期检查记录数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
int countOverTime(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.mapper.datasource.check;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-25
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CheckUserMapper{
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.zcloud.mapper.datasource.check;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-30
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface ListManagerMapper {
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**查询今日待处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getListToday(PageData pd);
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listExaminedNum(PageData pd);
|
||||
|
||||
List<PageData> listTempNum(PageData pd);
|
||||
|
||||
/**启用
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void startup(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteTemplist(PageData pd);
|
||||
|
||||
List<PageData> selectTemp(PageData pd);
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listExaminedNumJjr(PageData pd);
|
||||
|
||||
|
||||
/**查询所有清单清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getAllList(PageData pd);
|
||||
|
||||
/**上期超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> overTimeRecord(PageData pd);
|
||||
|
||||
/**上期超期未检查的清单(每日使用)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> overTimeRecordDay(PageData pd);
|
||||
|
||||
/**节假日超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> overTimeRecordJjr(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.zcloud.mapper.datasource.corp;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
* 说明:企业管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CorpInfoMapper {
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.mapper.datasource.hidden;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface HiddenMapper{
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editDeadline(PageData pd);
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getYestoday(PageData pd);
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业通知公告
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeCorpMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
public List<PageData> listByUserId (Page page);
|
||||
|
||||
List<PageData> listByIndex(Page page);
|
||||
|
||||
|
||||
int getRedPoint(PageData pd);
|
||||
|
||||
/**获取平台公告(第一条)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData getPlaNewNotice(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业公告人员关系表
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeCorpUserMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
/**
|
||||
* 批量添加公告人员关系信息
|
||||
* @param pd
|
||||
*/
|
||||
void savaAll(PageData pd);
|
||||
|
||||
void deleteByNotId(PageData pd);
|
||||
List<PageData> getTypeCountByNotId (Page page);
|
||||
/**
|
||||
* 查看用户阅读公告情况
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getReadUserlistPage(Page page);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:公告日志
|
||||
* 作者:fjk
|
||||
* 时间:2020-08-31
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface NoticeLogMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(PageData pd);
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAllByNoticeId(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:通知管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeManagementMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
void editIsEnable(PageData pd);
|
||||
void editUserName(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:通知模板
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeTemplateMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**通过code获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByCode(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.zcloud.mapper.datasource.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 说明: 通知公告Mapper
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
* @version
|
||||
*/
|
||||
public interface ServiceNoticeMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
List<PageData> applistAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
PageData listCountBYBasicinfoID(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
void saveNotAndCorp(PageData pd);
|
||||
void delteNotAndCorpByNotId (PageData pd);
|
||||
List<PageData> getNotAndCorpByNotId(PageData pd);
|
||||
|
||||
List<PageData> getNotAndCorpByCorpIddatalistPage(Page page);
|
||||
/**
|
||||
* 统计查看通过企业信息
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getTypeCountByNotId (Page page);
|
||||
|
||||
List<PageData> getCorpReadTypelistPage(Page page);
|
||||
/**
|
||||
* 修改阅读状态
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
void editCorpInfo (PageData pd);
|
||||
|
||||
int getRedPoint(PageData pd);
|
||||
|
||||
|
||||
/** 获取最新公告
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData getNewNotice(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.mapper.datasource.pe;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PerformanceExamineDeptMapper {
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
void saveBatch(List<PageData> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.mapper.datasource.pe;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PerformanceExamineUserMapper {
|
||||
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
void saveBatch(List<PageData> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.mapper.datasource.risk;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:风险点台账
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-29
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface RiskPointAnalysisMapper {
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.zcloud.mapper.datasource.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MSMLoginMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
int msUsedCount(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.zcloud.mapper.datasource.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSLogMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
int msUsedCount(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.mapper.datasource.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSManagementMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
void editIsEnable(PageData pd);
|
||||
void editUserName(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.datasource.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信开通日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-03-23
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSOpenLogMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.mapper.datasource.speEquip;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:特种设备管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SpecialEquipmentMapper{
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.zcloud.mapper.datasource.speEquip;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:特种设备安全巡检管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SpecialEquipmentWxjMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package com.zcloud.mapper.datasource.statistics;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单统计记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface ListStatisticsMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deletewl(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCountList(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**定时器查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByCondition(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
PageData getTimeAstrict(PageData pd);
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> countStaByUser(PageData pd);
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> countSta(PageData pd);
|
||||
|
||||
/**检查情况列表
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> checkSituation(PageData pd);
|
||||
|
||||
/**人员应处理清单个数(节假日清单数算1)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> countListStaByUser(PageData pd);
|
||||
/**人员应处理清单数(各周期)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> countByPeriodUser(PageData pd);
|
||||
|
||||
List<PageData> listAllForPlan(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.zcloud.mapper.datasource.statistics;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StatisticsMapper {
|
||||
List<PageData> listAll(PageData pd);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明: 组织机构接Mapper
|
||||
* 创建人:luoxiaobao
|
||||
* 官网:
|
||||
*/
|
||||
public interface DepartmentMapper{
|
||||
|
||||
|
||||
/**通过条件获取全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户Mapper
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface UsersMapper {
|
||||
|
||||
/**通过用户ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllUser(PageData pd);
|
||||
|
||||
/**查询用户倒班周期数据
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getUserWork(PageData pd);
|
||||
|
||||
/**修改用户倒班周期
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editShiftWork(PageData pd);
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.mapper.datasource.task;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:在线学习考试-任务
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-20
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface StudyTaskMapper {
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.service.check;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CheckRecordService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**清单逾期检查记录数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int countOverTime(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.check;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-25
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CheckUserService {
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd)throws Exception;
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.zcloud.service.check;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-30
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface ListManagerService {
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**查询今日待处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getListToday(PageData pd)throws Exception;
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listExaminedNum(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listTempNum(PageData pd)throws Exception;
|
||||
|
||||
/**启用
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void startup(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteTemplist(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> selectTemp(PageData pd)throws Exception;
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listExaminedNumJjr(PageData pd)throws Exception;
|
||||
|
||||
/**查询所有清单清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getAllList(PageData pd)throws Exception;
|
||||
|
||||
/**上期超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecord(PageData pd)throws Exception;
|
||||
|
||||
/**上期超期未检查的清单(每日使用)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecordDay(PageData pd)throws Exception;
|
||||
|
||||
/**节假日超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecordJjr(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.service.check.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.check.CheckRecordMapper;
|
||||
import com.zcloud.service.check.CheckRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CheckRecordServiceImpl implements CheckRecordService {
|
||||
|
||||
@Autowired
|
||||
private CheckRecordMapper checkrecordMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
checkrecordMapper.save(pd);
|
||||
}
|
||||
|
||||
/**清单逾期检查记录数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int countOverTime(PageData pd)throws Exception{
|
||||
return checkrecordMapper.countOverTime(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.service.check.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.check.CheckUserMapper;
|
||||
import com.zcloud.service.check.CheckUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单检查记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-25
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CheckUserServiceImpl implements CheckUserService {
|
||||
|
||||
@Autowired
|
||||
private CheckUserMapper checkuserMapper;
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd)throws Exception{
|
||||
return checkuserMapper.getDeptExamine(pd);
|
||||
}
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception{
|
||||
return checkuserMapper.getUserExamine(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package com.zcloud.service.check.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.check.ListManagerMapper;
|
||||
import com.zcloud.service.check.ListManagerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-30
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class ListManagerServiceImpl implements ListManagerService {
|
||||
|
||||
@Autowired
|
||||
private ListManagerMapper listmanagerMapper;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
listmanagerMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**查询今日待处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getListToday(PageData pd)throws Exception{
|
||||
return listmanagerMapper.getListToday(pd);
|
||||
}
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> listExaminedNum(PageData pd) throws Exception {
|
||||
return listmanagerMapper.listExaminedNum(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listTempNum(PageData pd) throws Exception {
|
||||
return listmanagerMapper.listTempNum(pd);
|
||||
}
|
||||
|
||||
/**启用
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void startup(PageData pd)throws Exception{
|
||||
listmanagerMapper.startup(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteTemplist(PageData pd)throws Exception{
|
||||
listmanagerMapper.deleteTemplist(pd);
|
||||
}
|
||||
|
||||
public List<PageData> selectTemp(PageData pd)throws Exception{
|
||||
return listmanagerMapper.selectTemp(pd);
|
||||
}
|
||||
|
||||
/**待检查清单数量
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> listExaminedNumJjr(PageData pd) throws Exception {
|
||||
return listmanagerMapper.listExaminedNumJjr(pd);
|
||||
}
|
||||
|
||||
/**查询所有清单清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getAllList(PageData pd)throws Exception{
|
||||
return listmanagerMapper.getAllList(pd);
|
||||
}
|
||||
|
||||
/**上期超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecord(PageData pd)throws Exception{
|
||||
return listmanagerMapper.overTimeRecord(pd);
|
||||
}
|
||||
|
||||
/**上期超期未检查的清单(每日使用)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecordDay(PageData pd)throws Exception{
|
||||
return listmanagerMapper.overTimeRecordDay(pd);
|
||||
}
|
||||
|
||||
/**节假日超期未检查的清单
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> overTimeRecordJjr(PageData pd)throws Exception{
|
||||
return listmanagerMapper.overTimeRecordJjr(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.corp;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CorpInfoService {
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.service.corp.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.corp.CorpInfoMapper;
|
||||
import com.zcloud.service.corp.CorpInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 说明:企业管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CorpInfoServiceImpl implements CorpInfoService {
|
||||
|
||||
@Autowired
|
||||
private CorpInfoMapper corpinfoMapper;
|
||||
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return corpinfoMapper.findById(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.service.hidden;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface HiddenService{
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editDeadline(PageData pd)throws Exception;
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getYestoday(PageData pd)throws Exception;
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> getUserExamine(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.service.hidden.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.hidden.HiddenMapper;
|
||||
import com.zcloud.service.hidden.HiddenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class HiddenServiceImpl implements HiddenService {
|
||||
|
||||
@Autowired
|
||||
private HiddenMapper hiddenMapper;
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editDeadline(PageData pd)throws Exception{
|
||||
hiddenMapper.editDeadline(pd);
|
||||
}
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getYestoday(PageData pd)throws Exception{
|
||||
return hiddenMapper.getYestoday(pd);
|
||||
}
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd)throws Exception{
|
||||
return hiddenMapper.getDeptExamine(pd);
|
||||
}
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception{
|
||||
return hiddenMapper.getUserExamine(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业通知公告
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeCorpService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public List<PageData> listByUserId(Page page) throws Exception;
|
||||
/**列表首页显示通知
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByIndex(Page page)throws Exception;
|
||||
|
||||
|
||||
public int getRedPoint(PageData pd) throws Exception;
|
||||
|
||||
/**获取平台公告(第一条)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getPlaNewNotice(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业公告人员关系表
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeCorpUserService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public void saveAll (PageData pd) throws Exception;
|
||||
void deleteByNotId (PageData pd) throws Exception;
|
||||
List<PageData> getTypeCountByNotId (Page page) throws Exception;
|
||||
/**
|
||||
* 查看用户阅读公告情况
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getUserReadLiser(Page page) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:公告日志
|
||||
* 作者:fjk
|
||||
* 时间:2020-08-31
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface NoticeLogService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllByNoticeId(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getNotAndCorpByNotId(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeManagementService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
public void editIsEnable(PageData pd)throws Exception;
|
||||
public void editUserName(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:通知模板
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface NoticeTemplateService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
public PageData findByCode(PageData pd)throws Exception;
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package com.zcloud.service.notice;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 说明: 通知公告接口
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
* @version
|
||||
*/
|
||||
public interface ServiceNoticeService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
public List<PageData> applistAll(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
public PageData listCountBYBasicinfoID(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**新增通知公告和企业管理表
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveNotAndCorp(PageData pd)throws Exception;
|
||||
/**
|
||||
* 根据公告id获取企业信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getNotAndCorpByNotId (PageData pd) throws Exception;
|
||||
/**
|
||||
* 根据公告删除关系
|
||||
* @param id
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteNotAndCorpByNotId(PageData pd) throws Exception;
|
||||
/**
|
||||
* 根据公告id获取企业信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getNotAndCorpByCorpId (Page page) throws Exception;
|
||||
/**
|
||||
* 统计查看通过企业信息
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getTypeCountByNotId (Page page) throws Exception;
|
||||
/**
|
||||
* 查看公告的阅读状态
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCorpReadType(Page page) throws Exception;
|
||||
|
||||
/**
|
||||
* 修改阅读状态
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
void editCorpInfo(PageData pd) throws Exception;
|
||||
|
||||
|
||||
int getRedPoint(PageData pd) throws Exception;
|
||||
|
||||
|
||||
/**获取最新公告
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getNewNotice(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.NoticeCorpMapper;
|
||||
import com.zcloud.service.notice.NoticeCorpService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业通知公告
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class NoticeCorpServiceImpl implements NoticeCorpService {
|
||||
|
||||
@Autowired
|
||||
private NoticeCorpMapper noticecorpMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticecorpMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticecorpMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticecorpMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticecorpMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticecorpMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticecorpMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
noticecorpMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listByUserId(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticecorpMapper.listByUserId(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listByIndex(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticecorpMapper.listByIndex(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRedPoint(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticecorpMapper.getRedPoint(pd);
|
||||
}
|
||||
|
||||
|
||||
/**获取平台公告(第一条)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getPlaNewNotice(PageData pd)throws Exception{
|
||||
return noticecorpMapper.getPlaNewNotice(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.NoticeCorpUserMapper;
|
||||
import com.zcloud.service.notice.NoticeCorpUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:企业公告人员关系表
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-22
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class NoticeCorpUserServiceImpl implements NoticeCorpUserService {
|
||||
|
||||
@Autowired
|
||||
private NoticeCorpUserMapper noticecorpuseridMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticecorpuseridMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticecorpuseridMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticecorpuseridMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticecorpuseridMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticecorpuseridMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticecorpuseridMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
noticecorpuseridMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAll(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
noticecorpuseridMapper.savaAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByNotId(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
noticecorpuseridMapper.deleteByNotId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getTypeCountByNotId(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticecorpuseridMapper.getTypeCountByNotId(page);
|
||||
}
|
||||
/**
|
||||
* 查看用户阅读公告情况
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getUserReadLiser(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticecorpuseridMapper.getReadUserlistPage(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.NoticeLogMapper;
|
||||
import com.zcloud.service.notice.NoticeLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:公告日志
|
||||
* 作者:fjk
|
||||
* 时间:2020-08-31
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class NoticeLogServiceImpl implements NoticeLogService {
|
||||
|
||||
@Autowired
|
||||
private NoticeLogMapper noticelogMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticelogMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticelogMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticelogMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticelogMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticelogMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticelogMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(PageData pd)throws Exception{
|
||||
noticelogMapper.deleteAll(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllByNoticeId(PageData pd)throws Exception{
|
||||
noticelogMapper.deleteAllByNoticeId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getNotAndCorpByNotId(PageData pd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.NoticeManagementMapper;
|
||||
import com.zcloud.service.notice.NoticeManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class NoticeManagementServiceImpl implements NoticeManagementService {
|
||||
|
||||
@Autowired
|
||||
private NoticeManagementMapper noticemanagementMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticemanagementMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticemanagementMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticemanagementMapper.edit(pd);
|
||||
}
|
||||
public void editIsEnable(PageData pd)throws Exception{
|
||||
noticemanagementMapper.editIsEnable(pd);
|
||||
}
|
||||
public void editUserName(PageData pd)throws Exception{
|
||||
noticemanagementMapper.editUserName(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticemanagementMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticemanagementMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticemanagementMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
noticemanagementMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.NoticeTemplateMapper;
|
||||
import com.zcloud.service.notice.NoticeTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:通知模板
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class NoticeTemplateServiceImpl implements NoticeTemplateService {
|
||||
|
||||
@Autowired
|
||||
private NoticeTemplateMapper noticetemplateMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticetemplateMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticetemplateMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticetemplateMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticetemplateMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticetemplateMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticetemplateMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**通过code取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCode(PageData pd)throws Exception{
|
||||
return noticetemplateMapper.findByCode(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
noticetemplateMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
package com.zcloud.service.notice.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.notice.ServiceNoticeMapper;
|
||||
import com.zcloud.service.notice.ServiceNoticeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 说明: 通知公告接口实现类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
* @version
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class ServiceNoticeServiceImpl implements ServiceNoticeService {
|
||||
|
||||
@Autowired
|
||||
private ServiceNoticeMapper noticeMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
noticeMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
noticeMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
noticeMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return noticeMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return noticeMapper.listAll(pd);
|
||||
}
|
||||
public List<PageData> applistAll(PageData pd)throws Exception{
|
||||
return noticeMapper.applistAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return noticeMapper.findById(pd);
|
||||
}
|
||||
public PageData listCountBYBasicinfoID(PageData pd)throws Exception{
|
||||
return noticeMapper.listCountBYBasicinfoID(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
noticeMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNotAndCorp(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
noticeMapper.saveNotAndCorp(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteNotAndCorpByNotId(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
noticeMapper.delteNotAndCorpByNotId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getNotAndCorpByNotId(PageData pd) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticeMapper.getNotAndCorpByNotId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getNotAndCorpByCorpId(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticeMapper.getNotAndCorpByCorpIddatalistPage(page);
|
||||
}
|
||||
/**
|
||||
* 统计查看通过企业信息
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getTypeCountByNotId(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticeMapper.getTypeCountByNotId(page);
|
||||
}
|
||||
/**
|
||||
* 查看公告的阅读状态
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getCorpReadType(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return noticeMapper.getCorpReadTypelistPage(page);
|
||||
}
|
||||
/**
|
||||
* 修改阅读状态
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editCorpInfo(PageData pd) throws Exception{
|
||||
noticeMapper.editCorpInfo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRedPoint(PageData pd)throws Exception{
|
||||
return noticeMapper.getRedPoint(pd);
|
||||
}
|
||||
|
||||
/**获取最新公告
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getNewNotice(PageData pd)throws Exception{
|
||||
return noticeMapper.getNewNotice(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.service.pe;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PerformanceExamineDeptService {
|
||||
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveBatch(List<PageData> list)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.pe;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PerformanceExamineUserService {
|
||||
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveBatch(List<PageData> list)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.service.pe.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.pe.PerformanceExamineDeptMapper;
|
||||
import com.zcloud.service.pe.PerformanceExamineDeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class PerformanceExamineDeptServiceImpl implements PerformanceExamineDeptService {
|
||||
|
||||
@Autowired
|
||||
private PerformanceExamineDeptMapper performanceexamineDeptMapper;
|
||||
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveBatch(List<PageData> list)throws Exception{
|
||||
performanceexamineDeptMapper.saveBatch(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.service.pe.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.pe.PerformanceExamineUserMapper;
|
||||
import com.zcloud.service.pe.PerformanceExamineUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端绩效考核
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-05-27
|
||||
* 官网:www.zcloudchina.com1
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class PerformanceExamineUserServiceImpl implements PerformanceExamineUserService {
|
||||
|
||||
@Autowired
|
||||
private PerformanceExamineUserMapper performanceexamineUserMapper;
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveBatch(List<PageData> list)throws Exception{
|
||||
performanceexamineUserMapper.saveBatch(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.service.risk;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:风险点台账
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-29
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface RiskPointAnalysisService {
|
||||
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> getUserExamine(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.zcloud.service.risk.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.risk.RiskPointAnalysisMapper;
|
||||
import com.zcloud.service.risk.RiskPointAnalysisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:风险点台账
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-29
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class RiskPointAnalysisServiceImpl implements RiskPointAnalysisService {
|
||||
|
||||
@Autowired
|
||||
private RiskPointAnalysisMapper riskpointAnalysisMapper;
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd) throws Exception {
|
||||
return riskpointAnalysisMapper.getDeptExamine(pd);
|
||||
}
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception {
|
||||
return riskpointAnalysisMapper.getUserExamine(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.zcloud.service.sms;
|
||||
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MSMLoginService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int msUsedCount(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public void addForAliSmsUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception;
|
||||
|
||||
public void addForAliSmsLimitUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception;
|
||||
|
||||
public void addForAliSmsToolUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms, List<PageData> paramsList) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.zcloud.service.sms;
|
||||
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSLogService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int msUsedCount(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public void addForAliSmsUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception;
|
||||
|
||||
public void addForAliSmsLimitUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception;
|
||||
|
||||
public void addForAliSmsToolUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms, List<PageData> paramsList) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.service.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSManagementService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
public void editIsEnable(PageData pd)throws Exception;
|
||||
public void editUserName(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.service.sms;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信开通日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-03-23
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SMSOpenLogService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
package com.zcloud.service.sms.impl;
|
||||
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.sms.MSMLoginMapper;
|
||||
import com.zcloud.service.sms.MSMLoginService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MSMLoginServiceImpl implements MSMLoginService {
|
||||
|
||||
@Autowired
|
||||
private MSMLoginMapper msmloginMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
msmloginMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
msmloginMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
msmloginMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return msmloginMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return msmloginMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int msUsedCount(PageData pd)throws Exception{
|
||||
return msmloginMapper.msUsedCount(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return msmloginMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
msmloginMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
/**
|
||||
* 发生短信的日志
|
||||
*/
|
||||
public void addForAliSmsUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
if(sendmap.get("type").equals("1")) {
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {
|
||||
//request.setTemplateParam("{\"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {
|
||||
retMess.append("corpname:"+sendmap.get("corpname").toString()+";");
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
retMess.append("month:"+sendmap.get("month").toString()+";");
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {
|
||||
|
||||
retMess.append("pname:"+sendmap.get("pname").toString()+";");
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
retMess.append("month:"+sendmap.get("month").toString()+";");
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("5")) {
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生有限空间审核表短信的日志
|
||||
*/
|
||||
public void addForAliSmsLimitUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
if(sendmap.get("type").equals("1")) {
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {
|
||||
retMess.append("tname:"+sendmap.get("tname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {
|
||||
retMess.append("tname:"+sendmap.get("tname").toString()+";");
|
||||
retMess.append("sname:"+sendmap.get("sname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {
|
||||
retMess.append("tsname:"+sendmap.get("sname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过短信工具类发送的短信日志
|
||||
*/
|
||||
public void addForAliSmsToolUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms, List<PageData> paramsList) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
// 遍历参数
|
||||
if(paramsList != null && paramsList.size() > 0) {
|
||||
for(PageData par: paramsList) {
|
||||
retMess.append(par.get("name").toString()+":"+par.get("value").toString()+";");
|
||||
}
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
package com.zcloud.service.sms.impl;
|
||||
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.sms.SMSLogMapper;
|
||||
import com.zcloud.service.sms.SMSLogService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 说明:短信记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-02-26
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class SMSLogServiceImpl implements SMSLogService {
|
||||
|
||||
@Autowired
|
||||
private SMSLogMapper msmloginMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
msmloginMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
msmloginMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
msmloginMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return msmloginMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return msmloginMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**本公司已发送短信数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public int msUsedCount(PageData pd)throws Exception{
|
||||
return msmloginMapper.msUsedCount(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return msmloginMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
msmloginMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
/**
|
||||
* 发生短信的日志
|
||||
*/
|
||||
public void addForAliSmsUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
if(sendmap.get("type").equals("1")) {
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {
|
||||
//request.setTemplateParam("{\"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {
|
||||
retMess.append("corpname:"+sendmap.get("corpname").toString()+";");
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
retMess.append("month:"+sendmap.get("month").toString()+";");
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {
|
||||
|
||||
retMess.append("pname:"+sendmap.get("pname").toString()+";");
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
retMess.append("month:"+sendmap.get("month").toString()+";");
|
||||
retMess.append("time:"+sendmap.get("time").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("5")) {
|
||||
retMess.append("qname:"+sendmap.get("qname").toString()+";");
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生有限空间审核表短信的日志
|
||||
*/
|
||||
public void addForAliSmsLimitUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms ) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
if(sendmap.get("type").equals("1")) {
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {
|
||||
retMess.append("tname:"+sendmap.get("tname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {
|
||||
retMess.append("tname:"+sendmap.get("tname").toString()+";");
|
||||
retMess.append("sname:"+sendmap.get("sname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {
|
||||
retMess.append("tsname:"+sendmap.get("sname").toString()+";");
|
||||
retMess.append("name:"+sendmap.get("name").toString()+";");
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过短信工具类发送的短信日志
|
||||
*/
|
||||
public void addForAliSmsToolUtil(Map<String ,Object> sendmap , String corpInfoId , SendSmsResponse ssms, List<PageData> paramsList) throws Exception{
|
||||
StringBuffer retMess = new StringBuffer();
|
||||
// 遍历参数
|
||||
if(paramsList != null && paramsList.size() > 0) {
|
||||
for(PageData par: paramsList) {
|
||||
retMess.append(par.get("name").toString()+":"+par.get("value").toString()+";");
|
||||
}
|
||||
}
|
||||
retMess.append("requestId:"+ssms.getRequestId()+";");
|
||||
retMess.append("bizId:"+ssms.getBizId()+";");
|
||||
retMess.append("code:"+ssms.getCode()+";");
|
||||
retMess.append("message:"+ssms.getMessage()+";");
|
||||
|
||||
String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
|
||||
|
||||
PageData pd = new PageData();
|
||||
pd.put("MSMLOGIN_ID", uuid); //主键
|
||||
pd.put("PHONE", sendmap.get("phone").toString());
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("CONTENT", sendmap.get("templateCode").toString());
|
||||
pd.put("STATE", ssms.getCode());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("CORPINFO_ID", corpInfoId);
|
||||
pd.put("RET_MESSAGE", retMess.toString());
|
||||
this.save(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.zcloud.service.sms.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.sms.SMSManagementMapper;
|
||||
import com.zcloud.service.sms.SMSManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class SMSManagementServiceImpl implements SMSManagementService {
|
||||
|
||||
@Autowired
|
||||
private SMSManagementMapper smsmanagementMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
smsmanagementMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
smsmanagementMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
smsmanagementMapper.edit(pd);
|
||||
}
|
||||
public void editIsEnable(PageData pd)throws Exception{
|
||||
smsmanagementMapper.editIsEnable(pd);
|
||||
}
|
||||
public void editUserName(PageData pd)throws Exception{
|
||||
smsmanagementMapper.editUserName(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return smsmanagementMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return smsmanagementMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return smsmanagementMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
smsmanagementMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.service.sms.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.sms.SMSOpenLogMapper;
|
||||
import com.zcloud.service.sms.SMSOpenLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:短信开通日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-03-23
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class SMSOpenLogServiceImpl implements SMSOpenLogService {
|
||||
|
||||
@Autowired
|
||||
private SMSOpenLogMapper smsopenlogMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
smsopenlogMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
smsopenlogMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
smsopenlogMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return smsopenlogMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return smsopenlogMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return smsopenlogMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
smsopenlogMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.service.speEquip;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:特种设备管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SpecialEquipmentService{
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.service.speEquip;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:特种设备安全巡检管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface SpecialEquipmentWxjService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.service.speEquip.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.speEquip.SpecialEquipmentMapper;
|
||||
import com.zcloud.service.speEquip.SpecialEquipmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:特种设备管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class SpecialEquipmentServiceImpl implements SpecialEquipmentService {
|
||||
|
||||
@Autowired
|
||||
private SpecialEquipmentMapper specialequipmentMapper;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
specialequipmentMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return specialequipmentMapper.listAll(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.service.speEquip.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.speEquip.SpecialEquipmentWxjMapper;
|
||||
import com.zcloud.service.speEquip.SpecialEquipmentWxjService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 说明:特种设备安全巡检管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class SpecialEquipmentWxjServiceImpl implements SpecialEquipmentWxjService {
|
||||
|
||||
@Autowired
|
||||
private SpecialEquipmentWxjMapper specialequipmentwxjMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
specialequipmentwxjMapper.save(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.zcloud.service.statistics;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单统计记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface ListStatisticsService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deletewl(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountList(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**定时器查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCondition(PageData pd)throws Exception;
|
||||
|
||||
|
||||
public PageData getTimeAstrict(PageData pd)throws Exception;
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countStaByUser(PageData pd)throws Exception;
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countSta(PageData pd)throws Exception;
|
||||
|
||||
/**检查情况列表
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> checkSituation(PageData pd)throws Exception;
|
||||
/**人员应处理清单个数(节假日清单数算1)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countListStaByUser(PageData pd)throws Exception;
|
||||
|
||||
/**人员应处理清单数(各周期)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countByPeriodUser(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listAllForPlan(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.zcloud.service.statistics;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface StatisticsService {
|
||||
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
package com.zcloud.service.statistics.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.statistics.ListStatisticsMapper;
|
||||
import com.zcloud.service.statistics.ListStatisticsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:清单统计记录
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class ListStatisticsServiceImpl implements ListStatisticsService {
|
||||
|
||||
@Autowired
|
||||
private ListStatisticsMapper listStatisticsMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
listStatisticsMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
listStatisticsMapper.delete(pd);
|
||||
}
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deletewl(PageData pd)throws Exception{
|
||||
listStatisticsMapper.deletewl(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
listStatisticsMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return listStatisticsMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
listStatisticsMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**定时器查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public PageData findByCondition(PageData pd) throws Exception {
|
||||
/* PageData ls = new PageData();
|
||||
List<PageData> lsList = listStatisticsMapper.findByCondition(pd);
|
||||
if(lsList != null && lsList.size() > 0) {
|
||||
ls = lsList.get(0);
|
||||
}*/
|
||||
return listStatisticsMapper.findByCondition(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCountList(PageData pd) throws Exception {
|
||||
return listStatisticsMapper.getCountList(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getTimeAstrict(PageData pd) throws Exception {
|
||||
return listStatisticsMapper.getTimeAstrict(pd);
|
||||
}
|
||||
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countStaByUser(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.countStaByUser(pd);
|
||||
}
|
||||
|
||||
/**人员应处理清单数
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countSta(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.countSta(pd);
|
||||
}
|
||||
|
||||
/**检查情况列表
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> checkSituation(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.checkSituation(pd);
|
||||
}
|
||||
|
||||
/**人员应处理清单个数(节假日清单数算1)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countListStaByUser(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.countListStaByUser(pd);
|
||||
}
|
||||
/**人员应处理清单数(各周期)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> countByPeriodUser(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.countByPeriodUser(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listAllForPlan(PageData pd)throws Exception{
|
||||
return listStatisticsMapper.listAllForPlan(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.statistics.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.statistics.StatisticsMapper;
|
||||
import com.zcloud.service.statistics.StatisticsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class StatisticsServiceImpl implements StatisticsService {
|
||||
@Autowired
|
||||
private StatisticsMapper statisticsMapper;
|
||||
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
|
||||
|
||||
return statisticsMapper.listAll(pd);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明: 组织机构接接口
|
||||
* 创建人:FH Q313596790
|
||||
* 官网:
|
||||
*/
|
||||
public interface DepartmentService{
|
||||
|
||||
/**通过条件获取全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户服务接口
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface UsersService {
|
||||
|
||||
/**通过用户ID获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUser(PageData pd)throws Exception;
|
||||
|
||||
/**查询用户倒班周期数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getUserWork(PageData pd)throws Exception;
|
||||
|
||||
/**修改用户倒班周期
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editShiftWork(PageData pd) throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.DepartmentMapper;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明: 组织机构
|
||||
* 创建人:FH Q313596790
|
||||
* 官网:
|
||||
*/
|
||||
@Service(value="departmentService")
|
||||
@Transactional //开启事物
|
||||
public class DepartmentServiceImpl implements DepartmentService {
|
||||
|
||||
@Autowired
|
||||
private DepartmentMapper departmentMapper;
|
||||
|
||||
/**通过条件获取全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return (List<PageData>)departmentMapper.listAll(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户服务接口实现类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UsersServiceImpl implements UsersService {
|
||||
|
||||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
|
||||
/**通过用户ID获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return usersMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUser(PageData pd)throws Exception{
|
||||
return usersMapper.listAllUser(pd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询用户倒班周期数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getUserWork(PageData pd) throws Exception {
|
||||
return usersMapper.getUserWork(pd);
|
||||
}
|
||||
|
||||
/**修改用户倒班周期
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editShiftWork(PageData pd) {
|
||||
usersMapper.editShiftWork(pd);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.service.task;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:在线学习考试-任务
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-20
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface StudyTaskService {
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> getUserExamine(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.zcloud.service.task.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.task.StudyTaskMapper;
|
||||
import com.zcloud.service.task.StudyTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:在线学习考试-任务
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-12-20
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class StudyTaskServiceImpl implements StudyTaskService {
|
||||
|
||||
@Autowired
|
||||
private StudyTaskMapper studytaskMapper;
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd)throws Exception{
|
||||
return studytaskMapper.getDeptExamine(pd);
|
||||
}
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception{
|
||||
return studytaskMapper.getUserExamine(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
// 有限空间发送短信工具类
|
||||
public class AliSmsLimitUtil {
|
||||
|
||||
//产品名称:云通信短信API产品,开发者无需替换
|
||||
static final String product = "Dysmsapi";
|
||||
//产品域名,开发者无需替换
|
||||
static final String domain = "dysmsapi.aliyuncs.com";
|
||||
|
||||
// TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
|
||||
static final String accessKeyId = "LTAI5tK134ZzXPEwykAdpVn2";//LTAI4G7hRf3LqVGvobYRFxW2
|
||||
static final String accessKeySecret = "XCEMY8FG52cXImFMeIiH4tDJ9BIN3N";//T43mhQvHiEPt9oBmWP3BLFuqtaYKhr
|
||||
|
||||
public static SendSmsResponse sendSms(Map<String,Object> sendmap) throws ClientException {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
// String alipaysms = Tools.readTxtFile("admin/config/alipaysms.txt");//读取WEBSOCKET配置
|
||||
// if(null != alipaysms && !"".equals(alipaysms)){
|
||||
// String strIW[] = alipaysms.split(",");
|
||||
// if(strIW.length == 3){
|
||||
// map.put("phoneNumber", strIW[0]); //待发送手机号
|
||||
// map.put("signName", strIW[1]); //短信签名
|
||||
// map.put("templateCode", strIW[2]); //短信模板
|
||||
// }
|
||||
// }
|
||||
//组装请求对象-具体描述见控制台-文档部分内容
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
//必填:待发送手机号18630110835
|
||||
request.setPhoneNumbers(sendmap.get("phone").toString());
|
||||
//必填:短信签名-可在短信控制台中找到
|
||||
request.setSignName("秦安双控");
|
||||
//必填:短信模板-可在短信控制台中找到
|
||||
request.setTemplateCode(sendmap.get("templateCode").toString());
|
||||
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
|
||||
// if(sendmap.get("paytype").toString().equals("zfb")){
|
||||
// paytype="支付宝";
|
||||
// }else{
|
||||
// paytype="网银";
|
||||
// }
|
||||
if(sendmap.get("type").equals("1")) {// 确认通知、确认打回、审批驳回
|
||||
request.setTemplateParam("{\"name\":\""+sendmap.get("name").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {// 通知审批
|
||||
request.setTemplateParam("{\"tname\":\""+sendmap.get("tname").toString()+"\", \"name\":\""+sendmap.get("name").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {// 审批通过-通知检测人
|
||||
request.setTemplateParam("{\"tname\":\""+sendmap.get("tname").toString()+"\", \"sname\":\""+sendmap.get("sname").toString()+"\", \"name\":\""+sendmap.get("name").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {// 审批通过-通知申请人
|
||||
request.setTemplateParam("{\"sname\":\""+sendmap.get("sname").toString()+"\", \"name\":\""+sendmap.get("name").toString()+"\"}");
|
||||
}
|
||||
//request.setTemplateParam("{\"code\":\""+234+"\",\"\code\":\""+234+"\"}");
|
||||
//选填-上行短信扩展码(无特殊需求用户请忽略此字段)
|
||||
//request.setSmsUpExtendCode("90997");
|
||||
|
||||
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
|
||||
request.setOutId("yourOutId");
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
|
||||
return sendSmsResponse;
|
||||
}
|
||||
|
||||
public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException {
|
||||
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
|
||||
//组装请求对象
|
||||
QuerySendDetailsRequest request = new QuerySendDetailsRequest();
|
||||
//必填-号码
|
||||
request.setPhoneNumber("18630363710");
|
||||
//可选-流水号
|
||||
request.setBizId(bizId);
|
||||
//必填-发送日期 支持30天内记录查询,格式yyyyMMdd
|
||||
SimpleDateFormat ft = new SimpleDateFormat("yyyyMMdd");
|
||||
request.setSendDate(ft.format(new Date()));
|
||||
//必填-页大小
|
||||
request.setPageSize(10L);
|
||||
//必填-当前页码从1开始计数
|
||||
request.setCurrentPage(1L);
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
QuerySendDetailsResponse querySendDetailsResponse = acsClient.getAcsResponse(request);
|
||||
|
||||
return querySendDetailsResponse;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClientException, InterruptedException {
|
||||
//发短信
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("infoDetail", "阿斯顿发");
|
||||
map.put("phone", "18630363710");
|
||||
map.put("infoType", "阿三地方");
|
||||
SendSmsResponse response = sendSms(map);
|
||||
System.out.println("短信接口返回的数据----------------");
|
||||
System.out.println("Code=" + response.getCode());
|
||||
System.out.println("Message=" + response.getMessage());
|
||||
System.out.println("RequestId=" + response.getRequestId());
|
||||
System.out.println("BizId=" + response.getBizId());
|
||||
|
||||
Thread.sleep(3000L);
|
||||
|
||||
//查明细
|
||||
if(response.getCode() != null && response.getCode().equals("OK")) {
|
||||
QuerySendDetailsResponse querySendDetailsResponse = querySendDetails(response.getBizId());
|
||||
System.out.println("短信明细查询接口返回数据----------------");
|
||||
System.out.println("Code=" + querySendDetailsResponse.getCode());
|
||||
System.out.println("Message=" + querySendDetailsResponse.getMessage());
|
||||
int i = 0;
|
||||
for(QuerySendDetailsResponse.SmsSendDetailDTO smsSendDetailDTO : querySendDetailsResponse.getSmsSendDetailDTOs())
|
||||
{
|
||||
System.out.println("SmsSendDetailDTO["+i+"]:");
|
||||
System.out.println("Content=" + smsSendDetailDTO.getContent());
|
||||
System.out.println("ErrCode=" + smsSendDetailDTO.getErrCode());
|
||||
System.out.println("OutId=" + smsSendDetailDTO.getOutId());
|
||||
System.out.println("PhoneNum=" + smsSendDetailDTO.getPhoneNum());
|
||||
System.out.println("ReceiveDate=" + smsSendDetailDTO.getReceiveDate());
|
||||
System.out.println("SendDate=" + smsSendDetailDTO.getSendDate());
|
||||
System.out.println("SendStatus=" + smsSendDetailDTO.getSendStatus());
|
||||
System.out.println("Template=" + smsSendDetailDTO.getTemplateCode());
|
||||
}
|
||||
System.out.println("TotalCount=" + querySendDetailsResponse.getTotalCount());
|
||||
System.out.println("RequestId=" + querySendDetailsResponse.getRequestId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
// 有限空间发送短信工具类
|
||||
public class AliSmsToolUtil {
|
||||
|
||||
//产品名称:云通信短信API产品,开发者无需替换
|
||||
static final String product = "Dysmsapi";
|
||||
//产品域名,开发者无需替换
|
||||
static final String domain = "dysmsapi.aliyuncs.com";
|
||||
|
||||
// TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
|
||||
static final String accessKeyId = "LTAI5tK134ZzXPEwykAdpVn2";//LTAI4G7hRf3LqVGvobYRFxW2
|
||||
static final String accessKeySecret = "XCEMY8FG52cXImFMeIiH4tDJ9BIN3N";//T43mhQvHiEPt9oBmWP3BLFuqtaYKhr
|
||||
|
||||
public static SendSmsResponse sendSms(Map<String,Object> sendmap, List<PageData> paramsList) throws ClientException {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
// String alipaysms = Tools.readTxtFile("admin/config/alipaysms.txt");//读取WEBSOCKET配置
|
||||
// if(null != alipaysms && !"".equals(alipaysms)){
|
||||
// String strIW[] = alipaysms.split(",");
|
||||
// if(strIW.length == 3){
|
||||
// map.put("phoneNumber", strIW[0]); //待发送手机号
|
||||
// map.put("signName", strIW[1]); //短信签名
|
||||
// map.put("templateCode", strIW[2]); //短信模板
|
||||
// }
|
||||
// }
|
||||
//组装请求对象-具体描述见控制台-文档部分内容
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
//必填:待发送手机号18630110835
|
||||
request.setPhoneNumbers(sendmap.get("phone").toString());
|
||||
//必填:短信签名-可在短信控制台中找到
|
||||
request.setSignName("秦安双控");
|
||||
//必填:短信模板-可在短信控制台中找到
|
||||
request.setTemplateCode(sendmap.get("templateCode").toString());
|
||||
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
|
||||
// if(sendmap.get("paytype").toString().equals("zfb")){
|
||||
// paytype="支付宝";
|
||||
// }else{
|
||||
// paytype="网银";
|
||||
// }
|
||||
// 遍历参数
|
||||
if(paramsList != null && paramsList.size() > 0) {
|
||||
StringBuffer parStr = new StringBuffer();
|
||||
for(PageData par: paramsList) {
|
||||
par.toString();
|
||||
parStr.append("\""+par.get("name").toString()+"\":\""+par.get("value").toString()+"\", ");
|
||||
}
|
||||
request.setTemplateParam("{"+parStr.substring(0, parStr.length() -2)+"}");
|
||||
} else {
|
||||
request.setTemplateParam("{}");
|
||||
}
|
||||
//request.setTemplateParam("{\"code\":\""+234+"\",\"\code\":\""+234+"\"}");
|
||||
//选填-上行短信扩展码(无特殊需求用户请忽略此字段)
|
||||
//request.setSmsUpExtendCode("90997");
|
||||
|
||||
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
|
||||
request.setOutId("yourOutId");
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
|
||||
return sendSmsResponse;
|
||||
}
|
||||
|
||||
public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException {
|
||||
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
|
||||
//组装请求对象
|
||||
QuerySendDetailsRequest request = new QuerySendDetailsRequest();
|
||||
//必填-号码
|
||||
request.setPhoneNumber("18630363710");
|
||||
//可选-流水号
|
||||
request.setBizId(bizId);
|
||||
//必填-发送日期 支持30天内记录查询,格式yyyyMMdd
|
||||
SimpleDateFormat ft = new SimpleDateFormat("yyyyMMdd");
|
||||
request.setSendDate(ft.format(new Date()));
|
||||
//必填-页大小
|
||||
request.setPageSize(10L);
|
||||
//必填-当前页码从1开始计数
|
||||
request.setCurrentPage(1L);
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
QuerySendDetailsResponse querySendDetailsResponse = acsClient.getAcsResponse(request);
|
||||
|
||||
return querySendDetailsResponse;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClientException, InterruptedException {
|
||||
//发短信
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("infoDetail", "阿斯顿发");
|
||||
map.put("phone", "18630363710");
|
||||
map.put("infoType", "阿三地方");
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
SendSmsResponse response = sendSms(map,paramsList);
|
||||
System.out.println("短信接口返回的数据----------------");
|
||||
System.out.println("Code=" + response.getCode());
|
||||
System.out.println("Message=" + response.getMessage());
|
||||
System.out.println("RequestId=" + response.getRequestId());
|
||||
System.out.println("BizId=" + response.getBizId());
|
||||
|
||||
Thread.sleep(3000L);
|
||||
|
||||
//查明细
|
||||
if(response.getCode() != null && response.getCode().equals("OK")) {
|
||||
QuerySendDetailsResponse querySendDetailsResponse = querySendDetails(response.getBizId());
|
||||
System.out.println("短信明细查询接口返回数据----------------");
|
||||
System.out.println("Code=" + querySendDetailsResponse.getCode());
|
||||
System.out.println("Message=" + querySendDetailsResponse.getMessage());
|
||||
int i = 0;
|
||||
for(QuerySendDetailsResponse.SmsSendDetailDTO smsSendDetailDTO : querySendDetailsResponse.getSmsSendDetailDTOs())
|
||||
{
|
||||
System.out.println("SmsSendDetailDTO["+i+"]:");
|
||||
System.out.println("Content=" + smsSendDetailDTO.getContent());
|
||||
System.out.println("ErrCode=" + smsSendDetailDTO.getErrCode());
|
||||
System.out.println("OutId=" + smsSendDetailDTO.getOutId());
|
||||
System.out.println("PhoneNum=" + smsSendDetailDTO.getPhoneNum());
|
||||
System.out.println("ReceiveDate=" + smsSendDetailDTO.getReceiveDate());
|
||||
System.out.println("SendDate=" + smsSendDetailDTO.getSendDate());
|
||||
System.out.println("SendStatus=" + smsSendDetailDTO.getSendStatus());
|
||||
System.out.println("Template=" + smsSendDetailDTO.getTemplateCode());
|
||||
}
|
||||
System.out.println("TotalCount=" + querySendDetailsResponse.getTotalCount());
|
||||
System.out.println("RequestId=" + querySendDetailsResponse.getRequestId());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AliSmsUtil {
|
||||
|
||||
//产品名称:云通信短信API产品,开发者无需替换
|
||||
static final String product = "Dysmsapi";
|
||||
//产品域名,开发者无需替换
|
||||
static final String domain = "dysmsapi.aliyuncs.com";
|
||||
|
||||
// TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
|
||||
static final String accessKeyId = "LTAI5tK134ZzXPEwykAdpVn2";//LTAI4G7hRf3LqVGvobYRFxW2
|
||||
static final String accessKeySecret = "XCEMY8FG52cXImFMeIiH4tDJ9BIN3N";//T43mhQvHiEPt9oBmWP3BLFuqtaYKhr
|
||||
|
||||
public static SendSmsResponse sendSms(Map<String,Object> sendmap) throws ClientException {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
// String alipaysms = Tools.readTxtFile("admin/config/alipaysms.txt");//读取WEBSOCKET配置
|
||||
// if(null != alipaysms && !"".equals(alipaysms)){
|
||||
// String strIW[] = alipaysms.split(",");
|
||||
// if(strIW.length == 3){
|
||||
// map.put("phoneNumber", strIW[0]); //待发送手机号
|
||||
// map.put("signName", strIW[1]); //短信签名
|
||||
// map.put("templateCode", strIW[2]); //短信模板
|
||||
// }
|
||||
// }
|
||||
//组装请求对象-具体描述见控制台-文档部分内容
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
//必填:待发送手机号18630110835
|
||||
request.setPhoneNumbers(sendmap.get("phone").toString());
|
||||
//必填:短信签名-可在短信控制台中找到
|
||||
request.setSignName("秦安双控");
|
||||
//必填:短信模板-可在短信控制台中找到
|
||||
request.setTemplateCode(sendmap.get("templateCode").toString());
|
||||
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
|
||||
// if(sendmap.get("paytype").toString().equals("zfb")){
|
||||
// paytype="支付宝";
|
||||
// }else{
|
||||
// paytype="网银";
|
||||
// }
|
||||
if(sendmap.get("type").equals("1")) {
|
||||
request.setTemplateParam("{\"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("2")) {
|
||||
//request.setTemplateParam("{\"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("3")) {
|
||||
request.setTemplateParam("{\"corpname\":\""+sendmap.get("corpname").toString()+"\", \"qname\":\""+sendmap.get("qname").toString()+"\", \"month\":\""+sendmap.get("month").toString()+"\", \"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("4")) {
|
||||
request.setTemplateParam("{\"pname\":\""+sendmap.get("pname").toString()+"\", \"qname\":\""+sendmap.get("qname").toString()+"\", \"month\":\""+sendmap.get("month").toString()+"\", \"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("5")) {//工作任务提醒
|
||||
request.setTemplateParam("{\"pname\":\""+sendmap.get("pname").toString()+"\", \"qname\":\""+sendmap.get("qname").toString()+"\", \"month\":\""+sendmap.get("month").toString()+"\", \"time\":\""+sendmap.get("time").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("6")) {
|
||||
request.setTemplateParam("{\"qname\":\""+sendmap.get("qname").toString()+"\"}");
|
||||
}
|
||||
if(sendmap.get("type").equals("7")) {//工作任务提醒
|
||||
request.setTemplateParam("{\"day\":\""+sendmap.get("day").toString()+"\", \"investigate\":\""+sendmap.get("investigate").toString()+"\"}");
|
||||
}
|
||||
//request.setTemplateParam("{\"code\":\""+234+"\",\"\code\":\""+234+"\"}");
|
||||
//选填-上行短信扩展码(无特殊需求用户请忽略此字段)
|
||||
//request.setSmsUpExtendCode("90997");
|
||||
|
||||
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
|
||||
request.setOutId("yourOutId");
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
|
||||
return sendSmsResponse;
|
||||
}
|
||||
|
||||
public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException {
|
||||
|
||||
//可自助调整超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
//初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
|
||||
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
|
||||
//组装请求对象
|
||||
QuerySendDetailsRequest request = new QuerySendDetailsRequest();
|
||||
//必填-号码
|
||||
request.setPhoneNumber("18630363710");
|
||||
//可选-流水号
|
||||
request.setBizId(bizId);
|
||||
//必填-发送日期 支持30天内记录查询,格式yyyyMMdd
|
||||
SimpleDateFormat ft = new SimpleDateFormat("yyyyMMdd");
|
||||
request.setSendDate(ft.format(new Date()));
|
||||
//必填-页大小
|
||||
request.setPageSize(10L);
|
||||
//必填-当前页码从1开始计数
|
||||
request.setCurrentPage(1L);
|
||||
|
||||
//hint 此处可能会抛出异常,注意catch
|
||||
QuerySendDetailsResponse querySendDetailsResponse = acsClient.getAcsResponse(request);
|
||||
|
||||
return querySendDetailsResponse;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClientException, InterruptedException {
|
||||
//发短信
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
map.put("infoDetail", "阿斯顿发");
|
||||
map.put("phone", "18630363710");
|
||||
map.put("infoType", "阿三地方");
|
||||
SendSmsResponse response = sendSms(map);
|
||||
System.out.println("短信接口返回的数据----------------");
|
||||
System.out.println("Code=" + response.getCode());
|
||||
System.out.println("Message=" + response.getMessage());
|
||||
System.out.println("RequestId=" + response.getRequestId());
|
||||
System.out.println("BizId=" + response.getBizId());
|
||||
|
||||
Thread.sleep(3000L);
|
||||
|
||||
//查明细
|
||||
if(response.getCode() != null && response.getCode().equals("OK")) {
|
||||
QuerySendDetailsResponse querySendDetailsResponse = querySendDetails(response.getBizId());
|
||||
System.out.println("短信明细查询接口返回数据----------------");
|
||||
System.out.println("Code=" + querySendDetailsResponse.getCode());
|
||||
System.out.println("Message=" + querySendDetailsResponse.getMessage());
|
||||
int i = 0;
|
||||
for(QuerySendDetailsResponse.SmsSendDetailDTO smsSendDetailDTO : querySendDetailsResponse.getSmsSendDetailDTOs())
|
||||
{
|
||||
System.out.println("SmsSendDetailDTO["+i+"]:");
|
||||
System.out.println("Content=" + smsSendDetailDTO.getContent());
|
||||
System.out.println("ErrCode=" + smsSendDetailDTO.getErrCode());
|
||||
System.out.println("OutId=" + smsSendDetailDTO.getOutId());
|
||||
System.out.println("PhoneNum=" + smsSendDetailDTO.getPhoneNum());
|
||||
System.out.println("ReceiveDate=" + smsSendDetailDTO.getReceiveDate());
|
||||
System.out.println("SendDate=" + smsSendDetailDTO.getSendDate());
|
||||
System.out.println("SendStatus=" + smsSendDetailDTO.getSendStatus());
|
||||
System.out.println("Template=" + smsSendDetailDTO.getTemplateCode());
|
||||
}
|
||||
System.out.println("TotalCount=" + querySendDetailsResponse.getTotalCount());
|
||||
System.out.println("RequestId=" + querySendDetailsResponse.getRequestId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
/**
|
||||
* 说明:常量
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class Const {
|
||||
|
||||
public static final String SESSION_USER = "SESSION_USER"; //session用的用户
|
||||
public static final String SESSION_USERROL = "SESSION_USERROL"; //用户对象(包含角色信息)
|
||||
public static final String SESSION_ROLE_RIGHTS = "SESSION_ROLE_RIGHTS"; //角色菜单权限
|
||||
public static final String SHIROSET = "SHIROSET"; //菜单权限标识
|
||||
public static final String SESSION_USERNAME = "USERNAME"; //用户名
|
||||
public static final String SESSION_U_NAME = "SESSION_U_NAME"; //用户姓名
|
||||
public static final String SESSION_ROLE = "SESSION_ROLE"; //主职角色信息
|
||||
public static final String SESSION_RNUMBERS = "RNUMBERS"; //角色编码数组
|
||||
public static final String SESSION_ALLMENU = "SESSION_ALLMENU"; //全部菜单
|
||||
public static final String SKIN = "SKIN"; //用户皮肤
|
||||
|
||||
public static final String SYSSET = "config/sysSet.ini"; //系统设置配置文件路径
|
||||
public static final String SYSNAME = "sysName"; //系统名称
|
||||
public static final String SHOWCOUNT = "showCount"; //每页条数
|
||||
|
||||
public static final String FILEPATHFILE = "/uploadFiles/file/"; //文件上传路径
|
||||
public static final String BIFILEPATHFILE = "/uploadFiles/Bfile/"; //文件上传路径
|
||||
public static final String FILEPATHIMG = "/uploadFiles/imgs/"; //图片上传路径
|
||||
public static final String FILEPATHIMGSPECIAL = "/uploadFiles/imgs/special/"; //图片上传路径(特种装备)
|
||||
public static final String FILEPATHDZJM = "/uploadFiles/dzjm/"; //图片上传路径
|
||||
public static final String FILEPATHYHTP = "/uploadFiles/yhtp/"; //图片上传路径
|
||||
public static final String FILEPATHFXSST = "/uploadFiles/fxsst/"; //图片上传路径 风险四色图
|
||||
|
||||
public static final String FILEACTIVITI = "/uploadFiles/activitiFile/"; //工作流生成XML和PNG目录
|
||||
|
||||
public static final String DEPARTMENT_IDS = "DEPARTMENT_IDS"; //当前用户拥有的最高部门权限集合
|
||||
public static final String DEPARTMENT_ID = "DEPARTMENT_ID"; //当前用户拥有的最高部门权限
|
||||
public static final String CORPINFO_ID = "CORPINFO_ID"; //当前用户所属企业
|
||||
public static final String POST_ID = "POST_ID"; //当前用户所属企业
|
||||
public static final String PRECINCT_ID = "PRECINCT_ID"; //当前用户拥有的最高部门权限
|
||||
public static final String USER_ID = "USER_ID"; //当前用户userid
|
||||
public static final String IS_MAIN = "IS_MAIN"; //是否主账号
|
||||
public static final String ISSUPERVISE = "ISSUPERVISE"; //是否监管部门
|
||||
|
||||
public static final String CORP_TRAINTYPE = "CORP_TRAINTYPE"; //当前用户所属企业的培训行业类型
|
||||
public static final String VIPLEVEL = "VIPLEVEL"; //当前用户所属企业的培训行业类型
|
||||
|
||||
|
||||
public static final String FILEURL = "/mnt/qyag/file/"; //文件服务器地址
|
||||
public static final String HTTPFILEURL = "https://file.zcloudchina.com/YTHFile"; //文件服务器地址
|
||||
|
||||
|
||||
public final static String APPID = "wx9199de454d31b016";
|
||||
public final static String SECRET = "183cdcac380e1f98f00c793491e27d88";
|
||||
public static final String XCX_MCH_ID = "1607757714";
|
||||
public static final String XCX_KEY = "zhuoyunkeji88888zhuoyunkeji88888";
|
||||
|
||||
public final static String OA_APPID = "wx69f7e25b3760001c";//公众号
|
||||
public final static String OA_SECRET = "087fe91f660300df63d0ef16fd162124";//公众号
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,626 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:日期处理(临时处理时间) 作者:zhangyue 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class DateSysUtil {
|
||||
|
||||
private final static SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
|
||||
private final static SimpleDateFormat sdfMonth = new SimpleDateFormat("MM");
|
||||
private final static SimpleDateFormat sdfOnlyDay = new SimpleDateFormat("dd");
|
||||
private final static SimpleDateFormat sdfDay = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private final static SimpleDateFormat sdfMDay = new SimpleDateFormat("yyyy-M-d");
|
||||
private final static SimpleDateFormat sdfDays = new SimpleDateFormat("yyyyMMdd");
|
||||
private final static SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
private final static SimpleDateFormat sdfTimes = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getSdfTimes() {
|
||||
return sdfTimes.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getYear(int i) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH, -i);
|
||||
return sdfYear.format(c.getTime());
|
||||
}
|
||||
|
||||
public static String getMonth(int i) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH, -i);
|
||||
return sdfMonth.format(c.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取DD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getOnlyDay(int i) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH, -i);
|
||||
return sdfOnlyDay.format(c.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY-MM-DD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDay(int i) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.DAY_OF_MONTH, -i);
|
||||
return sdfDay.format(c.getTime());
|
||||
}
|
||||
|
||||
public static String MDay() {
|
||||
return sdfMDay.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYYMMDD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDays() {
|
||||
return sdfDays.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY-MM-DD HH:mm:ss格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getTime() {
|
||||
return sdfTime.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: compareDate
|
||||
* @Description: TODO(日期比较,如果s>=e 返回true 否则返回false)
|
||||
* @param s
|
||||
* @param e
|
||||
* @return boolean
|
||||
* @throws @author fh
|
||||
*/
|
||||
public static boolean compareDate(String s, String e) {
|
||||
if (fomatDate(s) == null || fomatDate(e) == null) {
|
||||
return false;
|
||||
}
|
||||
return fomatDate(s).getTime() >= fomatDate(e).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDate(String date) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
return fmt.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDateTime(String date) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
return fmt.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验日期是否合法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValidDate(String s) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
fmt.parse(s);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false; // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static int getDiffYear(String startTime, String endTime) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
int years = (int) (((fmt.parse(endTime).getTime() - fmt.parse(startTime).getTime()) / (1000 * 60 * 60 * 24))
|
||||
/ 365);
|
||||
return years;
|
||||
} catch (Exception e) {
|
||||
return 0; // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <li>功能描述:时间相减得到天数
|
||||
*
|
||||
* @param beginDateStr
|
||||
* @param endDateStr
|
||||
* @return long
|
||||
* @author Administrator
|
||||
*/
|
||||
public static long getDaySub(String beginDateStr, String endDateStr) {
|
||||
long day = 0;
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date beginDate = null;
|
||||
Date endDate = null;
|
||||
try {
|
||||
beginDate = format.parse(beginDateStr);
|
||||
endDate = format.parse(endDateStr);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
day = (endDate.getTime() - beginDate.getTime()) / (24 * 60 * 60 * 1000);
|
||||
// System.out.println("相隔的天数="+day);
|
||||
return day;
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到n天之后的日期
|
||||
*
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
public static String getAfterDayDate(String days) {
|
||||
int daysInt = Integer.parseInt(days);
|
||||
Calendar canlendar = Calendar.getInstance(); // java.util包
|
||||
canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动
|
||||
Date date = canlendar.getTime();
|
||||
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdfd.format(date);
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到n天之后是周几
|
||||
*
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
public static String getAfterDayWeek(String days) {
|
||||
int daysInt = Integer.parseInt(days);
|
||||
Calendar canlendar = Calendar.getInstance(); // java.util包
|
||||
canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动
|
||||
Date date = canlendar.getTime();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E");
|
||||
String dateStr = sdf.format(date);
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,日期转字符串
|
||||
*
|
||||
* @param date
|
||||
* @return yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String date2Str(Date date) {
|
||||
return date2Str(date, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
public static String date3Str(Date date) {
|
||||
return date2Str(date, "yyyy-M-d");
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,字符串转日期
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static Date str2Date(String date) {
|
||||
if (Tools.notEmpty(date)) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
return sdf.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new Date();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 把时间根据时、分、秒转换为时间段
|
||||
*
|
||||
* @param StrDate
|
||||
*/
|
||||
public static String getTimes(String StrDate) {
|
||||
String resultTimes = "";
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date now;
|
||||
try {
|
||||
now = new Date();
|
||||
Date date = df.parse(StrDate);
|
||||
long times = now.getTime() - date.getTime();
|
||||
long day = times / (24 * 60 * 60 * 1000);
|
||||
long hour = (times / (60 * 60 * 1000) - day * 24);
|
||||
long min = ((times / (60 * 1000)) - day * 24 * 60 - hour * 60);
|
||||
long sec = (times / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60);
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
// sb.append("发表于:");
|
||||
if (hour > 0) {
|
||||
sb.append(hour + "小时前");
|
||||
} else if (min > 0) {
|
||||
sb.append(min + "分钟前");
|
||||
} else {
|
||||
sb.append(sec + "秒前");
|
||||
}
|
||||
resultTimes = sb.toString();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultTimes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照参数format的格式,日期转字符串
|
||||
*
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public static String date2Str(Date date, String format) {
|
||||
if (date != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
return sdf.format(date);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当年的第一天
|
||||
*
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrYearFirst(int i) {
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
|
||||
cal.add(Calendar.DAY_OF_MONTH, -i);
|
||||
|
||||
final int last = cal.getActualMinimum(Calendar.DAY_OF_YEAR);
|
||||
|
||||
cal.set(Calendar.DAY_OF_YEAR, last);
|
||||
|
||||
return sdfDay.format(cal.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当年的最后一天
|
||||
*
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrYearLast(int i) {
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
cal.add(Calendar.DAY_OF_MONTH, -i);
|
||||
|
||||
final int last = cal.getActualMaximum(Calendar.DAY_OF_YEAR);
|
||||
|
||||
cal.set(Calendar.DAY_OF_YEAR, last);
|
||||
|
||||
return sdfDay.format(cal.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前季度第一天
|
||||
*
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String quarterStart(int i) {
|
||||
Date dBegin = new Date();
|
||||
Calendar calBegin = Calendar.getInstance();
|
||||
|
||||
calBegin.add(Calendar.DAY_OF_MONTH, -i);
|
||||
// calBegin.setTime(dBegin);
|
||||
int remainder = calBegin.get(Calendar.MONTH) % 3;
|
||||
int month = remainder != 0 ? calBegin.get(Calendar.MONTH) - remainder : calBegin.get(Calendar.MONTH);
|
||||
|
||||
calBegin.set(Calendar.MONTH, month);
|
||||
calBegin.set(Calendar.DAY_OF_MONTH, calBegin.getActualMinimum(Calendar.DAY_OF_MONTH));
|
||||
|
||||
calBegin.setTime(calBegin.getTime());
|
||||
return sdfDay.format(calBegin.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前季度最后一天
|
||||
*
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String quarterEnd(int i) {
|
||||
Date dEnd = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -i);
|
||||
// calendar.setTime(dEnd);
|
||||
int remainder = (calendar.get(Calendar.MONTH) + 1) % 3;
|
||||
int month = remainder != 0 ? calendar.get(Calendar.MONTH) + (3 - remainder) : calendar.get(Calendar.MONTH);
|
||||
calendar.set(Calendar.MONTH, month);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.setTime(calendar.getTime());
|
||||
return sdfDay.format(calendar.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月第一天日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthFirstDay(int i) {
|
||||
/*
|
||||
* String date_str = "2019-02-15";
|
||||
*/
|
||||
|
||||
Calendar cale = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
// cale.setTime(formatter.parse(date_str));
|
||||
Calendar c = Calendar.getInstance();
|
||||
cale.add(Calendar.DAY_OF_MONTH, -i);
|
||||
|
||||
cale.add(Calendar.MONTH, 0);
|
||||
|
||||
cale.set(Calendar.DAY_OF_MONTH, 1);
|
||||
|
||||
String firstDayOfMonth = formatter.format(cale.getTime()); // 当月第一天 2019-02-01
|
||||
|
||||
/*
|
||||
* cale.add(Calendar.MONTH, 1);
|
||||
*
|
||||
* cale.set(Calendar.DAY_OF_MONTH, 0);
|
||||
*
|
||||
* String lastDayOfMonth = formatter.format(cale.getTime()); // 当月最后一天
|
||||
* 2019-02-28
|
||||
*/ return sdfDay.format(cale.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月最后一天日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthEndDay(int i) {
|
||||
/*
|
||||
* String date_str = "2019-02-15";
|
||||
*/
|
||||
|
||||
Calendar cale = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
// cale.setTime(formatter.parse(date_str));
|
||||
Calendar c = Calendar.getInstance();
|
||||
cale.add(Calendar.DAY_OF_MONTH, -i);
|
||||
|
||||
/*
|
||||
* cale.add(Calendar.MONTH, 0);
|
||||
*
|
||||
* cale.set(Calendar.DAY_OF_MONTH, 1);
|
||||
*
|
||||
* String firstDayOfMonth = formatter.format(cale.getTime()); // 当月第一天
|
||||
* 2019-02-01
|
||||
*/
|
||||
|
||||
cale.add(Calendar.MONTH, 1);
|
||||
|
||||
cale.set(Calendar.DAY_OF_MONTH, 0);
|
||||
|
||||
String lastDayOfMonth = formatter.format(cale.getTime()); // 当月最后一天 2019-02-28
|
||||
return sdfDay.format(cale.getTime());
|
||||
}
|
||||
|
||||
public static boolean timeCalendar(Date nowTime, Date amBeginTime, Date amEndTime) {
|
||||
// 设置当前时间
|
||||
Calendar date = Calendar.getInstance();
|
||||
date.setTime(nowTime);
|
||||
// 设置开始时间
|
||||
Calendar amBegin = Calendar.getInstance();
|
||||
amBegin.setTime(amBeginTime);// 上午开始时间
|
||||
// 设置结束时间
|
||||
Calendar amEnd = Calendar.getInstance();
|
||||
amEnd.setTime(amEndTime);// 上午结束时间
|
||||
// 处于开始时间之后,和结束时间之前的判断
|
||||
if ((date.after(amBegin) && date.before(amEnd))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本周的第一天
|
||||
*
|
||||
* @return String
|
||||
**/
|
||||
public static String getWeekStart(int i) {
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
Calendar cal = Calendar.getInstance();
|
||||
// Calendar c = Calendar.getInstance();
|
||||
cal.add(Calendar.DAY_OF_MONTH, -i);
|
||||
// cal.setTime(time);
|
||||
|
||||
// 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
|
||||
int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
if (1 == dayWeek) {
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
|
||||
cal.setFirstDayOfWeek(Calendar.MONDAY);// 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
|
||||
|
||||
int day = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);// 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
|
||||
/*
|
||||
* cal.add(Calendar.DATE, 6);
|
||||
* System.out.println("所在周星期日的日期:"+sdf.format(cal.getTime()));
|
||||
*/
|
||||
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + " 00:00:00";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本周的最后一天
|
||||
*
|
||||
* @return String
|
||||
**/
|
||||
public static String getWeekEnd(int i) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
Calendar cal = Calendar.getInstance();
|
||||
// Calendar c = Calendar.getInstance();
|
||||
cal.add(Calendar.DAY_OF_MONTH, -i);
|
||||
// cal.setTime(time);
|
||||
|
||||
// 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
|
||||
int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
if (1 == dayWeek) {
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
|
||||
cal.setFirstDayOfWeek(Calendar.MONDAY);// 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
|
||||
|
||||
int day = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);// 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
|
||||
|
||||
cal.add(Calendar.DATE, 6);
|
||||
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + " 23:59:59";
|
||||
}
|
||||
|
||||
public static Map<String,String> getNexPeriod(String daystr,String period) {
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date date = sdf.parse (daystr);
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
Calendar cal2 = Calendar.getInstance();
|
||||
switch (period) {
|
||||
case "specialPeriod001"://每日
|
||||
cal1.setTime(date);
|
||||
cal1.add(Calendar.DATE, 1);
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal1.getTime()));
|
||||
break;
|
||||
case "specialPeriod002"://每周
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
int dayWeek = cal1.get(Calendar.DAY_OF_WEEK);
|
||||
if(dayWeek == 1){
|
||||
cal1.add(Calendar.DAY_OF_MONTH, 0);
|
||||
cal2.add(Calendar.DAY_OF_MONTH, 6);
|
||||
} else {
|
||||
cal1.add(Calendar.DAY_OF_MONTH, 1-dayWeek+7);
|
||||
cal2.add(Calendar.DAY_OF_MONTH, 1-dayWeek+13);
|
||||
}
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal2.getTime()));
|
||||
break;
|
||||
case "specialPeriod003"://每旬
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.setTime(date);
|
||||
if(now.get(Calendar.DATE)<10){
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,11);
|
||||
cal2.set(Calendar.DAY_OF_MONTH,20);
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal2.getTime()));
|
||||
}else if(now.get(Calendar.DATE)<20){
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,21);
|
||||
cal2.set(Calendar.DAY_OF_MONTH, cal2.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal2.getTime()));
|
||||
}else{
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.add(Calendar.MONTH, 1);
|
||||
cal2.add(Calendar.MONTH, 1);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,1);
|
||||
cal2.set(Calendar.DAY_OF_MONTH, 10);
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal2.getTime()));
|
||||
}
|
||||
break;
|
||||
case "specialPeriod004"://每月
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,1);
|
||||
cal1.add(Calendar.MONTH, 1);
|
||||
cal2.add(Calendar.MONTH, 1);
|
||||
cal2.set(Calendar.DAY_OF_MONTH, cal2.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
map.put("PERIOD_START_DATE",sdf.format(cal1.getTime()));
|
||||
map.put("PERIOD_END_DATE",sdf.format(cal2.getTime()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return map;
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ParseException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date date = sdf.parse ("2022-12-31");
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
cal1.setTime(date);
|
||||
cal1.add(Calendar.DATE, 1);
|
||||
System.out.println(sdf.format(cal1.getTime()));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,751 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:日期处理
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public class DateUtil {
|
||||
|
||||
private final static SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
|
||||
private final static SimpleDateFormat sdfMonth = new SimpleDateFormat("MM");
|
||||
private final static SimpleDateFormat sdfOnlyDay = new SimpleDateFormat("dd");
|
||||
private final static SimpleDateFormat sdfDay = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private final static SimpleDateFormat sdfMDay = new SimpleDateFormat("yyyy-M-d");
|
||||
private final static SimpleDateFormat sdfDays = new SimpleDateFormat("yyyyMMdd");
|
||||
private final static SimpleDateFormat sdfTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
private final static SimpleDateFormat sdfTimes = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
* @return
|
||||
*/
|
||||
public static String getSdfTimes() {
|
||||
return sdfTimes.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
* @return
|
||||
*/
|
||||
public static String getYear() {
|
||||
return sdfYear.format(new Date());
|
||||
}
|
||||
public static String getMonth() {
|
||||
return sdfMonth.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取DD格式
|
||||
* @return
|
||||
*/
|
||||
public static String getOnlyDay() {
|
||||
return sdfOnlyDay.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY-MM-DD格式
|
||||
* @return
|
||||
*/
|
||||
public static String getDay() {
|
||||
return sdfDay.format(new Date());
|
||||
}
|
||||
public static String MDay() {
|
||||
return sdfMDay.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYYMMDD格式
|
||||
* @return
|
||||
*/
|
||||
public static String getDays(){
|
||||
return sdfDays.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYY-MM-DD HH:mm:ss格式
|
||||
* @return
|
||||
*/
|
||||
public static String getTime() {
|
||||
return sdfTime.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: compareDate
|
||||
* @Description: TODO(日期比较,如果s>=e 返回true 否则返回false)
|
||||
* @param s
|
||||
* @param e
|
||||
* @return boolean
|
||||
* @throws
|
||||
* @author fh
|
||||
*/
|
||||
public static boolean compareDate(String s, String e) {
|
||||
if(fomatDate(s)==null||fomatDate(e)==null){
|
||||
return false;
|
||||
}
|
||||
return fomatDate(s).getTime() >=fomatDate(e).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDate(String date) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
return fmt.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDateTime(String date) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
return fmt.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验日期是否合法
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValidDate(String s) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
fmt.parse(s);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false; // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static int getDiffYear(String startTime,String endTime) {
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
int years=(int) (((fmt.parse(endTime).getTime()-fmt.parse(startTime).getTime())/ (1000 * 60 * 60 * 24))/365);
|
||||
return years;
|
||||
} catch (Exception e) {
|
||||
return 0; // 如果throw java.text.ParseException或者NullPointerException,就说明格式不对
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <li>功能描述:时间相减得到天数
|
||||
* @param beginDateStr
|
||||
* @param endDateStr
|
||||
* @return
|
||||
* long
|
||||
* @author Administrator
|
||||
*/
|
||||
public static long getDaySub(String beginDateStr,String endDateStr){
|
||||
long day=0;
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date beginDate = null;
|
||||
Date endDate = null;
|
||||
try {
|
||||
beginDate = format.parse(beginDateStr);
|
||||
endDate= format.parse(endDateStr);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
day=(endDate.getTime()-beginDate.getTime())/(24*60*60*1000);
|
||||
//System.out.println("相隔的天数="+day);
|
||||
return day;
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到n天之后的日期
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
public static String getAfterDayDate(String days) {
|
||||
int daysInt = Integer.parseInt(days);
|
||||
Calendar canlendar = Calendar.getInstance(); // java.util包
|
||||
canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动
|
||||
Date date = canlendar.getTime();
|
||||
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String dateStr = sdfd.format(date);
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到n天之后是周几
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
public static String getAfterDayWeek(String days) {
|
||||
int daysInt = Integer.parseInt(days);
|
||||
Calendar canlendar = Calendar.getInstance(); // java.util包
|
||||
canlendar.add(Calendar.DATE, daysInt); // 日期减 如果不够减会将月变动
|
||||
Date date = canlendar.getTime();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E");
|
||||
String dateStr = sdf.format(date);
|
||||
return dateStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,日期转字符串
|
||||
* @param date
|
||||
* @return yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String date2Str(Date date){
|
||||
return date2Str(date,"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
public static String date3Str(Date date){
|
||||
return date2Str(date,"yyyy-M-d");
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,字符串转日期
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static Date str2Date(String date){
|
||||
if(Tools.notEmpty(date)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
return sdf.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new Date();
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 把时间根据时、分、秒转换为时间段
|
||||
* @param StrDate
|
||||
*/
|
||||
public static String getTimes(String StrDate){
|
||||
String resultTimes = "";
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date now;
|
||||
try {
|
||||
now = new Date();
|
||||
Date date=df.parse(StrDate);
|
||||
long times = now.getTime()-date.getTime();
|
||||
long day = times/(24*60*60*1000);
|
||||
long hour = (times/(60*60*1000)-day*24);
|
||||
long min = ((times/(60*1000))-day*24*60-hour*60);
|
||||
long sec = (times/1000-day*24*60*60-hour*60*60-min*60);
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
//sb.append("发表于:");
|
||||
if(hour>0 ){
|
||||
sb.append(hour+"小时前");
|
||||
} else if(min>0){
|
||||
sb.append(min+"分钟前");
|
||||
} else{
|
||||
sb.append(sec+"秒前");
|
||||
}
|
||||
resultTimes = sb.toString();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultTimes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照参数format的格式,日期转字符串
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public static String date2Str(Date date,String format){
|
||||
if(date!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
return sdf.format(date);
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当年的第一天
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrYearFirst(){
|
||||
Calendar currCal=Calendar.getInstance();
|
||||
int currentYear = currCal.get(Calendar.YEAR);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.clear();
|
||||
calendar.set(Calendar.YEAR, currentYear);
|
||||
Date currYearFirst = calendar.getTime();
|
||||
return sdfDay.format(currYearFirst);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当年的最后一天
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrYearLast(){
|
||||
Calendar currCal=Calendar.getInstance();
|
||||
int currentYear = currCal.get(Calendar.YEAR);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.clear();
|
||||
calendar.set(Calendar.YEAR, currentYear);
|
||||
calendar.roll(Calendar.DAY_OF_YEAR, -1);
|
||||
Date currYearLast = calendar.getTime();
|
||||
return sdfDay.format(currYearLast);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前季度第一天
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String quarterStart() {
|
||||
Date dBegin = new Date();
|
||||
Calendar calBegin = Calendar.getInstance();
|
||||
calBegin.setTime(dBegin);
|
||||
int remainder = calBegin.get(Calendar.MONTH) % 3;
|
||||
int month = remainder != 0 ? calBegin.get(Calendar.MONTH) - remainder: calBegin.get(Calendar.MONTH);
|
||||
|
||||
calBegin.set(Calendar.MONTH, month);
|
||||
calBegin.set(Calendar.DAY_OF_MONTH, calBegin.getActualMinimum(Calendar.DAY_OF_MONTH));
|
||||
|
||||
calBegin.setTime(calBegin.getTime());
|
||||
return sdfDay.format(calBegin.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前季度最后一天
|
||||
* @author zhangyue
|
||||
* @return
|
||||
*/
|
||||
public static String quarterEnd() {
|
||||
Date dEnd = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(dEnd);
|
||||
int remainder = (calendar.get(Calendar.MONTH) + 1) % 3;
|
||||
int month = remainder != 0 ? calendar.get(Calendar.MONTH) + (3 - remainder) : calendar.get(Calendar.MONTH);
|
||||
calendar.set(Calendar.MONTH, month);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.setTime(calendar.getTime());
|
||||
return sdfDay.format(calendar.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月第一天日期
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthFirstDay() {
|
||||
Calendar thisMonthFirstDateCal = Calendar.getInstance();
|
||||
thisMonthFirstDateCal.set(Calendar.DAY_OF_MONTH, 1);
|
||||
String thisMonthFirstTime = sdfDay.format(thisMonthFirstDateCal.getTime());
|
||||
return thisMonthFirstTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月最后一天日期
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthEndDay() {
|
||||
Calendar thisMonthEndDateCal = Calendar.getInstance();
|
||||
thisMonthEndDateCal.set(Calendar.DAY_OF_MONTH, thisMonthEndDateCal.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
String thisMonthEndTime = sdfDay.format(thisMonthEndDateCal.getTime());
|
||||
return thisMonthEndTime;
|
||||
}
|
||||
public static boolean timeCalendar(Date nowTime, Date amBeginTime, Date amEndTime) {
|
||||
//设置当前时间
|
||||
Calendar date = Calendar.getInstance();
|
||||
date.setTime(nowTime);
|
||||
//设置开始时间
|
||||
Calendar amBegin = Calendar.getInstance();
|
||||
amBegin.setTime(amBeginTime);//上午开始时间
|
||||
//设置结束时间
|
||||
Calendar amEnd = Calendar.getInstance();
|
||||
amEnd.setTime(amEndTime);//上午结束时间
|
||||
//处于开始时间之后,和结束时间之前的判断
|
||||
if ((date.after(amBegin) && date.before(amEnd))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本周的第一天
|
||||
* @return String
|
||||
* **/
|
||||
public static String getWeekStart(){
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
Calendar cal = Calendar.getInstance();
|
||||
// Calendar c = Calendar.getInstance();
|
||||
cal.add(Calendar.DAY_OF_MONTH, 0);
|
||||
// cal.setTime(time);
|
||||
|
||||
// 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
|
||||
int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
if (1 == dayWeek) {
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
|
||||
cal.setFirstDayOfWeek(Calendar.MONDAY);// 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
|
||||
|
||||
int day = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);// 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
|
||||
/*
|
||||
* cal.add(Calendar.DATE, 6);
|
||||
* System.out.println("所在周星期日的日期:"+sdf.format(cal.getTime()));
|
||||
*/
|
||||
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + " 00:00:00";
|
||||
}
|
||||
/**
|
||||
* 获取本周的最后一天
|
||||
* @return String
|
||||
* **/
|
||||
public static String getWeekEnd(){
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
Calendar cal = Calendar.getInstance();
|
||||
// Calendar c = Calendar.getInstance();
|
||||
cal.add(Calendar.DAY_OF_MONTH, 0);
|
||||
// cal.setTime(time);
|
||||
|
||||
// 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
|
||||
int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
if (1 == dayWeek) {
|
||||
cal.add(Calendar.DAY_OF_MONTH, -1);
|
||||
}
|
||||
|
||||
cal.setFirstDayOfWeek(Calendar.MONDAY);// 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
|
||||
|
||||
int day = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
|
||||
cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);// 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
|
||||
|
||||
cal.add(Calendar.DATE, 6);
|
||||
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + " 23:59:59";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 判断时间格式 格式必须为“YYYY-MM-dd”
|
||||
* 2004-2-30 是无效的
|
||||
* 2003-2-29 是无效的
|
||||
* @param sDate
|
||||
* @return
|
||||
*/
|
||||
public static boolean isLegalDate(String sDate) {
|
||||
int legalLen = 10;
|
||||
if ((sDate == null) || (sDate.length() != legalLen)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date date = formatter.parse(sDate);
|
||||
return sDate.equals(formatter.format(date));
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间比较
|
||||
* @param amBeginTime
|
||||
* @param amEndTime
|
||||
* @return
|
||||
*/
|
||||
public static boolean timeCompare(Date amBeginTime, Date amEndTime) {
|
||||
//设置开始时间
|
||||
Calendar amBegin = Calendar.getInstance();
|
||||
amBegin.setTime(amBeginTime);//上午开始时间
|
||||
//设置结束时间
|
||||
Calendar amEnd = Calendar.getInstance();
|
||||
amEnd.setTime(amEndTime);//上午结束时间
|
||||
//开始时间是否早于结束时间
|
||||
if (amBegin.before(amEnd)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取6个月内月份日期
|
||||
* @param flag 结果是否显示年份
|
||||
* @return
|
||||
*/
|
||||
public static List<String> getHalfYearMonth(boolean flag) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -4);
|
||||
String before_six = c.get(Calendar.YEAR) + "-" + c.get(Calendar.MONTH);// 六个月前
|
||||
List<String> result = new ArrayList<String>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");// 格式化为年月
|
||||
Calendar min = Calendar.getInstance();
|
||||
Calendar max = Calendar.getInstance();
|
||||
try {
|
||||
min.setTime(sdf.parse(before_six));
|
||||
min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 1);
|
||||
max.setTime(sdf.parse(sdf.format(new Date())));
|
||||
|
||||
//不含当前月
|
||||
|
||||
/* int month = max.get(Calendar.MONTH);
|
||||
max.set(Calendar.MONTH, month-1);
|
||||
*/
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 2);
|
||||
Calendar curr = min;
|
||||
while (curr.before(max)) {
|
||||
if (flag) {
|
||||
result.add(sdf.format(curr.getTime()));
|
||||
} else {
|
||||
result.add(curr.get(Calendar.MONTH) + 1 + "月");
|
||||
}
|
||||
curr.add(Calendar.MONTH, 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//根据当前日期获得最近n周的日期区间(不包含本周)
|
||||
public static String getFromToDate(SimpleDateFormat sdf, Date date, int n, int option, int k) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1;
|
||||
int offset = 0 == option ? 1 - dayOfWeek : 7 - dayOfWeek;
|
||||
int amount = 0 == option ? offset - (n - 1 + k) * 7 : offset - k * 7;
|
||||
calendar.add(Calendar.DATE, amount);
|
||||
return sdf.format(calendar.getTime());
|
||||
}
|
||||
public static SimpleDateFormat sdf() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
// 获取上周的开始时间
|
||||
public static String getBeginDayOfLastWeek() {
|
||||
//上周日期
|
||||
SimpleDateFormat sdf = sdf();
|
||||
String beginDate = getFromToDate(sdf, new Date(), 1, 0, 1);
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
try {
|
||||
calendar.setTime(sdf.parse(beginDate));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
return sdf.format(calendar.getTime());
|
||||
}
|
||||
|
||||
// 获取上周的结束时间
|
||||
public static String getEndDayOfLastWeek() {
|
||||
//上周日期
|
||||
SimpleDateFormat sdf = sdf();
|
||||
String endDate = getFromToDate(sdf, new Date(), 1, 1, 1);
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
try {
|
||||
calendar.setTime(sdf.parse(endDate));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
return sdf.format(calendar.getTime());
|
||||
}
|
||||
|
||||
// 获得上月第一天0点时间
|
||||
public static String getTimesLastMonthmorning() {
|
||||
//上月日期
|
||||
Calendar c=Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -1);
|
||||
SimpleDateFormat sdf = sdf();
|
||||
String gtimelast = sdf.format(c.getTime()); //上月
|
||||
int lastMonthMaxDay=c.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH), lastMonthMaxDay, 23, 59, 59);
|
||||
|
||||
//按格式输出
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-01 00:00:00");
|
||||
String gtime = sdf2.format(c.getTime()); //上月第一天
|
||||
return gtime;
|
||||
}
|
||||
// 获得上月最后一天24点时间
|
||||
public static String getTimesLastMonthnight() {
|
||||
//上月日期
|
||||
Calendar c=Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -1);
|
||||
SimpleDateFormat sdf = sdf();
|
||||
String gtimelast = sdf.format(c.getTime()); //上月
|
||||
int lastMonthMaxDay=c.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH), lastMonthMaxDay, 23, 59, 59);
|
||||
|
||||
//按格式输出
|
||||
String gtime = sdf.format(c.getTime()); //上月最后一天
|
||||
return gtime;
|
||||
}
|
||||
/**
|
||||
* 获取上一季度 开始和结束时间
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String[] getLastQuarter() {
|
||||
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String[] range = new String[2];
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
startCalendar.set(Calendar.MONTH, ((int) startCalendar.get(Calendar.MONTH) / 3 - 1) * 3);
|
||||
startCalendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
Date startDate = startCalendar.getTime();
|
||||
range[0] = sdfd.format(startDate);
|
||||
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
endCalendar.set(Calendar.MONTH, ((int) endCalendar.get(Calendar.MONTH) / 3 - 1) * 3 + 2);
|
||||
endCalendar.set(Calendar.DAY_OF_MONTH, endCalendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
Date endDate = endCalendar.getTime();
|
||||
range[1] = sdfd.format(endDate);
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当日期前/后某个月的所有日期 0 本月 负数 之前的月份 。正数 之后的月份
|
||||
*
|
||||
* @param months
|
||||
* @return
|
||||
*/
|
||||
public static List<String> getDayListOfMonth(Integer months) {
|
||||
List<String> list = new ArrayList<>();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) + months);
|
||||
int month = cal.get(Calendar.MONTH) + 1;
|
||||
String monthStr = month < 10 ? "0" + month : String.valueOf(month);
|
||||
int year = cal.get(Calendar.YEAR);
|
||||
int day = cal.getActualMaximum(Calendar.DATE);
|
||||
for (int i = 1; i <= day; i++) {
|
||||
String d = String.valueOf(i);
|
||||
if (i < 10) {
|
||||
d = "0" + d;
|
||||
}
|
||||
list.add(year + "-" + monthStr + "-" + d);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算两个日期之间相差的天数
|
||||
*
|
||||
* @param smdate 较小的时间
|
||||
* @param bdate 较大的时间
|
||||
* @return 相差天数
|
||||
* @throws ParseException
|
||||
*/
|
||||
public static int daysBetween(Date smdate, Date bdate) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
try {
|
||||
smdate = sdf.parse(sdf.format(smdate));
|
||||
bdate = sdf.parse(sdf.format(bdate));
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(smdate);
|
||||
long time1 = cal.getTimeInMillis();
|
||||
cal.setTime(bdate);
|
||||
long time2 = cal.getTimeInMillis();
|
||||
long between_days = (time2 - time1) / (1000 * 3600 * 24);
|
||||
|
||||
return Integer.parseInt(String.valueOf(between_days));
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串的日期格式的计算
|
||||
*/
|
||||
public static int daysBetween(String smdate, String bdate) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar cal = Calendar.getInstance();
|
||||
long time1 = 0;
|
||||
long time2 = 0;
|
||||
try {
|
||||
cal.setTime(sdf.parse(smdate));
|
||||
time1 = cal.getTimeInMillis();
|
||||
cal.setTime(sdf.parse(bdate));
|
||||
time2 = cal.getTimeInMillis();
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
long between_days = (time2 - time1) / (1000 * 3600 * 24);
|
||||
|
||||
return Integer.parseInt(String.valueOf(between_days));
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到几天前的时间
|
||||
*
|
||||
* @param d
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public static Date getDateBefore(Date d, int day) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.setTime(d);
|
||||
now.set(Calendar.DATE, now.get(Calendar.DATE) - day);
|
||||
return now.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到几天后的时间
|
||||
*
|
||||
* @param d
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public static Date getDateAfter(Date d, int day) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.setTime(d);
|
||||
now.set(Calendar.DATE, now.get(Calendar.DATE) + day);
|
||||
return now.getTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(getLastQuarter()[0]+"----------"+getLastQuarter()[1]);
|
||||
/*System.out.println(isLegalDate("2010-02-29"));*/
|
||||
/*System.out.println(quarterStart()+" 00:00:00");
|
||||
System.out.println(getCurrYearLast()+" 23:59:59");*/
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.check.CheckUserService;
|
||||
import com.zcloud.service.hidden.HiddenService;
|
||||
import com.zcloud.service.pe.PerformanceExamineDeptService;
|
||||
import com.zcloud.service.risk.RiskPointAnalysisService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.task.StudyTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class ExamineDeptScheduled {
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
@Autowired
|
||||
private HiddenService hiddenService;
|
||||
@Autowired
|
||||
private CheckUserService checkUserService;
|
||||
@Autowired
|
||||
private StudyTaskService studyTaskService;
|
||||
@Autowired
|
||||
private RiskPointAnalysisService riskPointAnalysisService;
|
||||
@Autowired
|
||||
private PerformanceExamineDeptService performanceExamineDeptService;
|
||||
|
||||
@Scheduled(cron ="0 5 0 1 * ?")
|
||||
public void scheduled(){
|
||||
try {
|
||||
System.out.println( "============绩效考核(部门)==========");
|
||||
List<PageData> deptList = departmentService.listAll(null);
|
||||
Map<String,PageData> depts = listToMap(deptList);
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
Date date = new Date();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.MONTH, -1);
|
||||
String month = sdf.format(cal.getTime());
|
||||
PageData pd = new PageData();
|
||||
pd.put("MONTH",month);
|
||||
|
||||
//1隐患发现,2隐患整改
|
||||
List<PageData> score1List = hiddenService.getDeptExamine(pd);
|
||||
for (PageData score1pd : score1List) {
|
||||
int hidden_count = Integer.parseInt(score1pd.get("hidden_count").toString());
|
||||
int rectify_count = Integer.parseInt(score1pd.get("rectify_count").toString());
|
||||
int user_count = Integer.parseInt(score1pd.get("user_count").toString());
|
||||
if(user_count == 0){//没有员工,直接零分
|
||||
if(depts.containsKey(score1pd.getString("DEPARTMENT_ID"))) {
|
||||
depts.get(score1pd.getString("DEPARTMENT_ID")).put("SCORE1", 0.0);
|
||||
depts.get(score1pd.getString("DEPARTMENT_ID")).put("SCORE2", 0.0);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
DecimalFormat df=new DecimalFormat("0.00");//设置保留位数
|
||||
double hidden_rate = Double.valueOf(df.format((double)hidden_count/user_count));
|
||||
double rectify_rate = Double.valueOf(df.format((double)rectify_count/user_count));
|
||||
double score1 = hidden_rate * 20;
|
||||
double score2 = rectify_rate * 20;
|
||||
if(score1 > 20) score1 = 20;
|
||||
if(score2 > 20) score2 = 20;
|
||||
|
||||
if(depts.containsKey(score1pd.getString("DEPARTMENT_ID"))) {
|
||||
depts.get(score1pd.getString("DEPARTMENT_ID")).put("SCORE1", score1);
|
||||
depts.get(score1pd.getString("DEPARTMENT_ID")).put("SCORE2", score2);
|
||||
}
|
||||
}
|
||||
|
||||
//3部门清单检查率
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
Calendar cal2 = Calendar.getInstance();
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,1);
|
||||
cal1.add(Calendar.MONTH, -1);
|
||||
cal2.add(Calendar.MONTH, -1);
|
||||
cal2.set(Calendar.DAY_OF_MONTH, cal2.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
pd.put("STARTTIME",sdf.format(cal1.getTime()) + "-01 00:00:00");
|
||||
pd.put("ENDTIME",sdf.format(cal2.getTime()) + "-31 00:00:00");
|
||||
List<PageData> score3List = checkUserService.getDeptExamine(pd);
|
||||
for (PageData score3pd : score3List) {
|
||||
int sta_count = Integer.parseInt(score3pd.get("sta_count").toString());
|
||||
int check_count = Integer.parseInt(score3pd.get("check_count").toString());
|
||||
if(sta_count == 0){//没有应检查数,直接零分
|
||||
if(depts.containsKey(score3pd.getString("DEPARTMENT_ID"))) {
|
||||
depts.get(score3pd.getString("DEPARTMENT_ID")).put("SCORE3", 0.0);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
DecimalFormat df=new DecimalFormat("0.00");//设置保留位数
|
||||
double check_rate = Double.valueOf(df.format((double)check_count/sta_count));
|
||||
double score3 = check_rate * 20;
|
||||
if(score3 > 20) score3 = 20;
|
||||
|
||||
if(depts.containsKey(score3pd.getString("DEPARTMENT_ID"))) {
|
||||
depts.get(score3pd.getString("DEPARTMENT_ID")).put("SCORE3", score3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//4.培训得分
|
||||
List<PageData> score4List = studyTaskService.getDeptExamine(pd);
|
||||
for (PageData score4pd : score4List) {
|
||||
|
||||
int user_count = Integer.parseInt(score4pd.get("user_count").toString());
|
||||
int st_count = Integer.parseInt(score4pd.get("st_count").toString());
|
||||
DecimalFormat df=new DecimalFormat("0.00");//设置保留位数
|
||||
if(user_count == 0){
|
||||
if(depts.containsKey(score4pd.getString("DEPARTMENT_ID")))
|
||||
depts.get(score4pd.getString("DEPARTMENT_ID")).put("SCORE4", 0.00);
|
||||
continue;
|
||||
}
|
||||
double st_rate = Double.valueOf(df.format((double)st_count/user_count));
|
||||
double score4 = st_rate * 20;
|
||||
if(score4 > 20) score4 = 20;
|
||||
|
||||
if(depts.containsKey(score4pd.getString("DEPARTMENT_ID")))
|
||||
depts.get(score4pd.getString("DEPARTMENT_ID")).put("SCORE4", score4);
|
||||
}
|
||||
|
||||
//5.风险辨识完善得分
|
||||
List<PageData> score5List = riskPointAnalysisService.getDeptExamine(pd);
|
||||
for (PageData score5pd : score5List) {
|
||||
int count = Integer.parseInt(score5pd.get("count").toString());
|
||||
double score5 = count * 2;
|
||||
|
||||
if(depts.containsKey(score5pd.getString("DEPARTMENT_ID")))
|
||||
depts.get(score5pd.getString("DEPARTMENT_ID")).put("SCORE5", score5);
|
||||
}
|
||||
|
||||
// 保存
|
||||
List<PageData> scores = new ArrayList<PageData>(depts.values());
|
||||
performanceExamineDeptService.saveBatch(scores);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, PageData> listToMap(List<PageData> deptList) {
|
||||
Map<String,PageData> depts = new HashMap<String,PageData>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
Date date = new Date();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.MONTH, -1);
|
||||
for (PageData dept : deptList) {
|
||||
PageData score = new PageData();
|
||||
score.put("PERFORMANCE_EXAMINE_DEPT_ID",UuidUtil.get32UUID());
|
||||
score.put("CORPINFO_ID",dept.get("CORPINFO_ID"));
|
||||
score.put("DEPARTMENT_ID",dept.get("DEPARTMENT_ID"));
|
||||
score.put("EXAMINE_DATE",sdf.format(cal.getTime()));
|
||||
score.put("SCORE1",0.0);
|
||||
score.put("SCORE2",0.0);
|
||||
score.put("SCORE3",0.0);
|
||||
score.put("SCORE4",0.0);
|
||||
score.put("SCORE5",0.0);
|
||||
depts.put(dept.getString("DEPARTMENT_ID"),score);
|
||||
}
|
||||
return depts;
|
||||
}
|
||||
|
||||
public int getMonthSpace(String date1, String date2)throws ParseException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int result=0;
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
cal1.setTime(sdf.parse(date1));
|
||||
Calendar cal2 = Calendar.getInstance();
|
||||
cal2.setTime(sdf.parse(date2));
|
||||
result =(cal1.get(Calendar.YEAR) - cal2.get(Calendar.YEAR)) * 12 + cal1.get(Calendar.MONTH)-
|
||||
cal2.get(Calendar.MONTH);
|
||||
return result==0?1 : Math.abs(result);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ParseException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = sdf.parse ("2022-03-30 12:00:00");
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
cal.add(Calendar.MONTH, -1);
|
||||
System.out.println(sdf.format(cal.getTime()));
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue