commit
8bfc98cc71
29 changed files with 3697 additions and 0 deletions
-
33.gitignore
-
10README.md
-
310mvnw
-
182mvnw.cmd
-
77pom.xml
-
445src/main/java/com/okayjava/html/Entity/PetRegisterEntity.java
-
15src/main/java/com/okayjava/html/Repository/PetRepository.java
-
23src/main/java/com/okayjava/html/Service/PetRegisterService.java
-
13src/main/java/com/okayjava/html/ServletInitializer.java
-
13src/main/java/com/okayjava/html/SpringbootHtmlApplication.java
-
255src/main/java/com/okayjava/html/controller/AcceptReject.java
-
69src/main/java/com/okayjava/html/controller/Acknowledge.java
-
201src/main/java/com/okayjava/html/controller/IndexController.java
-
7src/main/java/com/okayjava/html/exceptions/CustomExceptions.java
-
15src/main/java/com/okayjava/html/exceptions/ExceptionHAndlers.java
-
38src/main/java/com/okayjava/html/model/Customer.java
-
527src/main/java/com/okayjava/html/model/PetRegister.java
-
147src/main/java/com/okayjava/html/model/RazorPay.java
-
24src/main/java/com/okayjava/html/model/Response.java
-
23src/main/java/com/okayjava/html/model/payments.java
-
44src/main/java/com/okayjava/html/utils/imageCompress.java
-
14src/main/resources/application.properties
-
138src/main/resources/templates/acknowledged.html
-
49src/main/resources/templates/head.html
-
688src/main/resources/templates/index.html
-
31src/main/resources/templates/navbar.html
-
170src/main/resources/templates/razorpayment.html
-
123src/main/resources/templates/welcome.html
-
13src/test/java/com/okayjava/html/SpringbootHtmlApplicationTests.java
@ -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/ |
|||
@ -0,0 +1,10 @@ |
|||
# springboot-html |
|||
|
|||
Springboot with HTML - take user input |
|||
Watch the video here - https://youtu.be/GMNGPry979k |
|||
|
|||
## Getting started |
|||
|
|||
Watch the video here |
|||
https://youtu.be/GMNGPry979k |
|||
|
|||
@ -0,0 +1,310 @@ |
|||
#!/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 /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="`which java`" |
|||
fi |
|||
fi |
|||
|
|||
if [ ! -x "$JAVACMD" ] ; then |
|||
echo "Error: JAVA_HOME is not defined correctly." >&2 |
|||
echo " We cannot execute $JAVACMD" >&2 |
|||
exit 1 |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ] ; then |
|||
echo "Warning: JAVA_HOME environment variable is not set." |
|||
fi |
|||
|
|||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
|||
|
|||
# traverses directory structure from process work directory to filesystem root |
|||
# first directory with .mvn subdirectory is considered project base directory |
|||
find_maven_basedir() { |
|||
|
|||
if [ -z "$1" ] |
|||
then |
|||
echo "Path not specified to find_maven_basedir" |
|||
return 1 |
|||
fi |
|||
|
|||
basedir="$1" |
|||
wdir="$1" |
|||
while [ "$wdir" != '/' ] ; do |
|||
if [ -d "$wdir"/.mvn ] ; then |
|||
basedir=$wdir |
|||
break |
|||
fi |
|||
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
|||
if [ -d "${wdir}" ]; then |
|||
wdir=`cd "$wdir/.."; pwd` |
|||
fi |
|||
# end of workaround |
|||
done |
|||
echo "${basedir}" |
|||
} |
|||
|
|||
# concatenates all lines of a file |
|||
concat_lines() { |
|||
if [ -f "$1" ]; then |
|||
echo "$(tr -s '\n' ' ' < "$1")" |
|||
fi |
|||
} |
|||
|
|||
BASE_DIR=`find_maven_basedir "$(pwd)"` |
|||
if [ -z "$BASE_DIR" ]; then |
|||
exit 1; |
|||
fi |
|||
|
|||
########################################################################################## |
|||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
########################################################################################## |
|||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found .mvn/wrapper/maven-wrapper.jar" |
|||
fi |
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
|||
fi |
|||
if [ -n "$MVNW_REPOURL" ]; then |
|||
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
else |
|||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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" |
|||
else |
|||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$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 \ |
|||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
|||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
|||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
|||
@ -0,0 +1,182 @@ |
|||
@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 "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" |
|||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" |
|||
:skipRcPre |
|||
|
|||
@setlocal |
|||
|
|||
set ERROR_CODE=0 |
|||
|
|||
@REM To isolate internal variables from possible post scripts, we use another setlocal |
|||
@setlocal |
|||
|
|||
@REM ==== START VALIDATION ==== |
|||
if not "%JAVA_HOME%" == "" goto OkJHome |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME not found in your environment. >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
:OkJHome |
|||
if exist "%JAVA_HOME%\bin\java.exe" goto init |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
|||
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
@REM ==== END VALIDATION ==== |
|||
|
|||
:init |
|||
|
|||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
|||
@REM Fallback to current working directory if not found. |
|||
|
|||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
|||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
|||
|
|||
set EXEC_DIR=%CD% |
|||
set WDIR=%EXEC_DIR% |
|||
:findBaseDir |
|||
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
|||
cd .. |
|||
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
|||
set WDIR=%CD% |
|||
goto findBaseDir |
|||
|
|||
:baseDirFound |
|||
set MAVEN_PROJECTBASEDIR=%WDIR% |
|||
cd "%EXEC_DIR%" |
|||
goto endDetectBaseDir |
|||
|
|||
:baseDirNotFound |
|||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
|||
cd "%EXEC_DIR%" |
|||
|
|||
:endDetectBaseDir |
|||
|
|||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
|||
|
|||
@setlocal EnableExtensions EnableDelayedExpansion |
|||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
|||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
|||
|
|||
:endReadAdditionalConfig |
|||
|
|||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
|||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
|||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
|
|||
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
|||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
|||
) |
|||
|
|||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
if exist %WRAPPER_JAR% ( |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Found %WRAPPER_JAR% |
|||
) |
|||
) else ( |
|||
if not "%MVNW_REPOURL%" == "" ( |
|||
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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 "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" |
|||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" |
|||
:skipRcPost |
|||
|
|||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
|||
if "%MAVEN_BATCH_PAUSE%" == "on" pause |
|||
|
|||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% |
|||
|
|||
exit /B %ERROR_CODE% |
|||
@ -0,0 +1,77 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.6.1</version> |
|||
<relativePath/> <!-- lookup parent from repository --> |
|||
</parent> |
|||
<groupId>com.okayjava.html</groupId> |
|||
<artifactId>pet-registry</artifactId> |
|||
<version>0.0.1</version> |
|||
<packaging>war</packaging> |
|||
<name>pet-registry</name> |
|||
<description>Pet Registration</description> |
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
<maven.compiler.source>8</maven.compiler.source> |
|||
<maven.compiler.target>8</maven.compiler.target> |
|||
</properties> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-thymeleaf</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-data-jpa</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-jdbc</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.razorpay</groupId> |
|||
<artifactId>razorpay-java</artifactId> |
|||
<version>1.3.9</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.google.code.gson</groupId> |
|||
<artifactId>gson</artifactId> |
|||
<version>2.6.2</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
</plugins> |
|||
<defaultGoal>package</defaultGoal> |
|||
|
|||
</build> |
|||
|
|||
</project> |
|||
@ -0,0 +1,445 @@ |
|||
package com.okayjava.html.Entity; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.persistence.*; |
|||
|
|||
|
|||
@Data |
|||
//@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@Entity |
|||
@Table(name = "PETREGISTER") |
|||
public class PetRegisterEntity { |
|||
@Id |
|||
private long Id; |
|||
|
|||
public String getPaymentid() { |
|||
return paymentid; |
|||
} |
|||
|
|||
public void setPaymentid(String paymentid) { |
|||
this.paymentid = paymentid; |
|||
} |
|||
|
|||
public long getId() { |
|||
return Id; |
|||
} |
|||
@Lob |
|||
private byte[] addressProofPhoto; |
|||
@Lob |
|||
private byte[] petPhoto; |
|||
|
|||
private String paymentid; |
|||
|
|||
public byte[] getAddressProofPhoto() { |
|||
return addressProofPhoto; |
|||
} |
|||
|
|||
public void setAddressProofPhoto(byte[] addressProofPhoto) { |
|||
this.addressProofPhoto = addressProofPhoto; |
|||
} |
|||
|
|||
public byte[] getPetPhoto() { |
|||
return petPhoto; |
|||
} |
|||
|
|||
public void setPetPhoto(byte[] petPhoto) { |
|||
this.petPhoto = petPhoto; |
|||
} |
|||
|
|||
public byte[] getVaccinationCertificatePhoto() { |
|||
return vaccinationCertificatePhoto; |
|||
} |
|||
|
|||
public void setVaccinationCertificatePhoto(byte[] vaccinationCertificatePhoto) { |
|||
this.vaccinationCertificatePhoto = vaccinationCertificatePhoto; |
|||
} |
|||
@Lob |
|||
private byte[] vaccinationCertificatePhoto; |
|||
|
|||
public void setId(long id) { |
|||
Id = id; |
|||
} |
|||
|
|||
public byte[] getApplicantPhoto() { |
|||
return applicantPhoto; |
|||
} |
|||
|
|||
public void setApplicantPhoto(byte[] applicantPhoto) { |
|||
this.applicantPhoto = applicantPhoto; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
private String comments; |
|||
private String status; |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(String status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getComments() { |
|||
return comments; |
|||
} |
|||
|
|||
public void setComments(String comments) { |
|||
this.comments = comments; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getPetID() { |
|||
return petID; |
|||
} |
|||
|
|||
public void setPetID(String petID) { |
|||
this.petID = petID; |
|||
} |
|||
|
|||
|
|||
public String getAgeyears() { |
|||
return Ageyears; |
|||
} |
|||
|
|||
@Lob |
|||
private byte[] applicantPhoto; |
|||
private String name; |
|||
private String petID; |
|||
private String zone; |
|||
private String division; |
|||
private String title; |
|||
private String fname; |
|||
private String doornumber; |
|||
private String street; |
|||
private String area; |
|||
private String city; |
|||
private String phone; |
|||
private String pincode; |
|||
private String state; |
|||
private String email; |
|||
private String pancardnumber; |
|||
private String aadhar; |
|||
private String votercard; |
|||
private String previouslicense; |
|||
private String petname; |
|||
private String species; |
|||
private String identificationmark; |
|||
private String breed; |
|||
private String petcolor; |
|||
private String gender; |
|||
private String VeterinaryConsultant; |
|||
private String TNVCNo; |
|||
|
|||
public String getDivision() { |
|||
return division; |
|||
} |
|||
|
|||
public void setDivision(String division) { |
|||
this.division = division; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return title; |
|||
} |
|||
|
|||
public void setTitle(String title) { |
|||
this.title = title; |
|||
} |
|||
|
|||
public String getDoornumber() { |
|||
return doornumber; |
|||
} |
|||
|
|||
public void setDoornumber(String doornumber) { |
|||
this.doornumber = doornumber; |
|||
} |
|||
|
|||
public String getStreet() { |
|||
return street; |
|||
} |
|||
|
|||
public void setStreet(String street) { |
|||
this.street = street; |
|||
} |
|||
|
|||
public String getArea() { |
|||
return area; |
|||
} |
|||
|
|||
public void setArea(String area) { |
|||
this.area = area; |
|||
} |
|||
|
|||
public String getCity() { |
|||
return city; |
|||
} |
|||
|
|||
public void setCity(String city) { |
|||
this.city = city; |
|||
} |
|||
|
|||
public String getPhone() { |
|||
return phone; |
|||
} |
|||
|
|||
public void setPhone(String phone) { |
|||
this.phone = phone; |
|||
} |
|||
|
|||
public String getPincode() { |
|||
return pincode; |
|||
} |
|||
|
|||
public void setPincode(String pincode) { |
|||
this.pincode = pincode; |
|||
} |
|||
|
|||
public String getState() { |
|||
return state; |
|||
} |
|||
|
|||
public void setState(String state) { |
|||
this.state = state; |
|||
} |
|||
|
|||
public String getPancardnumber() { |
|||
return pancardnumber; |
|||
} |
|||
|
|||
public void setPancardnumber(String pancardnumber) { |
|||
this.pancardnumber = pancardnumber; |
|||
} |
|||
|
|||
public String getAadhar() { |
|||
return aadhar; |
|||
} |
|||
|
|||
public void setAadhar(String aadhar) { |
|||
this.aadhar = aadhar; |
|||
} |
|||
|
|||
public String getVotercard() { |
|||
return votercard; |
|||
} |
|||
|
|||
public void setVotercard(String votercard) { |
|||
this.votercard = votercard; |
|||
} |
|||
|
|||
public String getPreviouslicense() { |
|||
return previouslicense; |
|||
} |
|||
|
|||
public void setPreviouslicense(String previouslicense) { |
|||
this.previouslicense = previouslicense; |
|||
} |
|||
public String getPetname() { |
|||
return petname; |
|||
} |
|||
|
|||
public void setPetname(String petname) { |
|||
this.petname = petname; |
|||
} |
|||
|
|||
public String getSpecies() { |
|||
return species; |
|||
} |
|||
|
|||
public void setSpecies(String species) { |
|||
this.species = species; |
|||
} |
|||
|
|||
public String getIdentificationmark() { |
|||
return identificationmark; |
|||
} |
|||
|
|||
public void setIdentificationmark(String identificationmark) { |
|||
this.identificationmark = identificationmark; |
|||
} |
|||
|
|||
public String getBreed() { |
|||
return breed; |
|||
} |
|||
|
|||
public void setBreed(String breed) { |
|||
this.breed = breed; |
|||
} |
|||
|
|||
public String getPetcolor() { |
|||
return petcolor; |
|||
} |
|||
|
|||
public void setPetcolor(String petcolor) { |
|||
this.petcolor = petcolor; |
|||
} |
|||
|
|||
public String getVeterinaryConsultant() { |
|||
return VeterinaryConsultant; |
|||
} |
|||
|
|||
public void setVeterinaryConsultant(String veterinaryConsultant) { |
|||
VeterinaryConsultant = veterinaryConsultant; |
|||
} |
|||
|
|||
|
|||
public String getSterilization() { |
|||
return sterilization; |
|||
} |
|||
|
|||
public void setSterilization(String sterilization) { |
|||
this.sterilization = sterilization; |
|||
} |
|||
|
|||
public void setAgeyears(String ageyears) { |
|||
Ageyears = ageyears; |
|||
} |
|||
|
|||
private String Ageyears; |
|||
|
|||
public String getMonths() { |
|||
return Months; |
|||
} |
|||
|
|||
public void setMonths(String months) { |
|||
Months = months; |
|||
} |
|||
|
|||
private String Months; |
|||
|
|||
public String getARVdate() { |
|||
return ARVdate; |
|||
} |
|||
|
|||
public void setARVdate(String ARVddate) { |
|||
this.ARVdate = ARVdate; |
|||
} |
|||
|
|||
private String ARVdate; |
|||
|
|||
public String getLastdate() { |
|||
return Lastdate; |
|||
} |
|||
|
|||
public void setLastdate(String Lastdate) { |
|||
this.Lastdate = Lastdate; |
|||
} |
|||
|
|||
private String Lastdate; |
|||
|
|||
private String sterilization; |
|||
|
|||
private String adopted; |
|||
|
|||
private String AntiRabies_vaccination; |
|||
|
|||
private String Other_vaccination; |
|||
|
|||
|
|||
public String getZone() { |
|||
return zone; |
|||
} |
|||
|
|||
public void setZone(String zone) { |
|||
this.zone = zone; |
|||
} |
|||
|
|||
public String getPan() { |
|||
return pancardnumber; |
|||
} |
|||
public void setPan(String pancardnumber) { |
|||
this.pancardnumber = pancardnumber; |
|||
} |
|||
|
|||
public String getFname() { |
|||
return fname; |
|||
} |
|||
public void setFname(String fname) { |
|||
this.fname = fname; |
|||
} |
|||
|
|||
public String getEmail() { |
|||
return email; |
|||
} |
|||
public void setEmail(String email) { |
|||
this.email = email; |
|||
} |
|||
public String getTNVCNo() { |
|||
return TNVCNo; |
|||
} |
|||
public void setTNVCNo(String TNVCNo) { |
|||
this.TNVCNo = TNVCNo; |
|||
} |
|||
|
|||
public String getGender() { |
|||
return gender; |
|||
} |
|||
public void setGender(String gender) { |
|||
this.gender = gender; |
|||
} |
|||
public String getAdopted() { |
|||
return adopted; |
|||
} |
|||
|
|||
public String getAntiRabies_vaccination(){ |
|||
return AntiRabies_vaccination; |
|||
} |
|||
public String getOther_Vaccination(){ |
|||
String Other_Vaccination = null; |
|||
return null; |
|||
} |
|||
public PetRegisterEntity(long id, String petID, String zone, String division, |
|||
String title, String fname, String doornumber, |
|||
String street, String area, String city, String phone, String pincode, |
|||
String state, String email, String pancardnumber, String aadhar, String votercard, |
|||
String previouslicense, String petname, String species, String identificationmark, |
|||
String breed, String petcolor, String gender, String veterinaryConsultant, |
|||
String TNVCNo, String ageyears, String months, String ARVdate, String Lastdate, |
|||
String sterilization, String adopted, String Other_Vaccination, String AntiRabies_vaccination) { |
|||
Id = id; |
|||
this.petID = petID; |
|||
this.zone = zone; |
|||
this.division = division; |
|||
this.title = title; |
|||
this.fname = fname; |
|||
this.doornumber = doornumber; |
|||
this.street = street; |
|||
this.area = area; |
|||
this.city = city; |
|||
this.phone = phone; |
|||
this.pincode = pincode; |
|||
this.state = state; |
|||
this.email = email; |
|||
this.pancardnumber = pancardnumber; |
|||
this.aadhar = aadhar; |
|||
this.votercard = votercard; |
|||
this.previouslicense = previouslicense; |
|||
this.petname = petname; |
|||
this.species = species; |
|||
this.identificationmark = identificationmark; |
|||
this.breed = breed; |
|||
this.petcolor = petcolor; |
|||
this.gender = gender; |
|||
VeterinaryConsultant = veterinaryConsultant; |
|||
this.TNVCNo = TNVCNo; |
|||
Ageyears = ageyears; |
|||
Months = months; |
|||
this.ARVdate = ARVdate; |
|||
this.Lastdate = Lastdate; |
|||
this.sterilization = sterilization; |
|||
this.adopted = adopted; |
|||
this.AntiRabies_vaccination = AntiRabies_vaccination; |
|||
} |
|||
|
|||
public void setAdopted(String adopted) { |
|||
this.adopted = adopted; |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.okayjava.html.Repository; |
|||
import com.okayjava.html.Entity.PetRegisterEntity; |
|||
import org.springframework.data.jpa.repository.JpaRepository; |
|||
|
|||
import javax.persistence.Id; |
|||
|
|||
public interface PetRepository extends JpaRepository<PetRegisterEntity,Id> { |
|||
PetRepository findByName(String name); |
|||
} |
|||
|
|||
// |
|||
// |
|||
//public interface PetRepository extends JpaRepository<PetRegisterS,Id> { |
|||
// Pet findByName(String name); |
|||
//} |
|||
@ -0,0 +1,23 @@ |
|||
package com.okayjava.html.Service; |
|||
|
|||
import com.okayjava.html.Repository.PetRepository; |
|||
import com.okayjava.html.Entity.PetRegisterEntity; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class PetRegisterService { |
|||
@Autowired |
|||
private PetRepository petRepository; |
|||
|
|||
public PetRegisterEntity addPetRegister(PetRegisterEntity petregister) { |
|||
return petRepository.save(petregister); |
|||
|
|||
} |
|||
public List<PetRegisterEntity> getAllpetregister() { |
|||
List<PetRegisterEntity> emps = (List<PetRegisterEntity>) petRepository.findAll(); |
|||
return emps; |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.okayjava.html; |
|||
|
|||
import org.springframework.boot.builder.SpringApplicationBuilder; |
|||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
|||
|
|||
public class ServletInitializer extends SpringBootServletInitializer { |
|||
|
|||
@Override |
|||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { |
|||
return application.sources(SpringbootHtmlApplication.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.okayjava.html; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
|
|||
@SpringBootApplication |
|||
public class SpringbootHtmlApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(SpringbootHtmlApplication.class, args); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,255 @@ |
|||
package com.okayjava.html.controller; |
|||
|
|||
import com.google.gson.Gson; |
|||
import com.okayjava.html.model.*; |
|||
import com.razorpay.Order; |
|||
import java.math.BigDecimal; |
|||
import java.math.RoundingMode; |
|||
|
|||
import org.hibernate.cfg.Environment; |
|||
import org.json.JSONObject; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
|
|||
|
|||
import com.okayjava.html.Repository.PetRepository; |
|||
import com.razorpay.RazorpayClient; |
|||
import com.razorpay.RazorpayException; |
|||
import com.razorpay.VirtualAccount; |
|||
import org.json.JSONObject; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.jdbc.core.JdbcTemplate; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.Model; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.math.RoundingMode; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.util.List; |
|||
|
|||
@Controller |
|||
public class AcceptReject { |
|||
@Autowired |
|||
private JdbcTemplate jdbcTemplate; |
|||
private PetRepository petRepository; |
|||
|
|||
private RazorpayClient client; |
|||
private static Gson gson = new Gson(); |
|||
|
|||
@Value("${razoramount}") |
|||
private Integer rAmount; |
|||
|
|||
/** |
|||
* add your secretId and secretValue you got from your RazorPay account. |
|||
*/ |
|||
private static final String SECRET_ID = "rzp_live_dZkTTP32cjf3wj"; |
|||
private static final String SECRET_KEY = "pPgFK4AwzQoBC7zoPKSPl1At"; |
|||
public AcceptReject() throws RazorpayException { |
|||
this.client = new RazorpayClient(SECRET_ID, SECRET_KEY); |
|||
} |
|||
@RequestMapping(value = "/decisionMaking", params = "reject", method = RequestMethod.POST) |
|||
public String Reject(@RequestParam("petsID") String petID, Model model, |
|||
@RequestParam("comments") String comments) { |
|||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); |
|||
LocalDateTime now = LocalDateTime.now(); |
|||
System.out.println(dtf.format(now)); |
|||
|
|||
String sql = "update petregister set comments = concat(comments, '. " + comments + |
|||
" as on " + dtf.format(now) + "'), status = 'Rejected' where petid='" + petID + "'"; |
|||
|
|||
System.out.println(sql); |
|||
jdbcTemplate.update(sql); |
|||
|
|||
model.addAttribute("petsID", petID); |
|||
System.out.println(comments); |
|||
|
|||
List<PetRegister> petRegisters = jdbcTemplate.query("select * from petregister", (rs, rowNum) -> { |
|||
PetRegister petRegister = new PetRegister(rs.getString("petID"), rs.getString("zone"), |
|||
rs.getString("division"), rs.getString("title"), rs.getString("fname"), |
|||
rs.getString("doornumber"), rs.getString("street"), rs.getString("area"), rs.getString("city"), rs.getString("phone"), |
|||
rs.getString("pincode"), rs.getString("state"), rs.getString("email"), rs.getString("pancardnumber"), |
|||
rs.getString("aadhar"), rs.getString("votercard"), rs.getString("previouslicense"), rs.getString("petname"), |
|||
rs.getString("species"), rs.getString("identificationmark"), rs.getString("breed"), rs.getString("petcolor"), |
|||
rs.getString("gender"), rs.getString("Veterinary_Consultant"), rs.getString("TNVCNo"), |
|||
rs.getString("Ageyears"), rs.getString("months"), rs.getString("ARVdate"), rs.getString("Lastdate"), rs.getString("sterilization"), |
|||
rs.getString("adopted"), "NA", rs.getBytes("applicant_photo"), |
|||
rs.getBytes("address_proof_photo"), rs.getBytes("vaccination_certificate_photo"), |
|||
rs.getBytes("pet_photo"), rs.getString("comments"), rs.getString("status"), |
|||
rs.getString("paymentid")); |
|||
|
|||
// System.out.println(petRegister); |
|||
|
|||
return petRegister; |
|||
}); |
|||
// System.out.println(petRegisters); |
|||
model.addAttribute("pets", petRegisters); |
|||
// model.addAttribute("comments", comments); |
|||
return "welcome"; |
|||
} |
|||
|
|||
@RequestMapping(value = "/decisionMaking", params = "Accept", method = RequestMethod.POST) |
|||
public String Accept(@RequestParam("petsID") String petID, Model model, |
|||
@RequestParam("comments") String comments) throws RazorpayException { |
|||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); |
|||
LocalDateTime now = LocalDateTime.now(); |
|||
System.out.println(dtf.format(now)); |
|||
|
|||
String sql = "update petregister set comments = concat(comments, '. " + comments + |
|||
" as on " + dtf.format(now) + "'), status = 'Accepted' where petid='" + petID + "'"; |
|||
|
|||
System.out.println(sql); |
|||
jdbcTemplate.update(sql); |
|||
|
|||
model.addAttribute("petsID", petID); |
|||
System.out.println(comments); |
|||
|
|||
List<PetRegister> petRegisters = jdbcTemplate.query("select * from petregister where paymentid is null", (rs, rowNum) -> { |
|||
PetRegister petRegister = new PetRegister(rs.getString("petID"), rs.getString("zone"), |
|||
rs.getString("division"), rs.getString("title"), rs.getString("fname"), |
|||
rs.getString("doornumber"), rs.getString("street"), rs.getString("area"), rs.getString("city"), rs.getString("phone"), |
|||
rs.getString("pincode"), rs.getString("state"), rs.getString("email"), rs.getString("pancardnumber"), |
|||
rs.getString("aadhar"), rs.getString("votercard"), rs.getString("previouslicense"), rs.getString("petname"), |
|||
rs.getString("species"), rs.getString("identificationmark"), rs.getString("breed"), rs.getString("petcolor"), |
|||
rs.getString("gender"), rs.getString("Veterinary_Consultant"), rs.getString("TNVCNo"), |
|||
rs.getString("Ageyears"), rs.getString("months"), rs.getString("ARVdate"), rs.getString("Lastdate"), rs.getString("sterilization"), |
|||
rs.getString("adopted"), "NA", rs.getBytes("applicant_photo"), |
|||
rs.getBytes("address_proof_photo"), rs.getBytes("vaccination_certificate_photo"), |
|||
rs.getBytes("pet_photo"), rs.getString("comments"), rs.getString("status"), |
|||
rs.getString("paymentid")); |
|||
|
|||
// System.out.println(petRegister); |
|||
|
|||
return petRegister; |
|||
}); |
|||
|
|||
// RazorpayClient razorpay = new RazorpayClient("rzp_test_JOC0wRKpLH1cVW", "9EzSlxvJbTyQ2Hg0Us5ZX4VD"); |
|||
// |
|||
// JSONObject orderRequest = new JSONObject(); |
|||
// orderRequest.put("amount",1000); |
|||
// orderRequest.put("currency","INR"); |
|||
// orderRequest.put("receipt", "receipt#1"); |
|||
// orderRequest.put("payment_capture", 1); |
|||
// JSONObject notes = new JSONObject(); |
|||
// notes.put("notes_key_1","Pet Registration Charges"); |
|||
// orderRequest.put("notes",notes); |
|||
// System.out.println("orderRequest: " + orderRequest); |
|||
// |
|||
// Order order = razorpay.Orders.create(orderRequest); |
|||
// |
|||
// JSONObject params = new JSONObject(); |
|||
// params.put("count","100"); |
|||
// |
|||
// List<Order> orders = razorpay.Orders.fetchAll(params); |
|||
// System.out.println(orders); |
|||
|
|||
// List<VirtualAccount> virtualAccounts = razorpay.VirtualAccounts.fetchAll(); |
|||
// System.out.println(virtualAccounts); |
|||
model.addAttribute("pets", petRegisters); |
|||
model.addAttribute("rAmount", rAmount); |
|||
// model.addAttribute("comments", comments); |
|||
return "razorpayment"; |
|||
} |
|||
|
|||
@GetMapping("/GetRazorPayment/petid={petID}") |
|||
public String getrazorpayment(ModelMap model, @PathVariable String petID){ |
|||
model.addAttribute("petsID", petID); |
|||
return "razorpayment"; |
|||
} |
|||
|
|||
@RequestMapping(value="/updatePayment", method=RequestMethod.POST) |
|||
@ResponseBody |
|||
public ResponseEntity<String> upPayment(@RequestBody payments payid) { |
|||
|
|||
try { |
|||
|
|||
/** |
|||
* creating an order in RazorPay. |
|||
* new order will have order id. you can get this order id by calling order.get("id") |
|||
*/ |
|||
System.out.println(payid.getPaymentid()); |
|||
System.out.println(payid.getPetsID()); |
|||
String sql = "update petregister set paymentid = '" + payid.getPaymentid() + |
|||
"' where petid='" + payid.getPetsID() + "'"; |
|||
|
|||
System.out.println(sql); |
|||
jdbcTemplate.update(sql); |
|||
|
|||
return new ResponseEntity<String>(gson.toJson(payid.getPaymentid()), |
|||
HttpStatus.OK); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return new ResponseEntity<String>(gson.toJson(getResponse(new RazorPay(), 500)), |
|||
HttpStatus.EXPECTATION_FAILED); |
|||
} |
|||
|
|||
@RequestMapping(value="/createPayment", method=RequestMethod.POST) |
|||
@ResponseBody |
|||
public ResponseEntity<String> createOrder(@RequestBody Customer customer) { |
|||
|
|||
try { |
|||
|
|||
/** |
|||
* creating an order in RazorPay. |
|||
* new order will have order id. you can get this order id by calling order.get("id") |
|||
*/ |
|||
Order order = createRazorPayOrder( customer.getAmount() ); |
|||
RazorPay razorPay = getRazorPay((String)order.get("id"), customer); |
|||
|
|||
return new ResponseEntity<String>(gson.toJson(getResponse(razorPay, 200)), |
|||
HttpStatus.OK); |
|||
} catch (RazorpayException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return new ResponseEntity<String>(gson.toJson(getResponse(new RazorPay(), 500)), |
|||
HttpStatus.EXPECTATION_FAILED); |
|||
} |
|||
|
|||
private Response getResponse(RazorPay razorPay, int statusCode) { |
|||
Response response = new Response(); |
|||
response.setStatusCode(statusCode); |
|||
response.setRazorPay(razorPay); |
|||
return response; |
|||
} |
|||
|
|||
private RazorPay getRazorPay(String orderId, Customer customer) { |
|||
RazorPay razorPay = new RazorPay(); |
|||
razorPay.setApplicationFee(convertRupeeToPaise(customer.getAmount())); |
|||
razorPay.setCustomerName(customer.getCustomerName()); |
|||
razorPay.setCustomerEmail(customer.getEmail()); |
|||
razorPay.setCustomerContact(customer.getPhoneNumber()); |
|||
razorPay.setMerchantName("PETS"); |
|||
razorPay.setPurchaseDescription("PET REGISTRATION"); |
|||
razorPay.setRazorpayOrderId(orderId); |
|||
razorPay.setSecretKey(SECRET_ID); |
|||
razorPay.setImageURL("/logo"); |
|||
razorPay.setTheme("#F37254"); |
|||
razorPay.setNotes("notes"+orderId); |
|||
|
|||
return razorPay; |
|||
} |
|||
|
|||
private Order createRazorPayOrder(String amount) throws RazorpayException { |
|||
|
|||
JSONObject options = new JSONObject(); |
|||
options.put("amount", convertRupeeToPaise(amount)); |
|||
options.put("currency", "INR"); |
|||
options.put("receipt", "txn_123456"); |
|||
options.put("payment_capture", 1); // You can enable this if you want to do Auto Capture. |
|||
return client.Orders.create(options); |
|||
} |
|||
|
|||
private String convertRupeeToPaise(String paise) { |
|||
BigDecimal b = new BigDecimal(paise); |
|||
BigDecimal value = b.multiply(new BigDecimal("100")); |
|||
return value.setScale(0, RoundingMode.UP).toString(); |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
package com.okayjava.html.controller; |
|||
|
|||
import com.okayjava.html.Repository.PetRepository; |
|||
import com.okayjava.html.model.PetRegister; |
|||
import com.okayjava.html.utils.imageCompress; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.jdbc.core.JdbcTemplate; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.Model; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
|
|||
import java.util.Base64; |
|||
import java.util.List; |
|||
|
|||
@Controller |
|||
public class Acknowledge { |
|||
@Autowired |
|||
private JdbcTemplate jdbcTemplate; |
|||
private PetRepository petRepository; |
|||
|
|||
@PostMapping("/Acknowledgeregister") |
|||
public String acknowledgeRegister(@RequestParam("petsID") String petID, Model model){ |
|||
System.out.println(petID); |
|||
|
|||
List<PetRegister> petRegisters = jdbcTemplate.query("select * from petregister where petID = '" + petID + "'" |
|||
, (rs, rowNum) -> { |
|||
PetRegister petRegister = new PetRegister(rs.getString("petID"), rs.getString("zone"), |
|||
rs.getString("division"), rs.getString("title"), rs.getString("Fname"), |
|||
rs.getString("doornumber"), rs.getString("street"), rs.getString("area"), rs.getString("city"), rs.getString("phone"), |
|||
rs.getString("pincode"), rs.getString("state"), rs.getString("email"), rs.getString("pancardnumber"), |
|||
rs.getString("aadhar"), rs.getString("votercard"), rs.getString("previouslicense"), rs.getString("petname"), |
|||
rs.getString("species"), rs.getString("identificationmark"), rs.getString("breed"), rs.getString("petcolor"), |
|||
rs.getString("gender"), rs.getString("Veterinary_Consultant"), rs.getString("TNVCNo"), |
|||
rs.getString("Ageyears"), rs.getString("months"), |
|||
rs.getString("ARVdate"), rs.getString("Lastdate"), |
|||
rs.getString("sterilization"), |
|||
rs.getString("adopted"), "NA", |
|||
imageCompress.decompressImage( rs.getBytes("applicant_photo")), |
|||
imageCompress.decompressImage( rs.getBytes("address_proof_photo")), |
|||
imageCompress.decompressImage( rs.getBytes("vaccination_certificate_photo")), |
|||
imageCompress.decompressImage( rs.getBytes("pet_photo")), |
|||
rs.getString("comments"), rs.getString("status"), |
|||
rs.getString("paymentid")); |
|||
System.out.println(petRegister); |
|||
return petRegister; |
|||
}); |
|||
|
|||
try { |
|||
petRegisters.get(0).setPet_photo(Base64.getEncoder().encodeToString(petRegisters.get(0).getPetPhoto_bytes())); |
|||
petRegisters.get(0).setVaccination_certificate_photo(Base64.getEncoder().encodeToString(petRegisters.get(0).getVaccinationCertificatePhoto_bytes())); |
|||
|
|||
|
|||
System.out.println(petRegisters.get(0).getApplicant_photo_bytes().length > 5); |
|||
if (petRegisters.get(0).getApplicant_photo_bytes().length > 5) { |
|||
petRegisters.get(0).setApplicant_photo(Base64.getEncoder().encodeToString(petRegisters.get(0).getApplicant_photo_bytes())); |
|||
} |
|||
} |
|||
catch (Exception ex){ |
|||
petRegisters.get(0).setApplicant_photo("NA"); |
|||
System.out.println(ex); |
|||
|
|||
} |
|||
model.addAttribute("pets", petRegisters); |
|||
// model.addAttribute("petID", petRegisters.get(0).getApplicant_photo()); |
|||
|
|||
return "acknowledged"; |
|||
} |
|||
} |
|||
@ -0,0 +1,201 @@ |
|||
package com.okayjava.html.controller; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.okayjava.html.utils.imageCompress; |
|||
import com.okayjava.html.Repository.PetRepository; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.jdbc.core.JdbcTemplate; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.Model; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.util.StringUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import com.okayjava.html.Service.PetRegisterService; |
|||
|
|||
import com.okayjava.html.model.PetRegister; |
|||
import com.okayjava.html.Entity.PetRegisterEntity; |
|||
import org.springframework.web.multipart.MaxUploadSizeExceededException; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.IOException; |
|||
import java.time.Instant; |
|||
import java.util.Base64; |
|||
import java.util.List; |
|||
|
|||
@Controller |
|||
public class IndexController { |
|||
|
|||
@Autowired |
|||
private JdbcTemplate jdbcTemplate; |
|||
private PetRepository petRepository; |
|||
@GetMapping("/index") |
|||
public String index() { |
|||
|
|||
return "index"; |
|||
} |
|||
|
|||
@GetMapping("/GetRegisteredPetdetails") |
|||
public String getRegisteredPetdetails(ModelMap model){ |
|||
List<PetRegister> petRegisters = jdbcTemplate.query("select * from petregister ", (rs, rowNum) -> { |
|||
PetRegister petRegister = new PetRegister(rs.getString("petID"), rs.getString("zone"), |
|||
rs.getString("division"), rs.getString("title"), rs.getString("fname"), |
|||
rs.getString("doornumber"), rs.getString("street"), rs.getString("area"), rs.getString("city"), rs.getString("phone"), |
|||
rs.getString("pincode"), rs.getString("state"), rs.getString("email"), rs.getString("pancardnumber"), |
|||
rs.getString("aadhar"), rs.getString("votercard"), rs.getString("previouslicense"), rs.getString("petname"), |
|||
rs.getString("species"), rs.getString("identificationmark"), rs.getString("breed"), rs.getString("petcolor"), |
|||
rs.getString("gender"), rs.getString("Veterinary_Consultant"), rs.getString("TNVCNo"), |
|||
rs.getString("Ageyears"), rs.getString("months"), rs.getString("ARVdate"), rs.getString("Lastdate"), rs.getString("sterilization"), |
|||
rs.getString("adopted"), rs.getString("id"), rs.getBytes("applicant_photo"), |
|||
rs.getBytes("address_proof_photo"), rs.getBytes("vaccination_certificate_photo"), |
|||
rs.getBytes("pet_photo"), rs.getString("comments"), rs.getString("status"), |
|||
rs.getString("paymentid")); |
|||
|
|||
// System.out.println(petRegister); |
|||
|
|||
return petRegister; |
|||
}); |
|||
System.out.println(petRegisters); |
|||
model.addAttribute("pets", petRegisters); |
|||
|
|||
return "welcome"; |
|||
} |
|||
|
|||
@ExceptionHandler(MaxUploadSizeExceededException.class) |
|||
@RequestMapping("/register") |
|||
public String userRegistration(@ModelAttribute PetRegister pet, Model model, |
|||
@RequestParam("applicantPhoto") MultipartFile applicantPhotoFile, |
|||
@RequestParam("addressProofPhoto") MultipartFile addressProofPhotoFile, |
|||
@RequestParam("petPhoto") MultipartFile petPhotoFile, |
|||
@RequestParam("vaccinationCertificatePhoto") MultipartFile vaccinationCertificatePhotoFile) |
|||
throws IOException { |
|||
try { |
|||
|
|||
System.out.println(pet.toString()); |
|||
// validate |
|||
// System.out.println(pet.getFname()); |
|||
// System.out.println(pet.getEmail()); |
|||
// System.out.println(pet.getAadhar()); |
|||
// System.out.println(pet.getPan()); |
|||
// System.out.println(pet.getAdopted()); |
|||
// System.out.println(pet.getAgeyears()); |
|||
// System.out.println(pet.getARVdate()); |
|||
// System.out.println(pet.getAntiRabies_vaccination()); |
|||
// System.out.println(pet.getLastdate()); |
|||
// System.out.println(pet.getArea()); |
|||
// System.out.println(pet.getBreed()); |
|||
// System.out.println(pet.getCity()); |
|||
// System.out.println(pet.getDivision()); |
|||
// System.out.println(pet.getDoornumber()); |
|||
// System.out.println(pet.getIdentificationmark()); |
|||
// System.out.println(pet.getPetcolor()); |
|||
// System.out.println(pet.getPreviouslicense()); |
|||
// System.out.println(pet.getSpecies()); |
|||
// System.out.println(pet.getSterilization()); |
|||
// System.out.println(pet.getVeterinaryConsultant()); |
|||
// System.out.println(pet.getTNVCNo()); |
|||
// System.out.println(pet.getTitle()); |
|||
// System.out.println(pet.getStreet()); |
|||
// System.out.println(pet.getPincode()); |
|||
System.out.println(pet.getPetID()); |
|||
|
|||
model.addAttribute("firstname", pet.getFname()); |
|||
model.addAttribute("email", pet.getEmail()); |
|||
model.addAttribute("aadhar", pet.getAadhar()); |
|||
model.addAttribute("pan", pet.getPan()); |
|||
model.addAttribute("adopted", pet.getAdopted()); |
|||
model.addAttribute("AntiRabies_vaccination", pet.getAntiRabies_vaccination()); |
|||
model.addAttribute("ageyears", pet.getAgeyears()); |
|||
model.addAttribute("ARVdate", pet.getARVdate()); |
|||
model.addAttribute("Lastdate", pet.getLastdate()); |
|||
model.addAttribute("area", pet.getArea()); |
|||
model.addAttribute("breed", pet.getBreed()); |
|||
model.addAttribute("city", pet.getCity()); |
|||
model.addAttribute("division", pet.getDivision()); |
|||
model.addAttribute("doornumber", pet.getDoornumber()); |
|||
model.addAttribute("identificationmark", pet.getIdentificationmark()); |
|||
model.addAttribute("petcolour", pet.getPetcolor()); |
|||
model.addAttribute("previouslicense", pet.getPreviouslicense()); |
|||
model.addAttribute("species", pet.getSpecies()); |
|||
model.addAttribute("sterilization", pet.getSterilization()); |
|||
model.addAttribute("veterinaryconsultant", pet.getVeterinaryConsultant()); |
|||
model.addAttribute("TNVCNo", pet.getTNVCNo()); |
|||
model.addAttribute("title", pet.getTitle()); |
|||
model.addAttribute("street", pet.getStreet()); |
|||
model.addAttribute("pincode", pet.getPincode()); |
|||
model.addAttribute("state", pet.getPetID()); |
|||
long id = Instant.now().toEpochMilli(); |
|||
|
|||
String sql = "INSERT INTO petregister (Id, petID, zone, division, title," + |
|||
"fname, doornumber, street, area, city, phone," + |
|||
"pincode, state, email, pancardnumber, aadhar, votercard, previouslicense," + |
|||
"petname, species, identificationmark, breed, petcolor, gender, veterinary_consultant," + |
|||
"tnvcno, ageyears, months, arvdate, lastdate, sterilization, adopted, applicant_photo, " + |
|||
"address_proof_photo, vaccination_certificate_photo, pet_photo, comments) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
|||
jdbcTemplate.update(sql, id, "PetReg_" + String.valueOf(id), pet.getZone(), |
|||
pet.getDivision(), pet.getTitle(), pet.getFname(), |
|||
pet.getDoornumber(), pet.getStreet(), pet.getArea(), pet.getCity(), pet.getPhone(), |
|||
pet.getPincode(), pet.getState(), pet.getEmail(), pet.getPancardnumber(), |
|||
pet.getAadhar(), pet.getVotercard(), pet.getPreviouslicense(), pet.getPetname(), |
|||
pet.getSpecies(), pet.getIdentificationmark(), pet.getBreed(), pet.getPetcolor(), |
|||
pet.getGender(), pet.getVeterinaryConsultant(), pet.getTNVCNo(), |
|||
pet.getAgeyears(), pet.getMonths(), pet.getARVdate(), pet.getLastdate(), pet.getSterilization(), |
|||
pet.getAdopted(), imageCompress.compressImage(applicantPhotoFile.getBytes()), |
|||
imageCompress.compressImage(addressProofPhotoFile.getBytes()), |
|||
imageCompress.compressImage(petPhotoFile.getBytes()), |
|||
imageCompress.compressImage(vaccinationCertificatePhotoFile.getBytes()), "NA"); |
|||
|
|||
System.out.println("bytes"); |
|||
System.out.println(imageCompress.compressImage(applicantPhotoFile.getBytes())); |
|||
List<PetRegister> petRegisters = jdbcTemplate.query("select * from petregister where paymentid is null", (rs, rowNum) -> { |
|||
PetRegister petRegister = new PetRegister(rs.getString("petID"), rs.getString("zone"), |
|||
rs.getString("division"), rs.getString("title"), rs.getString("fname"), |
|||
rs.getString("doornumber"), rs.getString("street"), rs.getString("area"), rs.getString("city"), rs.getString("phone"), |
|||
rs.getString("pincode"), rs.getString("state"), rs.getString("email"), rs.getString("pancardnumber"), |
|||
rs.getString("aadhar"), rs.getString("votercard"), rs.getString("previouslicense"), rs.getString("petname"), |
|||
rs.getString("species"), rs.getString("identificationmark"), rs.getString("breed"), rs.getString("petcolor"), |
|||
rs.getString("gender"), rs.getString("Veterinary_Consultant"), rs.getString("TNVCNo"), |
|||
rs.getString("Ageyears"), rs.getString("months"), rs.getString("ARVdate"), rs.getString("Lastdate"), rs.getString("sterilization"), |
|||
rs.getString("adopted"), rs.getString("id"), rs.getBytes("applicant_photo"), |
|||
rs.getBytes("address_proof_photo"), rs.getBytes("vaccination_certificate_photo"), |
|||
rs.getBytes("pet_photo"), rs.getString("comments"), rs.getString("status"), |
|||
rs.getString("paymentid")); |
|||
|
|||
// System.out.println(petRegister); |
|||
|
|||
return petRegister; |
|||
}); |
|||
System.out.println(petRegisters); |
|||
model.addAttribute("pets", petRegisters); |
|||
|
|||
// petRepository.save(new PetRegisterEntity(1,"test",pet.getZone(), |
|||
// pet.getDivision(),pet.getTitle(), pet.getFname(), |
|||
// pet.getDoornumber(), pet.getStreet(), pet.getArea(), pet.getCity(), pet.getPhone(), |
|||
// pet.getPincode(), pet.getState(), pet.getEmail(), pet.getPancardnumber(), |
|||
// pet.getAadhar(), pet.getVotercard(), pet.getPreviouslicense(), pet.getPetname(), |
|||
// pet.getSpecies(), pet.getIdentificationmark(), pet.getBreed(), pet.getPetcolor(), |
|||
// pet.getGender(), pet.getVeterinaryConsultant(), pet.getTNVCNo(), |
|||
// pet.getAgeyears(), pet.getMonths(), pet.getARVdate(), pet.getLastdate(), pet.getSterilization(), pet.getAntiRabies_vaccination(), |
|||
// pet.getAdopted())); |
|||
// try { |
|||
|
|||
// String fileName = StringUtils.cleanPath(applicantPhotoFile.getOriginalFilename()); |
|||
// if(fileName.contains("..")) |
|||
// { |
|||
// System.out.println("not a a valid applicantPhoto File"); |
|||
// } |
|||
// System.out.println(applicantPhotoFile.getOriginalFilename()); |
|||
// System.out.println(applicantPhotoFile.getContentType()); |
|||
// System.out.println(applicantPhotoFile.getSize()); |
|||
// System.out.println(Base64.getEncoder().encodeToString(applicantPhotoFile.getBytes())); |
|||
// } catch (IOException e) { |
|||
// e.printStackTrace(); |
|||
// } |
|||
} |
|||
catch (Exception ex){ |
|||
System.out.println(ex); |
|||
} |
|||
return "welcome"; |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.okayjava.html.exceptions; |
|||
|
|||
public class CustomExceptions extends Exception{ |
|||
public CustomExceptions(){ |
|||
super("Pet Exceptions"); |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.okayjava.html.exceptions; |
|||
|
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.web.bind.annotation.ControllerAdvice; |
|||
import org.springframework.web.bind.annotation.ExceptionHandler; |
|||
import org.springframework.web.multipart.MaxUploadSizeExceededException; |
|||
|
|||
@ControllerAdvice |
|||
public class ExceptionHAndlers { |
|||
@ExceptionHandler(MaxUploadSizeExceededException.class) |
|||
public ResponseEntity<Object> PetMessage(MaxUploadSizeExceededException exp){ |
|||
return new ResponseEntity<>(exp.getMessage(), HttpStatus.INSUFFICIENT_STORAGE); |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.okayjava.html.model; |
|||
|
|||
public class Customer { |
|||
|
|||
private String customerName; |
|||
private String email; |
|||
private String phoneNumber; |
|||
private String amount; |
|||
public String getEmail() { |
|||
return email; |
|||
} |
|||
public void setEmail(String email) { |
|||
this.email = email; |
|||
} |
|||
public String getPhoneNumber() { |
|||
return phoneNumber; |
|||
} |
|||
public void setPhoneNumber(String phoneNumber) { |
|||
this.phoneNumber = phoneNumber; |
|||
} |
|||
public String getAmount() { |
|||
return amount; |
|||
} |
|||
public void setAmount(String amount) { |
|||
this.amount = amount; |
|||
} |
|||
public String getCustomerName() { |
|||
return customerName; |
|||
} |
|||
public void setCustomerName(String customerName) { |
|||
this.customerName = customerName; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,527 @@ |
|||
package com.okayjava.html.model; |
|||
|
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
public class PetRegister { |
|||
|
|||
// private MultipartFile applicantPhoto; |
|||
|
|||
public String getPaymentid() { |
|||
return paymentid; |
|||
} |
|||
|
|||
public void setPaymentid(String paymentid) { |
|||
this.paymentid = paymentid; |
|||
} |
|||
|
|||
private String paymentid; |
|||
|
|||
public String getComments() { |
|||
return comments; |
|||
} |
|||
|
|||
public void setComments(String comments) { |
|||
this.comments = comments; |
|||
} |
|||
|
|||
private String comments; |
|||
|
|||
private String name; |
|||
|
|||
private byte[] addressProofPhoto_bytes; |
|||
|
|||
|
|||
public byte[] getAddressProofPhoto_bytes() { |
|||
return addressProofPhoto_bytes; |
|||
} |
|||
|
|||
public void setAddressProofPhoto_bytes(byte[] addressProofPhoto_bytes) { |
|||
this.addressProofPhoto_bytes = addressProofPhoto_bytes; |
|||
} |
|||
|
|||
public byte[] getPetPhoto_bytes() { |
|||
return petPhoto_bytes; |
|||
} |
|||
|
|||
public void setPetPhoto_bytes(byte[] petPhoto_bytes) { |
|||
this.petPhoto_bytes = petPhoto_bytes; |
|||
} |
|||
|
|||
public byte[] getVaccinationCertificatePhoto_bytes() { |
|||
return vaccinationCertificatePhoto_bytes; |
|||
} |
|||
|
|||
public void setVaccinationCertificatePhoto_bytes(byte[] vaccinationCertificatePhoto_bytes) { |
|||
this.vaccinationCertificatePhoto_bytes = vaccinationCertificatePhoto_bytes; |
|||
} |
|||
|
|||
private byte[] petPhoto_bytes; |
|||
private byte[] vaccinationCertificatePhoto_bytes; |
|||
|
|||
public byte[] getApplicant_photo_bytes() { |
|||
return applicant_photo_bytes; |
|||
} |
|||
|
|||
public void setApplicant_photo_bytes(byte[] applicant_photo_bytes) { |
|||
this.applicant_photo_bytes = applicant_photo_bytes; |
|||
} |
|||
private String address_proof_photo; |
|||
|
|||
private String pet_photo; |
|||
|
|||
public String getAddress_proof_photo() { |
|||
return address_proof_photo; |
|||
} |
|||
|
|||
public void setAddress_proof_photo(String address_proof_photo) { |
|||
this.address_proof_photo = address_proof_photo; |
|||
} |
|||
|
|||
public String getPet_photo() { |
|||
return pet_photo; |
|||
} |
|||
|
|||
public void setPet_photo(String pet_photo) { |
|||
this.pet_photo = pet_photo; |
|||
} |
|||
|
|||
public String getVaccination_certificate_photo() { |
|||
return vaccination_certificate_photo; |
|||
} |
|||
|
|||
public void setVaccination_certificate_photo(String vaccination_certificate_photo) { |
|||
this.vaccination_certificate_photo = vaccination_certificate_photo; |
|||
} |
|||
|
|||
private String vaccination_certificate_photo; |
|||
|
|||
|
|||
public String getApplicant_photo() { |
|||
return applicant_photo; |
|||
} |
|||
private byte[] applicant_photo_bytes; |
|||
public void setApplicant_photo(String applicant_photo) { |
|||
this.applicant_photo = applicant_photo; |
|||
} |
|||
|
|||
private String applicant_photo; |
|||
private String petID; |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
public String getPetID() { |
|||
return petID; |
|||
} |
|||
|
|||
public void setPetID(String petID) { |
|||
this.petID = petID; |
|||
} |
|||
|
|||
private String zone; |
|||
private String division; |
|||
private String title; |
|||
private String fname; |
|||
private String doornumber; |
|||
|
|||
private String street; |
|||
private String area; |
|||
private String city; |
|||
private String phone; |
|||
private String pincode; |
|||
|
|||
private String state; |
|||
|
|||
|
|||
private String email; |
|||
private String pancardnumber; |
|||
|
|||
private String aadhar; |
|||
|
|||
private String votercard; |
|||
private String previouslicense; |
|||
|
|||
private String petname; |
|||
|
|||
private String species; |
|||
|
|||
private String identificationmark; |
|||
|
|||
private String breed; |
|||
|
|||
private String petcolor; |
|||
|
|||
private String gender; |
|||
|
|||
private String VeterinaryConsultant; |
|||
|
|||
private String TNVCNo; |
|||
|
|||
public String getAgeyears() { |
|||
return Ageyears; |
|||
} |
|||
|
|||
public String getDivision() { |
|||
return division; |
|||
} |
|||
|
|||
public void setDivision(String division) { |
|||
this.division = division; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return title; |
|||
} |
|||
|
|||
public void setTitle(String title) { |
|||
this.title = title; |
|||
} |
|||
|
|||
public String getDoornumber() { |
|||
return doornumber; |
|||
} |
|||
|
|||
public void setDoornumber(String doornumber) { |
|||
this.doornumber = doornumber; |
|||
} |
|||
|
|||
public String getStreet() { |
|||
return street; |
|||
} |
|||
|
|||
public void setStreet(String street) { |
|||
this.street = street; |
|||
} |
|||
|
|||
public String getArea() { |
|||
return area; |
|||
} |
|||
|
|||
public void setArea(String area) { |
|||
this.area = area; |
|||
} |
|||
|
|||
public String getCity() { |
|||
return city; |
|||
} |
|||
|
|||
public void setCity(String city) { |
|||
this.city = city; |
|||
} |
|||
|
|||
public String getPhone() { |
|||
return phone; |
|||
} |
|||
|
|||
public void setPhone(String phone) { |
|||
this.phone = phone; |
|||
} |
|||
|
|||
public String getPincode() { |
|||
return pincode; |
|||
} |
|||
|
|||
public void setPincode(String pincode) { |
|||
this.pincode = pincode; |
|||
} |
|||
|
|||
public String getState() { |
|||
return state; |
|||
} |
|||
|
|||
public void setState(String state) { |
|||
this.state = state; |
|||
} |
|||
|
|||
public String getPancardnumber() { |
|||
return pancardnumber; |
|||
} |
|||
|
|||
public void setPancardnumber(String pancardnumber) { |
|||
this.pancardnumber = pancardnumber; |
|||
} |
|||
|
|||
public String getAadhar() { |
|||
return aadhar; |
|||
} |
|||
|
|||
public void setAadhar(String aadhar) { |
|||
this.aadhar = aadhar; |
|||
} |
|||
|
|||
public String getVotercard() { |
|||
return votercard; |
|||
} |
|||
|
|||
public void setVotercard(String votercard) { |
|||
this.votercard = votercard; |
|||
} |
|||
|
|||
public String getPreviouslicense() { |
|||
return previouslicense; |
|||
} |
|||
|
|||
public void setPreviouslicense(String previouslicense) { |
|||
this.previouslicense = previouslicense; |
|||
} |
|||
|
|||
public String getPetname() { |
|||
return petname; |
|||
} |
|||
|
|||
public void setPetname(String petname) { |
|||
this.petname = petname; |
|||
} |
|||
|
|||
public String getSpecies() { |
|||
return species; |
|||
} |
|||
|
|||
public void setSpecies(String species) { |
|||
this.species = species; |
|||
} |
|||
|
|||
public String getIdentificationmark() { |
|||
return identificationmark; |
|||
} |
|||
|
|||
public void setIdentificationmark(String identificationmark) { |
|||
this.identificationmark = identificationmark; |
|||
} |
|||
|
|||
public String getBreed() { |
|||
return breed; |
|||
} |
|||
|
|||
public void setBreed(String breed) { |
|||
this.breed = breed; |
|||
} |
|||
|
|||
public String getPetcolor() { |
|||
return petcolor; |
|||
} |
|||
|
|||
public void setPetcolor(String petcolor) { |
|||
this.petcolor = petcolor; |
|||
} |
|||
|
|||
public String getVeterinaryConsultant() { |
|||
return VeterinaryConsultant; |
|||
} |
|||
|
|||
public void setVeterinaryConsultant(String veterinaryConsultant) { |
|||
VeterinaryConsultant = veterinaryConsultant; |
|||
} |
|||
|
|||
public String getSterilization() { |
|||
return sterilization; |
|||
} |
|||
|
|||
public void setSterilization(String sterilization) { |
|||
this.sterilization = sterilization; |
|||
} |
|||
|
|||
public void setAgeyears(String ageyears) { |
|||
Ageyears = ageyears; |
|||
} |
|||
|
|||
private String Ageyears; |
|||
|
|||
public String getMonths() { |
|||
return Months; |
|||
} |
|||
|
|||
public void setMonths(String months) { |
|||
Months = months; |
|||
} |
|||
|
|||
private String Months; |
|||
|
|||
public String getARVdate() { |
|||
return ARVdate; |
|||
} |
|||
|
|||
public void setARVdate(String ARVdate) { |
|||
this.ARVdate = ARVdate; |
|||
} |
|||
|
|||
private String ARVdate; |
|||
|
|||
public String getLastdate() { |
|||
return Lastdate; |
|||
} |
|||
|
|||
public void setLastdate(String Lastdate) { |
|||
this.Lastdate = Lastdate; |
|||
} |
|||
|
|||
private String Lastdate; |
|||
|
|||
private String sterilization; |
|||
|
|||
private String adopted; |
|||
private String AntiRabies_vaccination; |
|||
|
|||
private String months; |
|||
|
|||
|
|||
public String getZone() { |
|||
return zone; |
|||
} |
|||
|
|||
public void setZone(String zone) { |
|||
this.zone = zone; |
|||
} |
|||
|
|||
public String getPan() { |
|||
return pancardnumber; |
|||
} |
|||
public void setPan(String pancardnumber) { |
|||
this.pancardnumber = pancardnumber; |
|||
} |
|||
|
|||
public String getFname() { |
|||
return fname; |
|||
} |
|||
public void setFname(String fname) { |
|||
this.fname = fname; |
|||
} |
|||
public String getEmail() { |
|||
return email; |
|||
} |
|||
public void setEmail(String email) { |
|||
this.email = email; |
|||
} |
|||
public String getTNVCNo() { |
|||
return TNVCNo; |
|||
} |
|||
public void setTNVCNo(String TNVCNo) { |
|||
this.TNVCNo = TNVCNo; |
|||
} |
|||
private String status; |
|||
|
|||
public String getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(String status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public String getGender() { |
|||
return gender; |
|||
} |
|||
public void setGender(String gender) { |
|||
this.gender = gender; |
|||
} |
|||
public String getAdopted() { |
|||
return adopted; |
|||
} |
|||
public void setAdopted(String adopted) { |
|||
this.adopted = adopted; |
|||
} |
|||
|
|||
public String getAntiRabies_vaccination() { |
|||
return AntiRabies_vaccination; |
|||
} |
|||
public void setAntiRabies_vaccination(String AntiRabies_vaccination){ |
|||
this.AntiRabies_vaccination = AntiRabies_vaccination; |
|||
} |
|||
|
|||
public PetRegister(String petID, String zone, String division, String title, String fname, |
|||
String doornumber, String street, String area, |
|||
String city, String phone, String pincode, String state, String email, |
|||
String pancardnumber, String aadhar, String votercard, String previouslicense, |
|||
String petname, String species, String identificationmark, String breed, |
|||
String petcolor, String gender, String veterinaryConsultant, String TNVCNo, |
|||
String ageyears, String months, String ARVdate, String Lastdate, |
|||
String sterilization, String adopted, String name, byte[] applicant_photo, |
|||
byte[] addressProofPhoto_bytes, byte[] vaccinationCertificatePhoto_bytes, |
|||
byte[] petPhoto_bytes, String comments, String status, String paymentid) { |
|||
|
|||
setPaymentid(paymentid); |
|||
setStatus(status); |
|||
setComments(comments); |
|||
setApplicant_photo_bytes(applicant_photo); |
|||
setAddressProofPhoto_bytes(addressProofPhoto_bytes); |
|||
setVaccinationCertificatePhoto_bytes(vaccinationCertificatePhoto_bytes); |
|||
setPetPhoto_bytes(petPhoto_bytes); |
|||
setApplicant_photo_bytes(applicant_photo); |
|||
setZone(zone); |
|||
setDivision(division); |
|||
setTitle(title); |
|||
setFname(fname); |
|||
setDoornumber(doornumber); |
|||
setStreet(street); |
|||
setArea(area); |
|||
setCity(city); |
|||
setPhone(phone); |
|||
setPincode(pincode); |
|||
setState(state); |
|||
setEmail(email); |
|||
setPancardnumber(pancardnumber); |
|||
setAadhar(aadhar); |
|||
setVotercard(votercard); |
|||
setPreviouslicense(previouslicense); |
|||
setPetname(petname); |
|||
setSpecies(species); |
|||
setIdentificationmark(identificationmark); |
|||
setBreed(breed); |
|||
this.petcolor = petcolor; |
|||
this.gender = gender; |
|||
this.VeterinaryConsultant = veterinaryConsultant; |
|||
this.TNVCNo = TNVCNo; |
|||
this.Ageyears = ageyears; |
|||
this.Months = months; |
|||
this.ARVdate = ARVdate; |
|||
this.Lastdate = Lastdate; |
|||
this.sterilization = sterilization; |
|||
this.adopted = adopted; |
|||
// this.AntiRabies_vaccination = AntiRabies_vaccination; |
|||
this.petID = petID; |
|||
this.name = name; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "PetRegister [zone= " + zone +", " + |
|||
"division= " + division +", " + |
|||
"title= " + title +", " + |
|||
"fname= " + fname + ", " + |
|||
"doornumber= " + doornumber +", " + |
|||
"street= " + street +", " + |
|||
"area= " + area +", " + |
|||
"city= " + city +", " + |
|||
"phone= " + phone +", " + |
|||
"pincode= " + pincode +", " + |
|||
"state= " + state +", " + |
|||
"email= " + email + ", " + |
|||
"pancardnumber= " + pancardnumber +", " + |
|||
"aadhar= " + aadhar +", " + |
|||
"votercard= " + votercard +", " + |
|||
"previouslicense= " + previouslicense +", " + |
|||
"petname= " + petname +", " + |
|||
"species= " + species +", " + |
|||
"identificationmark= " + identificationmark +", " + |
|||
"breed= " + breed +", " + |
|||
"petcolor= " + petcolor +", " + |
|||
"gender= " + gender +", " + |
|||
"VeterinaryConsultant= " + VeterinaryConsultant +", " + |
|||
"TNVCNo= " + TNVCNo +", " + |
|||
"Ageyears= " + Ageyears +", " + |
|||
"AgeMonths= " + Months +", " + |
|||
"AgeMonths= " + ARVdate +", " + |
|||
"AgeMonths= " + Lastdate +", " + |
|||
"AgeMonths= " + sterilization +", " + |
|||
|
|||
"adopted= " + adopted + ", " + |
|||
"AntiRabies_vaccination= " + AntiRabies_vaccination + "]"; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,147 @@ |
|||
package com.okayjava.html.model; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* wrapper for RazorPay payment |
|||
* |
|||
* |
|||
*/ |
|||
|
|||
public class RazorPay { |
|||
|
|||
|
|||
private String applicationFee; |
|||
|
|||
private String razorpayOrderId; |
|||
|
|||
private String secretKey; |
|||
|
|||
private String paymentId; |
|||
|
|||
private String notes; |
|||
|
|||
private String imageURL; |
|||
|
|||
private String theme; |
|||
|
|||
private String merchantName; |
|||
|
|||
private String purchaseDescription; |
|||
|
|||
private String customerName; |
|||
|
|||
private String customerEmail; |
|||
|
|||
private String customerContact; |
|||
|
|||
public RazorPay() { |
|||
|
|||
} |
|||
|
|||
public RazorPay(String applicationFee) { |
|||
this.applicationFee = applicationFee; |
|||
} |
|||
|
|||
public String getApplicationFee() { |
|||
return applicationFee; |
|||
} |
|||
|
|||
public void setApplicationFee(String applicationFee) { |
|||
this.applicationFee = applicationFee; |
|||
} |
|||
|
|||
public String getRazorpayOrderId() { |
|||
return razorpayOrderId; |
|||
} |
|||
|
|||
public void setRazorpayOrderId(String razorpayOrderId) { |
|||
this.razorpayOrderId = razorpayOrderId; |
|||
} |
|||
|
|||
public String getSecretKey() { |
|||
return secretKey; |
|||
} |
|||
|
|||
public void setSecretKey(String secretKey) { |
|||
this.secretKey = secretKey; |
|||
} |
|||
|
|||
public String getMerchantName() { |
|||
return merchantName; |
|||
} |
|||
|
|||
public void setMerchantName(String merchantName) { |
|||
this.merchantName = merchantName; |
|||
} |
|||
|
|||
public String getPurchaseDescription() { |
|||
return purchaseDescription; |
|||
} |
|||
|
|||
public void setPurchaseDescription(String purchaseDescription) { |
|||
this.purchaseDescription = purchaseDescription; |
|||
} |
|||
|
|||
public String getCustomerName() { |
|||
return customerName; |
|||
} |
|||
|
|||
public void setCustomerName(String customerName) { |
|||
this.customerName = customerName; |
|||
} |
|||
|
|||
public String getCustomerEmail() { |
|||
return customerEmail; |
|||
} |
|||
|
|||
public void setCustomerEmail(String customerEmail) { |
|||
this.customerEmail = customerEmail; |
|||
} |
|||
|
|||
public String getCustomerContact() { |
|||
return customerContact; |
|||
} |
|||
|
|||
public void setCustomerContact(String customerContact) { |
|||
this.customerContact = customerContact; |
|||
} |
|||
|
|||
public String getPaymentId() { |
|||
return paymentId; |
|||
} |
|||
|
|||
public void setPaymentId(String paymentId) { |
|||
this.paymentId = paymentId; |
|||
} |
|||
|
|||
public String getNotes() { |
|||
return notes; |
|||
} |
|||
|
|||
public void setNotes(String notes) { |
|||
this.notes = notes; |
|||
} |
|||
|
|||
public String getImageURL() { |
|||
return imageURL; |
|||
} |
|||
|
|||
public void setImageURL(String imageURL) { |
|||
this.imageURL = imageURL; |
|||
} |
|||
|
|||
public String getTheme() { |
|||
return theme; |
|||
} |
|||
|
|||
public void setTheme(String theme) { |
|||
this.theme = theme; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,24 @@ |
|||
package com.okayjava.html.model; |
|||
|
|||
public class Response { |
|||
|
|||
private int statusCode; |
|||
private RazorPay razorPay; |
|||
|
|||
public int getStatusCode() { |
|||
return statusCode; |
|||
} |
|||
public void setStatusCode(int statusCode) { |
|||
this.statusCode = statusCode; |
|||
} |
|||
public RazorPay getRazorPay() { |
|||
return razorPay; |
|||
} |
|||
|
|||
public void setRazorPay(RazorPay razorPay) { |
|||
this.razorPay = razorPay; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.okayjava.html.model; |
|||
|
|||
public class payments { |
|||
|
|||
private String paymentid; |
|||
|
|||
public String getPetsID() { |
|||
return petsID; |
|||
} |
|||
|
|||
public void setPetsID(String petsID) { |
|||
this.petsID = petsID; |
|||
} |
|||
|
|||
private String petsID; |
|||
public String getPaymentid() { |
|||
return paymentid; |
|||
} |
|||
|
|||
public void setPaymentid(String paymentid) { |
|||
this.paymentid = paymentid; |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.okayjava.html.utils; |
|||
|
|||
import java.io.ByteArrayOutputStream; |
|||
import java.util.zip.Deflater; |
|||
import java.util.zip.Inflater; |
|||
|
|||
public class imageCompress { |
|||
public static byte[] compressImage(byte[] data) { |
|||
Deflater deflater = new Deflater(); |
|||
deflater.setLevel(Deflater.BEST_COMPRESSION); |
|||
deflater.setInput(data); |
|||
deflater.finish(); |
|||
|
|||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); |
|||
byte[] tmp = new byte[4*1024]; |
|||
while (!deflater.finished()) { |
|||
int size = deflater.deflate(tmp); |
|||
outputStream.write(tmp, 0, size); |
|||
} |
|||
try { |
|||
outputStream.close(); |
|||
} catch (Exception ignored) { |
|||
} |
|||
return outputStream.toByteArray(); |
|||
} |
|||
|
|||
|
|||
|
|||
public static byte[] decompressImage(byte[] data) { |
|||
Inflater inflater = new Inflater(); |
|||
inflater.setInput(data); |
|||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); |
|||
byte[] tmp = new byte[4*1024]; |
|||
try { |
|||
while (!inflater.finished()) { |
|||
int count = inflater.inflate(tmp); |
|||
outputStream.write(tmp, 0, count); |
|||
} |
|||
outputStream.close(); |
|||
} catch (Exception ignored) { |
|||
} |
|||
return outputStream.toByteArray(); |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
|||
spring.datasource.url = jdbc:mysql://localhost:3306/pet |
|||
spring.datasource.username = root |
|||
spring.datasource.password = Test@1234 |
|||
spring.jpa.show-sql = true |
|||
spring.jpa.hibernate.ddl-auto = update |
|||
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect |
|||
server.port=9191 |
|||
spring.servlet.multipart.enabled=true |
|||
spring.servlet.multipart.file-size-threshold=5KB |
|||
spring.servlet.multipart.max-file-size=2MB |
|||
spring.servlet.multipart.max-request-size=10MB |
|||
|
|||
razoramount = 50 |
|||
@ -0,0 +1,138 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="https://www.thymeleaf.org"> |
|||
<head> |
|||
<head th:include="head :: head"></head> |
|||
|
|||
<!-- Bootstrap CSS --> |
|||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> |
|||
<style> |
|||
.themed-grid-col { |
|||
padding-top: .75rem; |
|||
padding-bottom: .75rem; |
|||
background-color: rgba(86, 61, 124, .15); |
|||
border: 1px solid rgba(86, 61, 124, .2); |
|||
} |
|||
|
|||
.themed-container { |
|||
padding: .75rem; |
|||
margin-bottom: 1.5rem; |
|||
background-color: rgba(0, 123, 255, .15); |
|||
border: 1px solid rgba(0, 123, 255, .2); |
|||
} |
|||
|
|||
|
|||
body{ |
|||
margin-left:2px; |
|||
|
|||
margin-top:12px; |
|||
|
|||
} |
|||
|
|||
</style> |
|||
<title>acknowledged</title> |
|||
</head> |
|||
<body> |
|||
<div th:substituteby="navbar :: navbar"></div> |
|||
|
|||
<div class="container"> |
|||
<!-- <div class="row mb-2">--> |
|||
<!-- <div class="col-2 themed-grid-col"><b>Pet Category</b></div>--> |
|||
<!-- <div class="col-2 themed-grid-col"><span th:text="${pets[0].category}"></span></div>--> |
|||
<!-- </div>--> |
|||
<div class="row mb-2"> |
|||
<div class="col-2 themed-grid-col"><b>Zone</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].zone}"></span></div> |
|||
</div> |
|||
<div class="row mb-2"> |
|||
<div class="col-2 themed-grid-col"><b>Division</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].division}"></span></div> |
|||
</div> |
|||
<div class="row mb-5"> |
|||
<div class="col-2 themed-grid-col"><b>Name</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].title}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].fname}"></span></div> |
|||
</div> |
|||
|
|||
<div class="row mb-7"> |
|||
<div class="col-2 themed-grid-col"><b>Address</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].doornumber}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].street}"></span></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].area}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].city}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].pincode}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].state}"></span></div> |
|||
</div> |
|||
<div class="row mb-7"> |
|||
<div class="col-2 themed-grid-col"><b>Owner details</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].phone}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].email}"></span></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].pancardnumber}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].previouslicense}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].aadhar}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].votercard}"></span></div> |
|||
</div> |
|||
<div class="row mb-7"> |
|||
<div class="col-2 themed-grid-col"><b>Pet details</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].petname}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].species}"></span></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].identificationmark}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].breed}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].petcolor}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].gender}"></span></div> |
|||
|
|||
</div> |
|||
|
|||
<div class="row mb-7"> |
|||
<div class="col-2 themed-grid-col"><b>Veterinary Consultant</b></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].VeterinaryConsultant}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].TNVCNo}"></span></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].ageyears}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].months}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].ARVdate}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].Lastdate}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].sterilization}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].adopted}"></span></div> |
|||
<div class="col-2 themed-grid-col"><span th:text="${pets[0].AntiRabies_vaccination}"></span></div> |
|||
</div> |
|||
|
|||
<div class="row mb-4"> |
|||
<div class="col-2 themed-grid-col"><b>Applicant Photo</b></div> |
|||
<div class="col-2 themed-grid-col"> |
|||
<img alt="" th:src="'data:image/jpeg;base64,'+${pets[0].applicant_photo}" width="100px;"></img></div> |
|||
|
|||
<div class="row mb-4"> |
|||
<div class="col-2 themed-grid-col"><b>Applicant Address Proof Photo</b></div> |
|||
<div class="col-2 themed-grid-col"> |
|||
<img alt="" th:src="'data:image/jpeg;base64,'+${pets[0].address_proof_photo}" width="100px;"></img></div> |
|||
|
|||
<div class="col-2 themed-grid-col"><b>Pet photo</b></span></div> |
|||
<div class="col-2 themed-grid-col"> |
|||
<img alt="" th:src="'data:image/jpeg;base64,'+${pets[0].pet_photo}" width="100px;"></img></div> |
|||
</div> |
|||
|
|||
<div class="row mb-4"> |
|||
<div class="col-2 themed-grid-col"><b>Rabies Vaccination Certification</b></div> |
|||
<div class="col-2 themed-grid-col"> |
|||
<img alt="" th:src="'data:image/jpeg;base64,'+${pets[0].vaccination_certificate_photo}" width="100px;"></img></div> |
|||
|
|||
<div class="row mb-2"> |
|||
<div class="col-1 themed-grid-col"><b>Previous Comments</b></span></div> |
|||
<div class=" themed-grid-col"><span th:text="${pets[0].comments}"></span><</div> |
|||
</div> |
|||
|
|||
<div class="row mb-2"> |
|||
<form action="decisionMaking" method="POST"> |
|||
|
|||
|
|||
<textarea type="text" name="comments" rows="5" cols="100"></textarea> |
|||
<br/> |
|||
<button type="submit" class="btn btn-success" name="Accept" value="Accept">Accept</button> |
|||
<button type="submit" class="btn btn-danger" name="reject" value="reject">Reject</button> |
|||
<input type="hidden" name="petsID" readonly th:value="${pets[0].petID}"> |
|||
</form> |
|||
<button type="submit" class="btn btn-primary">Submit</button> |
|||
<button type="submit" class="btn btn-primary">Home</button> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,49 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" |
|||
xmlns:th="http://www.thymeleaf.org"> |
|||
<head th:fragment="head"> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
<link rel="stylesheet" type="text/css" media="all" |
|||
href="http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css" /> |
|||
<link rel="stylesheet" type="text/css" media="all" |
|||
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" /> |
|||
|
|||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> |
|||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script> |
|||
<title>Pet Registration</title> |
|||
<style> |
|||
|
|||
* { |
|||
box-sizing: border-box; |
|||
} |
|||
.h{ |
|||
width:240px; |
|||
display:inline-block; |
|||
} |
|||
.hello{ |
|||
padding: 8px; |
|||
border: 1px solid #ccc; |
|||
border-radius: 4px; |
|||
resize: auto; |
|||
} |
|||
select,input[type="date"], textarea,.teal { |
|||
width:100%; |
|||
padding: 8px; |
|||
border: 1px solid #ccc; |
|||
border-radius: 4px; |
|||
resize: horizontal; |
|||
overflow: auto; |
|||
} |
|||
|
|||
body{ |
|||
margin-left:-10px; |
|||
} |
|||
</style> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,688 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en" xmlns:th="https://thymeleaf.org"> |
|||
|
|||
<head th:include="head :: head"></head> |
|||
<body> |
|||
<div th:substituteby="navbar :: navbar"></div> |
|||
|
|||
<div><h5 style="text-align: center;">Greater Chennai Corporation</h5></div> |
|||
|
|||
<div><h5 style="text-align: center;">Public Health Department</h5></div> |
|||
|
|||
<div><h5 style="text-align: center;">Veterinary Section</style></h5></div> |
|||
|
|||
<br> |
|||
<div><h5 style="text-align: center;">Application Form for Pet Animal License Under Section 116 of</h5></div> |
|||
|
|||
<div><h5 style="text-align: center;">The Chennai City Municipal Corporation Act 1919</h5></div> |
|||
|
|||
<br> |
|||
|
|||
|
|||
<div class="container"> |
|||
<form action="register" method="post" enctype="multipart/form-data"> |
|||
<ol> |
|||
<li> <b>PET OWNER DETAILS /</b></li> |
|||
<b>உரிமையாளரின் விபரம்:</b> |
|||
<br style="bottom-border:border-box"> |
|||
<b><ol> |
|||
<br> |
|||
<li><u> |
|||
Name of the Owner/</u></b> |
|||
<br> |
|||
<b>உரிமையாளரின் பெயர்:<span>*</span></b> |
|||
|
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col"> |
|||
|
|||
<label>Title / </label> |
|||
<label>தலைப்பு:</label> |
|||
<br> |
|||
<select name="title" id="title"> |
|||
<option value=""></option> |
|||
<option value="Mr."> Mr. / திரு</option> |
|||
<option value="Mrs."> Mrs. / திருமதி</option> |
|||
<option value="Ms."> Ms. / செல்வி</option> |
|||
|
|||
</select> |
|||
</div> |
|||
<div class="col"> |
|||
<label for="name">Name /</label> |
|||
<label for="name"> பெயர்:<span>*</span></label> |
|||
<br> |
|||
<input id="name" class="teal" type="text" name="name"> |
|||
</div> |
|||
</div> |
|||
<!--<div > |
|||
<label for="initial">Initial</label> |
|||
<input id="initial" type="text" name="initial" required/> |
|||
</div> |
|||
<div > |
|||
<label for="name">Name</label> |
|||
<input id="name" type="text" name="name" required/> |
|||
</div>--> |
|||
|
|||
</li> |
|||
<hr> |
|||
<li> |
|||
<b><u>Address /</u></b> |
|||
<b>உரிமையாளரின் வசிப்பிடம்:</b> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="door number">Door Number /</label> |
|||
<label for="door number">கதவு எண்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" type="text" name="door number" required/> |
|||
</div> |
|||
</div> |
|||
<!-- <div> |
|||
<label class="h">Door Number</label> |
|||
<input id="door number" name="door number" required/> |
|||
</div>--> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Street /">Street /</label> |
|||
<label for="Street">தெரு:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="street" type="street" name="street" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Area /">Area /</label> |
|||
<label for="Area /">பகுதி:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="area" type="area" name="area" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id= "City">City /</label> |
|||
<label for="City"> மாநகரம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<b><label id="CHENNAI /">CHENNAI /</label></b> |
|||
<b><label for="chennai /" >சென்னை:</label></b> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="pincode">Pincode /</label> |
|||
<label for="pincode">அஞ்சல் குறியீட்டு எண்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="form-control" type="text" name="pin number" placeholder="Enter 6 Digit code" minlength="6" maxlength="6" required> |
|||
<br> |
|||
</div> |
|||
<br> |
|||
<ol> |
|||
<p><a href="https://chennaicorporation.gov.in/gcc/citizen-details/location-service-lb/#">Know Your Zone And Division</a></p> |
|||
|
|||
<div> |
|||
<label for="zone">Zone /</label> |
|||
<label for="zone">மண்டலம்:<span>*</span></label> |
|||
<select name="zone" id="zone"> |
|||
<option value="select zonelllll"></option> |
|||
<option value="01">01-Thiruvotriyur</option> |
|||
<option value="02">02-Manali</option> |
|||
<option value="03">03-Madhavaram</option> |
|||
<option value="04">04-Tondiarpet</option> |
|||
<option value="05">05-Royapuram</option> |
|||
<option value="06">06-Thiru-vi-ka nagar</option> |
|||
<option value="07">07-Ambattur</option> |
|||
<option value="08">08-Anna Nagar</option> |
|||
<option value="09">09-Teynampet</option> |
|||
<option value="10">10-Kodambakkam</option> |
|||
<option value="11">11-Valasaravakkam</option> |
|||
<option value="12">12-Alundur</option> |
|||
<option value="13">13-Adyar</option> |
|||
<option value="14">14-Perungudi</option> |
|||
<option value="15">15-Sozhinganallur</option> |
|||
</select> |
|||
</label> |
|||
<label for="division">Division /</label> |
|||
<label for="division">இடம்:<span>*</span></label> |
|||
<select name="division" id="division"> |
|||
<option value=""></option> |
|||
<option value="1-14">1-14</option> |
|||
<option value="15-22">15-22</option> |
|||
<option value="23-33">23-33</option> |
|||
<option value="34-48">34-48</option> |
|||
<option value="49-63">49-63</option> |
|||
<option value="64-78">64-78</option> |
|||
<option value="79-93">79-93</option> |
|||
<option value="94-108">94-108</option> |
|||
<option value="109-126">109-126</option> |
|||
<option value="127-142">127-142</option> |
|||
<option value="143-155">143-155</option> |
|||
<option value="156-167">156-167</option> |
|||
<option value="168-180">168-180</option> |
|||
<option value="181-191">181-191</option> |
|||
<option value="192-200">192-200</option> |
|||
</select></label> |
|||
|
|||
</div> |
|||
|
|||
|
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="State">State /</label> |
|||
<label for="State">மாநிலம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<b><label id="TAMILNADU">TAMILNADU /</label></b> |
|||
<label for="tamilnadu">தமிழ்நாடு</label> |
|||
<br> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Mobile Number ">Mobile Number /</label> |
|||
<label for="Mobile Number ">கைபேசி எண்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="form-control" type="text" name="phone Number" placeholder="Enter 10 Digit Number" minlength="10" maxlength="10" required> |
|||
<br> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Email /">Email /</label> |
|||
<label for="Email">மின்னஞ்சல்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input type="email" class="teal" id="email" name="email"required/> |
|||
</div> |
|||
</div> |
|||
|
|||
<br> |
|||
<br> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="PAN Card Number">PAN Card Number /</label> |
|||
<label for="PAN Card Number">பான் கார்டு எண்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="form-control" type="text" name="pan card number" placeholder="Enter 10 Digit code" minlength="10" maxlength="10" required/> |
|||
<br> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="AADHAR Number">AADHAR Number /</label> |
|||
<label for="AADHAR Number">ஆதார் எண்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="form-control" type="text" name="aadhar Number" placeholder="Enter 12 Digit nunber" minlength="12" maxlength="12" required/> |
|||
<br> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Voter's Card Number">Voter's Card Number /</label> |
|||
<label for="Voter's Card Number">வாக்காளர் அடையாள அட்டை எண்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="form-control" type="text" name="voter's card number" placeholder="Enter 10 Digit Code" minlength="10" maxlength="10" required/> |
|||
<br> |
|||
</div> |
|||
</div> |
|||
|
|||
<br> |
|||
</div> |
|||
</li> |
|||
|
|||
</ol> |
|||
|
|||
<hr> |
|||
</div> |
|||
</li> |
|||
</ol> |
|||
|
|||
|
|||
<li><b>PET DETAILS:</b></li> |
|||
<b>செல்லப்பிராணியின் விபரம்:</b> |
|||
<br> |
|||
<br> |
|||
<ol> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="phone" class="h">Pet Name /</label> |
|||
<label for="phone">செல்லப்பிராணியின் பெயர்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input id="petname" class="teal" name="petname" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="species /">Species /</label> |
|||
<label for="species">இனம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<select id="species" class="teal" name="species"> |
|||
<option value=""></option> |
|||
<option value="dog">Dog / நாய்</option> |
|||
<option value="cat">Cat / பூனை</option> |
|||
</select> |
|||
</label> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label for="identificationmark">Identification Mark:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="identificationmark" name="identificationmark" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="breed /">Breed /</label> |
|||
<label for="breed">வகை:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input id="breed" class="teal" name="breed" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="colour /">Colour /</label> |
|||
<label for="colour /"> நிறம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input id="color" class="teal" name="color" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="sex">Sex /</label> |
|||
<label for="sex">பாலினம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<select class="teal" id="gender" name="gender"> |
|||
<option value=""></option> |
|||
<option value="male">Male / ஆண்</option> |
|||
<option value="female">Female / பெண்</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-2"> |
|||
<label id="Age years">Age years /</label> |
|||
<label for="Age years">வயது வருடம்:<span>*</span></label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input class="teal" id="Ageyears"size="3" type="tel" name="Ageyears" required/> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<label id="Months /">Months /</label> |
|||
<label for="Months"> மாதம்:</label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input class="teal" id="Months" size="2" type="tel" name="Months" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
|
|||
<label id="Whether the pet is sterilized? /">Whether the Pet is Sterilized? /</label> |
|||
<label for="Whether the pet is sterilized?">செல்லப்பிராணிக்கு கருத்தடை செய்யப்பட்டுள்ளதா?</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input type="radio" id="Whether the pet is sterilized?" name="request_type"> |
|||
Yes |
|||
|
|||
|
|||
<input type="radio" for="Whether the pet is sterilized?" name="request_type"> |
|||
No |
|||
</div> |
|||
</div> |
|||
|
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
|
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
|
|||
<label id="Whether the pet is adopted from street? /">Whether the Pet is adopted from Street?/</label> |
|||
<label for="Whether the pet is adopted from street?">செல்லப்பிராணி தெருக்களிலிருந்து தத்தெடுக்கப்பட்டதா?</label> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="col-sm-6"> |
|||
<input type="radio" id="Whether the pet is adopted from street?" name="request_type"> |
|||
Yes |
|||
|
|||
<input type="radio" for="Whether the pet is adopted from street?" name="request_type"> |
|||
No |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<br> |
|||
<br> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label id="Whether Anti Rabies vaccination (ARV) is administered to the Dog: /"class="h">Whether Anti Rabies vaccination (ARV) Is Administered To The Dog: /</label> |
|||
<label for="Whether Anti Rabies vaccination (ARV) is administered to the Dog:"> செல்லப்பிராணிக்கு வெறிநாய்க்கடி நோய் தடுப்பூசி செலுத்தப்பட்டதா? </label> |
|||
</div> |
|||
<br> |
|||
<div class="col-sm-6"> |
|||
<label> <input type="radio" id="Whether Anti Rabies vaccination (ARV) is administered to the Dog:" name="request_type"> |
|||
Yes |
|||
</label> |
|||
<script type="text/javascript"> |
|||
function showMessage() { |
|||
alert("Sorry"); |
|||
} |
|||
</script> |
|||
|
|||
<input type="radio" onClick="showMessage()" name="request_type"> |
|||
|
|||
No |
|||
</label> |
|||
<br> |
|||
<label> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
|
|||
If no or ARV administered date more than 365 days: |
|||
Pop-up message: |
|||
<br> |
|||
Registration cannot be processed because of invalid ARV administered date. Kindly get your pet vaccinated in the following Pet Clinics run by Greater Chennai Corporation. |
|||
1.Thiru.Vi.Ka Nagar Pet Clinic, |
|||
Pallavan Salai, |
|||
Thiru.Vi.Ka Nagar |
|||
Div-68, Zone – 6 |
|||
2.Nungambakkam Pet Clinic |
|||
School Road, |
|||
Nungambakkam, |
|||
Chennai-600 034. |
|||
Division-110 Zone – 9 |
|||
3. Kannammapet Pet Clinic, |
|||
Muthu Rangam Salai, |
|||
T.Nagar, |
|||
Chennai-600 017 |
|||
Division-141, Zone - 10 |
|||
|
|||
4. Meenambakkam Pet Clinic |
|||
Nehru High Road, |
|||
Meenambakkam, |
|||
Chennai- 600 116. |
|||
Division-166, Zone-12. /</label> |
|||
<label>இல்லை அல்லது வெறிநாய்க்கடி நோய் தடுப்பூசி (ARV) செலுத்தப்பட்டு 365 நாட்களை கடந்திருந்தால்: |
|||
Pop-up message: |
|||
வெறிநாய்க் கடிநோய் தடுப்பூசி (ARV) செலுத்தப்பட்ட தேதி ஒரு வருடத்திற்கு மேல் ஆனதால், இந்த விண்ணப்பத்தை சமர்ப்பிக்க இயலாது. பெருநகர சென்னை மாநகராட்சியின் கட்டுப்பாட்டில் செயல்படும் கீழ்க்கண்ட செல்லப்பிராணிகள் சிகிச்சை மையங்களுக்கு சென்று உங்கள் செல்லப்பிராணிக்கு வெறிநாய்க் கடிநோய் தடுப்பூசி செலுத்துங்கள். |
|||
1. திரு.வி.க. நகர் செல்லப்பிராணிகள் சிகிச்சை மையம், |
|||
பல்லவன் சாலை, 14வது தெரு, |
|||
திரு.வி.க. நகர், சென்னை - 11. |
|||
கோட்டம் - 68, மண்டலம் – 6 |
|||
2. நுங்கம்பாக்கம் செல்லப்பிராணிகள் சிகிச்சை மையம், |
|||
பள்ளி தெரு, நுங்கம்பாக்கம், |
|||
சென்னை - 34. |
|||
கோட்டம் – 110, மண்டலம் –9 |
|||
3. கண்ணம்மாப்பேட்டை செல்லப்பிராணிகள் சிகிச்சை மையம், முத்துரங்கன் தெரு, |
|||
கண்ணம்மாப்பேட்டை, |
|||
சென்னை –17. |
|||
கோட்டம் – 141, மண்டலம் –10 |
|||
4. மீனம்பாக்கம் செல்லப்பிராணிகள் சிகிச்சை மையம், |
|||
நேரு நெடுஞ்சாலை, மீனம்பாக்கம், சென்னை. 116. |
|||
கோட்டம் – 166, மண்டலம் –12</label> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label id="If yes, ARV administered date: /" class="l">If yes, ARV Administered Date /</label> |
|||
<label for="If yes, ARV administered date:">ஆம் எனில், வெறிநாய்க் கடிநோய் தடுப்பூசி செலுத்தப்பட்ட தேதி:</label> |
|||
<br> |
|||
<br> |
|||
<label id="(Less than 365 days)">(Less than 365 days)</label> |
|||
<label for="(Less than 365 days)">(365 நாட்களுக்குள்)</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input id="If yes, ARV administered date:" type="date" class="teal" name="If yes, ARV administered date:" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label id="Last date of De-worming: /" class="h">Last Date Of De-Worming /</label> |
|||
<label for="Last date of De-worming:"> கடைசியாக குடல் புழு நீக்க மருந்து(De-worming) செலுத்தப்பட்ட தேதி:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="Last date of De-worming:" type="date" name="Last date of De-worming:" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div class="col-sm-3"> |
|||
<label id="Other vaccination given:" class="h">Other Vaccination Given /</label> |
|||
<label for="Other vaccination given:">வேறு ஏதேனும் தடுப்பூசி செலுத்தப்பட்ட விவரம்:</label> |
|||
</div> |
|||
|
|||
<div class="col-sm-6"> |
|||
<lebel id="Dog:">Dog:</lebel> |
|||
<br> |
|||
<br> |
|||
<div class="form-group"> |
|||
<input type="radio" name="choice-radio" for="DHPPi+"> |
|||
<label id="DHPPi+">DHPPi+L</label> |
|||
|
|||
|
|||
</div> |
|||
<div class="form-group"> |
|||
<input type="radio" name="choice-radio" id="Canine Corona"> |
|||
|
|||
<label for="Canine Corona">Canine Corona</label> |
|||
|
|||
</div> |
|||
<div class="form-group"> |
|||
<input type="radio" name="choice-radio" for="Kennel Cough:"> |
|||
<label id="Kennel Cough">Kennel Cough</label> |
|||
|
|||
</div> |
|||
<div class="col"> |
|||
<label id="other">Others</label> |
|||
<input for="Other" type="text" name="Others"> |
|||
<br><br> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-sm-6"> |
|||
<label id="cat:">Cat:</label> |
|||
<br> |
|||
<br> |
|||
<div class="form-group"> |
|||
<input type="radio" name="choice-radio" for="FCV+FVR+FPLV"> |
|||
<label id="FCV+FVR+FPLV">FCV+FVR+FPLV</label> |
|||
</div> |
|||
<div class="col"> |
|||
<input for="Others" type="text" name="name"> |
|||
<label id="Others">Others</label><br><br> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label for="Previous license No. from GCC(if any)" class="l">Previous License No. From GCC(If Any)</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input id="Previous license No. from GCC(if any)" type="tel" class="teal" placeholder="Enter 4 Digit code" minlength="4" maxlength="4" name="previouslicense" required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<hr> |
|||
<br> |
|||
<b>VETERINARY CONSULTANT DETAILS /</b> |
|||
<b>சிகிச்சை அளிக்கும் கால்நடை மருத்துவரின் விபரம்:</b> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-3"> |
|||
<label for="Name of the Veterinary doctor treating the pet: " class="h">Name of the Veterinary doctor treating the Pet / </label> |
|||
<label for="Name of the Veterinary doctor treating the pet: "> கால்நடை மருத்துவரின் பெயர்: சிகிச்சை அளிக்கும் கால்நடை மருத்துவரின் விபரம்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="Name of the Veterinary doctor treating the pet: " type="Name: Dr." value="Dr." name="Name: Dr." required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<br> |
|||
<br> |
|||
<div class="col-sm-3"> |
|||
<label for="Tamil Nadu Veterinary Council Number/ Indian Veterinary Council Number: ">Tamil Nadu Veterinary Council Number/ Indian Veterinary Council Number /</label> |
|||
<label for="Tamil Nadu Veterinary Council Number/ Indian Veterinary Council Number: ">தமிழ்நாடு கால்நடை மருத்துவ பேரவை பதிவு எண். / இந்திய கால்நடை மருத்துவ பேரவை பதிவு எண்:</label> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<input class="teal" id="Tamil Nadu Veterinary Council Number/ Indian Veterinary Council Number: " type="number" name="Tamil Nadu Veterinary Council Number/ Indian Veterinary Council Number: " required/> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<hr> |
|||
<br> |
|||
<b>Attachment Details /</b> |
|||
<b>இணைக்கப்பட வேண்டிய விவரங்கள்:<span>*</span></b> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-4"> |
|||
<label style="margin-right:3px" for="1. Applicants's Photo "> 1. Applicants's Photo /</label> |
|||
<label for="1. Applicants's Photo " >உரிமையாளரின் புகைப்படம்:</label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input type="file" id="1. Applicants's Photo " name="applicantPhoto"> |
|||
</div></div> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-4"> |
|||
<label for=" 2. Applicant Address Proof /</li>(Any one of Aadhar Card / Ration Card |
|||
/Voter's ID Card / Driving License)"> |
|||
2. Applicant Address Proof /</li>(Any one of Aadhar Card / Ration Card |
|||
/Voter's ID Card / Driving License)</label> |
|||
<label for=" 2. Applicant Address Proof /</li>(Any one of Aadhar Card / Ration Card |
|||
/Voter's ID Card / Driving License)">உரிமையாளரின் முகவரி ஆவணம் |
|||
(ஆதார் / வாக்காளர் / ரேசன் / ஓட்டுநர் உரிமம் |
|||
அட்டைகளில் ஏதேனும் ஒன்று):</label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input type="file" id=" 2. Applicant Address Proof /</li>(Any one of Aadhar Card / Ration Card |
|||
/Voter's ID Card / Driving License)" class="my" name="addressProofPhoto"> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-4"> |
|||
<label for="3. Pet photo ">3. Pet photo /</label> |
|||
<label for="3. Pet photo ">செல்லப்பிராணியின் புகைப்படம்:</label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input type="file" id="3. Pet photo " name="petPhoto"> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="row"> |
|||
<div class="col-sm-4"> |
|||
<label for="4. Rabies Vaccination Certification /">4. Rabies Vaccination Certification / |
|||
</label> |
|||
<label for="4. Rabies Vaccination Certification /">வெறிநாய் கடிநோய் செலுத்தியதற்கான சான்றிதழ்:</label> |
|||
</div> |
|||
<div class="col-sm-2"> |
|||
<input type="file" id="4. Rabies Vaccination Certification /" name="vaccinationCertificatePhoto"> |
|||
</div> |
|||
</div> |
|||
</ol> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
<div class="container"> |
|||
<div Align="center"> |
|||
<b>Declaration /</b> |
|||
<b>உறுதிமொழி:</b> |
|||
<br> |
|||
<br> |
|||
<label><input type="checkbox" id=" I hereby declare that the above furnished details are true to my knowledge /"> I hereby declare that the above furnished details are true to my knowledge /</label> |
|||
<div> |
|||
<label for=" I hereby declare that the above furnished details are true to my knowledge /"> மேலே அளிக்கப்பட்ட அனைத்து தகவல்களும் உண்மை என்று உறுதியளிக்கிறேன்: </label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br> |
|||
<br> |
|||
</ol> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<br> |
|||
<div Align="center"> |
|||
<input type="submit" value="Submit"> |
|||
<br> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,31 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" |
|||
xmlns:th="http://www.thymeleaf.org"> |
|||
<head th:include="head :: head"></head> |
|||
<body> |
|||
<div th:substituteby="navbar :: navbar"></div> |
|||
|
|||
<div th:fragment="navbar" class="navbar navbar-inverse navbar-static-top"> |
|||
<div class="navbar-inner"> |
|||
<div class="container"> |
|||
<button type="button" class="btn btn-navbar" data-toggle="collapse" |
|||
data-target=".nav-collapse"> |
|||
<span class="icon-bar"></span> <span class="icon-bar"></span> <span |
|||
class="icon-bar"></span> |
|||
</button> |
|||
|
|||
<a class="brand" href="/">New Registration</a> |
|||
<a class="brand" href="./GetRegisteredPetdetails">Existing Registration</a> |
|||
|
|||
|
|||
<div class="nav-collapse collapse"> |
|||
<ul class="nav"> |
|||
<li class=""><a class="brand" href="/">New Registration</a></li> |
|||
<li class=""><a class="brand" href="./GetRegisteredPetdetails">Existing Registration</a></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,170 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns:th="https://www.thymeleaf.org"> |
|||
|
|||
<head> |
|||
|
|||
<!-- added for razorpay --> |
|||
<meta charset="utf-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
|
|||
<!-- Bootstrap CSS --> |
|||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> |
|||
|
|||
|
|||
</head> |
|||
|
|||
<body class="nav-md"> |
|||
<div class="container body"> |
|||
<div class="main_container"> |
|||
|
|||
<nav class="navbar navbar-light bg-light" style="background-color: #ffffff!important;"> |
|||
<a class="navbar-brand" ></a> |
|||
</nav> |
|||
|
|||
<div class="alert alert-success" id="pay-success" style="display:none;"> |
|||
<strong>Payment Completed Successfully</strong> |
|||
</div> |
|||
|
|||
<form id="msform"> |
|||
|
|||
<div class="form-group"> |
|||
<label for="email">Name</label> |
|||
<input type="text" class="form-control" id="customerName" name="customerName" placeholder="Enter Customer Name" required="required"> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="email">Email address</label> |
|||
<input type="email" class="form-control" id="email" name="email" placeholder="Enter Email" required="required"> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="phoneNo">Phone No</label> |
|||
<input type="text" class="form-control" id="phoneNumber" name="phoneNumber" placeholder="Phone No"> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="amount">Amount</label> |
|||
<input type="text" class="form-control" readonly id="amount" name="amount" |
|||
placeholder="Amount" required="required" th:value="${rAmount}"> |
|||
</div> |
|||
<input type="hidden" id="petsID" readonly th:value="${petsID}"> |
|||
<input type="hidden" id="paymentid" readonly /> |
|||
|
|||
<button type="button" class="btn btn-primary" id="rzp-button1" style="margin-top:-2px">Pay</button> |
|||
<button type="button" class="btn btn-primary" id="rzp-button2" style="margin-top:-2px">Home</button> |
|||
</form> |
|||
|
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" ></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> |
|||
<!-- razorpay --> |
|||
<script src="https://checkout.razorpay.com/v1/checkout.js"></script> |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
function doPost(path, requestObject, isAsync) { |
|||
var resp; |
|||
$.ajax({ |
|||
url: path, |
|||
type: 'POST', |
|||
data: requestObject, |
|||
contentType: "application/json; charset=UTF-8", |
|||
async: isAsync, |
|||
success: function (data) { |
|||
resp = JSON.parse(data) |
|||
} |
|||
}) |
|||
return resp; |
|||
} |
|||
|
|||
|
|||
</script> |
|||
|
|||
<script> |
|||
var resp = null; |
|||
|
|||
/** |
|||
Manual Checkout for Razor Pay |
|||
**/ |
|||
|
|||
var options = { |
|||
"key": "", |
|||
"amount": "", |
|||
"name": "", |
|||
"description": "", |
|||
"image": "", |
|||
"order_id":"", |
|||
"handler": function (response){ |
|||
|
|||
|
|||
<!-- alert(response.razorpay_payment_id);--> |
|||
/* use this razorpay_payment_id for feature reference to this order */ |
|||
indexedReqObj = {"paymentid": response.razorpay_payment_id, "petsID": document.getElementById('petsID').value}; |
|||
document.getElementById('paymentid').value = JSON.stringify(indexedReqObj); |
|||
|
|||
payresponse = doPost("/pet-registry-0.0.1/updatePayment", JSON.stringify(indexedReqObj), false); |
|||
alert(payresponse); |
|||
if(payresponse.statusCode == 200){ |
|||
<!-- alert(resp);--> |
|||
} |
|||
<!-- $('#msform')[0].reset();--> |
|||
$('#pay-success').show(); |
|||
|
|||
}, |
|||
"prefill": { |
|||
"name": "", |
|||
"email": "" |
|||
}, |
|||
"notes": { |
|||
"address": "" |
|||
}, |
|||
"theme": { |
|||
"color": "" |
|||
} |
|||
}; |
|||
|
|||
|
|||
document.getElementById('rzp-button1').onclick = function(e){ |
|||
<!-- alert(document.getElementById('petsID').value);--> |
|||
|
|||
var reqObject = $('#msform').serializeArray(); |
|||
var indexedReqObj = {}; |
|||
$.map(reqObject, function(n, i){ |
|||
indexedReqObj[n['name']] = n['value']; |
|||
}); |
|||
<!-- alert(JSON.stringify(indexedReqObj));--> |
|||
resp = doPost("/pet-registry-0.0.1/createPayment", JSON.stringify(indexedReqObj), false); |
|||
if(resp.statusCode == 200) { |
|||
options.key = resp.razorPay.secretKey; |
|||
options.order_id = resp.razorPay.razorpayOrderId; |
|||
options.amount = resp.razorPay.applicationFee; //paise |
|||
options.name = resp.razorPay.merchantName; |
|||
options.description = resp.razorPay.purchaseDescription; |
|||
options.image = resp.razorPay.imageURL; |
|||
options.prefill.name = resp.razorPay.customerName; |
|||
options.prefill.email = resp.razorPay.customerEmail; |
|||
options.prefill.contact = resp.razorPay.customerContact; |
|||
|
|||
options.notes.address = resp.razorPay.notes; |
|||
options.theme.color = resp.razorPay.theme; |
|||
var rzp1 = new Razorpay(options); |
|||
rzp1.open(); |
|||
e.preventDefault(); |
|||
} else { |
|||
//do something else |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
|
|||
|
|||
|
|||
</html> |
|||
@ -0,0 +1,123 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns:th="https://www.thymeleaf.org"> |
|||
<head> |
|||
<head th:include="head :: head"></head> |
|||
|
|||
<!-- Bootstrap CSS --> |
|||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> |
|||
|
|||
<title>Pet Registry</title> |
|||
<style> |
|||
th, td { |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
.first-cols { |
|||
position: absolute; |
|||
width: 5em; |
|||
margin-left: -5em; |
|||
} |
|||
|
|||
.table-wrapper { |
|||
overflow-x: scroll; |
|||
overflow-y: scroll; |
|||
width: 900px; |
|||
height: 400px; |
|||
margin: 0 auto; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div th:substituteby="navbar :: navbar"></div> |
|||
|
|||
<div class="container"> |
|||
|
|||
<h1> Welcome to Pet Registration Acknowledgement</h1> |
|||
<div class="table-wrapper"> |
|||
<table class="table table-border table-striped"> |
|||
<thead class="thead-dark"> |
|||
<tr> |
|||
<th class="first-col">Operations</th> |
|||
<th>Status</th> |
|||
<th>Payment ID</th> |
|||
|
|||
<th>Title</th> |
|||
<th>First Name</th> |
|||
<th>division</th> |
|||
<th>doornumber</th> |
|||
<th>street</th> |
|||
<th>area</th> |
|||
<th>city</th> |
|||
<th>phone</th> |
|||
<th>pincode</th> |
|||
<th>state</th> |
|||
<th>email</th> |
|||
<th>pancardnumber</th> |
|||
<th>aadhar</th> |
|||
<th>votercard</th> |
|||
<th>previouslicense</th> |
|||
<th>petname</th> |
|||
<th>species</th> |
|||
<th>identificationmark</th> |
|||
<th>breed</th> |
|||
<th>petcolor</th> |
|||
<th>gender</th> |
|||
<th>veterinary_consultant</th> |
|||
<th>tnvcno</th> |
|||
<th>ageyears</th> |
|||
<th>months</th> |
|||
<th>arvdate</th> |
|||
<th>Lastdate</th> |
|||
<th>sterilization</th> |
|||
<th>adopted</th> |
|||
<th>antirabies_vaccination</th> |
|||
</tr>` |
|||
</thead> |
|||
<tbody> |
|||
<tr th:each="tPets:${pets}"> |
|||
<td class="first-col"> |
|||
<div class="btn-group" role="group" aria-label="Basic mixed styles example"> |
|||
<form action="Acknowledgeregister" method="post"> |
|||
<button type="submit" class="btn btn-primary">Select</button> |
|||
<input type="hidden" name="petsID" readonly th:value="${tPets.petID}"> |
|||
</form> |
|||
</div></td> |
|||
<td th:text="${tPets.status}"></td> |
|||
<td th:text="${tPets.paymentid}"></td> |
|||
<td th:text="${tPets.title}"></td> |
|||
<td th:text="${tPets.fname}"></td> |
|||
<td th:text="${tPets.division}"></td> |
|||
<td th:text="${tPets.doornumber}"></td> |
|||
<td th:text="${tPets.street}"></td> |
|||
<td th:text="${tPets.area}"></td> |
|||
<td th:text="${tPets.city}"></td> |
|||
<td th:text="${tPets.phone}"></td> |
|||
<td th:text="${tPets.pincode}"></td> |
|||
<td th:text="${tPets.state}"></td> |
|||
<td th:text="${tPets.email}"></td> |
|||
<td th:text="${tPets.pancardnumber}"></td> |
|||
<td th:text="${tPets.aadhar}"></td> |
|||
<td th:text="${tPets.votercard}"></td> |
|||
<td th:text="${tPets.previouslicense}"></td> |
|||
<td th:text="${tPets.petname}"></td> |
|||
<td th:text="${tPets.species}"></td> |
|||
<td th:text="${tPets.identificationmark}"></td> |
|||
<td th:text="${tPets.breed}"></td> |
|||
<td th:text="${tPets.petcolor}"></td> |
|||
<td th:text="${tPets.gender}"></td> |
|||
<td th:text="${tPets.VeterinaryConsultant}"></td> |
|||
<td th:text="${tPets.TNVCNo}"></td> |
|||
<td th:text="${tPets.ageyears}"></td> |
|||
<td th:text="${tPets.months}"></td> |
|||
<td th:text="${tPets.ARVdate}"></td> |
|||
<td th:text="${tPets.Lastdate}"></td> |
|||
<td th:text="${tPets.sterilization}"></td> |
|||
<td th:text="${tPets.adopted}"></td> |
|||
<td th:text="${tPets.AntiRabies_vaccination}"></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,13 @@ |
|||
package com.okayjava.html; |
|||
|
|||
import org.junit.jupiter.api.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
@SpringBootTest |
|||
class SpringbootHtmlApplicationTests { |
|||
|
|||
@Test |
|||
void contextLoads() { |
|||
} |
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue