거래로그>시간별 수동집계 기능 추가
This commit is contained in:
@@ -82,6 +82,54 @@
|
||||
</style>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<script language="javascript">
|
||||
function executeAggregationHourly() {
|
||||
var targetDate = $("#targetHour").val().replace(/-/g, "");
|
||||
var resultDiv = $("#hourlyResult");
|
||||
|
||||
// 날짜 입력 검증
|
||||
if (!targetDate || targetDate.trim() === '') {
|
||||
alert('대상 날짜를 입력하세요. (예: 20250120)');
|
||||
$("#targetHour").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
resultDiv.hide();
|
||||
$("#btn_execute_hourly").prop("disabled", true).text("실행중...");
|
||||
|
||||
$.ajax({
|
||||
url: '<c:url value="/onl/kjb/statistics/apiStatsAggregationMan.json"/>',
|
||||
type: 'POST',
|
||||
data: {
|
||||
cmd: 'AGGREGATION_HOUR',
|
||||
targetDate: targetDate,
|
||||
serviceType: '${param.serviceType}'
|
||||
},
|
||||
success: function(response) {
|
||||
resultDiv.removeClass("error").addClass("success");
|
||||
var message = response.message + "\n";
|
||||
message += "대상 날짜: " + response.targetDate + "\n";
|
||||
message += "처리 건수: " + response.processedCount;
|
||||
resultDiv.find("pre").text(message);
|
||||
resultDiv.show();
|
||||
},
|
||||
error: function(xhr) {
|
||||
resultDiv.removeClass("success").addClass("error");
|
||||
var message = "집계 실행 실패\n";
|
||||
try {
|
||||
var error = JSON.parse(xhr.responseText);
|
||||
message += error.message;
|
||||
} catch(e) {
|
||||
message += xhr.responseText || "알 수 없는 오류가 발생했습니다.";
|
||||
}
|
||||
resultDiv.find("pre").text(message);
|
||||
resultDiv.show();
|
||||
},
|
||||
complete: function() {
|
||||
$("#btn_execute_hourly").prop("disabled", false).text("집계 실행");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function executeHourlyToDaily() {
|
||||
var targetDate = $("#targetDate").val().replace(/-/g, "");
|
||||
var resultDiv = $("#dailyResult");
|
||||
@@ -255,6 +303,12 @@
|
||||
$("#targetYear").val(lastYear);
|
||||
|
||||
// 버튼 이벤트
|
||||
$("#btn_execute_hourly").click(function() {
|
||||
if (confirm("시간별 통계 집계를 실행하시겠습니까?")) {
|
||||
executeAggregationHourly();
|
||||
}
|
||||
});
|
||||
|
||||
$("#btn_execute_daily").click(function() {
|
||||
if (confirm("시간별→일별 통계 집계를 실행하시겠습니까?")) {
|
||||
executeHourlyToDaily();
|
||||
@@ -297,9 +351,26 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 거래로그 → 시간별 집계 -->
|
||||
<div class="aggregation-section">
|
||||
<h3>1. 거래로그 → 시간별 통계 집계</h3>
|
||||
<div class="aggregation-form">
|
||||
<label>대상 날짜:</label>
|
||||
<input type="text" id="targetHour" placeholder="yyyyMMdd" maxlength="8">
|
||||
<span style="color: #666; font-size: 12px;">(예: 20250120)</span>
|
||||
<button type="button" class="cssbtn" id="btn_execute_hourly" level="W">
|
||||
<i class="material-icons">play_arrow</i> 집계 실행
|
||||
</button>
|
||||
</div>
|
||||
<div id="hourlyResult" class="result-area">
|
||||
<strong>실행 결과:</strong>
|
||||
<pre></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 시간별 → 일별 집계 -->
|
||||
<div class="aggregation-section">
|
||||
<h3>1. 시간별 → 일별 통계 집계</h3>
|
||||
<h3>2. 시간별 → 일별 통계 집계</h3>
|
||||
<div class="aggregation-form">
|
||||
<label>대상 날짜:</label>
|
||||
<input type="text" id="targetDate" placeholder="yyyyMMdd" maxlength="8">
|
||||
@@ -316,7 +387,7 @@
|
||||
|
||||
<!-- 일별 → 월별 집계 -->
|
||||
<div class="aggregation-section">
|
||||
<h3>2. 일별 → 월별 통계 집계</h3>
|
||||
<h3>3. 일별 → 월별 통계 집계</h3>
|
||||
<div class="aggregation-form">
|
||||
<label>대상 월:</label>
|
||||
<input type="text" id="targetMonth" placeholder="yyyyMM" maxlength="6">
|
||||
@@ -333,7 +404,7 @@
|
||||
|
||||
<!-- 월별 → 연별 집계 -->
|
||||
<div class="aggregation-section">
|
||||
<h3>3. 월별 → 연별 통계 집계</h3>
|
||||
<h3>4. 월별 → 연별 통계 집계</h3>
|
||||
<div class="aggregation-form">
|
||||
<label>대상 연도:</label>
|
||||
<input type="text" id="targetYear" placeholder="yyyy" maxlength="4">
|
||||
|
||||
Reference in New Issue
Block a user