feat: 세외수입 개별시스템 연계 API 4종

dev
minkyu1128 2 years ago
parent ee776a5553
commit c3928ba182

37
.gitignore vendored

@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/

@ -0,0 +1,53 @@
plugins {
id 'org.springframework.boot' version '2.7.5'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
id 'java'
}
group = 'cokr.xit.ntri'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'com.oracle.database.jdbc:ojdbc8'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
/*====================================================================================
* Springdoc - swagger
====================================================================================*/
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
/*====================================================================================
* lombok
====================================================================================*/
implementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
/*====================================================================================
* commons-io
====================================================================================*/
implementation 'org.apache.commons:commons-io:1.3.2'
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}

Binary file not shown.

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

240
gradlew vendored

@ -0,0 +1,240 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed 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.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
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
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

91
gradlew.bat vendored

@ -0,0 +1,91 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem 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, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

@ -0,0 +1 @@
rootProject.name = 'ntri'

@ -0,0 +1,44 @@
package cokr.xit.ntri;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@Slf4j
@ComponentScan(basePackages = "cokr.xit")
@SpringBootApplication
public class NtriApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
// SpringApplication.run(NtriApplication.class, args);
Long begin = System.currentTimeMillis();
// PID Setting ...
SpringApplication application = new SpringApplication(NtriApplication.class);
application.addListeners(new ApplicationPidFileWriter()); //PID(Process ID 작성)
application.run(args);
log.info("=========================================================================================");
log.info("========== NTRI Application load Complete :: active profiles - {} ==========", System.getProperty("spring.profiles.active"));
log.info("=========================================================================================");
Long end = System.currentTimeMillis();
System.out.println("====================================================");
System.out.println("기동 소요시간: " + (end - begin) + "ms");
System.out.println("====================================================");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(NtriApplication.class);
}
}

@ -0,0 +1,58 @@
package cokr.xit.ntri.api.recv.entity;
import cokr.xit.ntri.support.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(schema = "", name = "ntri_recv_levy_cancel")
@Schema(name = "RecvLevyCancel", title = "부과취소정보(실시간)", description = "세외수입시스템으로 부과자료 연계 후 부과자료 삭제 시 삭제정보 실시간 제공(재 부과 연계시 부과연계관리키는 변경하여 제공)")
public class RecvLevyCancel extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private Long id;
@Schema(required = false, title = "자치단체코드", example = " ", description = "행정표준코드관리시스템의 자치단체코드")
@Column(name = "sgb_cd", length = 7)
private String sgbCd;
@Schema(required = false, title = "연계관리키", example = " ", description = "연계대상 기관에서 관리하는 유일키")
@Column(name = "link_mng_key", length = 50)
private String linkMngKey;
@Schema(required = false, title = "과세번호", example = " ", description = "과세자료의 유일한 번호. 개별자료인 경우")
@Column(name = "taxn_no", length = 31)
private String taxnNo;
@Schema(required = false, title = "부과취소일자", example = " ", description = " ")
@Column(name = "lvy_rtrcn_ymd", length = 8)
private String lvyRtrcnYmd;
@Schema(required = false, title = "삭제사유내용", example = " ", description = " ")
@Column(name = "del_rsn_cn", length = 4000)
private String delRsnCn;
@Schema(required = false, title = "예비항목1", example = " ", description = " ")
@Column(name = "rsve_item1", length = 200)
private String rsveItem1;
@Schema(required = false, title = "예비항목2", example = " ", description = " ")
@Column(name = "rsve_item2", length = 200)
private String rsveItem2;
@Schema(required = false, title = "예비항목3", example = " ", description = " ")
@Column(name = "rsve_item3", length = 200)
private String rsveItem3;
@Schema(required = false, title = "예비항목4", example = " ", description = " ")
@Column(name = "rsve_item4", length = 200)
private String rsveItem4;
@Schema(required = false, title = "예비항목5", example = " ", description = " ")
@Column(name = "rsve_item5", length = 200)
private String rsveItem5;
}

