fix: chuncheon, cheonan 패키지 적용

main
Jonguk. Lim 3 months ago
parent 767c6576ff
commit 5b71396f8f

Binary file not shown.

@ -1,15 +1,16 @@
package kr.xit.biz.sisul.mapper; package kr.xit.biz.chuncheon.mapper;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import org.springframework.context.annotation.Conditional;
import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO;
import kr.xit.biz.ens.model.cmm.TmplatManage; import kr.xit.biz.ens.model.cmm.TmplatManage;
import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest; import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
import kr.xit.other.model.ElecnoticeDTO.Elecnoticedtl;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/** /**
* <pre> * <pre>
@ -27,16 +28,16 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
* </pre> * </pre>
*/ */
@Mapper @Mapper
public interface IBizSisulMapper { @Conditional(ProfileConditionOfChuncheon.class)
public interface IBizChuncheonMapper {
Optional<TmplatManage> selectDeptInfoByTmplId(final String tmplatId); Optional<TmplatManage> selectDeptInfoByTmplId(final String tmplatId);
int insertCntcSndngMst(CntcDTO.SndngMst dto); int insertCntcSndngMst(CntcDTO.SndngMst dto);
int insertCntcSndngDtl(CntcDTO.SndngDtl dto); int insertCntcSndngDtl(CntcDTO.SndngDtl dto);
int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto); int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto);
int insertPostPlusJson(CntcDTO.PostPlusJson dto); int insertPostPlusJson(CntcDTO.PostPlusJson dto);
Optional<RsltSisulResMstData> selectSndngResultMaster(final RsltSisulRequest dto); Optional<ChuncheonSndngResultDTO.RsltChuncheonResMstData> selectSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto);
List<RsltSisulResDtlData> selectSndngResultDetails(final RsltSisulRequest dto); List<ChuncheonSndngResultDTO.RsltChuncheonResDtlData> selectSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto);
List<Elecnoticedtl> selectOhterResult();
Optional<CntcDTO.SndngMst> selectCntcMst(final CntcDTO.SndngMst dto); Optional<CntcDTO.SndngMst> selectCntcMst(final CntcDTO.SndngMst dto);

