Merge remote-tracking branch 'origin/jenkins_with_weblogic' into devs/sso
This commit is contained in:
@@ -90,6 +90,20 @@ function init(url,key){
|
|||||||
//new makeOptions("CODE","NAME").setObj($("select[name=bizlevel2]")).setNoValueInclude(true).setNoValue(' ','없음').setData(json.bizlevel2).rendering();
|
//new makeOptions("CODE","NAME").setObj($("select[name=bizlevel2]")).setNoValueInclude(true).setNoValue(' ','없음').setData(json.bizlevel2).rendering();
|
||||||
//setSearchable('bjobBzwkDstcd');
|
//setSearchable('bjobBzwkDstcd');
|
||||||
//setSearchable('uapplCd');
|
//setSearchable('uapplCd');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url:url,
|
||||||
|
dataType:"json",
|
||||||
|
data:{ cmd: 'LIST_UAPPL_COMBO'},
|
||||||
|
success:function(json){
|
||||||
|
new makeOptions("CODE","NAME").setObj($("select[name=uapplCd]")).setNoValueInclude(true).setNoValue(' ','없음').setData(json.uapplCd).rendering();
|
||||||
|
},
|
||||||
|
error:function(e){
|
||||||
|
// alert(e.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
debugger;
|
debugger;
|
||||||
if ( isDetail ){
|
if ( isDetail ){
|
||||||
detail(url, key);
|
detail(url, key);
|
||||||
@@ -141,13 +155,16 @@ function detail(url,key){
|
|||||||
$("select[name=bjobBzwkDstcd]").attr('disabled',true);
|
$("select[name=bjobBzwkDstcd]").attr('disabled',true);
|
||||||
$("input[name=bjobTranDstcdName]").attr('readonly',true);
|
$("input[name=bjobTranDstcdName]").attr('readonly',true);
|
||||||
$("input,select").each(function(){
|
$("input,select").each(function(){
|
||||||
var name = $(this).attr('name').toUpperCase();
|
var name = $(this).attr('name')
|
||||||
|
if(name != null) {
|
||||||
|
name = name.toUpperCase();
|
||||||
|
}
|
||||||
$(this).val(detail[name]);
|
$(this).val(detail[name]);
|
||||||
});
|
});
|
||||||
|
|
||||||
//Prop
|
//Prop
|
||||||
$("#grid")[0].addJSONData(data);
|
$("#grid")[0].addJSONData(data);
|
||||||
/* setSearchable('uapplCd'); */
|
setSearchable('uapplCd');
|
||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
// alert(e.responseText);
|
// alert(e.responseText);
|
||||||
@@ -326,8 +343,8 @@ $(document).ready(function() {
|
|||||||
<tr>
|
<tr>
|
||||||
<th>APPLICATION CODE</th>
|
<th>APPLICATION CODE</th>
|
||||||
<td>
|
<td>
|
||||||
<!-- <div class="select-style"><select name="uapplCd"></select></div> -->
|
<div class="select-style"><select name="uapplCd"></select></div>
|
||||||
<input type="text" name="uapplCd" />
|
<!-- <input type="text" name="uapplCd" /> -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||||
|
<%@ page import="java.io.*"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%
|
||||||
|
response.setHeader("Pragma", "No-cache");
|
||||||
|
response.setHeader("Cache-Control", "no-cache");
|
||||||
|
response.setHeader("Expires", "0");
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||||
|
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- 메뉴권한 미존재 유저 빈 화면 frame 노출 20251126 -->
|
||||||
|
<div class="right_box">
|
||||||
|
<div class="content_top"></div>
|
||||||
|
<div class="content_middle" id="title"></div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -63,7 +63,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="left_box">
|
<div class="left_box">
|
||||||
<div class="title"><%=menuName%></div>
|
<!-- 메뉴명이 null일 경우 공백 노출되도록 처리 20251126 -->
|
||||||
|
<div class="title"><%=menuName != null ? menuName : ""%></div>
|
||||||
<ul class="depth3">
|
<ul class="depth3">
|
||||||
<%
|
<%
|
||||||
for (MenuUI menuUi : list) {
|
for (MenuUI menuUi : list) {
|
||||||
|
|||||||
@@ -419,7 +419,9 @@
|
|||||||
<%} else {%>
|
<%} else {%>
|
||||||
goPage2('/monitoring/leftMenu.do?menuId=<%=firstTopMenuId%>', '<%=firstSubMenuUrl%>?menuId=<%=firstSubMenuId%>', '<%=firstSubMenuId%>');
|
goPage2('/monitoring/leftMenu.do?menuId=<%=firstTopMenuId%>', '<%=firstSubMenuUrl%>?menuId=<%=firstSubMenuId%>', '<%=firstSubMenuId%>');
|
||||||
<%}%>
|
<%}%>
|
||||||
|
<%} else {%>
|
||||||
|
// 메뉴권한이 없는 유저 로그인 시 빈화면 프레임을 노출 20251126
|
||||||
|
goPage2('/monitoring/leftMenu.do?menuId=00', '/monitoring/blankScreen.do', '');
|
||||||
<%}%>
|
<%}%>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -649,6 +649,10 @@ $(document).ready(function() {
|
|||||||
type : "POST",
|
type : "POST",
|
||||||
url:url,
|
url:url,
|
||||||
data:postData,
|
data:postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_modify").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success:function(args){
|
success:function(args){
|
||||||
if(args.status=="error"){
|
if(args.status=="error"){
|
||||||
alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message);
|
alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message);
|
||||||
@@ -659,7 +663,11 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
}
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_modify").text("수정");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("#btn_clone,#btn_clone_new").click(function(){
|
$("#btn_clone,#btn_clone_new").click(function(){
|
||||||
@@ -696,6 +704,10 @@ $(document).ready(function() {
|
|||||||
type : "POST",
|
type : "POST",
|
||||||
url:url,
|
url:url,
|
||||||
data:postData,
|
data:postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_clone").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success:function(args){
|
success:function(args){
|
||||||
alert("<%=localeMessage.getString("common.croneMsg")%>");
|
alert("<%=localeMessage.getString("common.croneMsg")%>");
|
||||||
//goNav(returnUrl);//LIST로 이동
|
//goNav(returnUrl);//LIST로 이동
|
||||||
@@ -715,7 +727,11 @@ $(document).ready(function() {
|
|||||||
alert(error);
|
alert(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_clone").text("복제");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("#btn_delete").click(function(){
|
$("#btn_delete").click(function(){
|
||||||
@@ -726,6 +742,10 @@ $(document).ready(function() {
|
|||||||
type : "POST",
|
type : "POST",
|
||||||
url:url,
|
url:url,
|
||||||
data:postData,
|
data:postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_delete").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success:function(args){
|
success:function(args){
|
||||||
if(args.status=="error"){
|
if(args.status=="error"){
|
||||||
alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message);
|
alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message);
|
||||||
@@ -736,7 +756,11 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
}
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_delete").text("삭제");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -233,43 +233,129 @@
|
|||||||
window.alert('이관 대상 API 성공['+successCount+']건, 실패['+failedCount+']건 서버에 다운로드 완료');
|
window.alert('이관 대상 API 성공['+successCount+']건, 실패['+failedCount+']건 서버에 다운로드 완료');
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonControl();
|
buttonControl();
|
||||||
|
|
||||||
FilePond.registerPlugin(FilePondPluginFileValidateType);
|
// 25.11.25 파일 가져오기 할 때 중복 검사 기능추가.
|
||||||
// FilePond 인스턴스 생성
|
FilePond.registerPlugin(FilePondPluginFileValidateType);
|
||||||
const pond = FilePond.create(document.querySelector('.filepond'), {
|
|
||||||
instantUpload: false, // 파일을 즉시 업로드하지 않음
|
let uploadErrors = [];
|
||||||
allowRevert: false,
|
let processedCount = 0;
|
||||||
acceptedFileTypes: ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/json'],
|
let totalFiles = 0;
|
||||||
// 서버 설정
|
|
||||||
server: {
|
// FilePond 인스턴스 생성
|
||||||
process: {
|
const pond = FilePond.create(document.querySelector('.filepond'), {
|
||||||
url: url_file + '?cmd=LIST_IMPORT_FILE&serviceType=' + sessionStorage["serviceType"],
|
instantUpload: false,
|
||||||
method: 'POST',
|
allowRevert: false,
|
||||||
// 필요한 경우 headers나 다른 설정 추가
|
acceptedFileTypes: ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/json'],
|
||||||
|
|
||||||
|
// 서버 설정
|
||||||
|
server: {
|
||||||
|
process: {
|
||||||
|
url: url_file + '?cmd=LIST_IMPORT_FILE&serviceType=' + sessionStorage["serviceType"],
|
||||||
|
method: 'POST',
|
||||||
|
ondata: (formData) => {
|
||||||
|
const chkBox = document.querySelector('#uploadModal input[name="importDupliCheck"]');
|
||||||
|
const isChecked = chkBox ? chkBox.checked : false;
|
||||||
|
formData.append('importDupliCheck', isChecked);
|
||||||
|
return formData;
|
||||||
},
|
},
|
||||||
// revert, load, restore, fetch 설정 (필요한 경우)
|
onerror: (response) => {
|
||||||
},
|
return response;
|
||||||
// 다른 필요한 옵션 추가
|
}
|
||||||
});
|
}
|
||||||
|
}
|
||||||
pond.on('processfiles', () => {
|
|
||||||
// 여기에 모든 파일 업로드 완료 후 실행할 코드를 작성
|
|
||||||
console.debug('모든 파일의 처리가 완료되었습니다.');
|
|
||||||
$('#btn_search').click();
|
|
||||||
});
|
|
||||||
|
|
||||||
// "업로드 시작" 버튼 클릭 이벤트 핸들러
|
|
||||||
document.getElementById('uploadButton').addEventListener('click', function () {
|
|
||||||
pond.processFiles(); // 선택된 모든 파일을 업로드
|
|
||||||
});
|
|
||||||
|
|
||||||
// 모달 닫기 이벤트 핸들러
|
|
||||||
$('#uploadModal').on('hidden.bs.modal', function (e) {
|
|
||||||
pond.removeFiles(); // 모달이 닫힐 때 파일 목록에서 모든 파일 제거
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 파일 처리 결과 수신
|
||||||
|
pond.on('processfile', (error, file) => {
|
||||||
|
processedCount++;
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
let errorMsg = '';
|
||||||
|
|
||||||
|
if (error.body) {
|
||||||
|
errorMsg = error.body;
|
||||||
|
} else if (typeof error === 'string') {
|
||||||
|
errorMsg = error;
|
||||||
|
} else {
|
||||||
|
errorMsg = '가져오기 중 오류가 발생 했습니다.';
|
||||||
|
}
|
||||||
|
|
||||||
|
let fileName = 'UnKnown';
|
||||||
|
if (file) {
|
||||||
|
if(file.filename) fileName = file.filename;
|
||||||
|
else if (file.file && file.file.name) fileName = file.file.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadErrors.push('파일명 [ ' + fileName + '] \n MESSAGE : ' + errorMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모든 파일 처리 완료 시
|
||||||
|
if (processedCount >= totalFiles) {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (uploadErrors.length > 0) {
|
||||||
|
const msg = "파일 처리 중 오류가 발생했습니다. \n" + uploadErrors.join('\n');
|
||||||
|
|
||||||
|
// 실패 시 변수 초기화
|
||||||
|
uploadErrors = [];
|
||||||
|
processedCount = 0;
|
||||||
|
|
||||||
|
$('#btn_search').click();
|
||||||
|
alert(msg);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert('모든 파일이 성공적으로 업로드 되었습니다.');
|
||||||
|
$('#uploadModal').modal('hide');
|
||||||
|
$('#btn_search').click();
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업로드 버튼 클릭 이벤트
|
||||||
|
document.getElementById('uploadButton').addEventListener('click', function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
uploadErrors = [];
|
||||||
|
processedCount = 0;
|
||||||
|
|
||||||
|
const currentFiles = pond.getFiles();
|
||||||
|
totalFiles = currentFiles.length;
|
||||||
|
|
||||||
|
if (totalFiles === 0) {
|
||||||
|
alert("업로드 할 파일을 선택하세요.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const chkBox = document.getElementById('importDupliCheck');
|
||||||
|
|
||||||
|
if (chkBox && !chkBox.checked) {
|
||||||
|
if (!confirm("중복검사를 체크하지 않는 경우 기존 값은 덮어 씌워집니다. \n진행하시겠습니까?")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pond.processFiles();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 모달이 닫힐 때만 초기화
|
||||||
|
$('#uploadModal').on('hidden.bs.modal', function(e) {
|
||||||
|
resetPond();
|
||||||
|
});
|
||||||
|
|
||||||
|
function resetPond() {
|
||||||
|
pond.removeFiles();
|
||||||
|
|
||||||
|
const chkBox = document.getElementById('importDupliCheck');
|
||||||
|
if (chkBox) chkBox.checked = false;
|
||||||
|
|
||||||
|
processedCount = 0;
|
||||||
|
totalFiles = 0;
|
||||||
|
uploadErrors = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -329,6 +415,10 @@
|
|||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<!-- 파일 업로드 시 중복체크 -->
|
||||||
|
|
||||||
|
<input type="checkbox" id="importDupliCheck" name="importDupliCheck">
|
||||||
|
<label class="form-check-label" for="importDupliCheck">중복검사</label>
|
||||||
<input type="file" class="filepond" name="file" multiple data-allow-reorder="true"
|
<input type="file" class="filepond" name="file" multiple data-allow-reorder="true"
|
||||||
data-max-file-size="3MB" data-max-files="10">
|
data-max-file-size="3MB" data-max-files="10">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -867,6 +867,10 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url:url,
|
url:url,
|
||||||
data: postData,
|
data: postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_modify").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success:function(message){
|
success:function(message){
|
||||||
alert("저장 되었습니다. \n\n[실시간 반영 결과]\n"+JSON.stringify(message));
|
alert("저장 되었습니다. \n\n[실시간 반영 결과]\n"+JSON.stringify(message));
|
||||||
if (typeof callback === 'function') {
|
if (typeof callback === 'function') {
|
||||||
@@ -877,6 +881,10 @@
|
|||||||
},
|
},
|
||||||
error:function(xhr, status, errorMsg){
|
error:function(xhr, status, errorMsg){
|
||||||
alert(JSON.parse(xhr.responseText).errorMsg);
|
alert(JSON.parse(xhr.responseText).errorMsg);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_modify").text("수정");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -936,6 +944,11 @@
|
|||||||
type : "POST",
|
type : "POST",
|
||||||
url:url,
|
url:url,
|
||||||
data:postData,
|
data:postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_delete").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
|
|
||||||
success:function(args){
|
success:function(args){
|
||||||
alert("삭제 되었습니다.");
|
alert("삭제 되었습니다.");
|
||||||
goNav(returnUrl);//LIST로 이동
|
goNav(returnUrl);//LIST로 이동
|
||||||
@@ -943,6 +956,10 @@
|
|||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_delete").text("삭제");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1203,6 +1220,10 @@
|
|||||||
newInboundHttpMethod,
|
newInboundHttpMethod,
|
||||||
newInboundRestPath,
|
newInboundRestPath,
|
||||||
},
|
},
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#doCloneInterfaceButton").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success: function () {
|
success: function () {
|
||||||
alert("["+orgApiInterfaceId+"] => ["+newBizCode+"]["+newApiInterfaceId+"] 복제 완료.");
|
alert("["+orgApiInterfaceId+"] => ["+newBizCode+"]["+newApiInterfaceId+"] 복제 완료.");
|
||||||
$('#cloneInterfaceModal').modal('hide');
|
$('#cloneInterfaceModal').modal('hide');
|
||||||
@@ -1210,19 +1231,25 @@
|
|||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#doCloneInterfaceButton").text("복제");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btn_excel_export").click(function () {
|
// 25.11.25 엑셀다운로드 사용안함.
|
||||||
const url = url_excel + '?cmd=DETAIL_EXPORT_TO_EXCEL';
|
// $("#btn_excel_export").click(function () {
|
||||||
const params = new URLSearchParams();
|
// const url = url_excel + '?cmd=DETAIL_EXPORT_TO_EXCEL';
|
||||||
params.append('eaiSvcName', getFullSvcName());
|
// const params = new URLSearchParams();
|
||||||
|
// params.append('eaiSvcName', getFullSvcName());
|
||||||
downloadFiles(url, params);
|
// downloadFiles(url, params);
|
||||||
|
// return false;
|
||||||
return false;
|
// });
|
||||||
});
|
|
||||||
|
|
||||||
|
// JSON 다운로드
|
||||||
$("#btn_json_export").click(function () {
|
$("#btn_json_export").click(function () {
|
||||||
const uri = url + '?cmd=DETAIL_EXPORT_TO_JSON';
|
const uri = url + '?cmd=DETAIL_EXPORT_TO_JSON';
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
|
|||||||
@@ -194,11 +194,19 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: url,
|
url: url,
|
||||||
data: postData,
|
data: postData,
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_save").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success: function () {
|
success: function () {
|
||||||
alert("<%= localeMessage.getString("common.saveMsg") %>");
|
alert("<%= localeMessage.getString("common.saveMsg") %>");
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
|
},
|
||||||
|
complate: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_save").text("수정");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -258,12 +266,20 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: url,
|
url: url,
|
||||||
data: { cmd: 'DELETE', apiId: $('#apiId').val() },
|
data: { cmd: 'DELETE', apiId: $('#apiId').val() },
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_delete").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success: function() {
|
success: function() {
|
||||||
alert("<%= localeMessage.getString("common.deleteMsg") %>");
|
alert("<%= localeMessage.getString("common.deleteMsg") %>");
|
||||||
window.close();
|
window.close();
|
||||||
},
|
},
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
|
},
|
||||||
|
complate: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_delete").text("삭제");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -276,6 +292,10 @@
|
|||||||
cmd: 'GENERATE_SPEC',
|
cmd: 'GENERATE_SPEC',
|
||||||
apiId: $('#apiId').val()
|
apiId: $('#apiId').val()
|
||||||
},
|
},
|
||||||
|
beforeSend: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", true);
|
||||||
|
$("#btn_generate_spec").text("처리중 . . . . .");
|
||||||
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// Update the editors with generated content
|
// Update the editors with generated content
|
||||||
$('#apiRequestSpec').summernote('code', data.requestSpec);
|
$('#apiRequestSpec').summernote('code', data.requestSpec);
|
||||||
@@ -288,6 +308,10 @@
|
|||||||
},
|
},
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
alert("API 스펙 생성 중 오류가 발생했습니다: " + e.responseText);
|
alert("API 스펙 생성 중 오류가 발생했습니다: " + e.responseText);
|
||||||
|
},
|
||||||
|
complate: function() {
|
||||||
|
$("[id^='btn_']").prop("disabled", false);
|
||||||
|
$("#btn_generate_spec").text("SPEC 자동 생성");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -446,6 +446,9 @@ WebContent/
|
|||||||
-Dlogback.configurationFile=classpath:logback-dev.xml
|
-Dlogback.configurationFile=classpath:logback-dev.xml
|
||||||
-Dhibernate.dialect=org.hibernate.dialect.Oracle12cDialect
|
-Dhibernate.dialect=org.hibernate.dialect.Oracle12cDialect
|
||||||
-Dkjb_safedb.mode=fake
|
-Dkjb_safedb.mode=fake
|
||||||
|
|
||||||
|
|
||||||
|
-Dlogback.configurationFile="C:\eactive\workspaces\kjb-eapim\eapim-admin\src\main\resources\logback-rinjae.xml"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 데이터베이스 지원
|
### 데이터베이스 지원
|
||||||
|
|||||||
+14
-1
@@ -156,7 +156,20 @@ public class BapMessageProcController extends BapBaseAnnotationController {
|
|||||||
ModelAndView modelAndView = new ModelAndView("jsonView",resultMap);
|
ModelAndView modelAndView = new ModelAndView("jsonView",resultMap);
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value= "/bap/admin/work/messageProcMan.json",params = "cmd=LIST_UAPPL_COMBO")
|
||||||
|
public ModelAndView initUapplCdCombo( HttpServletRequest request,
|
||||||
|
HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
List<Map<String, Object>> uapplCd = comboService.selectCM01ComboList("TRIM(EAIBZWKDSTCD)", "BZWKDSTICNAME");
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
resultMap.put("uapplCd" , uapplCd);
|
||||||
|
|
||||||
|
ModelAndView modelAndView = new ModelAndView("jsonView",resultMap);
|
||||||
|
return modelAndView;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value= "/bap/admin/work/messageProcMan.json",params = "cmd=LIST_PROP")
|
@RequestMapping(value= "/bap/admin/work/messageProcMan.json",params = "cmd=LIST_PROP")
|
||||||
public ModelAndView getProps( HttpServletRequest request,
|
public ModelAndView getProps( HttpServletRequest request,
|
||||||
HttpServletResponse response,
|
HttpServletResponse response,
|
||||||
|
|||||||
@@ -122,5 +122,16 @@ public class MenuRenderController extends BaseAnnotationController {
|
|||||||
|
|
||||||
return "/common/screen/top_04";
|
return "/common/screen/top_04";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 메뉴권한 미존재 유저 접속 시 빈 화면 frame 노출 20251126
|
||||||
|
*
|
||||||
|
* @return 빈 화면 (blank_screen)
|
||||||
|
*/
|
||||||
|
@GetMapping("/blankScreen.do")
|
||||||
|
public String getBlankScreen(HttpServletRequest request, String serviceType, ModelMap modelMap) throws Exception {
|
||||||
|
return "/common/screen/blank_screen";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,55 +12,77 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
|
|
||||||
public class CrossScriptingFilter implements Filter {
|
public class CrossScriptingFilter implements Filter {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(CrossScriptingFilter.class);
|
private static final Log logger = LogFactory.getLog(CrossScriptingFilter.class);
|
||||||
|
|
||||||
public void init(FilterConfig filterConfig) throws ServletException {
|
public void init(FilterConfig filterConfig) throws ServletException {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getBaseUrl(HttpServletRequest request) {
|
/**
|
||||||
String uri = request.getRequestURL().toString();
|
* 프록시 환경을 고려하여 baseUrl을 구합니다.
|
||||||
String servletPath = request.getServletPath();
|
* X-Forwarded-Proto, X-Forwarded-Host 헤더가 있으면 우선 사용합니다.
|
||||||
String baseUrl = uri.replace(servletPath, "");
|
*/
|
||||||
return baseUrl;
|
private String getBaseUrl(HttpServletRequest request) {
|
||||||
}
|
String forwardedProto = request.getHeader("X-Forwarded-Proto");
|
||||||
|
String forwardedHost = request.getHeader("X-Forwarded-Host");
|
||||||
private boolean checkReturnUrl(HttpServletRequest request, String returnUrl) {
|
|
||||||
String uri = request.getRequestURL().toString();
|
if (forwardedProto != null && forwardedHost != null) {
|
||||||
String servletPath = request.getServletPath();
|
// 프록시 환경: X-Forwarded 헤더 사용
|
||||||
String baseUrl = uri.replace(servletPath, "");
|
String baseUrl = forwardedProto + "://" + forwardedHost;
|
||||||
|
// :443 포트 제거 (https 기본 포트)
|
||||||
|
baseUrl = baseUrl.replace(":443", "");
|
||||||
|
return baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 직접 접속: 기존 로직
|
||||||
|
String uri = request.getRequestURL().toString();
|
||||||
|
String servletPath = request.getServletPath();
|
||||||
|
String baseUrl = uri.replace(servletPath, "");
|
||||||
|
return baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean checkReturnUrl(HttpServletRequest request, String returnUrl) {
|
||||||
|
String baseUrl = getBaseUrl(request);
|
||||||
// 25.11.10 - weblogic https://host:443/ 문제 대응
|
// 25.11.10 - weblogic https://host:443/ 문제 대응
|
||||||
baseUrl = baseUrl.replace(":443", "");
|
baseUrl = baseUrl.replace(":443", "");
|
||||||
return returnUrl.startsWith(baseUrl);
|
|
||||||
}
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("checkReturnUrl - baseUrl: " + baseUrl + ", returnUrl: " + returnUrl);
|
||||||
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
|
}
|
||||||
throws IOException, ServletException {
|
|
||||||
HttpServletRequest request = (HttpServletRequest) req;
|
return returnUrl.startsWith(baseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
|
||||||
|
throws IOException, ServletException {
|
||||||
|
HttpServletRequest request = (HttpServletRequest) req;
|
||||||
HttpServletResponse response = (HttpServletResponse) res;
|
HttpServletResponse response = (HttpServletResponse) res;
|
||||||
|
|
||||||
String returnUrl = (String)request.getParameter("returnUrl");
|
String returnUrl = (String) request.getParameter("returnUrl");
|
||||||
if(returnUrl != null) {
|
if (returnUrl != null) {
|
||||||
if(!checkReturnUrl(request, returnUrl)) {
|
if (!checkReturnUrl(request, returnUrl)) {
|
||||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "bad request. - "+returnUrl);
|
logger.warn("returnUrl validation failed - baseUrl: " + getBaseUrl(request)
|
||||||
return;
|
+ ", returnUrl: " + returnUrl
|
||||||
}
|
+ ", X-Forwarded-Proto: " + request.getHeader("X-Forwarded-Proto")
|
||||||
}
|
+ ", X-Forwarded-Host: " + request.getHeader("X-Forwarded-Host"));
|
||||||
|
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "bad request. - " + returnUrl);
|
||||||
// Web Cache Deception
|
return;
|
||||||
response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
|
}
|
||||||
response.setHeader("Pragma", "no-cache");
|
}
|
||||||
response.setDateHeader("Expires", 0);
|
|
||||||
|
// Web Cache Deception
|
||||||
chain.doFilter(new RequestWrapper(request), response);
|
response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
|
||||||
|
response.setHeader("Pragma", "no-cache");
|
||||||
|
response.setDateHeader("Expires", 0);
|
||||||
|
|
||||||
|
chain.doFilter(new RequestWrapper(request), response);
|
||||||
//
|
//
|
||||||
// if(servletPath.startsWith("/onl/admin/common")) {
|
// if(servletPath.startsWith("/onl/admin/common")) {
|
||||||
// System.out.println("RequestWrapper called");
|
// System.out.println("RequestWrapper called");
|
||||||
@@ -69,6 +91,6 @@ public class CrossScriptingFilter implements Filter {
|
|||||||
// else {
|
// else {
|
||||||
// chain.doFilter(request, response);
|
// chain.doFilter(request, response);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ public class EntityServiceLoggingAspect {
|
|||||||
|
|
||||||
@Before("executionEntityServicePointcut()")
|
@Before("executionEntityServicePointcut()")
|
||||||
public void entityService(JoinPoint joinPoint) {
|
public void entityService(JoinPoint joinPoint) {
|
||||||
Logger logger = LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringType());
|
// Logger logger = LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringType());
|
||||||
if (logger.isDebugEnabled()) {
|
// if (logger.isDebugEnabled()) {
|
||||||
logger.debug("{}", joinPoint.getSignature().toShortString());
|
// logger.debug("{}", joinPoint.getSignature().toShortString());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.eactive.eai.data.entity.onl.unifbwk.UnifBwkTp;
|
|||||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||||
import com.eactive.eai.rms.data.entity.onl.bzwkdstcd.QUserBusiness;
|
import com.eactive.eai.rms.data.entity.onl.bzwkdstcd.QUserBusiness;
|
||||||
import com.eactive.eai.rms.onl.manage.comm.unifbwk.UnifbwkUISearch;
|
import com.eactive.eai.rms.onl.manage.comm.unifbwk.UnifbwkUISearch;
|
||||||
|
import com.querydsl.core.BooleanBuilder;
|
||||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
|
||||||
@@ -54,12 +55,27 @@ public class UnifBwkTpService extends AbstractDataService<UnifBwkTp, String, Uni
|
|||||||
|
|
||||||
public Iterable<UnifBwkTp> findAllwithSearch(String searchBzwkName) {
|
public Iterable<UnifBwkTp> findAllwithSearch(String searchBzwkName) {
|
||||||
QUnifBwkTp qUnifBwkTp = QUnifBwkTp.unifBwkTp;
|
QUnifBwkTp qUnifBwkTp = QUnifBwkTp.unifBwkTp;
|
||||||
|
|
||||||
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(searchBzwkName)) {
|
||||||
|
|
||||||
|
String[] keywords = searchBzwkName.split(",");
|
||||||
|
|
||||||
|
for(String keyword : keywords) {
|
||||||
|
|
||||||
|
String param = keyword.trim();
|
||||||
|
|
||||||
|
BooleanExpression predicate = QUnifBwkTp.unifBwkTp.bzwkdsticname
|
||||||
|
.containsIgnoreCase(param)
|
||||||
|
.or(qUnifBwkTp.eaibzwkdstcd.containsIgnoreCase(param));
|
||||||
|
|
||||||
|
builder.or(predicate);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BooleanExpression predicate = QUnifBwkTp.unifBwkTp.bzwkdsticname
|
return repository.findAll(builder, qUnifBwkTp.eaibzwkdstcd.asc());
|
||||||
.containsIgnoreCase(searchBzwkName)
|
|
||||||
.or(qUnifBwkTp.eaibzwkdstcd.containsIgnoreCase(searchBzwkName));
|
|
||||||
|
|
||||||
return repository.findAll(predicate, qUnifBwkTp.eaibzwkdstcd.asc());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Page<UnifBwkTp> findPageWithSearch(Pageable pageable, UnifbwkUISearch unifbwkUISearch) {
|
public Page<UnifBwkTp> findPageWithSearch(Pageable pageable, UnifbwkUISearch unifbwkUISearch) {
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ public class HttpStatusController extends BaseController {
|
|||||||
list.removeIf(m -> m.get("adapterGroupSimple") == null || m.get("adapterGroupSimple") == "");
|
list.removeIf(m -> m.get("adapterGroupSimple") == null || m.get("adapterGroupSimple") == "");
|
||||||
|
|
||||||
// 어댑터 업무그룹별 정렬
|
// 어댑터 업무그룹별 정렬
|
||||||
String[] compareParam = { "adapterGroupName", "eaiSvrInstNm" };
|
String[] compareParam = { "adapterStatus", "adapterGroupName", "eaiSvrInstNm" };
|
||||||
MapComparator comp = new MapComparator(compareParam);
|
MapComparator comp = new MapComparator(compareParam);
|
||||||
Collections.sort(list, comp);
|
Collections.sort(list, comp);
|
||||||
return ResponseEntity.ok(new GridResponse<>(list));
|
return ResponseEntity.ok(new GridResponse<>(list));
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ public class SocketProcessController extends BaseController{
|
|||||||
pageVo.setTotalCount(list.size());
|
pageVo.setTotalCount(list.size());
|
||||||
|
|
||||||
//어댑터 업무그룹별 정렬
|
//어댑터 업무그룹별 정렬
|
||||||
String[] compareParam = {"AdptrBzwkGroupName","EaiSevrInstncName"};
|
String[] compareParam = {"Status","AdptrBzwkGroupName","EaiSevrInstncName"};
|
||||||
|
|
||||||
MapComparator comp = new MapComparator(compareParam);
|
MapComparator comp = new MapComparator(compareParam);
|
||||||
Collections.sort(list,comp);
|
Collections.sort(list,comp);
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class SocketStatusController extends BaseController {
|
|||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
for (EAIServer serverMap : serverList) {
|
for (EAIServer serverMap : serverList) {
|
||||||
String url = "http://" + serverMap.getEaisevrip() + ":" + serverMap.getSevrlsnportname()
|
String url = "http://" + serverMap.getEaisevrip() + ":" + serverMap.getSevrlsnportname()
|
||||||
+ HostInfomationForm.WEB_AGENT_CONTEXT_PATH + AGENT_PAGE_STATUS + "?adapterType=SOC"
|
+ HostInfomationForm.WEB_AGENT_CONTEXT_PATH + AGENT_PAGE_STATUS + "?adapterType=NET"
|
||||||
+ "&eaiSvrInstNm=" + serverMap.getEaisevrinstncname();
|
+ "&eaiSvrInstNm=" + serverMap.getEaisevrinstncname();
|
||||||
urls.add(url);
|
urls.add(url);
|
||||||
logger.debug(url);
|
logger.debug(url);
|
||||||
@@ -120,7 +120,7 @@ public class SocketStatusController extends BaseController {
|
|||||||
List<HashMap<String, Object>> list = gUtil.flushXmlToClient(urls);
|
List<HashMap<String, Object>> list = gUtil.flushXmlToClient(urls);
|
||||||
|
|
||||||
// 어댑터 업무그룹별 정렬
|
// 어댑터 업무그룹별 정렬
|
||||||
String[] compareParam = { "AdptrBzwkGroupName", "EaiSevrInstncName", "AdptrBzwkName" };
|
String[] compareParam = { "Status", "AdptrBzwkGroupName", "EaiSevrInstncName", "AdptrBzwkName" };
|
||||||
|
|
||||||
MapComparator comp = new MapComparator(compareParam);
|
MapComparator comp = new MapComparator(compareParam);
|
||||||
Collections.sort(list, comp);
|
Collections.sort(list, comp);
|
||||||
|
|||||||
+12
-10
@@ -21,6 +21,7 @@ import org.springframework.dao.DuplicateKeyException;
|
|||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -208,7 +209,6 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.excel", params = "cmd=DETAIL_EXPORT_TO_EXCEL")
|
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.excel", params = "cmd=DETAIL_EXPORT_TO_EXCEL")
|
||||||
public ResponseEntity<byte[]> detailExportToExcel(@RequestParam(name = "eaiSvcName") String eaiSvcName) throws Exception {
|
public ResponseEntity<byte[]> detailExportToExcel(@RequestParam(name = "eaiSvcName") String eaiSvcName) throws Exception {
|
||||||
// 단일 파일 처리
|
// 단일 파일 처리
|
||||||
@@ -228,20 +228,22 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.file", params = "cmd=LIST_IMPORT_FILE")
|
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.file", params = "cmd=LIST_IMPORT_FILE")
|
||||||
public ResponseEntity<?> listImportFromExcel(@RequestParam("file") MultipartFile file) {
|
public ResponseEntity<?> listImportFromJson(@RequestParam("file") MultipartFile file, boolean importDupliCheck) {
|
||||||
try {
|
try {
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
String extension = FilenameUtils.getExtension(file.getOriginalFilename()).toLowerCase();
|
String extension = FilenameUtils.getExtension(file.getOriginalFilename()).toLowerCase();
|
||||||
if("xls".equals(extension) || "xlsx".equals(extension)){
|
if("json".equals(extension)) {
|
||||||
ApiInterfaceReloadSyncSet apiInterfaceExportSetUI = service.importInterfaceFromExcel(file);
|
ApiInterfaceReloadSyncSet apiInterfaceExportSetUI = service.importInterfaceFromJson(file, importDupliCheck);
|
||||||
reloadSync(apiInterfaceExportSetUI.getApiInterfaceUI());
|
|
||||||
return ResponseEntity.ok().body("File successfully imported");
|
|
||||||
} else if("json".equals(extension)) {
|
|
||||||
ApiInterfaceReloadSyncSet apiInterfaceExportSetUI = service.importInterfaceFromJson(file);
|
|
||||||
reloadSync(apiInterfaceExportSetUI.getApiInterfaceUI());
|
reloadSync(apiInterfaceExportSetUI.getApiInterfaceUI());
|
||||||
return ResponseEntity.ok().body("File successfully imported");
|
return ResponseEntity.ok().body("File successfully imported");
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("파일 [ " + file.getOriginalFilename() + " ] 의 확장자가 JSON 이 아닙니다. 다시 시도하세요.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IllegalStateException dupEx) {
|
||||||
|
return ResponseEntity
|
||||||
|
.status(HttpStatus.CONFLICT)
|
||||||
|
.body(dupEx.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error processing file", e);
|
logger.error("Error processing file", e);
|
||||||
return ResponseEntity.internalServerError().body("Error processing file - "+e.getMessage() );
|
return ResponseEntity.internalServerError().body("Error processing file - "+e.getMessage() );
|
||||||
@@ -269,10 +271,10 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.json", params = "cmd=CLONE")
|
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.json", params = "cmd=CLONE")
|
||||||
public ResponseEntity<?> cloneApiInterface(String orgApiInterfaceId, String newBizCode, String newApiInterfaceId, String newInboundHttpMethod, String newInboundRestPath) throws BizException {
|
public ResponseEntity<?> cloneApiInterface(String orgApiInterfaceId, String newBizCode, String newApiInterfaceId, String newInboundHttpMethod, String newInboundRestPath, boolean importDupliCheck) throws BizException {
|
||||||
try {
|
try {
|
||||||
ApiInterfaceUI orgApiInterfaceUI = service.selectDetail(orgApiInterfaceId);
|
ApiInterfaceUI orgApiInterfaceUI = service.selectDetail(orgApiInterfaceId);
|
||||||
ApiInterfaceUI apiInterfaceUI = service.cloneApiInterface(orgApiInterfaceUI, newBizCode, newApiInterfaceId, newInboundHttpMethod, newInboundRestPath);
|
ApiInterfaceUI apiInterfaceUI = service.cloneApiInterface(orgApiInterfaceUI, newBizCode, newApiInterfaceId, newInboundHttpMethod, newInboundRestPath, importDupliCheck);
|
||||||
Map<String, Object> resultMap = reloadSync(apiInterfaceUI);
|
Map<String, Object> resultMap = reloadSync(apiInterfaceUI);
|
||||||
return ResponseEntity.ok(resultMap);
|
return ResponseEntity.ok(resultMap);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|||||||
@@ -588,6 +588,31 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
// 비표준에서 표준으로 가는 경우 표준으로 전환하기 위한 정보 이므로 내부로 갈 때만 처리
|
// 비표준에서 표준으로 가는 경우 표준으로 전환하기 위한 정보 이므로 내부로 갈 때만 처리
|
||||||
|
|
||||||
String eaiServiceName = vo.getEaiSvcName();
|
String eaiServiceName = vo.getEaiSvcName();
|
||||||
|
|
||||||
|
// 25.11.25 HS04 APIFULLPATH 추가.
|
||||||
|
List<AdapterUI> adapters = adapterGroup.getAdapters();
|
||||||
|
|
||||||
|
for (AdapterUI adapter : adapters) {
|
||||||
|
|
||||||
|
// propGroup NULL 체크
|
||||||
|
if(adapter.getAdapterPropGroup() == null) continue;
|
||||||
|
|
||||||
|
List<AdapterPropUI> props = adapter.getAdapterPropGroup().getAdapterProps();
|
||||||
|
|
||||||
|
if (props != null) {
|
||||||
|
for (AdapterPropUI prop : props) {
|
||||||
|
if("API_PATH".equals(prop.getPrptyname())) {
|
||||||
|
|
||||||
|
String fullPath = prop.getPrpty2val() + "/" + vo.getInboundRestPath();
|
||||||
|
vo.setApiFullPath(fullPath);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!"RST".equals(adapterGroup.getAdptrcd())) {
|
if (!"RST".equals(adapterGroup.getAdptrcd())) {
|
||||||
throw new RuntimeException("인바운드 어댑터가 타입이 REST가 아닙니다. 타입을 확인하세요");
|
throw new RuntimeException("인바운드 어댑터가 타입이 REST가 아닙니다. 타입을 확인하세요");
|
||||||
@@ -836,7 +861,8 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
apiInterfaceUI.setSendRecvType(sendRecvType);
|
apiInterfaceUI.setSendRecvType(sendRecvType);
|
||||||
apiInterfaceUI.setInOutType(inOutType);
|
apiInterfaceUI.setInOutType(inOutType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 25.11.25 광주은행 엑셀 가져오기 기능 사용안함.
|
||||||
public ApiInterfaceUI importInterfaceExcelSheet(Sheet sheet) throws Exception {
|
public ApiInterfaceUI importInterfaceExcelSheet(Sheet sheet) throws Exception {
|
||||||
String bizCode = PoiUtils.getCellValue(sheet, 1, 3);
|
String bizCode = PoiUtils.getCellValue(sheet, 1, 3);
|
||||||
String elinkServiceId = PoiUtils.getCellValue(sheet, 1, 5);
|
String elinkServiceId = PoiUtils.getCellValue(sheet, 1, 5);
|
||||||
@@ -910,16 +936,27 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
|
|
||||||
return apiInterfaceUI;
|
return apiInterfaceUI;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
private void importApiInterfaceUi(ApiInterfaceUI apiInterfaceUI) throws Exception {
|
private void importApiInterfaceUi(ApiInterfaceUI apiInterfaceUI, boolean importDupliCheck) throws Exception {
|
||||||
String elinkServiceId = apiInterfaceUI.getEaiSvcName();
|
String elinkServiceId = apiInterfaceUI.getEaiSvcName();
|
||||||
if (!eaiMessageQueryService.existsById(elinkServiceId)) {
|
|
||||||
insert(apiInterfaceUI);
|
// 중복검사 실시
|
||||||
|
boolean elinkServiceIdExists = eaiMessageQueryService.existsById(elinkServiceId);
|
||||||
|
|
||||||
|
// 아이디가 중복 일 경우, 중복검사 체크여부에 따라 업데이트 진행.
|
||||||
|
if (elinkServiceIdExists) {
|
||||||
|
// 중복검사 체크시 반환시킴
|
||||||
|
if (importDupliCheck) {
|
||||||
|
throw new IllegalStateException("ApiInterfaceId already exists [ " + elinkServiceId + " ]" );
|
||||||
|
} else {
|
||||||
|
update(apiInterfaceUI);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
update(apiInterfaceUI);
|
insert(apiInterfaceUI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* 25.11.25 광주은행 엑셀 가져오기 기능 사용안함.
|
||||||
public ApiInterfaceReloadSyncSet importInterfaceFromExcel(MultipartFile file) throws Exception {
|
public ApiInterfaceReloadSyncSet importInterfaceFromExcel(MultipartFile file) throws Exception {
|
||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
throw new IOException("File is empty");
|
throw new IOException("File is empty");
|
||||||
@@ -958,8 +995,9 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
}
|
}
|
||||||
return apiInterfaceReloadSyncSet;
|
return apiInterfaceReloadSyncSet;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public ApiInterfaceReloadSyncSet importInterfaceFromJson(MultipartFile file) throws Exception {
|
public ApiInterfaceReloadSyncSet importInterfaceFromJson(MultipartFile file, boolean importDupliCheck) throws Exception {
|
||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
throw new IOException("File is empty");
|
throw new IOException("File is empty");
|
||||||
}
|
}
|
||||||
@@ -983,7 +1021,7 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
importAndAddReloadSetTransform(transformUIList, apiInterfaceExportSetUI.getRequestTransform());
|
importAndAddReloadSetTransform(transformUIList, apiInterfaceExportSetUI.getRequestTransform());
|
||||||
importAndAddReloadSetTransform(transformUIList, apiInterfaceExportSetUI.getResponseTransform());
|
importAndAddReloadSetTransform(transformUIList, apiInterfaceExportSetUI.getResponseTransform());
|
||||||
|
|
||||||
importApiInterfaceUi(apiInterfaceExportSetUI.getApiInterfaceUI());
|
importApiInterfaceUi(apiInterfaceExportSetUI.getApiInterfaceUI(), importDupliCheck);
|
||||||
apiInterfaceReloadSyncSet.setApiInterfaceUI(apiInterfaceExportSetUI.getApiInterfaceUI());
|
apiInterfaceReloadSyncSet.setApiInterfaceUI(apiInterfaceExportSetUI.getApiInterfaceUI());
|
||||||
|
|
||||||
return apiInterfaceReloadSyncSet;
|
return apiInterfaceReloadSyncSet;
|
||||||
@@ -1108,12 +1146,17 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
return updatedString;
|
return updatedString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiInterfaceUI cloneApiInterface(ApiInterfaceUI orgApiInterfaceUI, String newBizCd, String newApiInterfaceId, String newInboundHttpMethod, String newInboundRestPath) throws Exception {
|
public ApiInterfaceUI cloneApiInterface(ApiInterfaceUI orgApiInterfaceUI, String newBizCd,
|
||||||
|
String newApiInterfaceId, String newInboundHttpMethod,
|
||||||
|
String newInboundRestPath, boolean importDupliCheck) throws Exception {
|
||||||
|
|
||||||
Optional<EAIMessageEntity> optional = eaiMessageQueryService.findById(newApiInterfaceId);
|
Optional<EAIMessageEntity> optional = eaiMessageQueryService.findById(newApiInterfaceId);
|
||||||
if (optional.isPresent()) {
|
if (optional.isPresent()) {
|
||||||
String bzwkDstcd = optional.get().getEaibzwkdstcd();
|
String bzwkDstcd = optional.get().getEaibzwkdstcd();
|
||||||
throw new BizException("[" + bzwkDstcd + "][" + newApiInterfaceId + "]로 이미 등록된 인터페이스입니다.\n조회가 되지 않을 시 담당자에게 문의바랍니다.");
|
throw new BizException("[" + bzwkDstcd + "][" + newApiInterfaceId + "]로 이미 등록된 인터페이스입니다.\n조회가 되지 않을 시 담당자에게 문의바랍니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
importDupliCheck = false; // 중복검사 완료.
|
||||||
|
|
||||||
ApiInterfaceUI apiInterfaceUI = orgApiInterfaceUI;
|
ApiInterfaceUI apiInterfaceUI = orgApiInterfaceUI;
|
||||||
apiInterfaceUI.setEaiBzwkDstcd(newBizCd);
|
apiInterfaceUI.setEaiBzwkDstcd(newBizCd);
|
||||||
@@ -1132,7 +1175,7 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
apiInterfaceUI.setResponseTransform(changeToTargetTransformUI(transform2Service.getTransformUiToExport(apiInterfaceUI.getResponseTransform()), newBizCd, newApiInterfaceId, apiInterfaceUI.getOutboundResponseLayout(), apiInterfaceUI.getInboundResponseLayout()));
|
apiInterfaceUI.setResponseTransform(changeToTargetTransformUI(transform2Service.getTransformUiToExport(apiInterfaceUI.getResponseTransform()), newBizCd, newApiInterfaceId, apiInterfaceUI.getOutboundResponseLayout(), apiInterfaceUI.getInboundResponseLayout()));
|
||||||
}
|
}
|
||||||
|
|
||||||
importApiInterfaceUi(apiInterfaceUI);
|
importApiInterfaceUi(apiInterfaceUI, importDupliCheck);
|
||||||
|
|
||||||
return apiInterfaceUI;
|
return apiInterfaceUI;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -148,6 +148,7 @@ public interface ApiInterfaceUIMapper {
|
|||||||
@Mapping(target = "eaisendrecv", source = "sendRecvType")
|
@Mapping(target = "eaisendrecv", source = "sendRecvType")
|
||||||
@Mapping(target = "eaidirection", source = "inOutType")
|
@Mapping(target = "eaidirection", source = "inOutType")
|
||||||
@Mapping(target = "standardMessageItems", source = "standardMessageItems")
|
@Mapping(target = "standardMessageItems", source = "standardMessageItems")
|
||||||
|
@Mapping(target = "apiFullPath", source = "apiFullPath")
|
||||||
StandardMessageInfo toStandardMessageInfo(ApiInterfaceUI vo);
|
StandardMessageInfo toStandardMessageInfo(ApiInterfaceUI vo);
|
||||||
|
|
||||||
@AfterMapping
|
@AfterMapping
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ public class ApiInterfaceUI {
|
|||||||
private List<String> headerValues;
|
private List<String> headerValues;
|
||||||
private List<StdMessageItemUI> standardMessageItems;
|
private List<StdMessageItemUI> standardMessageItems;
|
||||||
private List<StdMessageItemUI> inboundResponseStandardMessageItems ;
|
private List<StdMessageItemUI> inboundResponseStandardMessageItems ;
|
||||||
|
|
||||||
|
private String apiFullPath;
|
||||||
|
|
||||||
//ASYNC-SYNC 용
|
//ASYNC-SYNC 용
|
||||||
private String inboundResponseHttpMethod;
|
private String inboundResponseHttpMethod;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<configuration scan="true" scanPeriod="10 seconds">
|
<configuration scan="true" scanPeriod="10 seconds">
|
||||||
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
|
<!-- <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />-->
|
||||||
|
|
||||||
<property name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] \\(%F:%L\\) %-20M -%msg%n" />
|
<property name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] \\(%F:%L\\) %-20M -%msg%n" />
|
||||||
<property name="PREFIX" value="${inst.Type:-ems}" />
|
<property name="PREFIX" value="${inst.Type:-ems}" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<configuration scan="true" scanPeriod="10 seconds">
|
<configuration scan="true" scanPeriod="10 seconds">
|
||||||
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
|
<!-- <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />-->
|
||||||
|
|
||||||
<property name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] \\(%F:%L\\) %-20M -%msg%n" />
|
<property name="LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] \\(%F:%L\\) %-20M -%msg%n" />
|
||||||
<property name="PREFIX" value="${inst.Type:-ems}" />
|
<property name="PREFIX" value="${inst.Type:-ems}" />
|
||||||
|
|||||||
Reference in New Issue
Block a user