@ -0,0 +1,202 @@
package cokr.xit.ntri.api.recv.entity;
import cokr.xit.ntri.support.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(schema = "", name = "ntri_recv_levy_result")
@Schema(name = "RecvLevyResult", title = "부과결과정보(실시간)", description = "세외수입시스템으로 부과자료 연계 후 결의처리 시 전자납부번호 및 가상계좌번호 실시간 제공")
public class RecvLevyResult extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private Long id;
@Schema(required = false, title = "자치단체코드", example = " ", description = "행정표준코드관리시스템의 자치단체코드")
@Column(name = "sgb_cd", length = 7)
private String sgbCd;
@Schema(required = false, title = "연계관리키", example = " ", description = "연계대상 기관에서 관리하는 유일키")
@Column(name = "link_mng_key", length = 50)
private String linkMngKey;
@Schema(required = false, title = "과세번호", example = " ", description = "과세자료의 유일한 번호. 개별자료인 경우")
@Column(name = "taxn_no", length = 31)
private String taxnNo;
@Schema(required = false, title = "통합과세번호", example = " ", description = "과세자료(과세번호)의 통합관리번호. 통합자료인 경우")
@Column(name = "unty_taxn_no", length = 31)
private String untyTaxnNo;
@Schema(required = false, title = "부서코드", example = " ", description = "행정표준코드관리시스템의 부서코드")
@Column(name = "dpt_cd", length = 7)
private String dptCd;
@Schema(required = false, title = "특별회계사업코드", example = " ", description = " ")
@Column(name = "spcl_fis_biz_cd", length = 4)
private String spclFisBizCd;
@Schema(required = false, title = "회계연도", example = " ", description = " ")
@Column(name = "fyr", length = 4)
private String fyr;
@Schema(required = false, title = "회계구분코드", example = " ", description = "16:국세, 31:시도세, 41:시군구세, 51:특별회계시도세, 61:특별회계시군구세")
@Column(name = "act_se_cd", length = 2)
private String actSeCd;
@Schema(required = false, title = "대표세입과목코드", example = " ", description = " ")
@Column(name = "rprs_txm_cd", length = 6)
private String rprsTxmCd;
@Schema(required = false, title = "운영항목코드", example = " ", description = " ")
@Column(name = "oper_item_cd", length = 3)
private String operItemCd;
@Schema(required = false, title = "부과번호", example = " ", description = " ")
@Column(name = "lvy_no", length = 6)
private String lvyNo;
@Schema(required = false, title = "분납번호", example = " ", description = " ")
@Column(name = "itm_no", length = 2)
private String itmNo;
@Schema(required = false, title = "전자납부번호", example = " ", description = " ")
@Column(name = "epay_no", length = 19)
private String epayNo;
@Schema(required = false, title = "통합가상계좌은행명1", example = " ", description = " ")
@Column(name = "vtlac_bank_nm1", length = 100)
private String vtlacBankNm1;
@Schema(required = false, title = "통합가상계좌은행명2", example = " ", description = " ")
@Column(name = "vtlac_bank_nm2", length = 100)
private String vtlacBankNm2;
@Schema(required = false, title = "통합가상계좌은행명3", example = " ", description = " ")
@Column(name = "vtlac_bank_nm3", length = 100)
private String vtlacBankNm3;
@Schema(required = false, title = "통합가상계좌은행명4", example = " ", description = " ")
@Column(name = "vtlac_bank_nm4", length = 100)
private String vtlacBankNm4;
@Schema(required = false, title = "통합가상계좌은행명5", example = " ", description = " ")
@Column(name = "vtlac_bank_nm5", length = 100)
private String vtlacBankNm5;
@Schema(required = false, title = "통합가상계좌은행명6", example = " ", description = " ")
@Column(name = "vtlac_bank_nm6", length = 100)
private String vtlacBankNm6;
@Schema(required = false, title = "통합가상계좌은행명7", example = " ", description = " ")
@Column(name = "vtlac_bank_nm7", length = 100)
private String vtlacBankNm7;
@Schema(required = false, title = "통합가상계좌은행명8", example = " ", description = " ")
@Column(name = "vtlac_bank_nm8", length = 100)
private String vtlacBankNm8;
@Schema(required = false, title = "통합가상계좌은행명9", example = " ", description = " ")
@Column(name = "vtlac_bank_nm9", length = 100)
private String vtlacBankNm9;
@Schema(required = false, title = "통합가상계좌은행명10", example = " ", description = " ")
@Column(name = "vtlac_bank_nm10", length = 100)
private String vtlacBankNm10;
@Schema(required = false, title = "통합가상계좌은행명11", example = " ", description = " ")
@Column(name = "vtlac_bank_nm11", length = 100)
private String vtlacBankNm11;
@Schema(required = false, title = "통합가상계좌은행명12", example = " ", description = " ")
@Column(name = "vtlac_bank_nm12", length = 100)
private String vtlacBankNm12;
@Schema(required = false, title = "통합가상계좌은행명13", example = " ", description = " ")
@Column(name = "vtlac_bank_nm13", length = 100)
private String vtlacBankNm13;
@Schema(required = false, title = "통합가상계좌은행명14", example = " ", description = " ")
@Column(name = "vtlac_bank_nm14", length = 100)
private String vtlacBankNm14;
@Schema(required = false, title = "통합가상계좌은행명15", example = " ", description = " ")
@Column(name = "vtlac_bank_nm15", length = 100)
private String vtlacBankNm15;
@Schema(required = false, title = "통합가상계좌은행명16", example = " ", description = " ")
@Column(name = "vtlac_bank_nm16", length = 100)
private String vtlacBankNm16;
@Schema(required = false, title = "통합가상계좌은행명17", example = " ", description = " ")
@Column(name = "vtlac_bank_nm17", length = 100)
private String vtlacBankNm17;
@Schema(required = false, title = "통합가상계좌은행명18", example = " ", description = " ")
@Column(name = "vtlac_bank_nm18", length = 100)
private String vtlacBankNm18;
@Schema(required = false, title = "통합가상계좌은행명19", example = " ", description = " ")
@Column(name = "vtlac_bank_nm19", length = 100)
private String vtlacBankNm19;
@Schema(required = false, title = "통합가상계좌은행명20", example = " ", description = " ")
@Column(name = "vtlac_bank_nm20", length = 100)
private String vtlacBankNm20;
@Schema(required = false, title = "통합가상계좌번호1", example = " ", description = " ")
@Column(name = "vr_actno1", length = 20)
private String vrActno1;
@Schema(required = false, title = "통합가상계좌번호2", example = " ", description = " ")
@Column(name = "vr_actno2", length = 20)
private String vrActno2;
@Schema(required = false, title = "통합가상계좌번호3", example = " ", description = " ")
@Column(name = "vr_actno3", length = 20)
private String vrActno3;
@Schema(required = false, title = "통합가상계좌번호4", example = " ", description = " ")
@Column(name = "vr_actno4", length = 20)
private String vrActno4;
@Schema(required = false, title = "통합가상계좌번호5", example = " ", description = " ")
@Column(name = "vr_actno5", length = 20)
private String vrActno5;
@Schema(required = false, title = "통합가상계좌번호6", example = " ", description = " ")
@Column(name = "vr_actno6", length = 20)
private String vrActno6;
@Schema(required = false, title = "통합가상계좌번호7", example = " ", description = " ")
@Column(name = "vr_actno7", length = 20)
private String vrActno7;
@Schema(required = false, title = "통합가상계좌번호8", example = " ", description = " ")
@Column(name = "vr_actno8", length = 20)
private String vrActno8;
@Schema(required = false, title = "통합가상계좌번호9", example = " ", description = " ")
@Column(name = "vr_actno9", length = 20)
private String vrActno9;
@Schema(required = false, title = "통합가상계좌번호10", example = " ", description = " ")
@Column(name = "vr_actno10", length = 20)
private String vrActno10;
@Schema(required = false, title = "통합가상계좌번호11", example = " ", description = " ")
@Column(name = "vr_actno11", length = 20)
private String vrActno11;
@Schema(required = false, title = "통합가상계좌번호12", example = " ", description = " ")
@Column(name = "vr_actno12", length = 20)
private String vrActno12;
@Schema(required = false, title = "통합가상계좌번호13", example = " ", description = " ")
@Column(name = "vr_actno13", length = 20)
private String vrActno13;
@Schema(required = false, title = "통합가상계좌번호14", example = " ", description = " ")
@Column(name = "vr_actno14", length = 20)
private String vrActno14;
@Schema(required = false, title = "통합가상계좌번호15", example = " ", description = " ")
@Column(name = "vr_actno15", length = 20)
private String vrActno15;
@Schema(required = false, title = "통합가상계좌번호16", example = " ", description = " ")
@Column(name = "vr_actno16", length = 20)
private String vrActno16;
@Schema(required = false, title = "통합가상계좌번호17", example = " ", description = " ")
@Column(name = "vr_actno17", length = 20)
private String vrActno17;
@Schema(required = false, title = "통합가상계좌번호18", example = " ", description = " ")
@Column(name = "vr_actno18", length = 20)
private String vrActno18;
@Schema(required = false, title = "통합가상계좌번호19", example = " ", description = " ")
@Column(name = "vr_actno19", length = 20)
private String vrActno19;
@Schema(required = false, title = "통합가상계좌번호20", example = " ", description = " ")
@Column(name = "vr_actno20", length = 20)
private String vrActno20;
@Schema(required = false, title = "예비항목1", example = " ", description = " ")
@Column(name = "rsve_item1", length = 200)
private String rsveItem1;
@Schema(required = false, title = "예비항목2", example = " ", description = " ")
@Column(name = "rsve_item2", length = 200)
private String rsveItem2;
@Schema(required = false, title = "예비항목3", example = " ", description = " ")
@Column(name = "rsve_item3", length = 200)
private String rsveItem3;
@Schema(required = false, title = "예비항목4", example = " ", description = " ")
@Column(name = "rsve_item4", length = 200)
private String rsveItem4;
@Schema(required = false, title = "예비항목5", example = " ", description = " ")
@Column(name = "rsve_item5", length = 200)
private String rsveItem5;
}

@ -0,0 +1,140 @@
package cokr.xit.ntri.api.recv.entity;
import cokr.xit.ntri.support.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(schema = "", name = "ntri_recv_rciv_info")
@Schema(name = "RecvRcivInfo", title = "수납정보(실시간)", description = "세외수입시스템으로 부과자료 연계 후 수납처리 시 실시간 제공")
public class RecvRcivInfo extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private Long id;
@Schema(required = false, title = "자치단체코드", example = " ", description = "행정표준코드관리시스템의 자치단체코드")
@Column(name = "sgb_cd", length = 7)
private String sgbCd;
@Schema(required = false, title = "자치단체명", example = " ", description = "자치단체코드의 명")
@Column(name = "sgb_nm", length = 60)
private String sgbNm;
@Schema(required = false, title = "연계관리키", example = " ", description = "연계대상 기관에서 관리하는 유일키")
@Column(name = "link_mng_key", length = 50)
private String linkMngKey;
@Schema(required = false, title = "과세번호", example = " ", description = "과세자료의 유일한 번호. 개별자료인 경우")
@Column(name = "taxn_no", length = 31)
private String taxnNo;
@Schema(required = false, title = "통합과세번호", example = " ", description = "과세자료(과세번호)의 통합관리번호. 통합자료인 경우")
@Column(name = "unty_taxn_no", length = 31)
private String untyTaxnNo;
@Schema(required = false, title = "부서코드", example = " ", description = "행정표준코드관리시스템의 부서코드")
@Column(name = "dpt_cd", length = 7)
private String dptCd;
@Schema(required = false, title = "부서명", example = " ", description = "행정표준코드관리시스템의 부서코드의 명")
@Column(name = "dpt_nm", length = 200)
private String dptNm;
@Schema(required = false, title = "특별회계사업코드", example = " ", description = " ")
@Column(name = "spcl_fis_biz_cd", length = 4)
private String spclFisBizCd;
@Schema(required = false, title = "특별회계사업명", example = " ", description = " ")
@Column(name = "spcl_fis_biz_nm", length = 100)
private String spclFisBizNm;
@Schema(required = false, title = "회계연도", example = " ", description = " ")
@Column(name = "fyr", length = 4)
private String fyr;
@Schema(required = false, title = "회계구분코드", example = " ", description = "16:국세, 31:시도세, 41:시군구세, 51:특별회계시도세, 61:특별회계시군구세")
@Column(name = "act_se_cd", length = 2)
private String actSeCd;
@Schema(required = false, title = "회계구분명", example = " ", description = " ")
@Column(name = "act_se_nm", length = 100)
private String actSeNm;
@Schema(required = false, title = "대표세입과목코드", example = " ", description = " ")
@Column(name = "rprs_txm_cd", length = 6)
private String rprsTxmCd;
@Schema(required = false, title = "대표세입과목명", example = " ", description = " ")
@Column(name = "rprs_txm_nm", length = 100)
private String rprsTxmNm;
@Schema(required = false, title = "운영항목코드", example = " ", description = " ")
@Column(name = "oper_item_cd", length = 3)
private String operItemCd;
@Schema(required = false, title = "운영항목명", example = " ", description = " ")
@Column(name = "oper_item_nm", length = 100)
private String operItemNm;
@Schema(required = false, title = "부과번호", example = " ", description = " ")
@Column(name = "lvy_no", length = 6)
private String lvyNo;
@Schema(required = false, title = "분납번호", example = " ", description = "제도에 따른 부과자료 분납순번 01~89, 일부납부 신청에 따른 부과자료 순번 90~99")
@Column(name = "itm_no", length = 2)
private String itmNo;
@Schema(required = false, title = "전자납부번호", example = " ", description = " ")
@Column(name = "epay_no", length = 19)
private String epayNo;
@Schema(required = false, title = "수납번호", example = " ", description = "수납순번")
@Column(name = "rcvmt_no", length = 2)
private String rcvmtNo;
@Schema(required = false, title = "수납구분코드", example = " ", description = "01:완납, 02:이중수납, 03:분납, 04:과납, 05:오납, 06:일부수납")
@Column(name = "rcvmt_se_cd", length =2 )
private String rcvmtSeCd;
@Schema(required = false, title ="수납구분명" , example = " ", description = "수납구분코드명(일부납부, 완납 등)")
@Column(name = "rcvmt_se_nm", length =100 )
private String rcvmtSeNm;
@Schema(required = false, title ="수납일자" , example = " ", description = " ")
@Column(name = "rcvmt_ymd", length =8 )
private String rcvmtYmd;
@Schema(required = false, title ="회계일자" , example = " ", description = " ")
@Column(name = "act_ymd", length =8 )
private String actYmd;
@Schema(required = false, title ="이체일자" , example = " ", description = " ")
@Column(name = "tsf_ymd", length =8 )
private String tsfYmd;
@Schema(required = false, title ="수납본세금액" , example = " ", description = "수납본세")
@Column(name = "rcvmt_pct_amt", length =15 )
private String rcvmtPctAmt;
@Schema(required = false, title ="수납가산금액" , example = " ", description = "수납가산금")
@Column(name = "rcvmt_adtn_amt", length =15 )
private String rcvmtAdtnAmt;
@Schema(required = false, title ="수납이자금액" , example = " ", description = "수납이자")
@Column(name = "rcvmt_intr_amt", length = 15)
private String rcvmtIntrAmt;
@Schema(required = false, title = "은행명", example = " ", description = " ")
@Column(name = "bank_nm", length = 30)
private String bankNm;
@Schema(required = false, title = "수납유형코드", example = " ", description = "01:OCR수납, 02:수기수납, 03:계좌이체, 04:세입정정, 05:배당")
@Column(name = "rcvmt_ty_cd", length = 2)
private String rcvmtTyCd;
@Schema(required = false, title = "수납유형", example = " ", description = "납부매체정보(계좌이체, 신용카드결제, 가상계좌수납 등)")
@Column(name = "rcvmt_ty", length = 300)
private String rcvmtTy;
@Schema(required = false, title = "예비항목1", example = " ", description = " ")
@Column(name = "rsve_item1", length = 200)
private String rsveItem1;
@Schema(required = false, title = "예비항목2", example = " ", description = " ")
@Column(name = "rsve_item2", length = 200)
private String rsveItem2;
@Schema(required = false, title = "예비항목3", example = " ", description = " ")
@Column(name = "rsve_item3", length = 200)
private String rsveItem3;
@Schema(required = false, title = "예비항목4", example = " ", description = " ")
@Column(name = "rsve_item4", length = 200)
private String rsveItem4;
@Schema(required = false, title = "예비항목5", example = " ", description = " ")
@Column(name = "rsve_item5", length = 200)
private String rsveItem5;
}

