湛江重耗材采集器
commit
823ef3f870
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 potter fu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@ -0,0 +1,4 @@
|
||||
# springboot-mybatis2datasource-demo
|
||||
[](https://996.icu)
|
||||
|
||||
Spring Boot整合MyBatis双数据源Demo
|
||||
@ -0,0 +1,286 @@
|
||||
#!/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 Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# 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
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||
fi
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||
fi
|
||||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
while IFS="=" read key value; do
|
||||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||
esac
|
||||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Downloading from: $jarUrl"
|
||||
fi
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
|
||||
if command -v wget > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found wget ... using wget"
|
||||
fi
|
||||
wget "$jarUrl" -O "$wrapperJarPath"
|
||||
elif command -v curl > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found curl ... using curl"
|
||||
fi
|
||||
curl -o "$wrapperJarPath" "$jarUrl"
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Falling back to using Java to download"
|
||||
fi
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
if [ -e "$javaClass" ]; then
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
# Compiling the Java class
|
||||
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||
fi
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
# Running the downloader
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Running MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
fi
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||
fi
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||
@ -0,0 +1,161 @@
|
||||
@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 set title of command window
|
||||
title %0
|
||||
@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
|
||||
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
echo Found %WRAPPER_JAR%
|
||||
) else (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %DOWNLOAD_URL%
|
||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
||||
@ -0,0 +1,131 @@
|
||||
<?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>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>consumables_zj</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>springbootDemo</name>
|
||||
<description>springbootDemo</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- Java Native Access (JNA) -->
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<version>5.13.0</version>
|
||||
</dependency>
|
||||
<!-- Apache Commons Lang -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
<!-- Apache HttpClient -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
</dependency>
|
||||
<!-- swaggerui相关依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>2.0.9</version>
|
||||
</dependency>
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.23</version>
|
||||
</dependency>
|
||||
<!-- Apache PDFBox的依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>2.0.27</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-metadata</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-quartz</artifactId>
|
||||
</dependency>
|
||||
<!-- sqlserver相关依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>sqljdbc4</artifactId>
|
||||
<version>4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,16 @@
|
||||
package com.example;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @author potter.fu
|
||||
* @date 2018-12-07 15:40
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class MainApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(MainApplication.class, args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.example.config;
|
||||
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
@Configuration
|
||||
@MapperScan(basePackages = "com.example.db1.dao", sqlSessionTemplateRef = "db1SqlSessionTemplate")
|
||||
public class DataSource1Config {
|
||||
/**
|
||||
* 生成数据源. @Primary 注解声明为默认数据源
|
||||
*/
|
||||
@Bean(name = "db1DataSource")
|
||||
@ConfigurationProperties(prefix = "spring.datasource.hikari.db1")
|
||||
@Primary
|
||||
public DataSource testDataSource() {
|
||||
return DataSourceBuilder.create().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 SqlSessionFactory
|
||||
*/
|
||||
@Bean(name = "db1SqlSessionFactory")
|
||||
@Primary
|
||||
public SqlSessionFactory testSqlSessionFactory(@Qualifier("db1DataSource") DataSource dataSource) throws Exception {
|
||||
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
|
||||
bean.setDataSource(dataSource);
|
||||
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/db1/*.xml"));
|
||||
return bean.getObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置事务管理
|
||||
*/
|
||||
@Bean(name = "db1TransactionManager")
|
||||
@Primary
|
||||
public DataSourceTransactionManager testTransactionManager(@Qualifier("db1DataSource") DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
@Bean(name = "db1SqlSessionTemplate")
|
||||
@Primary
|
||||
public SqlSessionTemplate testSqlSessionTemplate(@Qualifier("db1SqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
|
||||
return new SqlSessionTemplate(sqlSessionFactory);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.example.config;
|
||||
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
@Configuration
|
||||
@MapperScan(basePackages = "com.example.db2.dao", sqlSessionTemplateRef = "db2SqlSessionTemplate")
|
||||
public class DataSource2Config {
|
||||
|
||||
@Bean(name = "db2DataSource")
|
||||
@ConfigurationProperties(prefix = "spring.datasource.hikari.db2")
|
||||
public DataSource testDataSource() {
|
||||
return DataSourceBuilder.create().build();
|
||||
}
|
||||
|
||||
@Bean(name = "db2SqlSessionFactory")
|
||||
public SqlSessionFactory testSqlSessionFactory(@Qualifier("db2DataSource") DataSource dataSource) throws Exception {
|
||||
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
|
||||
bean.setDataSource(dataSource);
|
||||
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/db2/*.xml"));
|
||||
return bean.getObject();
|
||||
}
|
||||
|
||||
@Bean(name = "db2TransactionManager")
|
||||
public DataSourceTransactionManager testTransactionManager(@Qualifier("db2DataSource") DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
@Bean(name = "db2SqlSessionTemplate")
|
||||
public SqlSessionTemplate testSqlSessionTemplate(@Qualifier("db2SqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
|
||||
return new SqlSessionTemplate(sqlSessionFactory);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.example.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.ParameterBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.Parameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2WebMvc
|
||||
public class Knife4jConfiguration {
|
||||
/**
|
||||
* 需要配置controller层包名
|
||||
*/
|
||||
String controllerPackagePath = "com.example";
|
||||
@Bean(value = "defaultApi2")
|
||||
public Docket defaultApi2() {
|
||||
List<Parameter> pars = new ArrayList<>();
|
||||
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||
tokenPar.name("token")
|
||||
.description("用户token")
|
||||
.defaultValue("")
|
||||
.modelRef(new ModelRef("string"))
|
||||
.parameterType("header")
|
||||
.required(false)
|
||||
.build();
|
||||
pars.add(tokenPar.build());
|
||||
//添加head参数end
|
||||
|
||||
Docket docket=new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
//.title("swagger-bootstrap-ui-demo RESTful APIs")
|
||||
.description("# swagger-bootstrap-ui-demo RESTful APIs")
|
||||
.termsOfServiceUrl("www.codeleader.top")
|
||||
.version("1.0")
|
||||
.build())
|
||||
.globalOperationParameters(pars)
|
||||
//分组名称
|
||||
.groupName("2.X版本")
|
||||
.select()
|
||||
//这里指定Controller扫描包路径
|
||||
.apis(RequestHandlerSelectors.basePackage(controllerPackagePath))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
return docket;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.example.controller;
|
||||
|
||||
import com.example.service.MedicaRecordService;
|
||||
import com.example.util.CommonResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName MedRecordController
|
||||
* @Description 重耗材采集器接口
|
||||
* @Author linjj
|
||||
* @Date 2025/3/25 16:45
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/task")
|
||||
@Api(value = "重耗材任务接口", tags = "重耗材任务对外接口")
|
||||
@Slf4j
|
||||
public class MedRecordController {
|
||||
|
||||
@Autowired
|
||||
private MedicaRecordService medicaRecordService;
|
||||
@PostMapping("/getTask")
|
||||
@ApiOperation("获取任务接口")
|
||||
@ResponseBody
|
||||
public CommonResult<?> GetTask() {
|
||||
medicaRecordService.gatherMedicaRecord();
|
||||
return CommonResult.success("完成");
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.example.db1.dao;
|
||||
|
||||
import com.example.dto.ArchiveDetailDto;
|
||||
import com.example.vo.ArchiveDetailVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName ArchiveDetailDao
|
||||
* @Description 操作文件表接口
|
||||
* @Author linjj
|
||||
* @Date 2024/1/19 9:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveDetailDao {
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 批量插入文件表数据
|
||||
* @DateTime: 2025/3/25 14:56
|
||||
* @Params: [archiveDetailDto]
|
||||
* @Return boolean
|
||||
*/
|
||||
boolean addArchiveDetailParam(@Param("list") List<ArchiveDetailDto> list);
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 插入文件表数据
|
||||
* @DateTime: 2025/3/25 14:56
|
||||
* @Params: [archiveDetailDto]
|
||||
* @Return boolean
|
||||
*/
|
||||
boolean addArchiveDetail(ArchiveDetailDto archiveDetailDto);
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询文件地址
|
||||
* @DateTime: 2025/3/26 16:34
|
||||
* @Params: [C2]
|
||||
* @Return java.util.List<java.lang.String>
|
||||
*/
|
||||
List<String> getPdfPath(String C1);
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 删除记录
|
||||
* @DateTime: 2025/3/26 16:37
|
||||
* @Params: [C1]
|
||||
* @Return boolean
|
||||
*/
|
||||
boolean delPdfPath(String C1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.example.db1.dao;
|
||||
|
||||
import com.example.vo.ArchiveDetailVo;
|
||||
import com.example.vo.ArchiveMasterVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName ArchiveMasterDao
|
||||
* @Description 患者基础信息查询sql
|
||||
* @Author linjj
|
||||
* @Date 2024/1/18 9:47
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveMasterDao {
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 根据记帐号住院次数查询患者是否存在归档数据库中
|
||||
* @DateTime: 2025/3/27 17:03
|
||||
* @Params: 、
|
||||
* @Return java.util.List<java.lang.String>
|
||||
*/
|
||||
List<String> getMasterId(@Param("patientId")String patientId, @Param("visitId")String visitId);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.example.db2.dao;
|
||||
|
||||
import com.example.vo.MedicaRecordVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MedicaRecordDao
|
||||
* @Description 查询重耗材信息接口
|
||||
* @Author linjj
|
||||
* @Date 2025/3/25 12:34
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MedicaRecordDao {
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询当天患者信息接口
|
||||
* @DateTime: 2025/3/25 12:36
|
||||
* @Return java.util.List<com.example.vo.MedicaRecordVo>
|
||||
*/
|
||||
List<MedicaRecordVo> getMedicaRecord();
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.example.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveDetailDto
|
||||
* @Description 保存文件表记录dto
|
||||
* @Author linjj
|
||||
* @Date 2024/1/18 17:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveDetailDto {
|
||||
//文件id
|
||||
private String id;
|
||||
//文件路径
|
||||
private String pdfPath;
|
||||
//病案id
|
||||
private String masterId;
|
||||
//生成时间
|
||||
private Date upLoadDateTime;
|
||||
//分段id
|
||||
private String assortId;
|
||||
//来源
|
||||
private String source;
|
||||
//文件名
|
||||
private String title;
|
||||
private String flag;
|
||||
private String sys;
|
||||
//扩展字段存储平台唯一id
|
||||
private String C1;
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.example.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveMasterVo
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2024/1/18 9:33
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveMasterDto {
|
||||
//病案id
|
||||
private String id;
|
||||
//患者姓名
|
||||
private String name;
|
||||
//住院次数
|
||||
private String visitId;
|
||||
//住院号
|
||||
private String inpNo;
|
||||
//入院时间
|
||||
private String admissionDateTime;
|
||||
//出院时间
|
||||
private String dischargeDateTime;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.example.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveOtherExtDto
|
||||
* @Description 任务表实体类
|
||||
* @Author linjj
|
||||
* @Date 2025/3/26 15:07
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveOtherExtDto {
|
||||
//任务id
|
||||
private String id;
|
||||
//创建时间
|
||||
private Date SycTime;
|
||||
//下载地址
|
||||
private String SycObj;
|
||||
//默认0
|
||||
private BigInteger otherID;
|
||||
//采集器标识重耗材21
|
||||
private BigInteger sysFlag;
|
||||
//更新时间
|
||||
private Date sysUpdateTime;
|
||||
//住院号
|
||||
private String jzh;
|
||||
//开始时间
|
||||
private Date stime;
|
||||
//结束时间
|
||||
private Date eTime;
|
||||
//任务状态0为开始、2采集失败、3成功
|
||||
private BigInteger statusFlag;
|
||||
//任务状态说明
|
||||
private String pResult;
|
||||
//主键id
|
||||
private String MID;
|
||||
//文件id
|
||||
private String DID;
|
||||
//文件名
|
||||
private String C1;
|
||||
//平台唯一id
|
||||
private String C2;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.example.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName updateOtherDao
|
||||
* @Description 更新任务表实体
|
||||
* @Author linjj
|
||||
* @Date 2025/3/26 15:42
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class UpdateOtherDao {
|
||||
//更新时间
|
||||
private Date sysUpdateTime;
|
||||
//开始时间
|
||||
private Date stime;
|
||||
//结束时间
|
||||
private Date eTime;
|
||||
//任务状态0为开始、2采集失败、3成功
|
||||
private BigInteger statusFlag;
|
||||
//任务状态说明
|
||||
private String pResult;
|
||||
//文件名
|
||||
private String C1;
|
||||
//平台唯一id
|
||||
private String C2;
|
||||
//文件id
|
||||
private String DID;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.example.quartz;
|
||||
|
||||
import com.example.service.MedicaRecordService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @description: 高耗材定时任务采集
|
||||
* @author linjj
|
||||
* @date: 2025/3/18 9:22
|
||||
*/
|
||||
public class ConsumablesQuartz extends QuartzJobBean {
|
||||
|
||||
|
||||
@Resource
|
||||
private MedicaRecordService medicaRecordService;
|
||||
|
||||
@Override
|
||||
protected void executeInternal(JobExecutionContext jobExecutionContext) {
|
||||
//根据试图中时间采集患者高耗材数据
|
||||
medicaRecordService.gatherMedicaRecord();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.example.quartz;
|
||||
|
||||
import org.quartz.*;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @ClassName QuartzConfig
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2025/3/14 15:47
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class QuartzConfig {
|
||||
|
||||
@Value("${quartzTime}")
|
||||
private String quartzTime;
|
||||
|
||||
|
||||
@Bean
|
||||
public JobDetail teatQuartzDetail() {
|
||||
|
||||
return JobBuilder.newJob(ConsumablesQuartz.class).withIdentity("ConsumablesQuartz").storeDurably().build();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Bean
|
||||
public Trigger testQuartzTrigger() {
|
||||
|
||||
return TriggerBuilder.newTrigger().forJob(teatQuartzDetail())
|
||||
|
||||
.withIdentity("ConsumablesQuartz")
|
||||
.withSchedule(CronScheduleBuilder.cronSchedule(quartzTime))
|
||||
.build();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.example.service;
|
||||
|
||||
/**
|
||||
* @ClassName MedicaRecordService
|
||||
* @Description 重耗材采集接口
|
||||
* @Author linjj
|
||||
* @Date 2025/3/25 12:55
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface MedicaRecordService {
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 轮询采集
|
||||
* @DateTime: 2025/3/25 12:58
|
||||
*/
|
||||
void gatherMedicaRecord();
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.example.text;
|
||||
|
||||
import com.example.MainApplication;
|
||||
import com.example.service.MedicaRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName test
|
||||
* @Description 测试类
|
||||
* @Author linjj
|
||||
* @Date 2024/1/18 9:54
|
||||
* @Version 1.0
|
||||
*/
|
||||
@SpringBootTest(classes = MainApplication.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
@Slf4j
|
||||
public class test {
|
||||
@Resource
|
||||
private MedicaRecordService medicaRecordService;
|
||||
@Value("${savePath}")
|
||||
private String savePath;
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(test.class);
|
||||
|
||||
|
||||
@Test
|
||||
public void testDemo() {
|
||||
medicaRecordService.gatherMedicaRecord();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.example.util;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 自定义的异常类
|
||||
* @author: ChenJ
|
||||
* @date: 2022/5/9 17:29
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
public class BusinessException extends Exception {
|
||||
/**
|
||||
* 枚举类型,内含状态码code和信息msg
|
||||
*/
|
||||
private final ExceptionCode exceptionCode;
|
||||
|
||||
public ExceptionCode getExceptionCode() {
|
||||
return exceptionCode;
|
||||
}
|
||||
|
||||
public BusinessException(ExceptionCode exceptionCode) {
|
||||
super(exceptionCode.getMessage());
|
||||
this.exceptionCode = exceptionCode;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
package com.example.util;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author docus
|
||||
* @date 2020/3/28 16:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("响应")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CommonResult<T> {
|
||||
@ApiModelProperty("响应码")
|
||||
private Integer code;
|
||||
@ApiModelProperty("响应消息")
|
||||
private String msg;
|
||||
@ApiModelProperty("响应实体")
|
||||
private T data;
|
||||
|
||||
public CommonResult(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> success(T data) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> success(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param errorCode 错误码
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(IErrorCode errorCode) {
|
||||
return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param errorCode 错误码
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(IErrorCode errorCode, String message) {
|
||||
return new CommonResult<T>(errorCode.getCode(), message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(String message) {
|
||||
return new CommonResult<T>(ResultCode.FAILED.getCode(), message, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed() {
|
||||
return failed(ResultCode.FAILED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数验证失败返回结果
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> validateFailed() {
|
||||
return failed(ResultCode.VALIDATE_FAILED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
*
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> validateFailed(String message) {
|
||||
return new CommonResult<T>(ResultCode.VALIDATE_FAILED.getCode(), message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未登录返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> unauthorized(T data) {
|
||||
return new CommonResult<T>(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重防及重复请求
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> preventreplay(T data) {
|
||||
return new CommonResult<T>(ResultCode.PREVENT_REPLAY.getCode(), ResultCode.PREVENT_REPLAY.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未授权返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> forbidden(T data) {
|
||||
return new CommonResult<T>(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.example.util;
|
||||
|
||||
/**
|
||||
* @Description 封装API的错误码
|
||||
* @Author JacksonTu
|
||||
* @Date 2020/3/28 16:26
|
||||
*/
|
||||
public interface IErrorCode {
|
||||
Integer getCode();
|
||||
|
||||
String getMessage();
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.example.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 这是一个给fastJSON/jackson准备的一个对象
|
||||
*/
|
||||
public class JsonResult implements Serializable {
|
||||
private Map<String, Object> dataMap = new HashMap<>(3);
|
||||
|
||||
public JsonResult() {
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return dataMap.get("code").toString();
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.dataMap.put("code", code);
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return dataMap.get("msg").toString();
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.dataMap.put("msg", msg);
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return dataMap.get("data");
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.dataMap.put("data", data);
|
||||
}
|
||||
|
||||
public Map<String, Object> getDataMap() {
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public void setDataMap(Map<String, Object> dataMap) {
|
||||
this.dataMap = dataMap;
|
||||
}
|
||||
|
||||
public void put(String name, Object value) {
|
||||
this.dataMap.put(name, value);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.example.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>Title:Msg </p>
|
||||
* <p>Description:common return class </p>
|
||||
* <p>Company: </p>
|
||||
* @author hu
|
||||
* @date
|
||||
*/
|
||||
public class Msg {
|
||||
//state:100-success 200-fail
|
||||
private int code;
|
||||
//提示信息
|
||||
private String msg;
|
||||
//用户要返回给浏览器的数据
|
||||
private Map<String,Object> extend=new HashMap<String,Object>();
|
||||
|
||||
|
||||
|
||||
public static Msg fail(String msg){
|
||||
Msg result=new Msg();
|
||||
result.setCode(100);
|
||||
result.setMsg(msg);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static Msg success(String msg){
|
||||
Msg result=new Msg();
|
||||
result.setCode(200);
|
||||
result.setMsg(msg);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Msg add(String key, Object value){
|
||||
this.getExtend().put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Map<String, Object> getExtend() {
|
||||
return extend;
|
||||
}
|
||||
|
||||
public void setExtend(Map<String, Object> extend) {
|
||||
this.extend = extend;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.example.util;
|
||||
|
||||
|
||||
/**
|
||||
* @Description 枚举一些常用API操作码
|
||||
* @Author JacksonTu
|
||||
* @Date 2020/3/28 16:26
|
||||
*/
|
||||
public enum ResultCode implements IErrorCode {
|
||||
|
||||
SUCCESS(0, "操作成功"),
|
||||
FAILED(500, "操作失败"),
|
||||
VALIDATE_FAILED(404, "参数检验失败"),
|
||||
UNAUTHORIZED(401, "暂未登录或token已经过期"),
|
||||
FORBIDDEN(403, "没有相关权限"),
|
||||
PREVENT_REPLAY(405,"重复请求"),
|
||||
NOT_EXIST(601,"数据不存在"),
|
||||
NOT_ENABLE(600,"数据未启用");
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
private ResultCode(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.example.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName Archive_detail
|
||||
* @Author linjj
|
||||
* @Date 2024/3/10 20:59
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveDetailVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String pdfPath;
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.example.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveMasterVo
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2024/1/18 9:33
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveMasterVo {
|
||||
|
||||
//病案id
|
||||
private String id;
|
||||
//患者姓名
|
||||
private String name;
|
||||
//住院次数
|
||||
private String visitId;
|
||||
//住院号
|
||||
private String inpNo;
|
||||
//入院时间
|
||||
private String admissionDateTime;
|
||||
//出院时间
|
||||
private String dischargeDateTime;
|
||||
//记帐号
|
||||
private String patientId;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.example.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName MedicaRecordVo
|
||||
* @Author linjj
|
||||
* @Date 2025/3/25 12:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_select_medica_record")
|
||||
public class MedicaRecordVo {
|
||||
private String id;
|
||||
//记帐号
|
||||
private String medicaRecord;
|
||||
//住院次数
|
||||
private String visitId;
|
||||
//患者姓名
|
||||
private String patientName;
|
||||
//导出时间
|
||||
private Date exportTime;
|
||||
//pdf下载地址
|
||||
private String pdfPath;
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
server.port=3397
|
||||
|
||||
# SQL Server ?????
|
||||
spring.datasource.hikari.db1.jdbc-url=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=DB_PrivilegeManagement_GYFY
|
||||
spring.datasource.hikari.db1.username=sa
|
||||
spring.datasource.hikari.db1.password=docus@702
|
||||
spring.datasource.hikari.db1.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
|
||||
# MySQL??
|
||||
spring.datasource.hikari.db2.jdbc-url=jdbc:mysql://10.6.3.80:3306/gzykd_spd
|
||||
spring.datasource.hikari.db2.username=baxt
|
||||
spring.datasource.hikari.db2.password=123456
|
||||
spring.datasource.hikari.db2.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
|
||||
# MyBatis-Plus ??
|
||||
mybatis-plus.mapper-locations=classpath:mapper/db1/*.xml,classpath:mapper/db2/*.xml
|
||||
mybatis-plus.type-aliases-package=com.example.vo
|
||||
@ -0,0 +1,4 @@
|
||||
#文件保存路径
|
||||
savePath: Z:\Consumables\reload
|
||||
#定时补偿任务时间
|
||||
quartzTime: 0 0/30 * * * ?
|
||||
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.example.db1.dao.ArchiveDetailDao">
|
||||
|
||||
<insert id="addArchiveDetail">
|
||||
insert into archive_detail(ID, PDF_PATH, MasterID, UpLoadDateTime, AssortID, Source, Title, flag, Sys,C1)
|
||||
values (#{id}, #{pdfPath}, #{masterId}, #{upLoadDateTime}, #{assortId},
|
||||
#{source},
|
||||
#{title}, #{flag}, #{sys}, #{C1})
|
||||
</insert>
|
||||
<insert id="addArchiveDetailParam">
|
||||
insert into
|
||||
archive_detail(id,PDF_PATH,MasterID,UpLoadDateTime,AssortID,Source,Title,flag,Sys,C1
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(replace(newid(), '-', ''),#{item.pdfPath},#{item.masterId},#{item.uploadDateTime},#{item.assortId},#{item.source},
|
||||
#{item.title},#{item.flag},#{item.sys})
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="delPdfPath">
|
||||
delete from archive_detail
|
||||
where c1 = #{C1} AND AssortID='61'
|
||||
</delete>
|
||||
<select id="getPdfPath" resultType="java.lang.String">
|
||||
select PDF_PATH FROM Archive_Detail WHERE c1=#{C1} AND AssortID='61'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.example.db1.dao.ArchiveMasterDao">
|
||||
|
||||
<select id="getMasterId" resultType="java.lang.String">
|
||||
select ID from Archive_Master where patient_id=#{patientId} and visit_id=#{visitId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.example.db1.dao.ArchiveOtherDao">
|
||||
<insert id="addArchiveOtherExt">
|
||||
insert into archive_other_ext(ID, SycTime, SycObj, otherID, sysFlag, sysUpdateTime, jzh, stime, eTime,statusFlag,pResult,MID,C2)
|
||||
values (#{id}, #{SycTime}, #{SycObj}, #{otherID}, #{sysFlag},
|
||||
#{sysUpdateTime},#{jzh}, #{stime}, #{eTime}, #{statusFlag}, #{pResult}, #{MID}, #{C2})
|
||||
</insert>
|
||||
<update id="updateArchiveOtherExt">
|
||||
update archive_other_ext
|
||||
<set>
|
||||
<if test="sysUpdateTime != null">
|
||||
sysUpdateTime = #{sysUpdateTime},
|
||||
</if>
|
||||
<if test="stime != null">
|
||||
stime = #{stime},
|
||||
</if>
|
||||
<if test="eTime != null">
|
||||
eTime = #{eTime},
|
||||
</if>
|
||||
<if test="statusFlag != null">
|
||||
statusFlag = #{statusFlag},
|
||||
</if>
|
||||
<if test="pResult != null">
|
||||
pResult = #{pResult},
|
||||
</if>
|
||||
<if test="C1 != null">
|
||||
C1 = #{C1},
|
||||
</if>
|
||||
<if test="DID != null">
|
||||
DID = #{DID},
|
||||
</if>
|
||||
</set>
|
||||
where C2 = #{C2}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getArchiveOtherExt" resultType="java.lang.String">
|
||||
select ID from archive_other_ext where C2=#{C2}
|
||||
</select>
|
||||
<select id="getArchiveOtherExtAndTime" resultType="java.lang.String">
|
||||
select ID from archive_other_ext where C2=#{C2} AND SycTime=#{SycTime}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.example.db2.dao.MedicaRecordDao">
|
||||
|
||||
|
||||
<select id="getMedicaRecord" resultType="com.example.vo.MedicaRecordVo">
|
||||
SELECT id,medica_record as medicaRecord,Visit_id as visitId,patient_name as patientName,exportTime,pdfpath as pdfPath
|
||||
FROM `v_select_medica_record`
|
||||
WHERE medica_record is not null
|
||||
AND visit_id is not null
|
||||
AND exporttime >= DATE_ADD(NOW(), INTERVAL -6 HOUR)
|
||||
AND exporttime <= NOW()
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue