From f1f7576b9df1548f70d760e0fb65b562b3b19d05 Mon Sep 17 00:00:00 2001 From: eastargh Date: Mon, 20 Jul 2026 11:46:07 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4=EC=8A=A4?= =?UTF-8?q?=20=EB=AA=A9=EB=A1=9D=EC=97=90=20=EC=83=81=ED=83=9C=EC=B9=BC?= =?UTF-8?q?=EB=9F=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apim/template/messageTemplateManPopup.jsp | 3 +++ .../onl/transaction/apim/apiInterfaceMan.jsp | 19 +++++++++++++++---- .../entity/onl/eaimsg/EAIMessageService.java | 19 +++++++++++++------ .../djb/apistatus/ApiStatusRepository.java | 11 ++++++++--- .../transaction/apim/ApiInterfaceService.java | 7 +++++-- .../transaction/apim/ui/ApiInterfaceUI.java | 1 + 6 files changed, 45 insertions(+), 15 deletions(-) diff --git a/WebContent/jsp/onl/apim/template/messageTemplateManPopup.jsp b/WebContent/jsp/onl/apim/template/messageTemplateManPopup.jsp index 00011c4..2c01443 100644 --- a/WebContent/jsp/onl/apim/template/messageTemplateManPopup.jsp +++ b/WebContent/jsp/onl/apim/template/messageTemplateManPopup.jsp @@ -172,6 +172,9 @@ $(document).ready(function() {
+ + + diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceMan.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceMan.jsp index 892471f..dc0c14b 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceMan.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceMan.jsp @@ -76,6 +76,15 @@ return cellvalue.substring(1, 4); } + function apiStatusFormatter(cellvalue, options, rowObject) { + switch (cellvalue) { + case 'E': return '장애'; + case 'D': return '지연'; + case 'C': return '점검'; + default: return '정상'; + } + } + function list() { detail() var gridPostData = getSearchForJqgrid("cmd", "LIST"); //jqgrid에서는 object 로 @@ -90,6 +99,7 @@ 'API FULL PATH', '요청', '응답', + '상태', '작성자', '가상응답여부', '변경일시(*)', @@ -99,11 +109,12 @@ {name: 'eaiSvcName', align: 'left', width: '100', sortable: true}, {name: 'eaiSvcDesc', align: 'left', sortable: false}, {name: 'apiFullPath', align: 'left', sortable: false}, - {name: 'fromAdapter', align: 'center', width: '40', formatter: adapterNameShortFormatter, sortable: false}, - {name: 'toAdapter', align: 'center', width: '40', formatter: adapterNameShortFormatter, sortable: false}, - {name: 'author', align: 'center', width: '60', sortable: false}, + {name: 'fromAdapter', align: 'center', width: '30', formatter: adapterNameShortFormatter, sortable: false}, + {name: 'toAdapter', align: 'center', width: '30', formatter: adapterNameShortFormatter, sortable: false}, + {name: 'statusCode', align: 'center', width: '30', formatter: apiStatusFormatter, sortable: false}, + {name: 'author', align: 'center', width: '40', sortable: false}, {name : 'simYn', align : 'center' , width:'40', hidden: true }, - {name : 'lastModifiedDate', align : 'center' , width:'40', sortable: true}, + {name : 'lastModifiedDate', align : 'center' , width:'60', sortable: true}, {name: 'syncAsyncType', align: 'center', width: '40', hidden: true}, ], jsonReader: { diff --git a/src/main/java/com/eactive/eai/rms/data/entity/onl/eaimsg/EAIMessageService.java b/src/main/java/com/eactive/eai/rms/data/entity/onl/eaimsg/EAIMessageService.java index 2aeb0e3..f6c1c45 100644 --- a/src/main/java/com/eactive/eai/rms/data/entity/onl/eaimsg/EAIMessageService.java +++ b/src/main/java/com/eactive/eai/rms/data/entity/onl/eaimsg/EAIMessageService.java @@ -22,6 +22,7 @@ import com.eactive.eai.data.entity.onl.message.QServiceMessageEntity; import com.eactive.eai.data.entity.onl.routing.QRouting; import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo; import com.eactive.eai.data.jpa.AbstractDataService; +import com.eactive.eai.rms.data.entity.onl.djb.apistatus.QApiStatus; import com.eactive.eai.rms.data.entity.onl.authserver.QScopeInfo; import com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusinessService; import com.querydsl.core.BooleanBuilder; @@ -45,26 +46,28 @@ public class EAIMessageService extends AbstractDataService jpaQuery = createBaseQuery(eaiMessageUISearch); long totalCount = jpaQuery.select(QEAIMessageEntity.eAIMessageEntity.count()).fetchOne(); - + // 정렬 조건 설정 OrderSpecifier orderSpecifier = getOrderSpecifier(qeaiMessageEntity, sortname, sortorder); - + List eaiMessages = jpaQuery .select(qeaiMessageEntity , qServiceMessageEntity.psvintfacdsticname , qServiceMessageEntity.psvsysadptrbzwkgroupname , qRouting.nonmotivrouturiname , qStdInfo.apifullpath - , qStdInfo.bzwksvckeyname - + , qStdInfo.bzwksvckeyname + , qApiStatus.statusCode + ) .limit(pageable.getPageSize()) - .offset(pageable.getOffset()) - .orderBy(orderSpecifier) + .offset(pageable.getOffset()) + .orderBy(orderSpecifier) .fetch(); return new PageImpl<>(eaiMessages, pageable, totalCount); @@ -105,6 +108,7 @@ public class EAIMessageService extends AbstractDataService { + " FROM (" + " SELECT EAISVCNAME" + " , STATUS_CODE AS PREV_STATUS_CODE " - + " , CASE WHEN STATUS_CODE != 'C' AND CTRL_YN = 'Y' THEN 'CONTROL_START'" + + " , CASE WHEN COUNT = 0 THEN 'STAY' " + + " WHEN STATUS_CODE != 'C' AND CTRL_YN = 'Y' THEN 'CONTROL_START'" + " WHEN STATUS_CODE = 'C' AND CTRL_YN = 'N' THEN 'CONTROL_END'" + " WHEN STATUS_CODE IN ('N','D') AND ERR_YN = 'Y' THEN 'ERROR_START'" + " WHEN STATUS_CODE = 'E' AND ERR_YN = 'N' THEN 'ERROR_END'" @@ -39,6 +40,10 @@ public interface ApiStatusRepository extends BaseRepository { + " FROM (" + " SELECT A.EAISVCNAME" + " , NVL(B.STATUS_CODE, 'N') AS STATUS_CODE" + + " , (SELECT COUNT(API_NAME) FROM API_STATS_MINUTE WHERE A.EAISVCNAME = API_NAME" + + " AND TO_CHAR(STAT_TIME,'YYYYMMDDHH24MI')" + + " BETWEEN TO_CHAR(SYSDATE - NUMTODSINTERVAL(30,'MINUTE'),'YYYYMMDDHH24MI')" + + " AND TO_CHAR(SYSDATE,'YYYYMMDDHH24MI')) AS COUNT " + " , NVL(( SELECT MAX('Y') FROM EMSAPP.DJB_APISTATUS_INCIDENT_API X" + " WHERE EXISTS (SELECT 1 FROM EMSAPP.DJB_APISTATUS_INCIDENT Y WHERE X.INCIDENT_ID = Y.INCIDENT_ID " + " AND SYSTIMESTAMP BETWEEN STARTED_AT AND END_AT) " @@ -46,7 +51,7 @@ public interface ApiStatusRepository extends BaseRepository { + " , (SELECT CASE WHEN TOTAL = 0 THEN 'X'" + " WHEN (TOTAL - SUCCESS) * 100 / TOTAL > :errorRate THEN 'Y'" + " ELSE 'N' END" - + " FROM (SELECT SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) AS TOTAL" + + " FROM (SELECT NVL(SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT),0) AS TOTAL" + " , SUM(SUCCESS_CNT) AS SUCCESS" + " FROM API_STATS_MINUTE" + " WHERE A.EAISVCNAME = API_NAME" @@ -56,7 +61,7 @@ public interface ApiStatusRepository extends BaseRepository { + " , (SELECT CASE WHEN TOTAL = 0 THEN 'X'" + " WHEN RESP_SUM / TOTAL > :delayAvgRespTime THEN 'Y'" + " ELSE 'N' END" - + " FROM (SELECT SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) AS TOTAL" + + " FROM (SELECT NVL(SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT),0) AS TOTAL" + " , SUM(SUCCESS_CNT) AS SUCCESS" + " , SUM((SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) * AVG_RESP_TIME) AS RESP_SUM" + " FROM API_STATS_MINUTE" diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java index c6f88a4..c227dda 100644 --- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java +++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java @@ -8,6 +8,7 @@ import com.eactive.eai.data.entity.onl.message.ServiceMessageEntityId; import com.eactive.eai.data.entity.onl.messagekey.MessageKey; import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo; import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo; +import com.eactive.eai.rms.data.entity.onl.djb.apistatus.QApiStatus; import com.eactive.eai.rms.common.base.OnlBaseService; import com.eactive.eai.rms.common.combo.ComboService; import com.eactive.eai.rms.common.combo.ComboVo; @@ -140,6 +141,7 @@ public class ApiInterfaceService extends OnlBaseService { String apiFullPath = tuple.get(QStandardMessageInfo.standardMessageInfo.apifullpath); String bzwksvckeyname = tuple.get(QStandardMessageInfo.standardMessageInfo.bzwksvckeyname); + String statusCode = tuple.get(QApiStatus.apiStatus.statusCode); ApiInterfaceUI apiInterfaceUI; if (eaiMessageEntity.getServiceMessages() != null && eaiMessageEntity.getServiceMessages().size() > 0) { @@ -147,10 +149,11 @@ public class ApiInterfaceService extends OnlBaseService { } else { apiInterfaceUI = apiInterfaceUIMapper.toVo(eaiMessageEntity); } - + apiInterfaceUI.setApiFullPath(apiFullPath); apiInterfaceUI.setBzwksvckeyname(bzwksvckeyname); - + apiInterfaceUI.setStatusCode(statusCode); + return apiInterfaceUI; }); } diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java index 0a1a963..35c023f 100644 --- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java +++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java @@ -53,6 +53,7 @@ public class ApiInterfaceUI { private String apiFullPath; private String bzwksvckeyname; + private String statusCode; //ASYNC-SYNC 용 private String inboundResponseHttpMethod;
<%= localeMessage.getString("messageTemplate.messageCode") %> *