@ -0,0 +1,117 @@
package cokr.xit.ntri.api.recv.entity;
import cokr.xit.ntri.support.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(schema = "", name = "ntri_recv_rdcamt_info")
@Schema(name = "RecvRdcamtInfo", title = "감액정보(실시간)", description = "세외수입시스템으로 부과자료 연계 후 감액자료 발생 시 실시간 제공")
public class RecvRdcamtInfo extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private Long id;
@Schema(required = false, title = "자치단체코드", example = " ", description = "행정표준코드관리시스템의 자치단체코드")
@Column(name = "sgb_cd", length = 7)
private String sgbCd;
@Schema(required = false, title = "자치단체명", example = " ", description = "자치단체코드의 명")
@Column(name = "sgb_nm", length = 60)
private String sgbNm;
@Schema(required = false, title = "연계관리키", example = " ", description = "연계대상 기관에서 관리하는 유일키")
@Column(name = "link_mng_key", length = 50)
private String linkMngKey;
@Schema(required = false, title = "과세번호", example = " ", description = "과세자료의 유일한 번호. 개별자료인 경우")
@Column(name = "taxn_no", length = 31)
private String taxnNo;
@Schema(required = false, title = "통합과세번호", example = " ", description = "과세자료(과세번호)의 통합관리번호. 통합자료인 경우")
@Column(name = "unty_taxn_no", length = 31)
private String untyTaxnNo;
@Schema(required = false, title = "부서코드", example = " ", description = "행정표준코드관리시스템의 부서코드")
@Column(name = "dpt_cd", length = 7)
private String dptCd;
@Schema(required = false, title = "부서명", example = " ", description = "행정표준코드관리시스템의 부서코드의 명")
@Column(name = "dpt_nm", length = 200)
private String dptNm;
@Schema(required = false, title = "특별회계사업코드", example = " ", description = " ")
@Column(name = "spcl_fis_biz_cd", length = 4)
private String spclFisBizCd;
@Schema(required = false, title = "특별회계사업명", example = " ", description = " ")
@Column(name = "spcl_fis_biz_nm", length = 100)
private String spclFisBizNm;
@Schema(required = false, title = "회계연도", example = " ", description = " ")
@Column(name = "fyr", length = 4)
private String fyr;
@Schema(required = false, title = "회계구분코드", example = " ", description = "16:국세, 31:시도세, 41:시군구세, 51:특별회계시도세, 61:특별회계시군구세")
@Column(name = "act_se_cd", length = 2)
private String actSeCd;
@Schema(required = false, title = "회계구분명", example = " ", description = " ")
@Column(name = "act_se_nm", length = 100)
private String actSeNm;
@Schema(required = false, title = "대표세입과목코드", example = " ", description = " ")
@Column(name = "rprs_txm_cd", length = 6)
private String rprsTxmCd;
@Schema(required = false, title = "대표세입과목명", example = " ", description = " ")
@Column(name = "rprs_txm_nm", length = 100)
private String rprsTxmNm;
@Schema(required = false, title = "운영항목코드", example = " ", description = " ")
@Column(name = "oper_item_cd", length = 3)
private String operItemCd;
@Schema(required = false, title = "운영항목명", example = " ", description = " ")
@Column(name = "oper_item_nm", length = 100)
private String operItemNm;
@Schema(required = false, title = "부과번호", example = " ", description = " ")
@Column(name = "lvy_no", length = 6)
private String lvyNo;
@Schema(required = false, title = "분납번호", example = " ", description = " ")
@Column(name = "itm_no", length = 2)
private String itmNo;
@Schema(required = false, title = "감액일자", example = " ", description = " ")
@Column(name = "rdc_ymd", length = 8)
private String rdcYmd;
@Schema(required = false, title = "감액본세금액", example = " ", description = "감액금액")
@Column(name = "rdc_pct_amt", length = 15)
private String rdcPctAmt;
@Schema(required = false, title = "금액가산금액", example = " ", description = "감액가산금")
@Column(name = "rdc_adtn_amt", length = 15)
private String rdcAdtnAmt;
@Schema(required = false, title = "감액이자금액", example = " ", description = "감액이자")
@Column(name = "rdc_intr_amt", length = 15)
private String rdcIntrAmt;
@Schema(required = false, title = "감액금액", example = " ", description = "감액총금액")
@Column(name = "rdc_amt", length = 15)
private String rdcAmt;
@Schema(required = false, title = "감액사유내용", example = " ", description = "감액사유내용(세액오류감액, 행정기관착오 등")
@Column(name = "rdc_rsn_cn", length = 255)
private String rdcRsnCn;
@Schema(required = false, title = "예비항목1", example = " ", description = " ")
@Column(name = "rsve_item1", length = 200)
private String rsveItem1;
@Schema(required = false, title = "예비항목2", example = " ", description = " ")
@Column(name = "rsve_item2", length = 200)
private String rsveItem2;
@Schema(required = false, title = "예비항목3", example = " ", description = " ")
@Column(name = "rsve_item3", length = 200)
private String rsveItem3;
@Schema(required = false, title = "예비항목4", example = " ", description = " ")
@Column(name = "rsve_item4", length = 200)
private String rsveItem4;
@Schema(required = false, title = "예비항목5", example = " ", description = " ")
@Column(name = "rsve_item5", length = 200)
private String rsveItem5;
}

@ -0,0 +1,7 @@
package cokr.xit.ntri.api.recv.entity.repository;
import cokr.xit.ntri.api.recv.entity.RecvLevyCancel;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RecvLevyCancelRepository extends JpaRepository<Long, RecvLevyCancel> {
}

@ -0,0 +1,7 @@
package cokr.xit.ntri.api.recv.entity.repository;
import cokr.xit.ntri.api.recv.entity.RecvLevyResult;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RecvLevyResultRepository extends JpaRepository<Long, RecvLevyResult> {
}

