Merge branch 'jenkins_with_weblogic' of ssh://git@192.168.240.178:18081/eapim/eapim-admin.git into jenkins_with_weblogic

This commit is contained in:
daekuk1
2026-01-26 14:06:53 +09:00
7 changed files with 168 additions and 37 deletions
@@ -306,6 +306,45 @@ var lastsel2;
buttonControl(key);
titleControl(key);
// 검색 기능
$("#btn_search").click(function() {
filterGrid();
});
// 엔터키로 검색
$("#searchText").keypress(function(e) {
if (e.which == 13) {
filterGrid();
return false;
}
});
// 초기화 버튼
$("#btn_reset").click(function() {
$("#searchText").val("");
filterGrid();
});
function filterGrid() {
var searchText = $("#searchText").val().toLowerCase();
var grid = $("#grid");
// 모든 행을 순회하며 필터링
var ids = grid.jqGrid('getDataIDs');
for (var i = 0; i < ids.length; i++) {
var rowData = grid.jqGrid('getRowData', ids[i]);
var prptyName = (rowData.PRPTYNAME || "").toLowerCase();
var prptyVal = (rowData.PRPTY2VAL || "").toLowerCase();
// 검색어가 비어있거나, 프로퍼티 키 또는 값에 포함되어 있으면 표시
if (searchText === "" || prptyName.indexOf(searchText) >= 0 || prptyVal.indexOf(searchText) >= 0) {
$("#" + ids[i]).show();
} else {
$("#" + ids[i]).hide();
}
}
}
});
</script>
</head>
@@ -359,10 +398,36 @@ var lastsel2;
</td>
</tr>
</table>
<!-- 검색 박스 추가 -->
<div class="search-box">
<input type="text" id="searchText" placeholder="<%= localeMessage.getString("propertyDetail.propertyKey") %> 또는 <%= localeMessage.getString("propertyDetail.propertyValue") %> 검색" />
<button type="button" class="cssbtn smallBtn2" id="btn_search"><i class="material-icons">search</i> 검색</button>
<button type="button" class="cssbtn smallBtn2" id="btn_reset"><i class="material-icons">refresh</i> 초기화</button>
</div>
<!-- grid -->
<table id="grid"></table>
</div><!-- end content_middle -->
</div><!-- end right_box -->
<style>
.search-box {
margin: 10px 0;
padding: 10px;
background-color: #f5f5f5;
border-radius: 4px;
}
.search-box input[type="text"] {
width: 300px;
padding: 5px 10px;
border: 1px solid #ddd;
border-radius: 3px;
}
.search-box button {
margin-left: 5px;
}
</style>
</body>
</html>
@@ -513,7 +513,36 @@ function gridRendering(){
colModel:[
{ name : 'PRPTYGROUPNAME' , align:'left' , hidden: true },
{ name : 'PRPTYNAME' , width: 70 , align:'left' },
{ name : 'PRPTY2VAL' , width: 70 , align:'left' , title:false, editable: true, formatter:mltplFormatter, unformatter:mltplUnFormatter},
{
name : 'PRPTY2VAL',
width: 70,
align:'left',
title:false,
editable: true,
formatter:mltplFormatter,
unformatter:mltplUnFormatter,
editoptions: {
dataEvents: [
{
type: 'keydown',
fn: function(e) {
if (e.which === 13) {
var val = $(this).val();
$(this).val($.trim(val));
}
}
},
{
type: 'blur',
fn: function(e) {
var val = $(this).val();
$(this).val($.trim(val));
}
}
]
}
// [여기까지 추가]
},
{ name : 'PRPTYDESC' , width: 300 , align:'left'},
{ name : 'DMNKND' , hidden:true},
{ name : 'DOMAINTYPE' , hidden:true, formatter:nullFormatter}
@@ -942,6 +971,7 @@ $(document).ready(function() {
buttonControl(isDetail);
titleControl(isDetail);
});
// clientManPopup.jsp에서 호출될 함수 (전역 스코프에 정의)
@@ -303,6 +303,12 @@
return cellvalue;
}
function trimFormatter(cellvalue, options, rowObject) {
return cellvalue ? String(cellvalue).trim() : '';
}
$(document).ready(function () {
console.log(roleString);
@@ -373,7 +379,7 @@
{name: 'TRACKASISKEY1CTNT', hidden: true},
{name: 'TRACKASISKEY2CTNT', hidden: true},
{name: 'EAISVCSERNO_TMP', align: 'left', width: '220'},
{name: 'EAISVCSERNO_TMP', align: 'left', width: '220', formatter: trimFormatter},
{name: 'KEYMGTMSGCTNT', align: 'left', width: '240'},
{name: 'LOGPRCSSSERNO_TMP', align: 'center', width: '40'},
{name: 'TELGMRECVTRANCD', align: 'left', width: '135', hidden: true},
@@ -216,7 +216,7 @@
$(tag+"[name="+name+"]").val(data[name.toUpperCase()]);
//업체코드.업체명
if(name=="companyName"){
if(name=="eaiSvcSerno"){
if(data["COMPANYCODE"] !=null && data["COMPANYCODE"].trim() != ''){
$("input[name=companyName]").val("["+data["COMPANYCODE"]+"] "+data[name.toUpperCase()]);
}
@@ -233,6 +233,13 @@
}
});
// 거래고유번호 trim
var $svcSernoInput = $("input[name=eaiSvcSerno]");
if($svcSernoInput.val()) {
$svcSernoInput.val( $svcSernoInput.val().trim() );
}
$("input[name=gstatSysAdptrBzwkGroupName],input[name=psvSysAdptrBzwkGroupName]").each(function(){
var name = $(this).attr("name");
if ("${rmsMenuAuth}" =="W"){ //2020.07.08 admin 만 버튼보이게 수정
+7 -4
View File
@@ -18,9 +18,12 @@ GET {{emsUrl}}/api/apis/000002-02/KJB
### 트랜잭션 로그 조회
GET {{emsUrl}}/api/transaction/log
POST {{emsUrl}}/api/transaction/log
Content-Type: application/json; application/json; charset=UTF-8
{
"apiServiceNumber": "asdasd",
"txDate": "asdasdasd"
}
###
GET {{emsUrl}}/transaction/log
@@ -44,8 +44,12 @@ public class EAILogRepositoryImpl implements EAILogRepository {
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
JPAQuery<?> query = new JPAQueryFactory(em)
.from(entityPathBase)
.leftJoin(qeaiMessageEntity)
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query, qeaiMessageEntity);
long totalCount = query.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
@@ -60,9 +64,8 @@ public class EAILogRepositoryImpl implements EAILogRepository {
qeaiLog.eaisvcname, qeaiLog.extbizcd, qeaiLog.refkey, qeaiLog.clientname,
qeaiLog.orgname, qeaiLog.msgprcssyms, qeaiLog.companycode, qeaiLog.eaierrctnt,
qeaiMessageEntity.eaisvcdesc))
.from(entityPathBase)
.leftJoin(qeaiMessageEntity)
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname))
// .from(...) --> 이미 위에서 선언했으므로 생략
// .leftJoin(...) --> 이미 위에서 선언했으므로 생략
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
.limit(1000)
.fetch();
@@ -74,8 +77,14 @@ public class EAILogRepositoryImpl implements EAILogRepository {
QEAILog qeaiLog = QEAILog.eAILog;
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
JPAQuery<?> query = new JPAQueryFactory(em)
.from(entityPathBase)
.leftJoin(qeaiMessageEntity)
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query, qeaiMessageEntity);
List<Tuple> results = query.select(
qeaiLog.id.logprcssserno, // 로그 처리 상태
@@ -91,7 +100,7 @@ public class EAILogRepositoryImpl implements EAILogRepository {
return reult;
}
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query) {
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query, QEAIMessageEntity qeaiMessageEntity) {
if (StringUtils.equalsIgnoreCase(eaiLogSearch.getAuthChk(), "Y")) {
QUserBusiness qUserBusiness = QUserBusiness.userBusiness;
@@ -128,6 +137,10 @@ public class EAILogRepositoryImpl implements EAILogRepository {
query.where(qeaiLog.eaisvcname.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcName()));
}
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcDesc())) {
query.where(qeaiMessageEntity.eaisvcdesc.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcDesc()));
}
if (StringUtils.isNotBlank(eaiLogSearch.getSearchKeyMgtMsgCtnt())) {
query.where(qeaiLog.keymgtmsgctnt.contains(eaiLogSearch.getSearchKeyMgtMsgCtnt()));
}
@@ -8,13 +8,15 @@ import com.eactive.eai.rms.data.entity.onl.logger.EAILogService;
import com.eactive.eai.rms.onl.apim.common.BaseRestController;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@@ -33,16 +35,16 @@ public class ApiTransactionLogController extends BaseRestController {
// 이중 매핑 문제를 해결하기 위해 (예: /api/transaction/log.do 와 /transaction/log.do) '.do' 확장자를 제거함.
// 이제 이 엔드포인트는 /api/transaction/log 를 통해서만 접근 가능하며, API 컨벤션에 맞춰 단일하고 명확한 접근 지점을 보장함.
@GetMapping("/transaction/log")
// @GetMapping("/transaction/log")
@PostMapping("/transaction/log")
public ResponseEntity<ApiLogUI> getApiLog(String txDate, String apiServiceNumber) {
public ResponseEntity<ApiLogUI> getApiLog(@RequestBody LogRequestBody requestBody) {
DataSourceContextHolder.setDataSourceType(DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW));
// txDate가 없으면 오늘 날짜 설정
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
LocalDate searchDate;
if (StringUtils.hasText(txDate)) {
searchDate = LocalDate.parse(txDate, formatter);
if (StringUtils.hasText(requestBody.getTxDate())) {
searchDate = LocalDate.parse(requestBody.getTxDate(), formatter);
} else {
searchDate = LocalDate.now();
}
@@ -51,7 +53,7 @@ public class ApiTransactionLogController extends BaseRestController {
ApiLogDTO dto = null;
for (int i = 0; i < 10; i++) {
String searchDateStr = searchDate.format(formatter);
dto = eaiLogService.getApiLog(searchDateStr, apiServiceNumber);
dto = eaiLogService.getApiLog(searchDateStr, requestBody.getApiServiceNumber());
// 결과가 있으면 종료
if (dto != null && dto.getLogs() != null && !dto.getLogs().isEmpty()) {
@@ -138,4 +140,9 @@ public class ApiTransactionLogController extends BaseRestController {
return ui;
}
@Data
public static class LogRequestBody {
private String txDate;
private String apiServiceNumber;
}
}