Merge branch 'jenkins_with_weblogic' of http://192.168.240.178:18080/eapim/eapim-admin.git into jenkins_with_weblogic
This commit is contained in:
@@ -617,8 +617,9 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=localeMessage.getString("tracking.eaisvcserno_tmp")%></th>
|
<th>API 명</th>
|
||||||
<td><input type="text" name="searchEaiSvcSerno" value="${param.searchEaiSvcSerno}"></td>
|
<td><input type="text" name="searchEaiSvcDesc" value="${param.searchEaiSvcDesc}"></td>
|
||||||
|
|
||||||
<th><%=localeMessage.getString("tracking.logprcssserno")%></th>
|
<th><%=localeMessage.getString("tracking.logprcssserno")%></th>
|
||||||
<td>
|
<td>
|
||||||
<div >
|
<div >
|
||||||
@@ -657,8 +658,11 @@
|
|||||||
</td> -->
|
</td> -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th><%=localeMessage.getString("tracking.eaisvcserno_tmp")%></th>
|
||||||
|
<td colspan="3"><input type="text" name="searchEaiSvcSerno" value="${param.searchEaiSvcSerno}"></td>
|
||||||
|
|
||||||
<th><%=localeMessage.getString("tracking.keymgtmsgctnt")%></th>
|
<th><%=localeMessage.getString("tracking.keymgtmsgctnt")%></th>
|
||||||
<td colspan="5"><input type="text" name="searchKeyMgtMsgCtnt" value="${param.searchKeyMgtMsgCtnt}"></td>
|
<td colspan="2"><input type="text" name="searchKeyMgtMsgCtnt" value="${param.searchKeyMgtMsgCtnt}"></td>
|
||||||
|
|
||||||
<%-- <th><%=localeMessage.getString("tracking.orgGUID")%></th>
|
<%-- <th><%=localeMessage.getString("tracking.orgGUID")%></th>
|
||||||
<td colspan="4"><input type="text" name="searchGuid" value="" maxlength="<%=DbTrackingService.GUID_LENGTH%>"></td> --%>
|
<td colspan="4"><input type="text" name="searchGuid" value="" maxlength="<%=DbTrackingService.GUID_LENGTH%>"></td> --%>
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
var eaiSvcSerno = urlParams.get("eaiSvcSerno");
|
var eaiSvcSerno = urlParams.get("eaiSvcSerno");
|
||||||
var logPrcssSerno = urlParams.get("logPrcssSerno");
|
var logPrcssSerno = urlParams.get("logPrcssSerno");
|
||||||
let fullMessageData;
|
let fullMessageData;
|
||||||
|
let layoutInfo = [];
|
||||||
|
let bzwkdatatntInfo;
|
||||||
|
|
||||||
var eaiSvcCode = "";
|
var eaiSvcCode = "";
|
||||||
|
|
||||||
@@ -198,6 +200,8 @@
|
|||||||
const isInboundWithoutNet = !json.GSTATSYSADPTRBZWKGROUPNAME.includes('NET');
|
const isInboundWithoutNet = !json.GSTATSYSADPTRBZWKGROUPNAME.includes('NET');
|
||||||
const isOutboundWithoutNet = !json.PSVSYSADPTRBZWKGROUPNAME.includes('NET');
|
const isOutboundWithoutNet = !json.PSVSYSADPTRBZWKGROUPNAME.includes('NET');
|
||||||
fullMessageData = json.FULLMESSAGEDATA;
|
fullMessageData = json.FULLMESSAGEDATA;
|
||||||
|
layoutInfo = json.standardHeader;
|
||||||
|
bzwkdatatntInfo = json.BZWKDATATNT;
|
||||||
|
|
||||||
if((isInboundPart && isInboundWithoutNet) || (isOutboundPart && isOutboundWithoutNet)){
|
if((isInboundPart && isInboundWithoutNet) || (isOutboundPart && isOutboundWithoutNet)){
|
||||||
selectHttpLog(url, prcsDate, json.EAISVCSERNO.trim(), logPrcssSerno);
|
selectHttpLog(url, prcsDate, json.EAISVCSERNO.trim(), logPrcssSerno);
|
||||||
@@ -353,6 +357,10 @@
|
|||||||
|
|
||||||
$('#btn_pretty_body').click(function(){
|
$('#btn_pretty_body').click(function(){
|
||||||
const syntax = $('#selectBodySyntax').val();
|
const syntax = $('#selectBodySyntax').val();
|
||||||
|
|
||||||
|
// FLAT view를 위해 생성된 데이터 -> 기존 업무데이터
|
||||||
|
bodyCodeEditor.setValue(bzwkdatatntInfo);
|
||||||
|
|
||||||
const value = bodyCodeEditor.getValue();
|
const value = bodyCodeEditor.getValue();
|
||||||
let prettyValue = value;
|
let prettyValue = value;
|
||||||
if(syntax === 'JSN'){
|
if(syntax === 'JSN'){
|
||||||
@@ -392,6 +400,7 @@
|
|||||||
$('#btn_pretty_body').css('display', 'block');
|
$('#btn_pretty_body').css('display', 'block');
|
||||||
bodyCodeEditor.setOption("mode", "application/json");
|
bodyCodeEditor.setOption("mode", "application/json");
|
||||||
}else if(syntax === 'XML'){
|
}else if(syntax === 'XML'){
|
||||||
|
$('#btn_pretty_body').css('display', 'block');
|
||||||
$('#btn_pretty_body').css('display', 'block');
|
$('#btn_pretty_body').css('display', 'block');
|
||||||
bodyCodeEditor.setOption("mode", "application/xml");
|
bodyCodeEditor.setOption("mode", "application/xml");
|
||||||
}else{
|
}else{
|
||||||
@@ -789,6 +798,78 @@ $(document).ready(function() {
|
|||||||
alert('전체 전문 복사되었습니다.')
|
alert('전체 전문 복사되었습니다.')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FLAT 데이터를 전문정보로 잘라서 JSON / XML VIEW 로 볼 수 있는 버튼
|
||||||
|
$('#btn_convert_view').click(function() {
|
||||||
|
var type = $('select[id=selectBodySyntax]').val();
|
||||||
|
|
||||||
|
if (!fullMessageData || !layoutInfo) {
|
||||||
|
alert("데이터가 없습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
parserCommon(fullMessageData, layoutInfo, type);
|
||||||
|
});
|
||||||
|
|
||||||
|
function parserCommon(flatData, layoutInfo, type) {
|
||||||
|
var cursor = 0;
|
||||||
|
var parsedList = [];
|
||||||
|
|
||||||
|
layoutInfo.forEach(function(field) {
|
||||||
|
var fieldLen = field.length;
|
||||||
|
|
||||||
|
if (fieldLen > 0) {
|
||||||
|
var rawValue = flatData.substring(cursor, cursor + fieldLen);
|
||||||
|
|
||||||
|
parsedList.push({
|
||||||
|
engName: field.name,
|
||||||
|
korName: field.desc || field.name,
|
||||||
|
value: rawValue // trim 금지.
|
||||||
|
});
|
||||||
|
|
||||||
|
cursor += fieldLen;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// CodeMirror 에디터에 값 세팅
|
||||||
|
var finalString = "";
|
||||||
|
|
||||||
|
if (type == "JSN") {
|
||||||
|
|
||||||
|
var jsonResult = {};
|
||||||
|
|
||||||
|
parsedList.forEach(function(item) {
|
||||||
|
jsonResult[item.engName] = {
|
||||||
|
"한글명": item.korName,
|
||||||
|
"값": item.value
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
finalString = JSON.stringify(jsonResult, null, 4);
|
||||||
|
|
||||||
|
} else if (type == "XML") {
|
||||||
|
|
||||||
|
var xmlResult = "<Root>\n";
|
||||||
|
|
||||||
|
parsedList.forEach(function(item) {
|
||||||
|
var cleanTagName = item.korName.replace(/[^a-zA-Z0-9가-힣]/g, "");
|
||||||
|
if (!cleanTagName) cleanTagName = item.engName;
|
||||||
|
|
||||||
|
xmlResult += "\t<" + cleanTagName + ">" + item.value + "</" + cleanTagName + ">\n";
|
||||||
|
});
|
||||||
|
xmlResult += "</Root>";
|
||||||
|
|
||||||
|
finalString = xmlResult;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
finalString = flatData;
|
||||||
|
}
|
||||||
|
|
||||||
|
bodyCodeEditor.setValue(finalString);
|
||||||
|
$('#selectBodySyntax').val(type).trigger('change');
|
||||||
|
|
||||||
|
// console.log("변환 완료:", parsedList);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -905,6 +986,9 @@ html,hbody {
|
|||||||
<td>
|
<td>
|
||||||
<button type="button" class="cssbtn" id="btn_pretty_body" ><i class="material-icons">format_align_left</i> <%= localeMessage.getString("trackingDetail.btnMakePretty") %></button>
|
<button type="button" class="cssbtn" id="btn_pretty_body" ><i class="material-icons">format_align_left</i> <%= localeMessage.getString("trackingDetail.btnMakePretty") %></button>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="cssbtn" id="btn_convert_view" ><i class="material-icons">format_align_left</i>FLAT_View</button>
|
||||||
|
</td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<span style="text-align: center;">
|
<span style="text-align: center;">
|
||||||
<select id="selectBodySyntax" style="width:100px;">
|
<select id="selectBodySyntax" style="width:100px;">
|
||||||
|
|||||||
+47
-21
@@ -8,12 +8,6 @@ import java.util.stream.Collectors;
|
|||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.PageImpl;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import com.eactive.eai.data.entity.onl.logger.EAILog;
|
import com.eactive.eai.data.entity.onl.logger.EAILog;
|
||||||
import com.eactive.eai.data.entity.onl.logger.EAILogId;
|
import com.eactive.eai.data.entity.onl.logger.EAILogId;
|
||||||
import com.eactive.eai.data.entity.onl.logger.QEAILog;
|
import com.eactive.eai.data.entity.onl.logger.QEAILog;
|
||||||
@@ -26,6 +20,12 @@ import com.querydsl.core.types.dsl.EntityPathBase;
|
|||||||
import com.querydsl.jpa.impl.JPAQuery;
|
import com.querydsl.jpa.impl.JPAQuery;
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageImpl;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class EAILogRepositoryImpl implements EAILogRepository {
|
public class EAILogRepositoryImpl implements EAILogRepository {
|
||||||
|
|
||||||
@@ -43,26 +43,43 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
|||||||
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
||||||
|
|
||||||
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||||
|
|
||||||
|
// Count Query
|
||||||
|
JPAQuery<?> countQuery = new JPAQueryFactory(em)
|
||||||
|
.from(entityPathBase)
|
||||||
|
.leftJoin(qeaiMessageEntity)
|
||||||
|
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||||
|
|
||||||
|
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, qeaiMessageEntity, countQuery);
|
||||||
|
|
||||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
long totalCount = countQuery.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
|
||||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
|
||||||
|
|
||||||
long totalCount = query.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
|
|
||||||
|
|
||||||
if (totalCount == 0) {
|
if (totalCount == 0) {
|
||||||
return new PageImpl<>(new ArrayList<>(), pageable, 0);
|
return new PageImpl<>(new ArrayList<>(), pageable, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List Query 분리
|
||||||
|
JPAQuery<?> listQuery = new JPAQueryFactory(em)
|
||||||
|
.from(entityPathBase)
|
||||||
|
.leftJoin(qeaiMessageEntity)
|
||||||
|
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||||
|
|
||||||
List<EAILogDto> list = query
|
List<EAILogDto> list = listQuery
|
||||||
// .select(Projections.constructor(EAILogDto.class, qeaiLog, qeaiMessageEntity.eaisvcdesc))
|
// .select(Projections.constructor(EAILogDto.class, qeaiLog, qeaiMessageEntity.eaisvcdesc))
|
||||||
.select(Projections.constructor(EAILogDto.class,
|
.select(Projections.constructor(EAILogDto.class,
|
||||||
qeaiLog.id, qeaiLog.trackasiskey1ctnt, qeaiLog.trackasiskey2ctnt, qeaiLog.keymgtmsgctnt,
|
qeaiLog.id,
|
||||||
qeaiLog.eaisvcname, qeaiLog.extbizcd, qeaiLog.refkey, qeaiLog.clientname,
|
qeaiLog.trackasiskey1ctnt,
|
||||||
qeaiLog.orgname, qeaiLog.msgprcssyms, qeaiLog.companycode, qeaiLog.eaierrctnt,
|
qeaiLog.trackasiskey2ctnt,
|
||||||
|
qeaiLog.keymgtmsgctnt,
|
||||||
|
qeaiLog.eaisvcname,
|
||||||
|
qeaiLog.extbizcd,
|
||||||
|
qeaiLog.refkey,
|
||||||
|
qeaiLog.clientname,
|
||||||
|
qeaiLog.orgname,
|
||||||
|
qeaiLog.msgprcssyms,
|
||||||
|
qeaiLog.companycode,
|
||||||
|
qeaiLog.eaierrctnt,
|
||||||
qeaiMessageEntity.eaisvcdesc))
|
qeaiMessageEntity.eaisvcdesc))
|
||||||
.from(entityPathBase)
|
|
||||||
.leftJoin(qeaiMessageEntity)
|
|
||||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname))
|
|
||||||
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
|
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
|
||||||
.limit(1000)
|
.limit(1000)
|
||||||
.fetch();
|
.fetch();
|
||||||
@@ -73,9 +90,15 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
|||||||
public Map<String, Long> countDetailedTransactions(Class<? extends EAILog> clazz, EAILogSearch eaiLogSearch) {
|
public Map<String, Long> countDetailedTransactions(Class<? extends EAILog> clazz, EAILogSearch eaiLogSearch) {
|
||||||
QEAILog qeaiLog = QEAILog.eAILog;
|
QEAILog qeaiLog = QEAILog.eAILog;
|
||||||
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
||||||
|
|
||||||
|
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||||
|
|
||||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
JPAQuery<?> query = new JPAQueryFactory(em)
|
||||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
.from(entityPathBase)
|
||||||
|
.leftJoin(qeaiMessageEntity)
|
||||||
|
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eAIMessageEntity.eaisvcname));
|
||||||
|
|
||||||
|
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, qeaiMessageEntity, query);
|
||||||
|
|
||||||
List<Tuple> results = query.select(
|
List<Tuple> results = query.select(
|
||||||
qeaiLog.id.logprcssserno, // 로그 처리 상태
|
qeaiLog.id.logprcssserno, // 로그 처리 상태
|
||||||
@@ -91,8 +114,7 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
|||||||
return reult;
|
return reult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query) {
|
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, QEAIMessageEntity qeaiMessageEntity, JPAQuery<?> query) {
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(eaiLogSearch.getAuthChk(), "Y")) {
|
if (StringUtils.equalsIgnoreCase(eaiLogSearch.getAuthChk(), "Y")) {
|
||||||
QUserBusiness qUserBusiness = QUserBusiness.userBusiness;
|
QUserBusiness qUserBusiness = QUserBusiness.userBusiness;
|
||||||
JPAQuery<String> subQuery = new JPAQueryFactory(em)
|
JPAQuery<String> subQuery = new JPAQueryFactory(em)
|
||||||
@@ -127,6 +149,10 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
|||||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcName())) {
|
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcName())) {
|
||||||
query.where(qeaiLog.eaisvcname.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcName()));
|
query.where(qeaiLog.eaisvcname.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcDesc())) {
|
||||||
|
query.where(qeaiMessageEntity.eaisvcdesc.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcDesc()));
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchKeyMgtMsgCtnt())) {
|
if (StringUtils.isNotBlank(eaiLogSearch.getSearchKeyMgtMsgCtnt())) {
|
||||||
query.where(qeaiLog.keymgtmsgctnt.contains(eaiLogSearch.getSearchKeyMgtMsgCtnt()));
|
query.where(qeaiLog.keymgtmsgctnt.contains(eaiLogSearch.getSearchKeyMgtMsgCtnt()));
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class EAILogSearch {
|
|||||||
private String searchEaiBzwkDstcd;
|
private String searchEaiBzwkDstcd;
|
||||||
private String searchEaiSvcSerno;
|
private String searchEaiSvcSerno;
|
||||||
private String searchEaiSvcName;
|
private String searchEaiSvcName;
|
||||||
|
private String searchEaiSvcDesc;
|
||||||
private String searchKeyMgtMsgCtnt;
|
private String searchKeyMgtMsgCtnt;
|
||||||
private String searchTrackAsisKey1Ctnt;
|
private String searchTrackAsisKey1Ctnt;
|
||||||
private String searchTrackAsisKey2Ctnt;
|
private String searchTrackAsisKey2Ctnt;
|
||||||
|
|||||||
Reference in New Issue
Block a user