@ -0,0 +1,7 @@
package cokr.xit.ntri.api.recv.entity.repository;
import cokr.xit.ntri.api.recv.entity.RecvRcivInfo;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RecvRcivInfoRepository extends JpaRepository<Long, RecvRcivInfo> {
}

@ -0,0 +1,7 @@
package cokr.xit.ntri.api.recv.entity.repository;
import cokr.xit.ntri.api.recv.entity.RecvRdcamtInfo;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RecvRdcamtInfoRepository extends JpaRepository<Long, RecvRdcamtInfo> {
}

@ -0,0 +1,26 @@
package cokr.xit.ntri.api.recv.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class RecvResponseDTO {
@Schema(required = false, title = "자치단체코드", example = " ", description = " ")
private String sgbCd;
@Schema(required = false, title = "연계대상코드", example = " ", description = " ")
private String linkTrgtCd;
@Schema(required = false, title = "연계관리키", example = " ", description = " ")
private String linkMngKey;
@Schema(required = false, title = "연계결과코드", example = " ", description = " ")
private String linkRstCd;
@Schema(required = false, title = "연계결과메시지", example = " ", description = " ")
private String linkRstMsg;
}

@ -0,0 +1,96 @@
package cokr.xit.ntri.api.recv.presentation;
import cokr.xit.ntri.api.recv.entity.repository.RecvLevyCancelRepository;
import cokr.xit.ntri.api.recv.entity.repository.RecvLevyResultRepository;
import cokr.xit.ntri.api.recv.entity.repository.RecvRcivInfoRepository;
import cokr.xit.ntri.api.recv.entity.repository.RecvRdcamtInfoRepository;
import cokr.xit.ntri.api.recv.model.RecvResponseDTO;
import cokr.xit.ntri.api.recv.service.RecvApiSpec;
import cokr.xit.ntri.api.recv.service.impl.LevyCancel;
import cokr.xit.ntri.api.recv.service.impl.LevyResult;
import cokr.xit.ntri.api.recv.service.impl.RcivInfo;
import cokr.xit.ntri.api.recv.service.impl.RdcamtInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RequiredArgsConstructor
@RestController
public class NtriRecvApi {
private final RecvLevyCancelRepository recvLevyCancelRepository;
private final RecvLevyResultRepository recvLevyResultRepository;
private final RecvRcivInfoRepository recvRcivInfoRepository;
private final RecvRdcamtInfoRepository recvRdcamtInfoRepository;
@PostMapping(value = "/recv/levy/cancel")
public ResponseEntity<RecvResponseDTO> levyCancel(String jParam) {
//저장
RecvApiSpec recv = LevyCancel.builder()
.jpaRepository(recvLevyCancelRepository)
.jParam(jParam)
.build();
try {
recv.execute();
} catch (Exception e) {
throw new RuntimeException(e);
}
return new ResponseEntity<RecvResponseDTO>((RecvResponseDTO) recv.getResult(), HttpStatus.OK);
}
@PostMapping(value = "/recv/levy/result")
public ResponseEntity<RecvResponseDTO> levyResult(String jParam) {
//저장
RecvApiSpec recv = LevyResult.builder()
.jpaRepository(recvLevyResultRepository)
.jParam(jParam)
.build();
try {
recv.execute();
} catch (Exception e) {
throw new RuntimeException(e);
}
return new ResponseEntity<RecvResponseDTO>((RecvResponseDTO) recv.getResult(), HttpStatus.OK);
}
@PostMapping(value = "/recv/rciv/info")
public ResponseEntity<RecvResponseDTO> rcivInfo(String jParam) {
//저장
RecvApiSpec recv = RcivInfo.builder()
.jpaRepository(recvRcivInfoRepository)
.jParam(jParam)
.build();
try {
recv.execute();
} catch (Exception e) {
throw new RuntimeException(e);
}
return new ResponseEntity<RecvResponseDTO>((RecvResponseDTO) recv.getResult(), HttpStatus.OK);
}
@PostMapping(value = "/recv/rdcamt/info")
public ResponseEntity<RecvResponseDTO> rdcamtInfo(String jParam) {
//저장
RecvApiSpec recv = RdcamtInfo.builder()
.jpaRepository(recvRdcamtInfoRepository)
.jParam(jParam)
.build();
try {
recv.execute();
} catch (Exception e) {
throw new RuntimeException(e);
}
return new ResponseEntity<RecvResponseDTO>((RecvResponseDTO) recv.getResult(), HttpStatus.OK);
}
}

@ -0,0 +1,16 @@
package cokr.xit.ntri.api.recv.service;
public interface RecvApiSpec<RT> {
void execute() throws Exception;
void parsing();
void mapping();
void save();
RT getResult();
}

@ -0,0 +1,66 @@
package cokr.xit.ntri.api.recv.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@RequiredArgsConstructor
public abstract class RecvApiSupport<DATA, E, RT> implements RecvApiSpec<RT> {
protected final String jParam;
protected final JpaRepository jpaRepository;
protected ObjectMapper mapper = new ObjectMapper();
private DATA data;
private E entity;
@Override
@Transactional(propagation = Propagation.REQUIRED, noRollbackFor = RuntimeException.class)
public void execute() throws Exception {
String phase = null;
try {
phase = "Parameter 파싱 실패";
parsing();
phase = "파싱 데이터 객체 매핑 실패";
mapping();
phase = "데이터 저장 실패";
save();
phase = "처리결과 저장 실패";
updateResult(this.entity);
} catch (Exception e) {
throw new RuntimeException(phase, e);
} finally {
}
}
protected abstract DATA parsing(String jParam);
@Override
public void parsing() {
this.data = parsing(this.jParam);
}
protected abstract E mapping(DATA m);
@Override
public void mapping() {
this.entity = mapping(data);
}
@Override
public void save() {
this.jpaRepository.save(entity);
}
protected abstract void updateResult(E entity);
protected E getEntity() {
return this.entity;
}
}

@ -0,0 +1,58 @@
package cokr.xit.ntri.api.recv.service.impl;
import cokr.xit.ntri.api.recv.entity.RecvLevyCancel;
import cokr.xit.ntri.api.recv.model.RecvResponseDTO;
import cokr.xit.ntri.api.recv.service.RecvApiSupport;
import lombok.Builder;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Map;
public class LevyCancel extends RecvApiSupport<Map<String, String>, RecvLevyCancel, RecvResponseDTO> {
@Builder(builderClassName = "builder")
public LevyCancel(String jParam, JpaRepository jpaRepository) {
super(jParam, jpaRepository);
}
@Override
protected Map<String, String> parsing(String jParam) {
return mapper.convertValue(jParam, Map.class);
}
@Override
protected RecvLevyCancel mapping(Map<String, String> m) {
return RecvLevyCancel.builder()
.sgbCd(m.get("sgbCd"))
.linkMngKey(m.get("linkMngKey"))
.taxnNo(m.get("taxnNo"))
.lvyRtrcnYmd(m.get("lvyRtrcnYmd"))
.delRsnCn(m.get("delRsnCn"))
.rsveItem1(m.get("rsveItem1"))
.rsveItem2(m.get("rsveItem2"))
.rsveItem3(m.get("rsveItem3"))
.rsveItem4(m.get("rsveItem4"))
.rsveItem5(m.get("rsveItem5"))
.build();
}
@Override
protected void updateResult(RecvLevyCancel entity) {
entity.setRspSgbCd("setRspSgbCd");
entity.setRspLinkTrgtCd("setRspLinkTrgtCd");
entity.setRspLinkMngKey("setRspLinkMngKey");
entity.setRspLinkRstCd("setRspLinkRstCd");
entity.setRspLinkRstMsg("setRspLinkRstMsg");
}
@Override
public RecvResponseDTO getResult() {
return RecvResponseDTO.builder()
.sgbCd(getEntity().getRspSgbCd())
.linkTrgtCd(getEntity().getRspLinkTrgtCd())
.linkMngKey(getEntity().getRspLinkMngKey())
.linkRstCd(getEntity().getRspLinkRstCd())
.linkRstMsg(getEntity().getRspLinkRstMsg())
.build();
}
}

@ -0,0 +1,106 @@
package cokr.xit.ntri.api.recv.service.impl;
import cokr.xit.ntri.api.recv.entity.RecvLevyResult;
import cokr.xit.ntri.api.recv.model.RecvResponseDTO;
import cokr.xit.ntri.api.recv.service.RecvApiSupport;
import lombok.Builder;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Map;
public class LevyResult extends RecvApiSupport<Map<String, String>, RecvLevyResult, RecvResponseDTO> {
@Builder(builderClassName = "builder")
public LevyResult(String jParam, JpaRepository jpaRepository) {
super(jParam, jpaRepository);
}
@Override
protected Map<String, String> parsing(String jParam) {
return mapper.convertValue(jParam, Map.class);
}
@Override
protected RecvLevyResult mapping(Map<String, String> m) {
return RecvLevyResult.builder()
.sgbCd(m.get("sgbCd"))
.linkMngKey(m.get("linkMngKey"))
.taxnNo(m.get("taxnNo"))
.untyTaxnNo(m.get("untyTaxnNo"))
.dptCd(m.get("dptCd"))
.spclFisBizCd(m.get("spclFisBizCd"))
.fyr(m.get("fyr"))
.actSeCd(m.get("actSeCd"))
.rprsTxmCd(m.get("rprsTxmCd"))
.operItemCd(m.get("operItemCd"))
.lvyNo(m.get("lvyNo"))
.itmNo(m.get("itmNo"))
.epayNo(m.get("epayNo"))
.vtlacBankNm1(m.get("vtlacBankNm1"))
.vtlacBankNm2(m.get("vtlacBankNm2"))
.vtlacBankNm3(m.get("vtlacBankNm3"))
.vtlacBankNm4(m.get("vtlacBankNm4"))
.vtlacBankNm5(m.get("vtlacBankNm5"))
.vtlacBankNm6(m.get("vtlacBankNm6"))
.vtlacBankNm7(m.get("vtlacBankNm7"))
.vtlacBankNm8(m.get("vtlacBankNm8"))
.vtlacBankNm9(m.get("vtlacBankNm9"))
.vtlacBankNm10(m.get("vtlacBankNm10"))
.vtlacBankNm11(m.get("vtlacBankNm11"))
.vtlacBankNm12(m.get("vtlacBankNm12"))
.vtlacBankNm13(m.get("vtlacBankNm13"))
.vtlacBankNm14(m.get("vtlacBankNm14"))
.vtlacBankNm15(m.get("vtlacBankNm15"))
.vtlacBankNm16(m.get("vtlacBankNm16"))
.vtlacBankNm17(m.get("vtlacBankNm17"))
.vtlacBankNm18(m.get("vtlacBankNm18"))
.vtlacBankNm19(m.get("vtlacBankNm19"))
.vtlacBankNm20(m.get("vtlacBankNm20"))
.vrActno1(m.get("vrActno1"))
.vrActno2(m.get("vrActno2"))
.vrActno3(m.get("vrActno3"))
.vrActno4(m.get("vrActno4"))
.vrActno5(m.get("vrActno5"))
.vrActno6(m.get("vrActno6"))
.vrActno7(m.get("vrActno7"))
.vrActno8(m.get("vrActno8"))
.vrActno9(m.get("vrActno9"))
.vrActno10(m.get("vrActno10"))
.vrActno11(m.get("vrActno11"))
.vrActno12(m.get("vrActno12"))
.vrActno13(m.get("vrActno13"))
.vrActno14(m.get("vrActno14"))
.vrActno15(m.get("vrActno15"))
.vrActno16(m.get("vrActno16"))
.vrActno17(m.get("vrActno17"))
.vrActno18(m.get("vrActno18"))
.vrActno19(m.get("vrActno19"))
.vrActno20(m.get("vrActno20"))
.rsveItem1(m.get("rsveItem1"))
.rsveItem2(m.get("rsveItem2"))
.rsveItem3(m.get("rsveItem3"))
.rsveItem4(m.get("rsveItem4"))
.rsveItem5(m.get("rsveItem5"))
.build();
}
@Override
protected void updateResult(RecvLevyResult entity) {
entity.setRspSgbCd("setRspSgbCd");
entity.setRspLinkTrgtCd("setRspLinkTrgtCd");
entity.setRspLinkMngKey("setRspLinkMngKey");
entity.setRspLinkRstCd("setRspLinkRstCd");
entity.setRspLinkRstMsg("setRspLinkRstMsg");
}
@Override
public RecvResponseDTO getResult() {
return RecvResponseDTO.builder()
.sgbCd(getEntity().getRspSgbCd())
.linkTrgtCd(getEntity().getRspLinkTrgtCd())
.linkMngKey(getEntity().getRspLinkMngKey())
.linkRstCd(getEntity().getRspLinkRstCd())
.linkRstMsg(getEntity().getRspLinkRstMsg())
.build();
}
}

@ -0,0 +1,84 @@
package cokr.xit.ntri.api.recv.service.impl;
import cokr.xit.ntri.api.recv.entity.RecvRcivInfo;
import cokr.xit.ntri.api.recv.model.RecvResponseDTO;
import cokr.xit.ntri.api.recv.service.RecvApiSupport;
import lombok.Builder;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Map;
public class RcivInfo extends RecvApiSupport<Map<String, String>, RecvRcivInfo, RecvResponseDTO> {
@Builder(builderClassName = "builder")
public RcivInfo(String jParam, JpaRepository jpaRepository) {
super(jParam, jpaRepository);
}
@Override
protected Map<String, String> parsing(String jParam) {
return mapper.convertValue(jParam, Map.class);
}
@Override
protected RecvRcivInfo mapping(Map<String, String> m) {
return RecvRcivInfo.builder()
.sgbCd(m.get("sgbCd"))
.sgbNm(m.get("sgbNm"))
.linkMngKey(m.get("linkMngKey"))
.taxnNo(m.get("taxnNo"))
.untyTaxnNo(m.get("untyTaxnNo"))
.dptCd(m.get("dptCd"))
.dptNm(m.get("dptNm"))
.spclFisBizCd(m.get("spclFisBizCd"))
.spclFisBizNm(m.get("spclFisBizNm"))
.fyr(m.get("fyr"))
.actSeCd(m.get("actSeCd"))
.actSeNm(m.get("actSeNm"))
.rprsTxmCd(m.get("rprsTxmCd"))
.rprsTxmNm(m.get("rprsTxmNm"))
.operItemCd(m.get("operItemCd"))
.operItemNm(m.get("operItemNm"))
.lvyNo(m.get("lvyNo"))
.itmNo(m.get("itmNo"))
.epayNo(m.get("epayNo"))
.rcvmtNo(m.get("rcvmtNo"))
.rcvmtSeCd(m.get("rcvmtSeCd"))
.rcvmtSeNm(m.get("rcvmtSeNm"))
.rcvmtYmd(m.get("rcvmtYmd"))
.actYmd(m.get("actYmd"))
.tsfYmd(m.get("tsfYmd"))
.rcvmtPctAmt(m.get("rcvmtPctAmt"))
.rcvmtAdtnAmt(m.get("rcvmtAdtnAmt"))
.rcvmtIntrAmt(m.get("rcvmtIntrAmt"))
.bankNm(m.get("bankNm"))
.rcvmtTyCd(m.get("rcvmtTyCd"))
.rcvmtTy(m.get("rcvmtTy"))
.rsveItem1(m.get("rsveItem1"))
.rsveItem2(m.get("rsveItem2"))
.rsveItem3(m.get("rsveItem3"))
.rsveItem4(m.get("rsveItem4"))
.rsveItem5(m.get("rsveItem5"))
.build();
}
@Override
protected void updateResult(RecvRcivInfo entity) {
entity.setRspSgbCd("setRspSgbCd");
entity.setRspLinkTrgtCd("setRspLinkTrgtCd");
entity.setRspLinkMngKey("setRspLinkMngKey");
entity.setRspLinkRstCd("setRspLinkRstCd");
entity.setRspLinkRstMsg("setRspLinkRstMsg");
}
@Override
public RecvResponseDTO getResult() {
return RecvResponseDTO.builder()
.sgbCd(getEntity().getRspSgbCd())
.linkTrgtCd(getEntity().getRspLinkTrgtCd())
.linkMngKey(getEntity().getRspLinkMngKey())
.linkRstCd(getEntity().getRspLinkRstCd())
.linkRstMsg(getEntity().getRspLinkRstMsg())
.build();
}
}

@ -0,0 +1,77 @@
package cokr.xit.ntri.api.recv.service.impl;
import cokr.xit.ntri.api.recv.entity.RecvRdcamtInfo;
import cokr.xit.ntri.api.recv.model.RecvResponseDTO;
import cokr.xit.ntri.api.recv.service.RecvApiSupport;
import lombok.Builder;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Map;
public class RdcamtInfo extends RecvApiSupport<Map<String, String>, RecvRdcamtInfo, RecvResponseDTO> {
@Builder(builderClassName = "builder")
public RdcamtInfo(String jParam, JpaRepository jpaRepository) {
super(jParam, jpaRepository);
}
@Override
protected Map<String, String> parsing(String jParam) {
return mapper.convertValue(jParam, Map.class);
}
@Override
protected RecvRdcamtInfo mapping(Map<String, String> m) {
return RecvRdcamtInfo.builder()
.sgbCd(m.get("sgbCd"))
.sgbNm(m.get("sgbNm"))
.linkMngKey(m.get("linkMngKey"))
.taxnNo(m.get("taxnNo"))
.untyTaxnNo(m.get("untyTaxnNo"))
.dptCd(m.get("dptCd"))
.dptNm(m.get("dptNm"))
.spclFisBizCd(m.get("spclFisBizCd"))
.spclFisBizNm(m.get("spclFisBizNm"))
.fyr(m.get("fyr"))
.actSeCd(m.get("actSeCd"))
.actSeNm(m.get("actSeNm"))
.rprsTxmCd(m.get("rprsTxmCd"))
.rprsTxmNm(m.get("rprsTxmNm"))
.operItemCd(m.get("operItemCd"))
.operItemNm(m.get("operItemNm"))
.lvyNo(m.get("lvyNo"))
.itmNo(m.get("itmNo"))
.rdcYmd(m.get("rdcYmd"))
.rdcPctAmt(m.get("rdcPctAmt"))
.rdcAdtnAmt(m.get("rdcAdtnAmt"))
.rdcIntrAmt(m.get("rdcIntrAmt"))
.rdcAmt(m.get("rdcAmt"))
.rdcRsnCn(m.get("rdcRsnCn"))
.rsveItem1(m.get("rsveItem1"))
.rsveItem2(m.get("rsveItem2"))
.rsveItem3(m.get("rsveItem3"))
.rsveItem4(m.get("rsveItem4"))
.rsveItem5(m.get("rsveItem5"))
.build();
}
@Override
protected void updateResult(RecvRdcamtInfo entity) {
entity.setRspSgbCd("setRspSgbCd");
entity.setRspLinkTrgtCd("setRspLinkTrgtCd");
entity.setRspLinkMngKey("setRspLinkMngKey");
entity.setRspLinkRstCd("setRspLinkRstCd");
entity.setRspLinkRstMsg("setRspLinkRstMsg");
}
@Override
public RecvResponseDTO getResult() {
return RecvResponseDTO.builder()
.sgbCd(getEntity().getRspSgbCd())
.linkTrgtCd(getEntity().getRspLinkTrgtCd())
.linkMngKey(getEntity().getRspLinkMngKey())
.linkRstCd(getEntity().getRspLinkRstCd())
.linkRstMsg(getEntity().getRspLinkRstMsg())
.build();
}
}

@ -0,0 +1,9 @@
package cokr.xit.ntri.core.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@Configuration
@EnableJpaRepositories(basePackages = "cokr.xit.ntri.api")
public class JpaConfig {
}

@ -0,0 +1,27 @@
package cokr.xit.ntri.core.config;
import cokr.xit.ntri.core.filter.RequestWrapperFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import java.util.Arrays;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Bean(name = "jsonView")
public MappingJackson2JsonView jsonView() {
return new MappingJackson2JsonView();
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Bean
public FilterRegistrationBean requestWrapperFilter() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new RequestWrapperFilter());
filterRegistrationBean.setUrlPatterns(Arrays.asList("/*"));
return filterRegistrationBean;
}
}

@ -0,0 +1,82 @@
package cokr.xit.ntri.core.filter;
import org.apache.commons.io.IOUtils;
import org.springframework.util.StringUtils;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* <ul>
* <li> : RequestWrapper </li>
* <li> : getInputStream() .</li>
* <li>: 2021. 11. 30. 11:22:09
* </ul>
*
* @author
*/
public class RequestWrapper extends HttpServletRequestWrapper {
private final Charset encoding;
private byte[] rawData;
@SuppressWarnings("deprecation")
public RequestWrapper(HttpServletRequest request) throws IOException {
super(request);
String characterEncoding = request.getCharacterEncoding();
if (StringUtils.isEmpty(characterEncoding)) {
characterEncoding = StandardCharsets.UTF_8.name();
}
this.encoding = Charset.forName(characterEncoding);
try {
InputStream inputStream = request.getInputStream(); //getInputStream()은 한번만 사용 가능. 이후 getInputStream 호출 시 "getInputStream() has already been called for this request" 오류 발생
this.rawData = IOUtils.toByteArray(inputStream); //재사용이 가능하도록 byte[] rawData변수에 저장 후 getInputStream()를 오버라이딩하여 rawData 반환
} catch (IOException e) {
throw e;
}
}
@Override
public ServletInputStream getInputStream() throws IOException {
final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(this.rawData);
ServletInputStream servletInputStream = new ServletInputStream() {
@Override
public boolean isFinished() {
return false;
}
@Override
public boolean isReady() {
return false;
}
@Override
public void setReadListener(ReadListener readListener) {
}
public int read() throws IOException {
return byteArrayInputStream.read();
}
};
return servletInputStream;
}
@Override
public BufferedReader getReader() throws IOException {
return new BufferedReader(new InputStreamReader(this.getInputStream(), this.encoding));
}
@Override
public ServletRequest getRequest() {
return super.getRequest();
}
}

@ -0,0 +1,17 @@
package cokr.xit.ntri.core.filter;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
public class RequestWrapperFilter implements Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
RequestWrapper readableRequestWrapper = new RequestWrapper((HttpServletRequest) request); //RequestWrapper 클래스로 wrapping
chain.doFilter(readableRequestWrapper, response);
}
}

@ -0,0 +1,54 @@
package cokr.xit.ntri.support.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.time.LocalDateTime;
@Getter
@Setter
@MappedSuperclass
@SuperBuilder
@NoArgsConstructor
public class BaseEntity {
@CreationTimestamp
@Column(name = "regist_dt", nullable = true)
private LocalDateTime registDt;
@UpdateTimestamp
@Column(name = "last_updt_dt", nullable = true)
private LocalDateTime lastUpdtDt;
@Setter
@Schema(required = false, title = "자치단체코드", example = " ", description = " ")
@Column(name = "rsp_sgb_cd", length = 7)
private String rspSgbCd;
@Setter
@Schema(required = false, title = "연계대상코드", example = " ", description = " ")
@Column(name = "rsp_link_trgt_cd", length = 15)
private String rspLinkTrgtCd;
@Setter
@Schema(required = false, title = "연계관리키", example = " ", description = " ")
@Column(name = "rsp_link_mng_key", length = 50)
private String rspLinkMngKey;
@Setter
@Schema(required = false, title = "연계결과코드", example = " ", description = " ")
@Column(name = "rsp_link_rst_cd", length = 30)
private String rspLinkRstCd;
@Setter
@Schema(required = false, title = "연계결과메시지", example = " ", description = " ")
@Column(name = "rsp_link_rst_msg", length = 200)
private String rspLinkRstMsg;
}

@ -0,0 +1,98 @@
app:
name: ntri
#=================
# Server
#=================
server:
port: 18080
error:
include-exception: true #?? ??? Exception ?? ??
include-stacktrace: never #?? ??? stacktrace ?? ??
path: '/error' #http://~/error ??
whitelabel:
enabled: true #?? ?? ??? ????? ??? ?? ??? ?? ??
servlet:
context-path: /
spring:
# ===================================================================================================================================
# PID ??
# ===================================================================================================================================
pid:
file: ${app.name}.pid
# ===================================================================================================================================
# Database ??
# ===================================================================================================================================
sql:
init:
continue-on-error: false # ???? ? SQL ?? ?? ? ???? ??
jpa:
database-platform: org.hibernate.dialect.Oracle10gDialect
hibernate:
ddl-auto: none # create / create-drop / update / validate / none
properties:
hibernate:
format_sql: true
use_sql_comments: true
generate-ddl: true
show-sql: true
datasource:
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@211.119.124.118:1521:bustms
username: iup
password: iup!0202
hikari:
auto-commit: false
minimum-idle: 10
maximum-pool-size: 50
connection-test-query: SELECT 1 FROM DUAL
transaction-isolation: TRANSACTION_READ_COMMITTED
pool-name: pool-${app.name}
# data-source-properties:
# rewriteBatchedStatments: true #???? insert ??? ??? ??
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
# ===================================================================================================================================
# Logging ??
# ===================================================================================================================================
logging:
charset:
console: utf-8
file: utf-8
level:
root: info
'[org.hibernate.type.descriptor.sql]': trace #jpa "?" ??(binding ????) ??
# '[org.springframework.orm.jpa]': debug
# '[org.springframework.transaction]': debug
# '[org.springframework.transaction.interceptor]': trace
# '[org.springframework.jdbc.core]': off
# '[org.springframework.orm]': off
# '[org.springframework.orm.hibernate5]': off
# '[com.p6spy.engine.logging]': off
# '[com.p6spy]': off
# '[org.hibernate]': off
# '[org.hibernate.sql]': off
# '[org.hibernate.jpa]': off
exception-conversion-word: '%wEx'
pattern:
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}){green} %clr([%18thread]){magenta} %clr(%-40.40logger{39}%line){cyan} %clr(: %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}){faint}'
file:
name: ./logs/${app.name}/logback.log
logback:
rollingpolicy:
file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd}-%i.log
max-history: 30 #????
max-file-size: 100MB #????
# '[org.hibernate.type.descriptor.sql]': trace
# '[org.springframework]': debug
# '[org.hibernate]': info

@ -0,0 +1,13 @@
package cokr.xit.ntri;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class NtriApplicationTests {
@Test
void contextLoads() {
}
}
Loading…
Cancel
Save