初始化提交

pull/1/head
fangjiakai 2024-02-04 09:01:19 +08:00
commit c9a6728b0c
1293 changed files with 411841 additions and 0 deletions
src/main/java/com/zcloud

25
.gitignore vendored Normal file
View File

@ -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/

225
mvnw vendored Normal file
View File

@ -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 "$@"

143
mvnw.cmd vendored Normal file
View File

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

457
pom.xml Normal file
View File

@ -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>

View File

@ -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;
}
}

View File

@ -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);
}
}

View File

@ -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启动类
}
}

View File

@ -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() {
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}

View File

@ -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);
}
}
}
}

View File

@ -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();
// }
// }
// }
//}

View File

@ -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("-------------------定时任务系统启动成功-------------------");
}
}

View File

@ -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+"条&nbsp;</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();\" >&nbsp;跳转&nbsp;</a></li>\n");
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;首页 &nbsp;</a></li>\n");
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;上页&nbsp;</a></li>\n");
}else{
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;共"+totalResult+"条&nbsp;</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();\" >&nbsp;跳转&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage(1)\">&nbsp;首页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+(currentPage-1)+")\">&nbsp;上页&nbsp;</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\">&nbsp;<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+")\">&nbsp;"+i+"</a></li>\n");
}
if(currentPage==totalPage){
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;尾页&nbsp;</a></li>\n");
}else{
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+(currentPage+1)+")\">&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;padding-top:10px;\"><a onclick=\"vm.nextPage("+totalPage+")\">&nbsp;尾页&nbsp;</a></li>\n");
}
sb.append(" <li style=\"padding-top:10px;\"><a>&nbsp;共"+totalPage+"页&nbsp;</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+"条&nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;首页 &nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;上页&nbsp;</a></li>\n");
}else{
sb.append(" <li><a>&nbsp;共"+totalResult+"条&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage(1)\">&nbsp;首页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+(currentPage-1)+")\">&nbsp;上页&nbsp;</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\">&nbsp;<b>"+i+"</b></font></a></li>\n");
else
sb.append(" <li style=\"cursor:pointer;\"><a style=\"cursor:pointer;\" onclick=\"vm.nextPage("+i+")\">&nbsp;"+i+"</a></li>\n");
}
if(currentPage==totalPage){
sb.append(" <li><a>&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;尾页&nbsp;</a></li>\n");
}else{
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+(currentPage+1)+")\">&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"vm.nextPage("+totalPage+")\">&nbsp;尾页&nbsp;</a></li>\n");
}
sb.append(" <li><a>&nbsp;共"+totalPage+"页&nbsp;</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+"条&nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;首页 &nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;上页&nbsp;</a></li>\n");
}else{
sb.append(" <li><a>&nbsp;共"+totalResult+"条&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage(1)\">&nbsp;首页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage-1)+")\">&nbsp;上页&nbsp;</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\">&nbsp;<b>"+i+"</b></font></a></li>\n");
else
sb.append(" <li style=\"cursor:pointer;\"><a style=\"cursor:pointer;\" onclick=\"nextPage("+i+")\">&nbsp;"+i+"</a></li>\n");
}
if(currentPage==totalPage){
sb.append(" <li><a>&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li><a>&nbsp;尾页&nbsp;</a></li>\n");
}else{
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+(currentPage+1)+")\">&nbsp;下页&nbsp;</a></li>\n");
sb.append(" <li style=\"cursor:pointer;\"><a onclick=\"nextPage("+totalPage+")\">&nbsp;尾页&nbsp;</a></li>\n");
}
sb.append(" <li><a>&nbsp;共"+totalPage+"页&nbsp;</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;
}
}

View File

@ -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();
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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());
}
}
}

View File

@ -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());
}
}
}

View File

@ -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());
}
}
}

View File

@ -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";//公众号
}

View File

@ -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();
}
}
}

View File

@ -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");*/
}
}

View File

@ -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