Initial commit
This commit is contained in:
commit
f9034fbe50
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
18
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
18
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
|
||||||
316
mvnw
vendored
Normal file
316
mvnw
vendored
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||||
|
. /usr/local/etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`\\unset -f command; \\command -v java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||||
|
fi
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
else
|
||||||
|
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read key value; do
|
||||||
|
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Downloading from: $jarUrl"
|
||||||
|
fi
|
||||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found wget ... using wget"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found curl ... using curl"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
else
|
||||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Falling back to using Java to download"
|
||||||
|
fi
|
||||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaClass=`cygpath --path --windows "$javaClass"`
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
# Compiling the Java class
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
# Running the downloader
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Running MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
fi
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" \
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||||
188
mvnw.cmd
vendored
Normal file
188
mvnw.cmd
vendored
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %DOWNLOAD_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% ^
|
||||||
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||||
|
%MAVEN_OPTS% ^
|
||||||
|
%MAVEN_DEBUG_OPTS% ^
|
||||||
|
-classpath %WRAPPER_JAR% ^
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
|
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
cmd /C exit /B %ERROR_CODE%
|
||||||
5
pom.properties
Normal file
5
pom.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#Generated by Apache Maven
|
||||||
|
#Wed Mar 24 14:28:42 WIB 2021
|
||||||
|
version=1
|
||||||
|
groupId=com.rsabhk
|
||||||
|
artifactId=reporting-service
|
||||||
148
pom.xml
Normal file
148
pom.xml
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
<?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>1.5.9.RELEASE</version>
|
||||||
|
<!-- <version>2.0.3.RELEASE</version> -->
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>com.rsabhk</groupId>
|
||||||
|
<artifactId>reporting-service</artifactId>
|
||||||
|
<version>1</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>reporting-service</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<!-- <mainClass>com.rsabhk.ReportingServiceApplication</mainClass> -->
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zaxxer</groupId>
|
||||||
|
<artifactId>HikariCP</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency> -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency> -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>bootstrap</artifactId>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat.embed</groupId>
|
||||||
|
<artifactId>tomcat-embed-jasper</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.46</version>
|
||||||
|
</dependency> -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
|
<artifactId>groovy-all</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itext-pdfa</artifactId>
|
||||||
|
<version>5.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.itextpdf</groupId>
|
||||||
|
<artifactId>itextpdf</artifactId>
|
||||||
|
<version>5.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.jasperreports</groupId>
|
||||||
|
<artifactId>jasperreports</artifactId>
|
||||||
|
<version>6.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/net.sourceforge.barbecue/barbecue -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.barbecue</groupId>
|
||||||
|
<artifactId>barbecue</artifactId>
|
||||||
|
<version>1.5-beta1</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.zxing</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.google.zxing/javase -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.zxing</groupId>
|
||||||
|
<artifactId>javase</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
16
src/main/java/com/reporting/ReportingApp.java
Normal file
16
src/main/java/com/reporting/ReportingApp.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package com.reporting;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ReportingApp {
|
||||||
|
|
||||||
|
public ReportingApp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ReportingApp.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
29
src/main/java/com/reporting/Utility/Age.java
Normal file
29
src/main/java/com/reporting/Utility/Age.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.reporting.Utility;
|
||||||
|
|
||||||
|
public class Age {
|
||||||
|
private int days;
|
||||||
|
private int months;
|
||||||
|
private int years;
|
||||||
|
|
||||||
|
public Age(int days, int months, int years) {
|
||||||
|
this.days = days;
|
||||||
|
this.months = months;
|
||||||
|
this.years = years;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDays() {
|
||||||
|
return this.days;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMonths() {
|
||||||
|
return this.months;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getYears() {
|
||||||
|
return this.years;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return this.years + " th, " + this.months + " bln, " + this.days + " hr";
|
||||||
|
}
|
||||||
|
}
|
||||||
66
src/main/java/com/reporting/Utility/AgeCalculator.java
Normal file
66
src/main/java/com/reporting/Utility/AgeCalculator.java
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
package com.reporting.Utility;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.Period;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public final class AgeCalculator {
|
||||||
|
public AgeCalculator() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Age calculateAge(Date birthDate) {
|
||||||
|
Age age = null;
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
LocalDate birthday = LocalDate.parse(format.format(birthDate));
|
||||||
|
Period period = Period.between(birthday, today);
|
||||||
|
age = new Age(period.getDays(), period.getMonths(), period.getYears());
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Age calculateAge2(Date tglRegistrasi, Date birthDate) {
|
||||||
|
int years = 0;
|
||||||
|
int months = 0;
|
||||||
|
int days = 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
Calendar birthDay = Calendar.getInstance();
|
||||||
|
birthDay.setTimeInMillis(birthDate.getTime());
|
||||||
|
Calendar regDay = Calendar.getInstance();
|
||||||
|
regDay.setTimeInMillis(tglRegistrasi.getTime());
|
||||||
|
years = regDay.get(1) - birthDay.get(1);
|
||||||
|
int currMonth = regDay.get(2) + 1;
|
||||||
|
int birthMonth = birthDay.get(2) + 1;
|
||||||
|
months = currMonth - birthMonth;
|
||||||
|
if (months < 0) {
|
||||||
|
--years;
|
||||||
|
months = 12 - birthMonth + currMonth;
|
||||||
|
if (regDay.get(5) < birthDay.get(5)) {
|
||||||
|
--months;
|
||||||
|
}
|
||||||
|
} else if (months == 0 && regDay.get(5) < birthDay.get(5)) {
|
||||||
|
--years;
|
||||||
|
months = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (regDay.get(5) > birthDay.get(5)) {
|
||||||
|
days = regDay.get(5) - birthDay.get(5);
|
||||||
|
} else if (regDay.get(5) < birthDay.get(5)) {
|
||||||
|
int today = regDay.get(5);
|
||||||
|
regDay.add(2, -1);
|
||||||
|
days = regDay.getActualMaximum(5) - birthDay.get(5) + today;
|
||||||
|
} else {
|
||||||
|
days = 0;
|
||||||
|
if (months == 12) {
|
||||||
|
++years;
|
||||||
|
months = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception var10) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Age(days, months, years);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/com/reporting/Utility/Constants.java
Normal file
42
src/main/java/com/reporting/Utility/Constants.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package com.reporting.Utility;
|
||||||
|
|
||||||
|
public class Constants {
|
||||||
|
public static final long ACCESS_TOKEN_VALIDITY_SECONDS = 18000L;
|
||||||
|
public static final String SIGNING_KEY = "x1y2z399";
|
||||||
|
public static final String TOKEN_PREFIX = "";
|
||||||
|
public static final String HEADER_STRING = "Authorization";
|
||||||
|
public static final boolean _TRUE = true;
|
||||||
|
public static final boolean _FALSE = false;
|
||||||
|
|
||||||
|
public Constants() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class ConnDb1 {
|
||||||
|
public static final String poolName = "PoolReporting1";
|
||||||
|
public static final String typeDriver = "com.zaxxer.hikari.HikariDataSource";
|
||||||
|
public static final String driverClassName = "org.postgresql.Driver";
|
||||||
|
public static final String urlDriver = "jdbc:postgresql://172.16.88.8:5432/rsab_hk_production";
|
||||||
|
public static final String userName = "postgres";
|
||||||
|
public static final String password = "root";
|
||||||
|
public static final String testQuery = "SELECT 1";
|
||||||
|
public static final int maxTimeOut = 100000;
|
||||||
|
public static final int maxLifetime = 60000;
|
||||||
|
public static final int minIdle = 5;
|
||||||
|
public static final int idleTimeout = 300000;
|
||||||
|
public static final int maximumPoolSize = 20;
|
||||||
|
public static final Boolean autoCommit = true;
|
||||||
|
|
||||||
|
public ConnDb1() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class MessageInfo {
|
||||||
|
public static final String INFO_MESSAGE = "INFO_MESSAGE";
|
||||||
|
public static final String WARNING_MESSAGE = "WARNING_MESSAGE";
|
||||||
|
public static final String ERROR_MESSAGE = "ERROR_MESSAGE";
|
||||||
|
public static final String EXCEPTION_MESSAGE = "EXCEPTION_MESSAGE";
|
||||||
|
|
||||||
|
public MessageInfo() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
91
src/main/java/com/reporting/Utility/DatabaseUtility.java
Normal file
91
src/main/java/com/reporting/Utility/DatabaseUtility.java
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
package com.reporting.Utility;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
|
public class DatabaseUtility {
|
||||||
|
static final Log LOG = LogFactory.getLog(DatabaseUtility.class);
|
||||||
|
|
||||||
|
public DatabaseUtility() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clear(Connection conn, PreparedStatement pstmt, ResultSet rs) throws Exception {
|
||||||
|
try {
|
||||||
|
if (pstmt != null) {
|
||||||
|
if (rs != null) {
|
||||||
|
rs.close();
|
||||||
|
rs = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conn != null) {
|
||||||
|
conn.close();
|
||||||
|
conn = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception var4) {
|
||||||
|
LOG.error("Exception at clear(conn, pstmt, rs)");
|
||||||
|
LOG.error(DatabaseUtility.class, var4);
|
||||||
|
throw var4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clear(Connection conn, PreparedStatement pstmt) throws Exception {
|
||||||
|
try {
|
||||||
|
if (pstmt != null) {
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conn != null) {
|
||||||
|
conn.close();
|
||||||
|
conn = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception var3) {
|
||||||
|
LOG.error("Exception at clear(conn, pstmt)");
|
||||||
|
LOG.error(DatabaseUtility.class, var3);
|
||||||
|
throw var3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clear(PreparedStatement pstmt, ResultSet rs) throws Exception {
|
||||||
|
try {
|
||||||
|
if (pstmt != null) {
|
||||||
|
if (rs != null) {
|
||||||
|
rs.close();
|
||||||
|
rs = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception var3) {
|
||||||
|
LOG.error("Exception at clear(pstmt, rs)");
|
||||||
|
LOG.error(DatabaseUtility.class, var3);
|
||||||
|
throw var3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void clear(PreparedStatement pstmt) throws Exception {
|
||||||
|
try {
|
||||||
|
if (pstmt != null) {
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception var2) {
|
||||||
|
LOG.error("Exception at clear(pstmt)");
|
||||||
|
LOG.error(DatabaseUtility.class, var2);
|
||||||
|
throw var2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
57
src/main/java/com/reporting/config/DbConfig.java
Normal file
57
src/main/java/com/reporting/config/DbConfig.java
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package com.reporting.config;
|
||||||
|
|
||||||
|
import com.reporting.Utility.Constants.ConnDb1;
|
||||||
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class DbConfig {
|
||||||
|
static final Log LOG = LogFactory.getLog(DbConfig.class);
|
||||||
|
|
||||||
|
public DbConfig() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Primary
|
||||||
|
@Bean(
|
||||||
|
name = {"db"}
|
||||||
|
)
|
||||||
|
public DataSource dataSource1() {
|
||||||
|
HikariConfig config = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
config = new HikariConfig();
|
||||||
|
config.setPoolName("PoolReporting1");
|
||||||
|
config.setDriverClassName("org.postgresql.Driver");
|
||||||
|
config.setConnectionTestQuery("SELECT 1");
|
||||||
|
config.setJdbcUrl("jdbc:postgresql://172.16.88.8:5432/rsab_hk_production");
|
||||||
|
config.setUsername("postgres");
|
||||||
|
config.setPassword("root");
|
||||||
|
config.setMinimumIdle(5);
|
||||||
|
config.setIdleTimeout(300000L);
|
||||||
|
config.setMaximumPoolSize(20);
|
||||||
|
config.setConnectionTimeout(100000L);
|
||||||
|
config.setAutoCommit(ConnDb1.autoCommit);
|
||||||
|
} catch (Exception var3) {
|
||||||
|
System.out.println(var3.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return new HikariDataSource(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean(
|
||||||
|
name = {"jdbcTemplate"}
|
||||||
|
)
|
||||||
|
public JdbcTemplate jdbcTemplate1(@Qualifier("db") DataSource ds) {
|
||||||
|
return new JdbcTemplate(ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
334
src/main/java/com/reporting/controller/ReportingController.java
Normal file
334
src/main/java/com/reporting/controller/ReportingController.java
Normal file
@ -0,0 +1,334 @@
|
|||||||
|
package com.reporting.controller;
|
||||||
|
|
||||||
|
import com.reporting.model.Pasien;
|
||||||
|
import com.reporting.service.ReportingService;
|
||||||
|
import com.reporting.service.ResepService;
|
||||||
|
import com.reporting.service.VerifikasiTagihanSupplierServices;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JasperExportManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/service-reporting"})
|
||||||
|
public class ReportingController {
|
||||||
|
static final Log LOG = LogFactory.getLog(ReportingController.class);
|
||||||
|
@Autowired
|
||||||
|
private ReportingService reportingService;
|
||||||
|
@Autowired
|
||||||
|
private ResepService resepService;
|
||||||
|
@Autowired
|
||||||
|
private VerifikasiTagihanSupplierServices verifikasiTagihanSupplierServices;
|
||||||
|
|
||||||
|
public ReportingController() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/label-gizi/{noregistrasi}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportLabelGiziTest(ModelAndView mv, @PathVariable("noregistrasi") String noregistrasi, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.exportPdfLabelGizi(noregistrasi);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/permintaan-makanan"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportPermintaanMakanan(@RequestParam("idRu") Integer idRu, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.exportPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/rekap-makanan"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapMakanan(@RequestParam("idRu") Integer idRu, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.exportPdfRekapMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/kartu-pasien/{nocm}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportKartuPasien(ModelAndView mv, @PathVariable("nocm") String nocm, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printReportKartuPasien(nocm);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/resep-dokter"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public Map<String, Object> getResepDokter(@RequestParam("strukOrder") String strukOrder) {
|
||||||
|
Map<String, Object> map = new HashMap();
|
||||||
|
|
||||||
|
try {
|
||||||
|
Pasien pasien = this.resepService.getPasien(strukOrder);
|
||||||
|
map.put("data", pasien);
|
||||||
|
} catch (Exception var4) {
|
||||||
|
var4.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/resep-pasien/{strukOrder}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportResepPasien(ModelAndView mv, @PathVariable("strukOrder") String strukOrder, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.resepService.exportPdfResepPasien(strukOrder);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-bedah/{noregis}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportLapBedahPasien(ModelAndView mv, @PathVariable("noregis") String noregis, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printReportLapBedah(noregis);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-konsul/{noorder}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportKonsulPasien(ModelAndView mv, @PathVariable("noorder") String noorder, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printReportKonsul(noorder);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-lab/{noorder}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void showPDF(@PathVariable("noorder") String noorder, HttpServletResponse response) {
|
||||||
|
InputStream inputStream = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String path = "/mnt/lis/" + noorder + ".pdf";
|
||||||
|
File file = new File(path);
|
||||||
|
inputStream = new FileInputStream(file);
|
||||||
|
|
||||||
|
int nRead;
|
||||||
|
while ((nRead = inputStream.read()) != -1) {
|
||||||
|
response.getWriter().write(nRead);
|
||||||
|
}
|
||||||
|
} catch (Exception var15) {
|
||||||
|
System.out.println(var15.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
inputStream.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/cetak-sep/{norec_pd}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void showPDFSEP(@PathVariable("norec_pd") String norec_pd, HttpServletResponse response) {
|
||||||
|
InputStream inputStream = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String path = "/home/admindev/reporting/" + norec_pd + ".pdf";
|
||||||
|
File file = new File(path);
|
||||||
|
inputStream = new FileInputStream(file);
|
||||||
|
|
||||||
|
int nRead;
|
||||||
|
while ((nRead = inputStream.read()) != -1) {
|
||||||
|
response.getWriter().write(nRead);
|
||||||
|
}
|
||||||
|
} catch (Exception var15) {
|
||||||
|
System.out.println(var15.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
inputStream.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-upk/{nores}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportUpk(ModelAndView mv, @PathVariable("nores") String nores, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printReportUpk(nores);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-verifikasi-tagihan-supplier/{noverifikasifk}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportVerifikasiTagihanSupplier(ModelAndView mv, @PathVariable("noverifikasifk") String noverifikasifk, HttpServletResponse response, HttpServletRequest req) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.verifikasiTagihanSupplierServices.generateVerifikasiTagihanPdf(noverifikasifk);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-verifikasi-pembayaran-umum/{noverifikasifk}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportVerifikasiPembayaranUmum(ModelAndView mv, @PathVariable("noverifikasifk") String noverifikasifk, HttpServletResponse response, HttpServletRequest req) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.verifikasiTagihanSupplierServices.generateVerifikasiPembayaranUmumPdf(noverifikasifk);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-harian-by-dept/{deptId}/{tglAwal}/{tglAkhir}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapPHarian(ModelAndView mv, @PathVariable("deptId") int deptId, @PathVariable("tglAwal") String tglAwal, @PathVariable("tglAkhir") String tglAkhir, HttpServletResponse response, HttpServletRequest req) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfLapRekapHarianByDept(deptId, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-harian-by-ruangan/{deptId}/{ruangId}/{tglAwal}/{tglAkhir}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapPHarian(ModelAndView mv, @PathVariable("deptId") int deptId, @PathVariable("ruangId") int ruangId, @PathVariable("tglAwal") String tglAwal, @PathVariable("tglAkhir") String tglAkhir, HttpServletResponse response, HttpServletRequest req) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfLapRekapHarianByRuanganId(deptId, ruangId, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-pengkajian-awal-by-nores/{nores}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportPengkajianAwalbyNoRes(ModelAndView mv, @PathVariable("nores") String nores, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfPengkajianAwalByNoRes(nores);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-penjamin"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapPenjamin(ModelAndView mv, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, @RequestParam("idDept") int idDept, @RequestParam("kelompokPasien") int kelompokPasien, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfRekapPenjamin(tglAwal, tglAkhir, idDept, kelompokPasien);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-penjamin-by-institusi"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapPenjaminByInstitusiPasien(ModelAndView mv, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, @RequestParam("idDept") int idDept, @RequestParam("kelompokPasien") int kelompokPasien, @RequestParam("institusiPasien") int institusiPasien, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfRekapPenjaminByInstitusiPasien(tglAwal, tglAkhir, idDept, kelompokPasien, institusiPasien);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-penjamin-by-ranap"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapPenjaminByRanap(ModelAndView mv, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, @RequestParam("idDept") int idDept, @RequestParam("kelompokPasien") int kelompokPasien, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfRekapPenjaminByRanap(tglAwal, tglAkhir, idDept, kelompokPasien);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-permintaan-makanan"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportPermintaanMakanan(ModelAndView mv, @RequestParam("idRu") int idRu, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-rekap-makanan"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportRekapMakanan(ModelAndView mv, @RequestParam("idRu") int idRu, @RequestParam("tglAwal") String tglAwal, @RequestParam("tglAkhir") String tglAkhir, HttpServletRequest req, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.printPdfRekapMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/gelang-pasien/{noregistrasi}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void exportLabelGelangPasien(ModelAndView mv, @PathVariable("noregistrasi") String noregistrasi, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.exportPdfGelangPasien(noregistrasi);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/lap-resume-medis/{norec}"},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public void printLapResumeMedis(ModelAndView mv, @PathVariable("norec") String norec, HttpServletResponse response) throws Exception {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.reportingService.exportPdfResumeMedis(norec);
|
||||||
|
response.setContentType("application/pdf");
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
|
||||||
|
}
|
||||||
|
}
|
||||||
104
src/main/java/com/reporting/controller/UserController.java
Normal file
104
src/main/java/com/reporting/controller/UserController.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
//
|
||||||
|
// Source code recreated from a .class file by IntelliJ IDEA
|
||||||
|
// (powered by FernFlower decompiler)
|
||||||
|
//
|
||||||
|
|
||||||
|
package com.reporting.controller;
|
||||||
|
|
||||||
|
import com.reporting.model.InfoResponse;
|
||||||
|
import com.reporting.model.Printer;
|
||||||
|
import com.reporting.model.PrinterForm;
|
||||||
|
import com.reporting.service.UserService;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.print.DocFlavor;
|
||||||
|
import javax.print.PrintService;
|
||||||
|
import javax.print.PrintServiceLookup;
|
||||||
|
import javax.print.attribute.AttributeSet;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperExportManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping({"/"})
|
||||||
|
public class UserController {
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
public UserController() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/", ""},
|
||||||
|
method = {RequestMethod.GET}
|
||||||
|
)
|
||||||
|
public ModelAndView home() {
|
||||||
|
ModelAndView model = new ModelAndView();
|
||||||
|
PrinterForm printerForm = new PrinterForm();
|
||||||
|
PrintService[] services = PrintServiceLookup.lookupPrintServices((DocFlavor) null, (AttributeSet) null);
|
||||||
|
List<Printer> printers = new ArrayList();
|
||||||
|
PrintService[] var5 = services;
|
||||||
|
int var6 = services.length;
|
||||||
|
|
||||||
|
for (int var7 = 0; var7 < var6; ++var7) {
|
||||||
|
PrintService service = var5[var7];
|
||||||
|
Printer printer = new Printer();
|
||||||
|
printer.setPrinterName(service.getName());
|
||||||
|
printers.add(printer);
|
||||||
|
}
|
||||||
|
|
||||||
|
model.addObject("listPrinters", printers);
|
||||||
|
model.addObject("printerForm", printerForm);
|
||||||
|
model.setViewName("home");
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/export"},
|
||||||
|
method = {RequestMethod.POST}
|
||||||
|
)
|
||||||
|
public void export(ModelAndView model, HttpServletResponse response) throws IOException, JRException, SQLException {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
response.setContentType("application/x-download");
|
||||||
|
response.setHeader("Content-Disposition", String.format("attachment; filename=\"users.pdf\""));
|
||||||
|
OutputStream out = response.getOutputStream();
|
||||||
|
jasperPrint = this.userService.exportPdfFile();
|
||||||
|
JasperExportManager.exportReportToPdfStream(jasperPrint, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/printDirect"},
|
||||||
|
method = {RequestMethod.POST}
|
||||||
|
)
|
||||||
|
public void printDirect(@ModelAttribute("printerForm") PrinterForm printerForm, ModelAndView model) throws IOException, JRException, SQLException {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
jasperPrint = this.userService.exportPdfFile();
|
||||||
|
this.userService.printReport(jasperPrint, printerForm.getPrinterName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(
|
||||||
|
value = {"/printDirectDefault"},
|
||||||
|
method = {RequestMethod.POST}
|
||||||
|
)
|
||||||
|
public void printDirectDefaultPrinter() throws SQLException, JRException, IOException {
|
||||||
|
JasperPrint jasperPrint = null;
|
||||||
|
InfoResponse infoResponse = new InfoResponse();
|
||||||
|
PrintService service = PrintServiceLookup.lookupDefaultPrintService();
|
||||||
|
String printServiceName = service.getName();
|
||||||
|
jasperPrint = this.userService.exportPdfFile();
|
||||||
|
this.userService.printReport(jasperPrint, printServiceName);
|
||||||
|
infoResponse.setInfo("Cetak Data Berhasil");
|
||||||
|
}
|
||||||
|
}
|
||||||
43
src/main/java/com/reporting/dao/LabelGizi.java
Normal file
43
src/main/java/com/reporting/dao/LabelGizi.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
package com.reporting.dao;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.core.io.ResourceLoader;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Repository
|
||||||
|
public class LabelGizi {
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private ResourceLoader resourceLoader;
|
||||||
|
|
||||||
|
public LabelGizi() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfFile() throws SQLException, JRException, IOException {
|
||||||
|
Connection conn = this.jdbcTemplate.getDataSource().getConnection();
|
||||||
|
String path = this.resourceLoader.getResource("classpath:rpt_labelgizi.jrxml").getURI().getPath();
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
String noregistrasi = "22fa0dd0-43c1-11e9-961f-8d877e74";
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noregistrasi", noregistrasi);
|
||||||
|
JasperPrint print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
}
|
||||||
566
src/main/java/com/reporting/dao/ReportingDao.java
Normal file
566
src/main/java/com/reporting/dao/ReportingDao.java
Normal file
@ -0,0 +1,566 @@
|
|||||||
|
package com.reporting.dao;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.print.DocFlavor;
|
||||||
|
import javax.print.PrintService;
|
||||||
|
import javax.print.PrintServiceLookup;
|
||||||
|
import javax.print.attribute.AttributeSet;
|
||||||
|
import javax.print.attribute.HashPrintRequestAttributeSet;
|
||||||
|
import javax.print.attribute.HashPrintServiceAttributeSet;
|
||||||
|
import javax.print.attribute.PrintRequestAttributeSet;
|
||||||
|
import javax.print.attribute.PrintServiceAttributeSet;
|
||||||
|
import javax.print.attribute.standard.MediaSizeName;
|
||||||
|
import javax.print.attribute.standard.OrientationRequested;
|
||||||
|
import javax.print.attribute.standard.PrinterName;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.export.JRPrintServiceExporter;
|
||||||
|
import net.sf.jasperreports.engine.type.OrientationEnum;
|
||||||
|
import net.sf.jasperreports.export.SimpleExporterInput;
|
||||||
|
import net.sf.jasperreports.export.SimplePrintServiceExporterConfiguration;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Repository
|
||||||
|
public class ReportingDao {
|
||||||
|
private static final Log LOG = LogFactory.getLog(ReportingDao.class);
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("db")
|
||||||
|
private DataSource ds1;
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate1;
|
||||||
|
|
||||||
|
public ReportingDao() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printReport(JasperPrint jasperPrint, String selectedPrinter) throws JRException {
|
||||||
|
PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
|
||||||
|
printRequestAttributeSet.add(MediaSizeName.ISO_A4);
|
||||||
|
if (jasperPrint.getOrientationValue() == OrientationEnum.LANDSCAPE) {
|
||||||
|
printRequestAttributeSet.add(OrientationRequested.LANDSCAPE);
|
||||||
|
} else {
|
||||||
|
printRequestAttributeSet.add(OrientationRequested.PORTRAIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
|
||||||
|
printServiceAttributeSet.add(new PrinterName(selectedPrinter, (Locale) null));
|
||||||
|
JRPrintServiceExporter exporter = new JRPrintServiceExporter();
|
||||||
|
SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();
|
||||||
|
configuration.setPrintRequestAttributeSet(printRequestAttributeSet);
|
||||||
|
configuration.setPrintServiceAttributeSet(printServiceAttributeSet);
|
||||||
|
configuration.setDisplayPageDialog(false);
|
||||||
|
configuration.setDisplayPrintDialog(false);
|
||||||
|
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
|
||||||
|
exporter.setConfiguration(configuration);
|
||||||
|
PrintService[] services = PrintServiceLookup.lookupPrintServices((DocFlavor) null, (AttributeSet) null);
|
||||||
|
PrintService selectedService = null;
|
||||||
|
if (services.length != 0 || services != null) {
|
||||||
|
PrintService[] var9 = services;
|
||||||
|
int var10 = services.length;
|
||||||
|
|
||||||
|
for (int var11 = 0; var11 < var10; ++var11) {
|
||||||
|
PrintService service = var9[var11];
|
||||||
|
String existingPrinter = service.getName();
|
||||||
|
if (existingPrinter.equals(selectedPrinter)) {
|
||||||
|
selectedService = service;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedService != null) {
|
||||||
|
exporter.exportReport();
|
||||||
|
} else {
|
||||||
|
System.out.println("You did not set the printer!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLabelGizi(String noregistrasi) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_labelgizi.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noregistrasi", noregistrasi);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfLabelGizi");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfPermintaanMakanan(Integer idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/pl_permintaan_makan.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("idRu", idRu);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at exportPdfPermintaanMakanan");
|
||||||
|
LOG.error(ReportingDao.class, var17);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapMakanan(Integer idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/pl_rekap_makan.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("idRu", idRu);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at exportPdfRekapMakanan");
|
||||||
|
LOG.error(ReportingDao.class, var17);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfKartuPasien(String nocm) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_kartupasien.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("nocm", nocm);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfLabelGizi");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLapBedah(String noregis) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_lapbedah.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noregis", noregis);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfResepPasien");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfKonsul(String noorder) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_konsul.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noorder", noorder);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfResepPasien");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfUpk(String nores) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_upk.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("nores", nores);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfUpk");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfVerifikasiTagihan(String noverifikasifk) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/BuktiKas.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noverifikasifk", noverifikasifk);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfVerifikasiTagihan");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLapRekapHarianByDept(int deptId, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_LapRekapPHarian.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("deptId", deptId);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at exportPdfLapRekapHarianByDept");
|
||||||
|
LOG.error(ReportingDao.class, var17);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLapRekapHarianByRuanganId(int deptId, int ruangId, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_LapRekapPHarianV2.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("deptId", deptId);
|
||||||
|
parameters.put("ruangId", ruangId);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var18) {
|
||||||
|
LOG.error("Exception at exportPdfLapRekapHarianByRuanganId");
|
||||||
|
LOG.error(ReportingDao.class, var18);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var17) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfPengkajianAwalByNoRes(String nores) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_PengkajianAwal.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("nores", nores);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfPengkajianAwalByNoRes");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapPenjamin(String tglAwal, String tglAkhir, int idDept, int kelompokPasien) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_rekap_penjamin.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
parameters.put("idDept", idDept);
|
||||||
|
parameters.put("kelompokPasien", kelompokPasien);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var18) {
|
||||||
|
LOG.error("Exception at exportPdfPengkajianAwalRekapPenjamin");
|
||||||
|
LOG.error(ReportingDao.class, var18);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var17) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapPenjaminByInstitusiPasien(String tglAwal, String tglAkhir, int idDept, int kelompokPasien, int institusiPasien) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_rekap_penjamin.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
parameters.put("idDept", idDept);
|
||||||
|
parameters.put("kelompokPasien", kelompokPasien);
|
||||||
|
parameters.put("institusiPasien", institusiPasien);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var19) {
|
||||||
|
LOG.error("Exception at exportPdfPengkajianAwalRekapPenjaminByInstitusiPasien");
|
||||||
|
LOG.error(ReportingDao.class, var19);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var18) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapPenjaminByRanap(String tglAwal, String tglAkhir, int idDept, int kelompokPasien) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/PL_rekap_penjaminRanap.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
parameters.put("idDept", idDept);
|
||||||
|
parameters.put("kelompokPasien", kelompokPasien);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var18) {
|
||||||
|
LOG.error("Exception at exportPdfRekapPenjaminByRanap");
|
||||||
|
LOG.error(ReportingDao.class, var18);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var17) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/pl_permintaan_makan.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("idRu", idRu);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at exportPdfPermintaanMakanan");
|
||||||
|
LOG.error(ReportingDao.class, var17);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapMakanan(int idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/pl_rekap_makan.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("idRu", idRu);
|
||||||
|
parameters.put("tglAwal", tglAwal);
|
||||||
|
parameters.put("tglAkhir", tglAkhir);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at exportPdfRekapMakanan");
|
||||||
|
LOG.error(ReportingDao.class, var17);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfGelangPasien(String noregistrasi) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/gelang_pasien.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("noregistrasi", noregistrasi);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfGelangPasien");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfResumeMedis(String norec) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/ResumeMedis.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
parameters.put("norec", norec);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at exportPdfResumeMedis");
|
||||||
|
LOG.error(ReportingDao.class, var15);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
}
|
||||||
100
src/main/java/com/reporting/dao/UserDaoImpl.java
Normal file
100
src/main/java/com/reporting/dao/UserDaoImpl.java
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
package com.reporting.dao;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.print.DocFlavor;
|
||||||
|
import javax.print.PrintService;
|
||||||
|
import javax.print.PrintServiceLookup;
|
||||||
|
import javax.print.attribute.AttributeSet;
|
||||||
|
import javax.print.attribute.HashPrintRequestAttributeSet;
|
||||||
|
import javax.print.attribute.HashPrintServiceAttributeSet;
|
||||||
|
import javax.print.attribute.PrintRequestAttributeSet;
|
||||||
|
import javax.print.attribute.PrintServiceAttributeSet;
|
||||||
|
import javax.print.attribute.standard.MediaSizeName;
|
||||||
|
import javax.print.attribute.standard.OrientationRequested;
|
||||||
|
import javax.print.attribute.standard.PrinterName;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.export.JRPrintServiceExporter;
|
||||||
|
import net.sf.jasperreports.engine.type.OrientationEnum;
|
||||||
|
import net.sf.jasperreports.export.SimpleExporterInput;
|
||||||
|
import net.sf.jasperreports.export.SimplePrintServiceExporterConfiguration;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.core.io.ResourceLoader;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Repository
|
||||||
|
public class UserDaoImpl {
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
private JdbcTemplate jdbcTemplate;
|
||||||
|
@Autowired
|
||||||
|
private ResourceLoader resourceLoader;
|
||||||
|
|
||||||
|
public UserDaoImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfFile() throws SQLException, JRException, IOException {
|
||||||
|
Connection conn = this.jdbcTemplate.getDataSource().getConnection();
|
||||||
|
String path = this.resourceLoader.getResource("classpath:rpt_users.jrxml").getURI().getPath();
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
Map<String, Object> parameters = new HashMap();
|
||||||
|
JasperPrint print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printReport(JasperPrint jasperPrint, String selectedPrinter) throws JRException {
|
||||||
|
PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
|
||||||
|
printRequestAttributeSet.add(MediaSizeName.ISO_A4);
|
||||||
|
if (jasperPrint.getOrientationValue() == OrientationEnum.LANDSCAPE) {
|
||||||
|
printRequestAttributeSet.add(OrientationRequested.LANDSCAPE);
|
||||||
|
} else {
|
||||||
|
printRequestAttributeSet.add(OrientationRequested.PORTRAIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
|
||||||
|
printServiceAttributeSet.add(new PrinterName(selectedPrinter, (Locale) null));
|
||||||
|
JRPrintServiceExporter exporter = new JRPrintServiceExporter();
|
||||||
|
SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();
|
||||||
|
configuration.setPrintRequestAttributeSet(printRequestAttributeSet);
|
||||||
|
configuration.setPrintServiceAttributeSet(printServiceAttributeSet);
|
||||||
|
configuration.setDisplayPageDialog(false);
|
||||||
|
configuration.setDisplayPrintDialog(false);
|
||||||
|
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
|
||||||
|
exporter.setConfiguration(configuration);
|
||||||
|
PrintService[] services = PrintServiceLookup.lookupPrintServices((DocFlavor) null, (AttributeSet) null);
|
||||||
|
PrintService selectedService = null;
|
||||||
|
if (services.length != 0 || services != null) {
|
||||||
|
PrintService[] var9 = services;
|
||||||
|
int var10 = services.length;
|
||||||
|
|
||||||
|
for (int var11 = 0; var11 < var10; ++var11) {
|
||||||
|
PrintService service = var9[var11];
|
||||||
|
String existingPrinter = service.getName();
|
||||||
|
if (existingPrinter.equals(selectedPrinter)) {
|
||||||
|
selectedService = service;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedService != null) {
|
||||||
|
exporter.exportReport();
|
||||||
|
} else {
|
||||||
|
System.out.println("You did not set the printer!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
37
src/main/java/com/reporting/model/ApiResponse.java
Normal file
37
src/main/java/com/reporting/model/ApiResponse.java
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
public class ApiResponse<T> {
|
||||||
|
private int status;
|
||||||
|
private String message;
|
||||||
|
private Object result;
|
||||||
|
|
||||||
|
public ApiResponse(int status, String message, Object result) {
|
||||||
|
this.status = status;
|
||||||
|
this.message = message;
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return this.status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return this.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getResult() {
|
||||||
|
return this.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Object result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
src/main/java/com/reporting/model/InfoResponse.java
Normal file
16
src/main/java/com/reporting/model/InfoResponse.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
public class InfoResponse {
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
public InfoResponse() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return this.info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInfo(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
155
src/main/java/com/reporting/model/Pasien.java
Normal file
155
src/main/java/com/reporting/model/Pasien.java
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Pasien implements Serializable {
|
||||||
|
private String strukOrder;
|
||||||
|
private String namaPasien;
|
||||||
|
private String noRegistrasi;
|
||||||
|
private String jenisKelamin;
|
||||||
|
private String noCm;
|
||||||
|
private String tglLahir;
|
||||||
|
private String namaDokter;
|
||||||
|
private Timestamp tglInput;
|
||||||
|
private String tglOrder;
|
||||||
|
private String namaRuangan;
|
||||||
|
private String kamar;
|
||||||
|
private String alergi;
|
||||||
|
private List<Resep> listResep;
|
||||||
|
private String umurPasien;
|
||||||
|
private String beratBadan;
|
||||||
|
private String riwayatAlergi;
|
||||||
|
|
||||||
|
public Pasien() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStrukOrder() {
|
||||||
|
return this.strukOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrukOrder(String strukOrder) {
|
||||||
|
this.strukOrder = strukOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaPasien() {
|
||||||
|
return this.namaPasien;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaPasien(String namaPasien) {
|
||||||
|
this.namaPasien = namaPasien;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoRegistrasi() {
|
||||||
|
return this.noRegistrasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoRegistrasi(String noRegistrasi) {
|
||||||
|
this.noRegistrasi = noRegistrasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJenisKelamin() {
|
||||||
|
return this.jenisKelamin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJenisKelamin(String jenisKelamin) {
|
||||||
|
this.jenisKelamin = jenisKelamin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoCm() {
|
||||||
|
return this.noCm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoCm(String noCm) {
|
||||||
|
this.noCm = noCm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaDokter() {
|
||||||
|
return this.namaDokter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaDokter(String namaDokter) {
|
||||||
|
this.namaDokter = namaDokter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getTglInput() {
|
||||||
|
return this.tglInput;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTglInput(Timestamp tglInput) {
|
||||||
|
this.tglInput = tglInput;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaRuangan() {
|
||||||
|
return this.namaRuangan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaRuangan(String namaRuangan) {
|
||||||
|
this.namaRuangan = namaRuangan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKamar() {
|
||||||
|
return this.kamar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKamar(String kamar) {
|
||||||
|
this.kamar = kamar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlergi() {
|
||||||
|
return this.alergi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlergi(String alergi) {
|
||||||
|
this.alergi = alergi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTglOrder() {
|
||||||
|
return this.tglOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTglOrder(String tglOrder) {
|
||||||
|
this.tglOrder = tglOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTglLahir() {
|
||||||
|
return this.tglLahir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTglLahir(String tglLahir) {
|
||||||
|
this.tglLahir = tglLahir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Resep> getListResep() {
|
||||||
|
return this.listResep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListResep(List<Resep> listResep) {
|
||||||
|
this.listResep = listResep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUmurPasien() {
|
||||||
|
return this.umurPasien;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUmurPasien(String umurPasien) {
|
||||||
|
this.umurPasien = umurPasien;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeratBadan() {
|
||||||
|
return this.beratBadan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBeratBadan(String beratBadan) {
|
||||||
|
this.beratBadan = beratBadan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRiwayatAlergi() {
|
||||||
|
return this.riwayatAlergi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRiwayatAlergi(String riwayatAlergi) {
|
||||||
|
this.riwayatAlergi = riwayatAlergi;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
src/main/java/com/reporting/model/Printer.java
Normal file
16
src/main/java/com/reporting/model/Printer.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
public class Printer {
|
||||||
|
private String printerName;
|
||||||
|
|
||||||
|
public Printer() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrinterName() {
|
||||||
|
return this.printerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrinterName(String printerName) {
|
||||||
|
this.printerName = printerName;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
src/main/java/com/reporting/model/PrinterForm.java
Normal file
16
src/main/java/com/reporting/model/PrinterForm.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
public class PrinterForm {
|
||||||
|
private String printerName;
|
||||||
|
|
||||||
|
public PrinterForm() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrinterName() {
|
||||||
|
return this.printerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrinterName(String printerName) {
|
||||||
|
this.printerName = printerName;
|
||||||
|
}
|
||||||
|
}
|
||||||
64
src/main/java/com/reporting/model/Resep.java
Normal file
64
src/main/java/com/reporting/model/Resep.java
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Resep implements Serializable {
|
||||||
|
private String resep;
|
||||||
|
private String strukOrderfk;
|
||||||
|
private String qtyProduk;
|
||||||
|
private String keteranganPakai;
|
||||||
|
private String namaObat;
|
||||||
|
private List<ResepDetail> resepDetail;
|
||||||
|
|
||||||
|
public Resep() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResep() {
|
||||||
|
return this.resep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResep(String resep) {
|
||||||
|
this.resep = resep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStrukOrderfk() {
|
||||||
|
return this.strukOrderfk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrukOrderfk(String strukOrderfk) {
|
||||||
|
this.strukOrderfk = strukOrderfk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQtyProduk() {
|
||||||
|
return this.qtyProduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtyProduk(String qtyProduk) {
|
||||||
|
this.qtyProduk = qtyProduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeteranganPakai() {
|
||||||
|
return this.keteranganPakai;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeteranganPakai(String keteranganPakai) {
|
||||||
|
this.keteranganPakai = keteranganPakai;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaObat() {
|
||||||
|
return this.namaObat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaObat(String namaObat) {
|
||||||
|
this.namaObat = namaObat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ResepDetail> getResepDetail() {
|
||||||
|
return this.resepDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResepDetail(List<ResepDetail> resepDetail) {
|
||||||
|
this.resepDetail = resepDetail;
|
||||||
|
}
|
||||||
|
}
|
||||||
45
src/main/java/com/reporting/model/ResepDetail.java
Normal file
45
src/main/java/com/reporting/model/ResepDetail.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ResepDetail implements Serializable {
|
||||||
|
private String qtyProduk;
|
||||||
|
private String keteranganPakai;
|
||||||
|
private String keteranganLainnya;
|
||||||
|
private String namaObat;
|
||||||
|
|
||||||
|
public ResepDetail() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQtyProduk() {
|
||||||
|
return this.qtyProduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtyProduk(String qtyProduk) {
|
||||||
|
this.qtyProduk = qtyProduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeteranganPakai() {
|
||||||
|
return this.keteranganPakai;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeteranganPakai(String keteranganPakai) {
|
||||||
|
this.keteranganPakai = keteranganPakai;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeteranganLainnya() {
|
||||||
|
return this.keteranganLainnya;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeteranganLainnya(String keteranganLainnya) {
|
||||||
|
this.keteranganLainnya = keteranganLainnya;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaObat() {
|
||||||
|
return this.namaObat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaObat(String namaObat) {
|
||||||
|
this.namaObat = namaObat;
|
||||||
|
}
|
||||||
|
}
|
||||||
144
src/main/java/com/reporting/model/VerifikasiTagihanSupplier.java
Normal file
144
src/main/java/com/reporting/model/VerifikasiTagihanSupplier.java
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class VerifikasiTagihanSupplier implements Serializable {
|
||||||
|
private String noSpk;
|
||||||
|
private String noverifikasifk;
|
||||||
|
private String kodeAnggaran;
|
||||||
|
private String namaRekanan;
|
||||||
|
private String keperluan;
|
||||||
|
private String noVerifikasi;
|
||||||
|
private Double totalBayar;
|
||||||
|
private String terbilang;
|
||||||
|
private String asalproduk;
|
||||||
|
private String kodeDana;
|
||||||
|
private String ba;
|
||||||
|
private String sppb;
|
||||||
|
private String faktur;
|
||||||
|
private Double pph;
|
||||||
|
private String tglSPK;
|
||||||
|
|
||||||
|
public VerifikasiTagihanSupplier() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoSpk() {
|
||||||
|
return this.noSpk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoSpk(String noSpk) {
|
||||||
|
this.noSpk = noSpk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoverifikasifk() {
|
||||||
|
return this.noverifikasifk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoverifikasifk(String noverifikasifk) {
|
||||||
|
this.noverifikasifk = noverifikasifk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKodeAnggaran() {
|
||||||
|
return this.kodeAnggaran;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKodeAnggaran(String kodeAnggaran) {
|
||||||
|
this.kodeAnggaran = kodeAnggaran;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaRekanan() {
|
||||||
|
return this.namaRekanan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaRekanan(String namaRekanan) {
|
||||||
|
this.namaRekanan = namaRekanan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeperluan() {
|
||||||
|
return this.keperluan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeperluan(String keperluan) {
|
||||||
|
this.keperluan = keperluan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoVerifikasi() {
|
||||||
|
return this.noVerifikasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoVerifikasi(String noVerifikasi) {
|
||||||
|
this.noVerifikasi = noVerifikasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getTotalBayar() {
|
||||||
|
return this.totalBayar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalBayar(Double totalBayar) {
|
||||||
|
this.totalBayar = totalBayar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTerbilang() {
|
||||||
|
return this.terbilang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTerbilang(String terbilang) {
|
||||||
|
this.terbilang = terbilang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAsalproduk() {
|
||||||
|
return this.asalproduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAsalproduk(String asalproduk) {
|
||||||
|
this.asalproduk = asalproduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKodeDana() {
|
||||||
|
return this.kodeDana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKodeDana(String kodeDana) {
|
||||||
|
this.kodeDana = kodeDana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBa() {
|
||||||
|
return this.ba;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBa(String ba) {
|
||||||
|
this.ba = ba;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSppb() {
|
||||||
|
return this.sppb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSppb(String sppb) {
|
||||||
|
this.sppb = sppb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFaktur() {
|
||||||
|
return this.faktur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFaktur(String faktur) {
|
||||||
|
this.faktur = faktur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getPph() {
|
||||||
|
return this.pph;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPph(Double pph) {
|
||||||
|
this.pph = pph;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTglSPK() {
|
||||||
|
return this.tglSPK;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTglSPK(String tglSPK) {
|
||||||
|
this.tglSPK = tglSPK;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
package com.reporting.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class VerifikasiTagihanSupplier2 implements Serializable {
|
||||||
|
private String noSpk;
|
||||||
|
private String noverifikasifk;
|
||||||
|
private String kodeAnggaran;
|
||||||
|
private String namaRekanan;
|
||||||
|
private String keperluan;
|
||||||
|
private String noVerifikasi;
|
||||||
|
private Double totalBayar;
|
||||||
|
private String terbilang;
|
||||||
|
private String asalproduk;
|
||||||
|
private String kodeDana;
|
||||||
|
private String ba;
|
||||||
|
private String sppb;
|
||||||
|
private String faktur;
|
||||||
|
private Double pph;
|
||||||
|
|
||||||
|
public VerifikasiTagihanSupplier2() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoSpk() {
|
||||||
|
return this.noSpk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoSpk(String noSpk) {
|
||||||
|
this.noSpk = noSpk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoverifikasifk() {
|
||||||
|
return this.noverifikasifk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoverifikasifk(String noverifikasifk) {
|
||||||
|
this.noverifikasifk = noverifikasifk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKodeAnggaran() {
|
||||||
|
return this.kodeAnggaran;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKodeAnggaran(String kodeAnggaran) {
|
||||||
|
this.kodeAnggaran = kodeAnggaran;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNamaRekanan() {
|
||||||
|
return this.namaRekanan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamaRekanan(String namaRekanan) {
|
||||||
|
this.namaRekanan = namaRekanan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeperluan() {
|
||||||
|
return this.keperluan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeperluan(String keperluan) {
|
||||||
|
this.keperluan = keperluan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoVerifikasi() {
|
||||||
|
return this.noVerifikasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoVerifikasi(String noVerifikasi) {
|
||||||
|
this.noVerifikasi = noVerifikasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getTotalBayar() {
|
||||||
|
return this.totalBayar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalBayar(Double totalBayar) {
|
||||||
|
this.totalBayar = totalBayar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTerbilang() {
|
||||||
|
return this.terbilang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTerbilang(String terbilang) {
|
||||||
|
this.terbilang = terbilang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAsalproduk() {
|
||||||
|
return this.asalproduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAsalproduk(String asalproduk) {
|
||||||
|
this.asalproduk = asalproduk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKodeDana() {
|
||||||
|
return this.kodeDana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKodeDana(String kodeDana) {
|
||||||
|
this.kodeDana = kodeDana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBa() {
|
||||||
|
return this.ba;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBa(String ba) {
|
||||||
|
this.ba = ba;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSppb() {
|
||||||
|
return this.sppb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSppb(String sppb) {
|
||||||
|
this.sppb = sppb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFaktur() {
|
||||||
|
return this.faktur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFaktur(String faktur) {
|
||||||
|
this.faktur = faktur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getPph() {
|
||||||
|
return this.pph;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPph(Double pph) {
|
||||||
|
this.pph = pph;
|
||||||
|
}
|
||||||
|
}
|
||||||
52
src/main/java/com/reporting/service/LapLabService.java
Normal file
52
src/main/java/com/reporting/service/LapLabService.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package com.reporting.service;
|
||||||
|
|
||||||
|
import com.itextpdf.text.pdf.PdfReader;
|
||||||
|
import com.itextpdf.text.pdf.parser.PdfTextExtractor;
|
||||||
|
import com.reporting.dao.ReportingDao;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service("lapLabService")
|
||||||
|
public class LapLabService {
|
||||||
|
static final Log LOG = LogFactory.getLog(LapLabService.class);
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("db")
|
||||||
|
private DataSource ds1;
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate1;
|
||||||
|
|
||||||
|
public LapLabService() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getLapLab() {
|
||||||
|
new File("/home/iwankasan/Documents/lap_lab/19057181.pdf");
|
||||||
|
FileInputStream fis = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String path = "/home/iwankasan/Documents/lap_lab/19057181.pdf";
|
||||||
|
PdfReader pdfReader = new PdfReader(path);
|
||||||
|
int pages = pdfReader.getNumberOfPages();
|
||||||
|
|
||||||
|
for (int i = 1; i <= pages; ++i) {
|
||||||
|
String pageContent = PdfTextExtractor.getTextFromPage(pdfReader, i);
|
||||||
|
System.out.println("Content on page " + i + ": " + pageContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
pdfReader.close();
|
||||||
|
} catch (Exception var8) {
|
||||||
|
LOG.error("Exception at LapLabService");
|
||||||
|
LOG.error(ReportingDao.class, var8);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
92
src/main/java/com/reporting/service/ReportingService.java
Normal file
92
src/main/java/com/reporting/service/ReportingService.java
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
package com.reporting.service;
|
||||||
|
|
||||||
|
import com.reporting.dao.ReportingDao;
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ReportingService {
|
||||||
|
@Autowired
|
||||||
|
private ReportingDao reportingDao;
|
||||||
|
|
||||||
|
public ReportingService() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfLabelGizi(String noregistrasi) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfLabelGizi(noregistrasi);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfPermintaanMakanan(Integer idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfRekapMakanan(Integer idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfRekapMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printReport(JasperPrint jasperPrint, String selectedPrinter) throws JRException {
|
||||||
|
this.reportingDao.printReport(jasperPrint, selectedPrinter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printReportKartuPasien(String nocm) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfKartuPasien(nocm);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printReportLapBedah(String noregis) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfLapBedah(noregis);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printReportKonsul(String noregis) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfKonsul(noregis);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printReportUpk(String nores) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfUpk(nores);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printReportVerifikasiTagihan(String noverifikasifk) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfVerifikasiTagihan(noverifikasifk);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfLapRekapHarianByDept(int deptId, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfLapRekapHarianByDept(deptId, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfLapRekapHarianByRuanganId(int deptId, int ruangId, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfLapRekapHarianByRuanganId(deptId, ruangId, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfPengkajianAwalByNoRes(String nores) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfPengkajianAwalByNoRes(nores);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfRekapPenjamin(String tglAwal, String tglAkhir, int idDept, int kelompokPasien) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfRekapPenjamin(tglAwal, tglAkhir, idDept, kelompokPasien);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfRekapPenjaminByInstitusiPasien(String tglAwal, String tglAkhir, int idDept, int kelompokPasien, int institusiPasien) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfRekapPenjaminByInstitusiPasien(tglAwal, tglAkhir, idDept, kelompokPasien, institusiPasien);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfRekapPenjaminByRanap(String tglAwal, String tglAkhir, int idDept, int kelompokPasien) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfRekapPenjaminByRanap(tglAwal, tglAkhir, idDept, kelompokPasien);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfPermintaanMakanan(int idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfPermintaanMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint printPdfRekapMakanan(int idRu, String tglAwal, String tglAkhir) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfRekapMakanan(idRu, tglAwal, tglAkhir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfGelangPasien(String noregistrasi) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfGelangPasien(noregistrasi);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfResumeMedis(String norec) throws Exception {
|
||||||
|
return this.reportingDao.exportPdfResumeMedis(norec);
|
||||||
|
}
|
||||||
|
}
|
||||||
218
src/main/java/com/reporting/service/ResepService.java
Normal file
218
src/main/java/com/reporting/service/ResepService.java
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
package com.reporting.service;
|
||||||
|
|
||||||
|
import com.reporting.Utility.Age;
|
||||||
|
import com.reporting.Utility.AgeCalculator;
|
||||||
|
import com.reporting.Utility.DatabaseUtility;
|
||||||
|
import com.reporting.dao.ReportingDao;
|
||||||
|
import com.reporting.model.Pasien;
|
||||||
|
import com.reporting.model.Resep;
|
||||||
|
import com.reporting.model.ResepDetail;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service("resepService")
|
||||||
|
public class ResepService {
|
||||||
|
static final Log LOG = LogFactory.getLog(ResepService.class);
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("db")
|
||||||
|
private DataSource ds1;
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate1;
|
||||||
|
|
||||||
|
public ResepService() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pasien getPasien(String strukOrder) throws Exception {
|
||||||
|
Pasien pasien = null;
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
String SQL = "select st.norec,st.objectpegawaiorderfk as dokter,to_char(st.tglorder,'dd-MM-yyyy') as tglorder,st.noregistrasifk, \tpg.namalengkap,ru.namaruangan,pd.noregistrasi,pd.tglregistrasi,ps.nocm,ps.namapasien, to_char(ps.tgllahir,'dd-MM-yyyy') as tgllahir,st.noorder,date(ps.tgllahir) as umurPasien, \tst.masalah as riwayatAlergi, st.diagnosis as beratBadan\tfrom strukorder_t st \tleft join pasien_m ps on st.nocmfk=ps.id \tleft join pasiendaftar_t pd on pd.norec=st.noregistrasifk \tleft join pegawai_m pg on pg.id=st.objectpegawaiorderfk \tleft join ruangan_m ru on ru.id=st.objectruanganfk \twhere st.statusenabled=true and st.keteranganorder='Order Farmasi' and st.norec='" + strukOrder + "'";
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.ds1 = this.jdbcTemplate1.getDataSource();
|
||||||
|
conn = this.ds1.getConnection();
|
||||||
|
pstmt = conn.prepareStatement(SQL);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
pasien = new Pasien();
|
||||||
|
pasien.setNoRegistrasi(rs.getString("noregistrasi"));
|
||||||
|
pasien.setNamaDokter(rs.getString("namalengkap"));
|
||||||
|
pasien.setTglOrder(rs.getString("tglorder"));
|
||||||
|
pasien.setTglLahir(rs.getString("tgllahir"));
|
||||||
|
pasien.setNamaPasien(rs.getString("namapasien"));
|
||||||
|
pasien.setNamaRuangan(rs.getString("namaruangan"));
|
||||||
|
pasien.setNoCm(rs.getString("nocm"));
|
||||||
|
Age age = AgeCalculator.calculateAge(rs.getDate("umurPasien"));
|
||||||
|
String umurPasien = Integer.toString(age.getYears()) + " tahun " + Integer.toString(age.getMonths()) + " bulan " + Integer.toString(age.getDays()) + " hari";
|
||||||
|
pasien.setUmurPasien(umurPasien);
|
||||||
|
if (rs.getString("riwayatAlergi") != null) {
|
||||||
|
pasien.setRiwayatAlergi(rs.getString("riwayatAlergi"));
|
||||||
|
} else {
|
||||||
|
pasien.setRiwayatAlergi("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
pasien.setBeratBadan(rs.getString("beratBadan"));
|
||||||
|
pasien.setUmurPasien(umurPasien);
|
||||||
|
pasien.setListResep(this.getResepHeader(strukOrder));
|
||||||
|
}
|
||||||
|
} catch (Exception var16) {
|
||||||
|
LOG.error("Exception at getPasien()", var16);
|
||||||
|
throw var16;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
DatabaseUtility.clear(conn, pstmt, rs);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return pasien;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Resep> getResepHeader(String strukOrder) throws Exception {
|
||||||
|
List<Resep> list = null;
|
||||||
|
Resep resep = null;
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
String SQL_HEADER = "select rd.racikanke as resep,rd.strukorderfk as strukorder from \t t_resep_dokter rd where rd.strukorderfk='" + strukOrder + "' \t and rd.statusenabled='true' group by rd.racikanke,rd.strukorderfk order by rd.racikanke asc";
|
||||||
|
|
||||||
|
try {
|
||||||
|
list = new ArrayList();
|
||||||
|
this.ds1 = this.jdbcTemplate1.getDataSource();
|
||||||
|
conn = this.ds1.getConnection();
|
||||||
|
pstmt = conn.prepareStatement(SQL_HEADER);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
resep = new Resep();
|
||||||
|
resep.setResep(rs.getString("resep"));
|
||||||
|
resep.setResepDetail(this.getResepDetail(strukOrder, rs.getString("resep")));
|
||||||
|
if (resep != null) {
|
||||||
|
list.add(resep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception var16) {
|
||||||
|
LOG.error("Exception at getResepDetail()", var16);
|
||||||
|
throw var16;
|
||||||
|
} finally {
|
||||||
|
resep = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
DatabaseUtility.clear(conn, pstmt, rs);
|
||||||
|
} catch (Exception var15) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ResepDetail> getResepDetail(String strukOrder, String resepke) throws Exception {
|
||||||
|
List<ResepDetail> list = null;
|
||||||
|
ResepDetail detail = null;
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
String SQL_ITEM = "select rd.objectprodukfk,rd.qtyproduk,rd.satuanview, rd.keteranganpakai,rd.keteranganlainnya,rd.namaobat from t_resep_dokter rd where rd.strukorderfk='" + strukOrder + "' and rd.racikanke='" + resepke + "'";
|
||||||
|
|
||||||
|
try {
|
||||||
|
list = new ArrayList();
|
||||||
|
this.ds1 = this.jdbcTemplate1.getDataSource();
|
||||||
|
conn = this.ds1.getConnection();
|
||||||
|
pstmt = conn.prepareStatement(SQL_ITEM);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
|
||||||
|
while (rs.next()) {
|
||||||
|
detail = new ResepDetail();
|
||||||
|
detail.setNamaObat(rs.getString("namaobat"));
|
||||||
|
detail.setKeteranganLainnya(rs.getString("keteranganlainnya"));
|
||||||
|
detail.setKeteranganPakai(rs.getString("keteranganpakai"));
|
||||||
|
detail.setQtyProduk(rs.getString("qtyproduk"));
|
||||||
|
if (detail != null) {
|
||||||
|
list.add(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception var17) {
|
||||||
|
LOG.error("Exception at getResepDetail()", var17);
|
||||||
|
throw var17;
|
||||||
|
} finally {
|
||||||
|
detail = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
DatabaseUtility.clear(conn, pstmt, rs);
|
||||||
|
} catch (Exception var16) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfResepPasien(String strukOrder) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Connection conn = null;
|
||||||
|
Map<String, Object> parameters = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
conn = this.jdbcTemplate1.getDataSource().getConnection();
|
||||||
|
String path = "/usr/share/app/reporting/rpt_eresep1.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
String namaPasien = this.getPasien(strukOrder).getNamaPasien();
|
||||||
|
String noRegistrasi = this.getPasien(strukOrder).getNoRegistrasi();
|
||||||
|
String tglInput = this.getPasien(strukOrder).getTglOrder();
|
||||||
|
String namaDokter = this.getPasien(strukOrder).getNamaDokter();
|
||||||
|
String namaRuangan = this.getPasien(strukOrder).getNamaRuangan();
|
||||||
|
String umurPasien = this.getPasien(strukOrder).getUmurPasien();
|
||||||
|
String tglLahir = this.getPasien(strukOrder).getTglLahir();
|
||||||
|
String noCM = this.getPasien(strukOrder).getNoCm();
|
||||||
|
String alergi = this.getPasien(strukOrder).getRiwayatAlergi();
|
||||||
|
String beratBadan = this.getPasien(strukOrder).getBeratBadan();
|
||||||
|
parameters = new HashMap();
|
||||||
|
parameters.put("strukOrder", strukOrder);
|
||||||
|
parameters.put("noRegistrasi", noRegistrasi);
|
||||||
|
parameters.put("namaPasien", namaPasien);
|
||||||
|
parameters.put("tglInput", tglInput);
|
||||||
|
parameters.put("tglLahir", tglLahir);
|
||||||
|
parameters.put("namaDokter", namaDokter);
|
||||||
|
parameters.put("namaRuangan", namaRuangan);
|
||||||
|
parameters.put("umurPasien", umurPasien);
|
||||||
|
parameters.put("noCM", noCM);
|
||||||
|
parameters.put("alergi", alergi);
|
||||||
|
parameters.put("beratBadan", beratBadan);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, conn);
|
||||||
|
} catch (Exception var25) {
|
||||||
|
LOG.error("Exception at exportPdfResepPasien");
|
||||||
|
LOG.error(ReportingDao.class, var25);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception var24) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
}
|
||||||
|
}
|
||||||
28
src/main/java/com/reporting/service/UserService.java
Normal file
28
src/main/java/com/reporting/service/UserService.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.reporting.service;
|
||||||
|
|
||||||
|
import com.reporting.dao.UserDaoImpl;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserService {
|
||||||
|
@Autowired
|
||||||
|
private UserDaoImpl userDao;
|
||||||
|
|
||||||
|
public UserService() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint exportPdfFile() throws SQLException, JRException, IOException {
|
||||||
|
return this.userDao.exportPdfFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printReport(JasperPrint jasperPrint, String selectedPrinter) throws JRException {
|
||||||
|
this.userDao.printReport(jasperPrint, selectedPrinter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,470 @@
|
|||||||
|
package com.reporting.service;
|
||||||
|
|
||||||
|
import com.reporting.Utility.DatabaseUtility;
|
||||||
|
import com.reporting.model.VerifikasiTagihanSupplier;
|
||||||
|
import com.reporting.model.VerifikasiTagihanSupplier2;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Vector;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service("verifikasiTagihanSupplierServices")
|
||||||
|
public class VerifikasiTagihanSupplierServices {
|
||||||
|
static final Log LOG = LogFactory.getLog(VerifikasiTagihanSupplierServices.class);
|
||||||
|
@Autowired
|
||||||
|
@Qualifier("db")
|
||||||
|
private DataSource ds1;
|
||||||
|
@Qualifier("jdbcTemplate")
|
||||||
|
@Autowired
|
||||||
|
private JdbcTemplate jdbcTemplate1;
|
||||||
|
|
||||||
|
public VerifikasiTagihanSupplierServices() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String terbilang(BigDecimal value) {
|
||||||
|
value = value.setScale(0, 6);
|
||||||
|
String strValue = value.toString();
|
||||||
|
int lenValue = strValue.length();
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
String bil1 = "";
|
||||||
|
String bil2 = "";
|
||||||
|
String urai = "";
|
||||||
|
|
||||||
|
while (x < lenValue) {
|
||||||
|
int z;
|
||||||
|
int strTot;
|
||||||
|
++x;
|
||||||
|
strTot = Integer.valueOf(strValue.substring(x - 1, x));
|
||||||
|
y += strTot;
|
||||||
|
z = lenValue - x + 1;
|
||||||
|
label94:
|
||||||
|
switch (strTot) {
|
||||||
|
case 1:
|
||||||
|
if (z != 1 && z != 7 && z != 10 && z != 13) {
|
||||||
|
if (z == 4) {
|
||||||
|
if (x == 1) {
|
||||||
|
bil1 = "Se";
|
||||||
|
} else {
|
||||||
|
bil1 = "Satu ";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (z != 2 && z != 5 && z != 8 && z != 11 && z != 14) {
|
||||||
|
bil1 = "Se";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
++x;
|
||||||
|
int newStrTot = Integer.valueOf(strValue.substring(x - 1, x));
|
||||||
|
z = lenValue - x + 1;
|
||||||
|
bil2 = "";
|
||||||
|
switch (newStrTot) {
|
||||||
|
case 0:
|
||||||
|
bil1 = "Sepuluh ";
|
||||||
|
break label94;
|
||||||
|
case 1:
|
||||||
|
bil1 = "Sebelas ";
|
||||||
|
break label94;
|
||||||
|
case 2:
|
||||||
|
bil1 = "Dua belas ";
|
||||||
|
break label94;
|
||||||
|
case 3:
|
||||||
|
bil1 = "Tiga belas ";
|
||||||
|
break label94;
|
||||||
|
case 4:
|
||||||
|
bil1 = "Empat belas ";
|
||||||
|
break label94;
|
||||||
|
case 5:
|
||||||
|
bil1 = "Lima belas ";
|
||||||
|
break label94;
|
||||||
|
case 6:
|
||||||
|
bil1 = "Enam belas ";
|
||||||
|
break label94;
|
||||||
|
case 7:
|
||||||
|
bil1 = "Tujuh belas ";
|
||||||
|
break label94;
|
||||||
|
case 8:
|
||||||
|
bil1 = "Delapan belas ";
|
||||||
|
break label94;
|
||||||
|
case 9:
|
||||||
|
bil1 = "Sembilan belas ";
|
||||||
|
default:
|
||||||
|
break label94;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bil1 = "Satu ";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
bil1 = "Dua ";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
bil1 = "Tiga ";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
bil1 = "Empat ";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
bil1 = "Lima ";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
bil1 = "Enam ";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
bil1 = "Tujuh ";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
bil1 = "Delapan ";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
bil1 = "Sembilan ";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
bil1 = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strTot > 0) {
|
||||||
|
if (z != 2 && z != 5 && z != 8 && z != 11 && z != 14) {
|
||||||
|
if (z != 3 && z != 6 && z != 9 && z != 12 && z != 15) {
|
||||||
|
bil2 = "";
|
||||||
|
} else {
|
||||||
|
bil2 = "Ratus ";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bil2 = "Puluh ";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bil2 = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y > 0) {
|
||||||
|
switch (z) {
|
||||||
|
case 4:
|
||||||
|
bil2 = bil2 + "Ribu ";
|
||||||
|
y = 0;
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
case 8:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
|
case 12:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
bil2 = bil2 + "Juta ";
|
||||||
|
y = 0;
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
bil2 = bil2 + "Milyar ";
|
||||||
|
y = 0;
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
bil2 = bil2 + "Trilyun ";
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bil1.equals("Se")) {
|
||||||
|
String pre = bil2.substring(0, 1);
|
||||||
|
urai = urai + bil1 + bil2.replace(pre, pre.toLowerCase());
|
||||||
|
} else {
|
||||||
|
urai = urai + bil1 + bil2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return urai;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String bilangx(double angka) {
|
||||||
|
String[] nomina = new String[]{"", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas"};
|
||||||
|
if (angka < 12.0) {
|
||||||
|
return nomina[(int) angka];
|
||||||
|
} else if (angka >= 12.0 && angka <= 19.0) {
|
||||||
|
return nomina[(int) angka % 10] + " belas ";
|
||||||
|
} else if (angka >= 20.0 && angka <= 99.0) {
|
||||||
|
return nomina[(int) angka / 10] + " puluh " + nomina[(int) angka % 10];
|
||||||
|
} else if (angka >= 100.0 && angka <= 199.0) {
|
||||||
|
return "seratus " + this.bilangx(angka % 100.0);
|
||||||
|
} else if (angka >= 200.0 && angka <= 999.0) {
|
||||||
|
return nomina[(int) angka / 100] + " ratus " + this.bilangx(angka % 100.0);
|
||||||
|
} else if (angka >= 1000.0 && angka <= 1999.0) {
|
||||||
|
return "seribu " + this.bilangx(angka % 1000.0);
|
||||||
|
} else if (angka >= 2000.0 && angka <= 999999.0) {
|
||||||
|
return this.bilangx((double) ((int) angka / 1000)) + " ribu " + this.bilangx(angka % 1000.0);
|
||||||
|
} else {
|
||||||
|
return angka >= 1000000.0 && angka <= 9.99999999E8 ? this.bilangx((double) ((int) angka / 1000000)) + " juta " + this.bilangx(angka % 1000000.0) : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public VerifikasiTagihanSupplier getVerifikasiTagihanSupplier(String noverifikasifk) throws Exception {
|
||||||
|
VerifikasiTagihanSupplier verif = null;
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
String SQL = "select * from(select xx.norec,xx.noverifikasifk,xx.tglstruk,xx.tgldokumen,xx.tgljatuhtempo,xx.rknid,xx.namarekanan,xx.asalproduk,xx.nostruk,xx.nodokumen,xx.nopo,xx.keperluan,xx.nosbk, \t\t\t\t(CASE WHEN xx.noverifikasi is null THEN '-' ELSE xx.noverifikasi END) as noverifikasi,xx.total,xx.totalppn,xx.totaldiskon,xx.subtotal,xx.sisautang, (CASE WHEN xx.noverifikasi is null THEN '-' ELSE xx.noverifikasi END) as noverifikasi, (case when xx.noorder is null then '-' else xx.noorder end) as nospk, (CASE WHEN xx.totalbayar = 0 THEN 'BELUM LUNAS' WHEN xx.totalbayar <> 0 and xx.totalbayar > 0 and xx.sisautang <> 0 THEN 'KREDIT' WHEN xx.totalbayar = xx.subtotal OR xx.sisautang = 0 THEN 'LUNAS' ELSE '' END) as statusbayar, (Case when xx.noverifikasi is null THEN 'BLM VERIFIKASI' WHEN xx.noverifikasi is not null THEN 'VERIFIKASI' ELSE '' END) as status, (Case when xx.confirmfk is null THEN 'BLM CONFIRM' ELSE 'CONFIRM' END) as statusconfirmkabag, (Case when xx.confirm1fk is null THEN 'BLM CONFIRM' ELSE 'CONFIRM' END) as statusconfirmanggaran, xx.noorderintern,xx.tglorder,xx.confirmfk,xx.confirm1fk,xx.keteranganlainnya as kodeanggaran,xx.kode_dana,xx.kode_dana,xx.ba,xx.sppb,xx.faktur,xx.pph FROM(SELECT x.norec,x.tglstruk,x.asalproduk,x.tgldokumen,x.tgljatuhtempo,x.rknid,x.namarekanan,x.nostruk,x.nodokumen,x.nopo, x.totalppn as totalppn, x.totaldiskon as totaldiskon, x.total as total, (x.total+x.totalppn-x.totaldiskon) as subtotal, x.totaldibayar as totalbayar, (case when x.totalsisahutang is null then (x.total+x.totalppn-x.totaldiskon) ELSE \t\t\t\t x.totalsisahutang end) as sisautang, x.nosbk,x.noverifikasi,x.noverifikasifk,x.confirmfk,x.confirm1fk,x.noorderintern,x.noorder,x.tglorder,x.keteranganlainnya,x.keperluan,x.kode_dana,x.ba,x.sppb,x.faktur,x.pph FROM (SELECT sp.norec,sp.tglstruk,sp.tglfaktur as tgldokumen,sp.nostruk,sp.nosppb as nopo,sp.nofaktur as nodokumen, SUM(spd.qtyproduk*spd.hargasatuan) as total, asp.asalproduk as asalproduk, SUM(spd.qtyproduk*spd.hargappn) as totalppn,SUM(spd.qtyproduk*spd.hargadiscount) as totaldiskon, CASE WHEN sbk.totaldibayar is null then 0 else sbk.totaldibayar end as totaldibayar, CASE WHEN sbk.totalsudahdibayar is null then 0 else sbk.totalsudahdibayar end as totalsudahdibayar,\t sbk.nosbk,sv.noverifikasi,sv.norec as noverifikasifk,sp.tgljatuhtempo,rkn.id as rknid,rkn.namarekanan,sbk.totalsisahutang, sv.confirmfk,sv.confirm1fk,so.noorderintern,so.noorder,so.tglorder,sv.keteranganlainnya,sv.keperluan,pg.kode_dana,sv.ba,sv.sppb,sv.faktur,sv.pph from strukpelayanan_t as sp left join strukorder_t as so on so.norec = sp.noorderfk inner join strukpelayanandetail_t as spd on spd.nostrukfk = sp.norec \t\t\t\t LEFT JOIN asalproduk_m as asp ON asp.id = spd.objectasalprodukfk left join rekanan_m as rkn on rkn.id = sp.objectrekananfk left join strukbuktipengeluaran_t as sbk on sbk.norec = sp.nosbklastfk left join strukverifikasi_t as sv on sv.norec = spd.noverifikasifk left join ruangan_m as ru on ru.id = sv.objectruanganfk \t\t\t\t left join penggunaan_anggaran_t as pg on pg.kode_anggaran=sv.keteranganlainnya\t where sp.objectkelompoktransaksifk=35 and sv.norec='" + noverifikasifk + "' GROUP BY sp.norec,sp.tglstruk,sp.tglfaktur,sp.nostruk,sp.nosppb,sp.nofaktur,sp.nosbklastfk,sbk.totaldibayar,pg.kode_dana, sbk.totalsudahdibayar,sp.tgljatuhtempo,rkn.id,rkn.namarekanan,sbk.nosbk,sv.noverifikasi,sv.norec,sbk.totalsisahutang,so.noorderintern,so.noorder,so.tglorder,asp.asalproduk) as x) as xx) as su";
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.ds1 = this.jdbcTemplate1.getDataSource();
|
||||||
|
conn = this.ds1.getConnection();
|
||||||
|
pstmt = conn.prepareStatement(SQL);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
if (rs.next()) {
|
||||||
|
verif = null;
|
||||||
|
verif = new VerifikasiTagihanSupplier();
|
||||||
|
verif.setNoverifikasifk(rs.getString("noverifikasifk"));
|
||||||
|
verif.setNoSpk(rs.getString("nospk"));
|
||||||
|
verif.setKodeAnggaran(rs.getString("kodeanggaran"));
|
||||||
|
verif.setKodeDana(rs.getString("kode_dana"));
|
||||||
|
verif.setNamaRekanan(rs.getString("namarekanan"));
|
||||||
|
verif.setTotalBayar(rs.getDouble("subtotal"));
|
||||||
|
verif.setKeperluan(rs.getString("keperluan"));
|
||||||
|
verif.setAsalproduk(rs.getString("asalproduk"));
|
||||||
|
verif.setNoVerifikasi(rs.getString("noverifikasi"));
|
||||||
|
verif.setBa(rs.getString("ba"));
|
||||||
|
verif.setSppb(rs.getString("sppb"));
|
||||||
|
verif.setFaktur(rs.getString("faktur"));
|
||||||
|
verif.setPph(rs.getDouble("pph"));
|
||||||
|
verif.setTerbilang(terbilang(new BigDecimal(rs.getDouble("subtotal"))).toUpperCase() + "RUPIAH");
|
||||||
|
}
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at getVerifikasiTagihanSupplier()");
|
||||||
|
LOG.error("VerifikasiTagihanSupplierServices.class", var15);
|
||||||
|
throw var15;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
DatabaseUtility.clear(conn, pstmt, rs);
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return verif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VerifikasiTagihanSupplier getVerifikasiPembayaranUmum(String noverifikasifk) throws Exception {
|
||||||
|
VerifikasiTagihanSupplier verif = null;
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
String SQL = "select spu.norec,to_char(spu.tgltransaksi,'dd-MM-yyyy') as tglSPK,spu.keperluan,spu.totaltagihan,spu.totalbayar,\t sv.norec as noverifikasifk,sv.tglverifikasi,sv.noverifikasi,sv.confirmfk,sv.confirm1fk,sv.keteranganlainnya as kodeanggaran,\t pg.kode_dana,spu.nospk,spu.keperluan,spu.namarekanan,spu.dana as asalproduk,sv.ba,sv.sppb,sv.faktur,sv.pph\t from strukpembayaranumum_t as spu \t left join strukverifikasi_t as sv on sv.norec=spu.noverifikasifk left join penggunaan_anggaran_t as pg on pg.kode_anggaran=sv.keteranganlainnya where sv.norec='" + noverifikasifk + "'";
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.ds1 = this.jdbcTemplate1.getDataSource();
|
||||||
|
conn = this.ds1.getConnection();
|
||||||
|
pstmt = conn.prepareStatement(SQL);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
if (rs.next()) {
|
||||||
|
verif = null;
|
||||||
|
verif = new VerifikasiTagihanSupplier();
|
||||||
|
verif.setNoverifikasifk(rs.getString("noverifikasifk"));
|
||||||
|
verif.setNoSpk(rs.getString("nospk"));
|
||||||
|
verif.setKodeAnggaran(rs.getString("kodeanggaran"));
|
||||||
|
verif.setKodeDana(rs.getString("kode_dana"));
|
||||||
|
verif.setNamaRekanan(rs.getString("namarekanan"));
|
||||||
|
verif.setTotalBayar(rs.getDouble("totaltagihan"));
|
||||||
|
verif.setKeperluan(rs.getString("keperluan"));
|
||||||
|
verif.setAsalproduk(rs.getString("asalproduk"));
|
||||||
|
verif.setNoVerifikasi(rs.getString("noverifikasi"));
|
||||||
|
verif.setTglSPK(rs.getString("tglSPK"));
|
||||||
|
verif.setBa(rs.getString("ba"));
|
||||||
|
verif.setSppb(rs.getString("sppb"));
|
||||||
|
verif.setFaktur(rs.getString("faktur"));
|
||||||
|
verif.setPph(rs.getDouble("pph"));
|
||||||
|
verif.setTerbilang(terbilang(new BigDecimal(rs.getDouble("totaltagihan"))).toUpperCase() + "RUPIAH");
|
||||||
|
}
|
||||||
|
} catch (Exception var15) {
|
||||||
|
LOG.error("Exception at getVerifikasiPembayaranUmum()");
|
||||||
|
LOG.error("VerifikasiTagihanSupplierServices.class", var15);
|
||||||
|
throw var15;
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
DatabaseUtility.clear(conn, pstmt, rs);
|
||||||
|
} catch (Exception var14) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return verif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint generateVerifikasiTagihanPdf(String noverifikasifk) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Map<String, Object> parameters = null;
|
||||||
|
JRBeanCollectionDataSource jrbcds = null;
|
||||||
|
Vector<VerifikasiTagihanSupplier2> collection = null;
|
||||||
|
VerifikasiTagihanSupplier verif = null;
|
||||||
|
VerifikasiTagihanSupplier2 verif2 = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
if (noverifikasifk == null) {
|
||||||
|
throw new Exception("Cannot find verifikasi = " + noverifikasifk + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
collection = null;
|
||||||
|
collection = new Vector();
|
||||||
|
verif = null;
|
||||||
|
verif = this.getVerifikasiTagihanSupplier(noverifikasifk);
|
||||||
|
verif2 = null;
|
||||||
|
verif2 = new VerifikasiTagihanSupplier2();
|
||||||
|
verif2.setNoSpk(verif.getNoSpk());
|
||||||
|
verif2.setKodeAnggaran(verif.getKodeAnggaran());
|
||||||
|
verif2.setKodeDana(verif.getKodeDana());
|
||||||
|
verif2.setNamaRekanan(verif.getNamaRekanan());
|
||||||
|
verif2.setTotalBayar(verif.getTotalBayar());
|
||||||
|
verif2.setKeperluan(verif.getKeperluan());
|
||||||
|
if (verif.getAsalproduk() != null) {
|
||||||
|
verif2.setAsalproduk(verif.getAsalproduk());
|
||||||
|
} else {
|
||||||
|
verif2.setAsalproduk("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
verif2.setNoVerifikasi(verif.getNoVerifikasi());
|
||||||
|
verif2.setTerbilang("#" + verif.getTerbilang() + "#");
|
||||||
|
if (verif.getBa() != null) {
|
||||||
|
verif2.setBa(verif.getBa());
|
||||||
|
} else {
|
||||||
|
verif2.setBa("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getSppb() != null) {
|
||||||
|
verif2.setSppb(verif.getSppb());
|
||||||
|
} else {
|
||||||
|
verif2.setSppb("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getFaktur() != null) {
|
||||||
|
verif2.setFaktur(verif.getFaktur());
|
||||||
|
} else {
|
||||||
|
verif2.setFaktur("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getPph() != null) {
|
||||||
|
verif2.setPph(verif.getPph());
|
||||||
|
} else {
|
||||||
|
verif2.setPph(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.add(verif2);
|
||||||
|
parameters = new HashMap();
|
||||||
|
parameters.put("noverifikasifk", noverifikasifk);
|
||||||
|
jrbcds = new JRBeanCollectionDataSource(collection);
|
||||||
|
String path = "/usr/share/app/reporting/rpt_verifikasitagihansupplier.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, jrbcds);
|
||||||
|
} catch (Exception var13) {
|
||||||
|
LOG.error("Exception at generateVerifikasiTagihanPdf()");
|
||||||
|
LOG.error(VerifikasiTagihanSupplierServices.class, var13);
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
} finally {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public JasperPrint generateVerifikasiPembayaranUmumPdf(String noverifikasifk) throws Exception {
|
||||||
|
JasperPrint print = null;
|
||||||
|
Map<String, Object> parameters = null;
|
||||||
|
JRBeanCollectionDataSource jrbcds = null;
|
||||||
|
Vector<VerifikasiTagihanSupplier2> collection = null;
|
||||||
|
VerifikasiTagihanSupplier verif = null;
|
||||||
|
VerifikasiTagihanSupplier2 verif2 = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
if (noverifikasifk == null) {
|
||||||
|
throw new Exception("Cannot find verifikasi = " + noverifikasifk + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
collection = null;
|
||||||
|
collection = new Vector();
|
||||||
|
verif = null;
|
||||||
|
verif = this.getVerifikasiPembayaranUmum(noverifikasifk);
|
||||||
|
verif2 = null;
|
||||||
|
verif2 = new VerifikasiTagihanSupplier2();
|
||||||
|
if (verif.getNoSpk() != null) {
|
||||||
|
verif2.setNoSpk(verif.getNoSpk());
|
||||||
|
} else {
|
||||||
|
verif2.setNoSpk("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
verif2.setKodeAnggaran(verif.getKodeAnggaran());
|
||||||
|
verif2.setKodeDana(verif.getKodeDana());
|
||||||
|
if (verif.getNamaRekanan() != null) {
|
||||||
|
verif2.setNamaRekanan(verif.getNamaRekanan());
|
||||||
|
} else {
|
||||||
|
verif2.setNamaRekanan("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
verif2.setTotalBayar(verif.getTotalBayar());
|
||||||
|
verif2.setKeperluan(verif.getKeperluan());
|
||||||
|
if (verif.getAsalproduk() != null) {
|
||||||
|
verif2.setAsalproduk(verif.getAsalproduk());
|
||||||
|
} else {
|
||||||
|
verif2.setAsalproduk("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
verif2.setNoVerifikasi(verif.getNoVerifikasi());
|
||||||
|
verif2.setTerbilang("#" + verif.getTerbilang() + "#");
|
||||||
|
if (verif.getBa() != null) {
|
||||||
|
verif2.setBa(verif.getBa());
|
||||||
|
} else {
|
||||||
|
verif2.setBa("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getSppb() != null) {
|
||||||
|
verif2.setSppb(verif.getSppb());
|
||||||
|
} else {
|
||||||
|
verif2.setSppb("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getFaktur() != null) {
|
||||||
|
verif2.setFaktur(verif.getFaktur());
|
||||||
|
} else {
|
||||||
|
verif2.setFaktur("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verif.getPph() != null) {
|
||||||
|
verif2.setPph(verif.getPph());
|
||||||
|
} else {
|
||||||
|
verif2.setPph(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
collection.add(verif2);
|
||||||
|
parameters = new HashMap();
|
||||||
|
parameters.put("noverifikasifk", noverifikasifk);
|
||||||
|
jrbcds = new JRBeanCollectionDataSource(collection);
|
||||||
|
String path = "/usr/share/app/reporting/rpt_verifikasipembayaranumum.jrxml";
|
||||||
|
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||||
|
print = JasperFillManager.fillReport(jasperReport, parameters, jrbcds);
|
||||||
|
} catch (Exception var13) {
|
||||||
|
LOG.error("Exception at generateVerifikasiPembayaranUmumPdf()");
|
||||||
|
LOG.error(VerifikasiTagihanSupplierServices.class, var13);
|
||||||
|
}
|
||||||
|
|
||||||
|
return print;
|
||||||
|
} finally {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/main/resources/application.properties
Normal file
20
src/main/resources/application.properties
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
server.port=7777
|
||||||
|
#Datasource
|
||||||
|
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||||
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
#spring.datasource.url=jdbc:postgresql://localhost:5432/simrs_db_new
|
||||||
|
spring.datasource.url=jdbc:postgresql://172.16.88.8:5432/rsab_hk_production
|
||||||
|
#spring.datasource.url=jdbc:postgresql://192.168.12.1:5432/rsab_hk_production
|
||||||
|
#spring.datasource.url=jdbc:postgresql://192.168.12.3:5432/rsabhk_db_17022020
|
||||||
|
spring.datasource.username=postgres
|
||||||
|
spring.datasource.password=root
|
||||||
|
#spring.datasource.hikari.pool-name=SpringBootHikariCP
|
||||||
|
#spring.datasource.hikari.connection-test-query=SELECT 1
|
||||||
|
#spring.datasource.hikari.minimum-idle=5
|
||||||
|
#spring.datasource.hikari.maximum-pool-size=50
|
||||||
|
#spring.datasource.hikari.connection-timeout=30000
|
||||||
|
#spring.datasource.hikari.idle-timeout=600000
|
||||||
|
#spring.datasource.hikari.max-lifetime=1800000
|
||||||
|
#spring.datasource.hikari.auto-commit=true
|
||||||
|
spring.mvc.dispatch-trace-request=true
|
||||||
|
spring.main.banner-mode=off
|
||||||
13
src/test/java/com/reporting/ReportingAppTests.java
Normal file
13
src/test/java/com/reporting/ReportingAppTests.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package com.reporting;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
class ReportingAppTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user