@ -1,9 +1,11 @@
package kr.xit.biz.sisul.model; package kr.xit.biz.chuncheon.model;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -25,14 +27,14 @@ import lombok.NoArgsConstructor;
* *
* </pre> * </pre>
*/ */
public class SisulSndngResultDTO { public class ChuncheonSndngResultDTO {
@Schema(name = "RsltSisulRequest", description = "발송결과정보 조회 request DTO") @Schema(name = "RsltChuncheonRequest", description = "발송결과정보 조회 request DTO")
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class RsltSisulRequest { public static class RsltChuncheonRequest {
/** /**
* ID - * ID -
*/ */
@ -48,12 +50,12 @@ public class SisulSndngResultDTO {
private String unitySndngDetailId; private String unitySndngDetailId;
} }
@Schema(name = "RsltSisulResMstData", description = "발송결과정보 master 조회 response DTO") @Schema(name = "RsltChuncheonResMstData", description = "발송결과정보 master 조회 response DTO")
@Getter @Getter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class RsltSisulResMstData { public static class RsltChuncheonResMstData {
/** /**
* ID - * ID -
@ -86,12 +88,12 @@ public class SisulSndngResultDTO {
private String sndngDt; private String sndngDt;
} }
@Schema(name = "RsltSisulResDtlData", description = "발송결과정보 details 조회 response DTO") @Schema(name = "RsltChuncheonResDtlData", description = "발송결과정보 details 조회 response DTO")
@Getter @Getter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class RsltSisulResDtlData { public static class RsltChuncheonResDtlData {
/** /**
* ID - * ID -
*/ */

@ -1,11 +1,9 @@
package kr.xit.biz.sisul.service; package kr.xit.biz.chuncheon.service;
import static egovframework.com.cmm.util.EgovDateUtil.formatDate; import static egovframework.com.cmm.util.EgovDateUtil.*;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
@ -16,9 +14,27 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolation;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.jasypt.encryption.StringEncryptor;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.springframework.context.annotation.Conditional;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import kr.xit.biz.chuncheon.mapper.IBizChuncheonMapper;
import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO;
import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants;
import kr.xit.biz.common.ApiConstants.NiceCiWrkDiv; import kr.xit.biz.common.ApiConstants.NiceCiWrkDiv;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
@ -29,12 +45,9 @@ import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResDataBody;
import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData;
import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiRequest;
import kr.xit.biz.sisul.mapper.IBizSisulMapper;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.exception.BizRuntimeException;
import kr.xit.core.service.AbstractService; import kr.xit.core.service.AbstractService;
import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon;
import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.Checks;
import kr.xit.core.support.xlsx.StreamingReader; import kr.xit.core.support.xlsx.StreamingReader;
import kr.xit.ens.cmm.CmmEnsUtils; import kr.xit.ens.cmm.CmmEnsUtils;
@ -42,18 +55,6 @@ import kr.xit.ens.nice.cmm.CmmNiceCiUtils;
import kr.xit.ens.nice.service.INiceCiService; import kr.xit.ens.nice.service.INiceCiService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.jasypt.encryption.StringEncryptor;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
/** /**
* <pre> * <pre>
@ -73,7 +74,8 @@ import org.springframework.web.multipart.MultipartFile;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class BizSisulService extends AbstractService implements IBizSisulService { @Conditional(ProfileConditionOfChuncheon.class)
public class BizChuncheonService extends AbstractService implements IBizChuncheonService {
private final static int FMC_EXCEL_DATA_START_ROW = 1; private final static int FMC_EXCEL_DATA_START_ROW = 1;
private final static int FMC_EXCEL_CELL_CNT = 58; private final static int FMC_EXCEL_CELL_CNT = 58;
@ -81,7 +83,7 @@ public class BizSisulService extends AbstractService implements IBizSisulService
private final StringEncryptor jasyptStringEncryptor; private final StringEncryptor jasyptStringEncryptor;
private final INiceCiService niceCiService; private final INiceCiService niceCiService;
private final IBizSisulMapper mapper; private final IBizChuncheonMapper mapper;
@Transactional @Transactional
@Override @Override
@ -162,7 +164,7 @@ public class BizSisulService extends AbstractService implements IBizSisulService
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public RsltSisulResMstData findSndngResultMaster(final RsltSisulRequest reqDTO) { public ChuncheonSndngResultDTO.RsltChuncheonResMstData findSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
CmmEnsUtils.validate(reqDTO); CmmEnsUtils.validate(reqDTO);
return mapper.selectSndngResultMaster(reqDTO) return mapper.selectSndngResultMaster(reqDTO)
.orElseThrow(() -> BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId()))); .orElseThrow(() -> BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId())));
@ -170,9 +172,9 @@ public class BizSisulService extends AbstractService implements IBizSisulService
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public List<RsltSisulResDtlData> findSndngResultDetails(final RsltSisulRequest reqDTO) { public List<ChuncheonSndngResultDTO.RsltChuncheonResDtlData> findSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
CmmEnsUtils.validate(reqDTO); CmmEnsUtils.validate(reqDTO);
List<RsltSisulResDtlData> resList = mapper.selectSndngResultDetails(reqDTO); List<ChuncheonSndngResultDTO.RsltChuncheonResDtlData> resList = mapper.selectSndngResultDetails(reqDTO);
if(resList.isEmpty()) throw BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId())); if(resList.isEmpty()) throw BizRuntimeException.create(String.format("[%s] 데이타를 찾을 수 없습니다", reqDTO.getUnitySndngMastrId()));
return mapper.selectSndngResultDetails(reqDTO); return mapper.selectSndngResultDetails(reqDTO);
} }

@ -1,11 +1,10 @@
package kr.xit.biz.sisul.service; package kr.xit.biz.chuncheon.service;
import java.util.List; import java.util.List;
import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResDtlData;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
/** /**
* <pre> * <pre>
@ -22,12 +21,12 @@ import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulResMstData;
* *
* </pre> * </pre>
*/ */
public interface IBizSisulService { public interface IBizChuncheonService {
String fmcExcelUpload(final FmcExcelUpload fileReq); String fmcExcelUpload(final FmcExcelUpload fileReq);
RsltSisulResMstData findSndngResultMaster(final RsltSisulRequest dto); ChuncheonSndngResultDTO.RsltChuncheonResMstData findSndngResultMaster(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto);
List<RsltSisulResDtlData> findSndngResultDetails(final RsltSisulRequest dto); List<ChuncheonSndngResultDTO.RsltChuncheonResDtlData> findSndngResultDetails(final ChuncheonSndngResultDTO.RsltChuncheonRequest dto);
String procCntcData(final CntcDTO.SndngMst dto); String procCntcData(final CntcDTO.SndngMst dto);
} }

@ -1,21 +1,24 @@
package kr.xit.biz.sisul.web; package kr.xit.biz.chuncheon.web;
import org.springframework.context.annotation.Conditional;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO;
import kr.xit.biz.chuncheon.service.IBizChuncheonService;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload;
import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.cntc.CntcDTO;
import kr.xit.biz.sisul.model.SisulSndngResultDTO.RsltSisulRequest;
import kr.xit.biz.sisul.service.IBizSisulService;
import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.model.ApiResponseDTO;
import kr.xit.core.model.IApiResponse; import kr.xit.core.model.IApiResponse;
import kr.xit.core.spring.config.support.ProfileConditionOfChuncheon;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* <pre> * <pre>
@ -33,13 +36,14 @@ import org.springframework.web.bind.annotation.RestController;
* </pre> * </pre>
*/ */
@Slf4j @Slf4j
@Tag(name = "BizSisulController", description = "전자고지 시설관리 시스템 연계 관련 처리") @Tag(name = "BizChuncheonController", description = "전자고지 춘천 시스템 연계 관련 처리")
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping(value = "/api/biz/sisul/v1") @RequestMapping(value = "/api/biz/chuncheon/v1")
public class BizSisulController { @Conditional(ProfileConditionOfChuncheon.class)
public class BizChuncheonController {
private final IBizSisulService service; private final IBizChuncheonService service;
/** /**
* (Facility Management Corporation) * (Facility Management Corporation)
@ -55,13 +59,13 @@ public class BizSisulController {
@Operation(summary = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출") @Operation(summary = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 마스터 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/master", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/sndng/result/master", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultMaster(@RequestBody RsltSisulRequest reqDTO) { public IApiResponse findSndngResultMaster(@RequestBody ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
return ApiResponseDTO.success(service.findSndngResultMaster(reqDTO)); return ApiResponseDTO.success(service.findSndngResultMaster(reqDTO));
} }
@Operation(summary = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출") @Operation(summary = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출", description = "발송결과정보 상세 조회 - 시설공단 내부시스템에서 호출")
@PostMapping(value = "/sndng/result/details", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/sndng/result/details", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public IApiResponse findSndngResultDetails(@RequestBody RsltSisulRequest reqDTO) { public IApiResponse findSndngResultDetails(@RequestBody ChuncheonSndngResultDTO.RsltChuncheonRequest reqDTO) {
return ApiResponseDTO.success(service.findSndngResultDetails(reqDTO)); return ApiResponseDTO.success(service.findSndngResultDetails(reqDTO));
} }

@ -74,15 +74,3 @@ app:
info-acmd: /api/acmdinfo info-acmd: /api/acmdinfo
# 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002 # 전자문서유통정보수치확인서 발급처리 : BC-AG-HS-002
cfm-acmd: /api/acmdinfocfm cfm-acmd: /api/acmdinfocfm
pplus:
host: https://t.postplus.co.kr
api:
# 우편 제작 접수
accept: /po/api/postplusPstMsrApi.do
# 우편 제작 상태 조회
status: /po/api/postplusPstStatusApi.do
epost:
host: http://openapi.epost.go.kr
api:
postTrackInfo: /trace/retrieveLongitudinalCombinedService/retrieveLongitudinalCombinedService/getLongitudinalCombinedList

@ -0,0 +1,129 @@
#-----------------------------------------------------------------------
# local 설정
#-----------------------------------------------------------------------
spring:
datasource:
hikari:
# 9 server
primary:
database: oracle
driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@211.119.124.118:1521:bustms
username: iup
password: iup!0202
read-only: false
pool-name: xit-oracle-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
# transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
devtools:
restart:
enabled: true
additional-exclude: static/**,public/**
livereload:
enabled: true
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
logging:
level:
root: debug
org.apache.http: warn
io.netty: warn
reactor.netty: WARN
# webclient logging
reactor.netty.http.client: DEBUG
#org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE
org.springframework: warn
org.hibernate.validator.internal: WARN
file:
# 로그파일 위치
path: ${app.data.root.path}/mens/logs
name: ${app.name}
# ==================================================================================================================
# SQL logging lib setting
# ==================================================================================================================
decorator:
datasource:
p6spy:
enable-logging: true
app:
api-ip: 211.119.124.73
# 강제로 swagger-url을 지정해야 하는 경우만 선언
#swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/'
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: http://localhost:8080, http://${app.api-ip}:8080, http://localhost:8082, http://${app.api-ip}:8082
data:
root:
#path: /Users/minuk/data
path: d:/data
#---------------------------------------------------------------
# log 설정
# request:
# custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
# --> 운영: common-enabled, 개발: custom-enabled 사용 권장
# response-enabled : 호출 결과 출력 - 운영시 false
# mdc : api 호출(서비스) 로그 기록
# uris : api 호출 로그 제외 패턴
#---------------------------------------------------------------
log:
request:
custom-enabled: true
response-enabled: true
# MDC logging trace 활성
mdc:
enabled: true
# slack
slack-webhook:
enabled: false
url: https://hooks.slack.com/services/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
ssh:
host: 211.119.124.9
port: 22
id: xituser
passwd: xituser!@
sg:
root-path: /data/mens/sg-pni-cctv
ens-path: /data/mens/sg-ens-cctv
rcv: /rcv
backup: /backup
err: /err
contract:
# milisecond
connection:
timeout: 60000
readTimeout: 60000
kt:
# vpn 사용
#host: http://172.16.0.13:10210/ONLWeb
host: http://211.43.10.163:10210/ONLWeb
api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do
#dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014
refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse
# 수신동의상태전송 : BC-AG-SN-015
approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve

@ -0,0 +1,130 @@
#-----------------------------------------------------------------------
# local 설정
#-----------------------------------------------------------------------
spring:
datasource:
hikari:
# 9 server
primary:
database: mysql
driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: ens
password: xit5811807
read-only: false
pool-name: xit-maria-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
validation-timeout: 300000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
#transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
devtools:
restart:
enabled: true
additional-exclude: static/**,public/**
livereload:
enabled: true
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
logging:
level:
root: debug
org.apache.http: warn
io.netty: warn
reactor.netty: WARN
# webclient logging
reactor.netty.http.client: DEBUG
#org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE
org.springframework: warn
org.hibernate.validator.internal: WARN
file:
# 로그파일 위치
path: ${app.data.root.path}/mens/logs
name: ${app.name}
# ==================================================================================================================
# SQL logging lib setting
# ==================================================================================================================
decorator:
datasource:
p6spy:
enable-logging: true
app:
api-ip: 211.119.124.73
# 강제로 swagger-url을 지정해야 하는 경우만 선언
#swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/'
# Spring Security cors 설정 :: CorsConfiguration 설정 값
cors:
allowed-origins: http://localhost:8080, http://${app.api-ip}:8080, http://localhost:8082, http://${app.api-ip}:8082
data:
root:
#path: /Users/minuk/data
path: d:/data
#---------------------------------------------------------------
# log 설정
# request:
# custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
# --> 운영: common-enabled, 개발: custom-enabled 사용 권장
# response-enabled : 호출 결과 출력 - 운영시 false
# mdc : api 호출(서비스) 로그 기록
# uris : api 호출 로그 제외 패턴
#---------------------------------------------------------------
log:
request:
custom-enabled: true
response-enabled: true
# MDC logging trace 활성
mdc:
enabled: true
# slack
slack-webhook:
enabled: false
url: https://hooks.slack.com/services/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
ssh:
host: 211.119.124.9
port: 22
id: xituser
passwd: xituser!@
sg:
root-path: /data/mens/sg-pni-cctv
ens-path: /data/mens/sg-ens-cctv
rcv: /rcv
backup: /backup
err: /err
contract:
# milisecond
connection:
timeout: 60000
readTimeout: 60000
kt:
# vpn 사용
#host: http://172.16.0.13:10210/ONLWeb
host: http://211.43.10.163:10210/ONLWeb
api:
# 모바일페이지 : 본문자수신등록 callback url - 토큰인증확인 조회, 열람확인결과 전송
dp-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/dpMblPage.do
me-callback-url: http://${app.api-ip}:8080/api/web/mbl/v1/kt/meMblPage.do
#dp-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/dpMblPage
#me-callback-url: http://211.119.124.73:8081/api/biz/mbl/v1/kt/meMblPage
# 수신거부상태전송 : BC-AG-SN-014
refuse-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/refuse
# 수신동의상태전송 : BC-AG-SN-015
approve-rcv: http://${app.api-ip}:8081/api/ens/kt/v1/receive/approve

@ -8,18 +8,37 @@ spring:
primary: primary:
database: mysql database: mysql
driver-class-name: org.mariadb.jdbc.Driver driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.9:4407/mens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: root username: ens
password: xit1807 password: xit5811807
read-only: false read-only: false
pool-name: xit-maria-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
validation-timeout: 300000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
#transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
# multi-database # multi-database
secondary: secondary:
database: oracle database: oracle
driver-class-name: oracle.jdbc.OracleDriver driver-class-name: oracle.jdbc.OracleDriver
jdbc-url: jdbc:oracle:thin:@211.119.124.117:1521:ora11g jdbc-url: jdbc:oracle:thin:@211.119.124.118:1521:bustms
username: xit_traffic username: iup
password: traffic5 password: iup!0202
read-only: false read-only: false
pool-name: xit-oracle-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
# transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
devtools: devtools:
restart: restart:

@ -61,32 +61,11 @@ spring:
#----------------------------------------------------------------- #-----------------------------------------------------------------
# xit framework 설정 # xit framework 설정
#----------------------------------------------------------------- #-----------------------------------------------------------------
datasource:
#type: com.zaxxer.hikari.HikariDataSource
hikari:
primary:
pool-name: xit-maria-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
validation-timeout: 300000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
#transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
secondary:
pool-name: xit-oracle-pool
auto-commit: false
# 인프라의 적용된 connection time limit보다 작아야함
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 5
# transaction-isolation: TRANSACTION_READ_UNCOMMITTED
data-source-properties:
rewriteBatchedStatements: true
logging: logging:
level: level:
root: error root: error
'[org.apache.tomcat.util.net]': warn
'[sun.rmi]': warn
'[javax.management]': warn
'[java.io.serialization]': warn

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.sisul.mapper.IBizSisulMapper"> <mapper namespace="kr.xit.biz.chuncheon.mapper.IBizChuncheonMapper">
<select id="selectDeptInfoByTmplId" resultType="kr.xit.biz.ens.model.cmm.TmplatManage"> <select id="selectDeptInfoByTmplId" resultType="kr.xit.biz.ens.model.cmm.TmplatManage">
/** ens-sysul-mysql-mapper|selectDeptInfoByTmplId-템플릿ID로 부서정보 조회|seojh */ /** ens-sysul-mysql-mapper|selectDeptInfoByTmplId-템플릿ID로 부서정보 조회|seojh */
@ -122,7 +122,7 @@
</insert> </insert>
<select id="selectSndngResultMaster" resultType="kr.xit.biz.sisul.model.SisulSndngResultDTO$RsltSisulResMstData"> <select id="selectSndngResultMaster" resultType="kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO$RsltChuncheonResMstData">
/** ens-sysul-mysql-mapper|selectSndngResultMaster-발송결과정보 마스터 조회|julim */ /** ens-sysul-mysql-mapper|selectSndngResultMaster-발송결과정보 마스터 조회|julim */
SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */ SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */
, tesn.sndng_se_code /* 발송구분코드 */ , tesn.sndng_se_code /* 발송구분코드 */
@ -134,7 +134,7 @@
WHERE tesn.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE tesn.unity_sndng_mastr_id = #{unitySndngMastrId}
</select> </select>
<select id="selectSndngResultDetails" resultType="kr.xit.biz.sisul.model.SisulSndngResultDTO$RsltSisulResDtlData"> <select id="selectSndngResultDetails" resultType="kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO$RsltChuncheonResDtlData">
/** ens-sysul-mysql-mapper|selectSndngResultDetails-발송결과정보 상세 조회|julim */ /** ens-sysul-mysql-mapper|selectSndngResultDetails-발송결과정보 상세 조회|julim */
SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */ SELECT tesn.unity_sndng_mastr_id /* 통합발송마스터 ID - 파일유일키 */
, tcsnd.unity_sndng_detail_id /* 통합발송상세 ID - 우편물 일련번호 */ , tcsnd.unity_sndng_detail_id /* 통합발송상세 ID - 우편물 일련번호 */
@ -156,38 +156,6 @@
</if> </if>
</select> </select>
<select id="selectOhterResult" resultType="kr.xit.other.model.ElecnoticeDTO$Elecnoticedtl">
SELECT tcsm.unity_sndng_mastr_id as unitysndngmastrid
, tcsm.sndng_co as sndngco
, fn_get_code_nm('ETI007', tcsm.sndng_process_sttus) as sndngprocesssttus
, 'ens' as insuser
, date_format(tcsm.regist_dt, '%Y%m%d%H%i%S') as insdate
, 'ens' as upduser
, date_format(tcsm.updt_dt, '%Y%m%d%H%i%S') as upddate
, tcsm.sndng_dt as sndngdt
, fn_get_code_nm('ETI005', SUBSTRING(tcsm.tmplat_id, 5,1)) as sndngsecode
, tcsm.tmplat_id as tmplatid
, date_format(now(), '%Y%m%d%H%i%S') as searchdate
, '' as success
, tcsm.error_mssage as message
, tcsd.unity_sndng_detail_id as unitysndngdetailid
, '' as gojidepth
, SUBSTRING(tcsd.main_code, 1, 7) AS taxnum1
, SUBSTRING(tcsd.main_code, 8, 8) AS taxnum2
, SUBSTRING(tcsd.main_code, 16, 7) AS taxnum3
, SUBSTRING(tcsd.main_code, 23, 7) AS taxnum4
, '' as worker
, '' as serialno
, tcsr.requst_dt as recvdt
, tcsr.readng_dt as readdt
, fn_get_code_nm('ETI008', tcsr.sndng_result_sttus) as resultcode
FROM tb_cntc_sndng_mastr tcsm
INNER JOIN tb_cntc_sndng_detail tcsd ON (tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id)
LEFT OUTER JOIN tb_cntc_sndng_result tcsr ON (tcsd.unity_sndng_detail_id = tcsr.unity_sndng_detail_id)
WHERE str_to_date(tcsm.clos_dt, '%Y%m%d%H%i%S') > date_add(now(), interval -7 day)
AND tcsm.sndng_process_sttus != 'accept'
</select>
<select id="selectCntcMst" resultType="kr.xit.biz.ens.model.cntc.CntcDTO$SndngMst"> <select id="selectCntcMst" resultType="kr.xit.biz.ens.model.cntc.CntcDTO$SndngMst">
SELECT unity_sndng_mastr_id as unitysndngmastrid SELECT unity_sndng_mastr_id as unitysndngmastrid
, sndng_process_sttus as sndngProcessSttus , sndng_process_sttus as sndngProcessSttus

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.ens.pplus.mapper.IPplusMapper">
<select id="selectPostPlusSendTgts" resultType="kr.xit.biz.ens.model.pplus.PplusDTO$BatchAcceptRequest">
/** ens-pplus-mapper|selectPostPlusSendTgts-Post Plus 발송 대상 목록 조회|julim */
SELECT tesm.unity_sndng_mastr_id
, tesm.sndng_mastr_id
, CASE WHEN tesm.try_seq = tesm.try_cnt THEN 'send-ok'
ELSE concat('sending', try_seq)
END AS sndngProcessSttus
, tepp.sndng_detail_id
, tepp.unity_sndng_detail_id
, tepp.signgu_code
, tepp.ffnlg_code
, tepp.service_cd
, tepp.con_key
, teppj.master_cols
, teppj.master_rows
, teppj.detail_cols
, teppj.detail_rows
FROM tb_ens_sndng_mastr tesm
JOIN tb_ens_post_plus tepp
ON tesm.sndng_mastr_id=tepp.sndng_mastr_id
AND tesm.signgu_code = tepp.signgu_code
AND tesm.ffnlg_code = tepp.ffnlg_code
JOIN tb_ens_post_plus_json teppj
ON tepp.unity_sndng_detail_id = teppj.unity_sndng_detail_id
AND tepp.con_key = teppj.con_key
AND tepp.sn = teppj.sn
WHERE tepp.sndng_mastr_id = #{sndngMastrId}
AND tesm.signgu_code = #{signguCode}
AND tesm.ffnlg_code = #{ffnlgCode}
ORDER BY teppj.sn
</select>
</mapper>

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.other.mapper.IOtherMapper">
<select id="selectElecnotice" resultType="kr.xit.other.model.ElecnoticeDTO$Elecnoticedtl">
/** other-oracle-mapper|selectElecnoticemst-전자고지 파일 외부연계 마스터 조회|jhseo */
SELECT a.unitysndngmastrid
, a.sndngco
, a.sndngprocesssttus
, a.insuser
, a.insdate
, a.upduser
, a.upddate
, b.unitysndngmastrid
, b.unitysndngdetailid
, b.sndngdt
, b.tmplatid
, b.gojidepth
, b.taxnum1
, b.taxnum2
, b.taxnum3
, b.taxnum4
, b.worker
, b.serialno
, b.recvdt
, b.readdt
, b.resultcode
FROM elecnoticemst a
LEFT OUTER JOIN elecnoticedtl b ON (a.unitysndngmastrid = b.unitysndngmastrid)
WHERE 1=1
AND a.unitysndngmastrid = #{unitysndngmastrid}
AND b.unitysndngdetailid = #{unitysndngdetailid}
</select>
<insert id="saveElecnoticemst">
/** other-oracle-mapper|saveElecnoticemst-전자고지 파일 외부연계 마스터 Merge|jhseo */
MERGE
INTO elecnoticemst a
USING dual
ON (a.unitysndngmastrid = #{unitysndngmastrid})
WHEN MATCHED THEN
UPDATE
SET a.sndngco = #{sndngco}
, a.sndngprocesssttus = #{sndngprocesssttus}
, a.sndngdt = TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS')
, a.tmplatid = #{tmplatid}
, a.message = SUBSTRB(#{message}, 1, 100)
, a.upduser = #{upduser}
, a.upddate = sysdate
WHEN NOT MATCHED THEN
INSERT (a.unitysndngmastrid
, a.sndngco
, a.sndngprocesssttus
, a.insuser
, a.insdate
, a.sndngdt
, a.sndngsecode
, a.tmplatid
, a.searchdate
, a.success
, a.message
)
VALUES (#{unitysndngmastrid}
, #{sndngco}
, #{sndngprocesssttus}
, #{insuser}
, sysdate
, TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS')
, #{sndngsecode}
, #{tmplatid}
, TO_DATE(#{searchdate},'YYYYMMDDHH24MISS')
, #{success}
, SUBSTRB(#{message}, 1, 100)
)
</insert>
<insert id="saveElecnoticedtl">
/** other-oracle-mapper|saveElecnoticedtl-전자고지 파일 외부연계 상세 Merge|jhseo */
MERGE
INTO elecnoticedtl b
USING dual
ON (b.unitysndngmastrid = #{unitysndngmastrid} AND b.unitysndngdetailid = #{unitysndngdetailid})
WHEN MATCHED THEN
UPDATE
SET b.tmplatid = #{tmplatid}
, b.recvdt = TO_DATE(#{recvdt},'YYYYMMDDHH24MISS')
, b.readdt = TO_DATE(#{readdt},'YYYYMMDDHH24MISS')
, b.resultcode = #{resultcode}
, b.upduser = #{upduser}
, b.upddate = sysdate
WHEN NOT MATCHED THEN
INSERT (b.unitysndngmastrid
, b.unitysndngdetailid
, b.sndngdt
, b.tmplatid
, b.gojidepth
, b.taxnum1
, b.taxnum2
, b.taxnum3
, b.taxnum4
, b.worker
, b.serialno
, b.recvdt
, b.readdt
, b.resultcode
, b.insuser
, b.insdate
)
VALUES (#{unitysndngmastrid}
, #{unitysndngdetailid}
, TO_DATE(#{sndngdt},'YYYYMMDDHH24MISS')
, #{tmplatid}
, #{gojidepth}
, #{taxnum1}
, #{taxnum2}
, #{taxnum3}
, #{taxnum4}
, #{worker}
, #{serialno}
, TO_DATE(#{recvdt},'YYYYMMDDHH24MISS')
, TO_DATE(#{readdt},'YYYYMMDDHH24MISS')
, #{resultcode}
, #{insuser}
, sysdate
)
</insert>
</mapper>

@ -14,7 +14,7 @@
--> -->
<!-- async rolling appender 사용시 로그의 class, method, line number 출력 제어 : 성능저하 이슈 --> <!-- async rolling appender 사용시 로그의 class, method, line number 출력 제어 : 성능저하 이슈 -->
<springProfile name="local, dev"> <springProfile name="local, local-chuncheon, dev, dev-chuncheon">
<property name="isIncludeCallerData" value="true"/> <property name="isIncludeCallerData" value="true"/>
</springProfile> </springProfile>
<springProfile name="prod"> <springProfile name="prod">
@ -115,7 +115,7 @@
<logger name="jdbc.resultsettable" level="OFF"/> <logger name="jdbc.resultsettable" level="OFF"/>
</springProfile> </springProfile>
<springProfile name="local, dev"> <springProfile name="local, local-chuncheon, dev, dev-chuncheon">
<!-- 로컬, 개발 환경에서는 sql문 및 결과 출력 --> <!-- 로컬, 개발 환경에서는 sql문 및 결과 출력 -->
<!-- SQL문과 소요된 시간 --> <!-- SQL문과 소요된 시간 -->
<logger name="jdbc.sqltiming" level="DEBUG" /> <logger name="jdbc.sqltiming" level="DEBUG" />
@ -174,7 +174,7 @@
<appender-ref ref="ASYNC_ROLLING"/> <appender-ref ref="ASYNC_ROLLING"/>
</springProfile> </springProfile>
<springProfile name="local, dev"> <springProfile name="local, local-chuncheon, dev, dev-chuncheon">
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC_ROLLING"/> <appender-ref ref="ASYNC_ROLLING"/>
</springProfile> </springProfile>

@ -0,0 +1,20 @@
package kr.xit.core.spring.config.support;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import lombok.NonNull;
public class ProfileConditionOfCheonan implements Condition {
@Override
public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) {
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
for (String profile : activeProfiles) {
if (profile.matches(".*cheonan.*")) {
return true;
}
}
return false;
}
}

@ -0,0 +1,20 @@
package kr.xit.core.spring.config.support;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import lombok.NonNull;
public class ProfileConditionOfChuncheon implements Condition {
@Override
public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) {
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
for (String profile : activeProfiles) {
if (profile.matches(".*chuncheon.*")) {
return true;
}
}
return false;
}
}

@ -0,0 +1,20 @@
package kr.xit.core.spring.config.support;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import lombok.NonNull;
public class ProfileConditionOfSisul implements Condition {
@Override
public boolean matches(ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) {
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
for (String profile : activeProfiles) {
if (profile.matches(".*sisul.*")) {
return true;
}
}
return false;
}
}

@ -280,6 +280,26 @@
</activation> </activation>
</profile> </profile>
<profile>
<id>local-chuncheon</id>
<properties>
<env>local-chuncheon</env>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<profile>
<id>local-cheonan</id>
<properties>
<env>local-cheonan</env>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<!-- dev configuration --> <!-- dev configuration -->
<profile> <profile>
<id>dev</id> <id>dev</id>

Loading…
Cancel
Save