통계 상세목록 조회 추가

main
이범준 1 year ago
parent dc249a3d8e
commit 0e59b60b2a

@ -3,6 +3,7 @@ package cokr.xit.fims.stat.service.bean;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@ -144,8 +145,10 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
throw new RuntimeException("통계 유형 확인 오류");
}
String domainKey = "";
//
if(domain.equals("crdn")) {
domainKey = "CRDN_ID";
CrdnQuery crdnQuery = new CrdnQuery();
crdnQuery.setSggCd(statQuery.getSggCd());
@ -159,6 +162,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
else if(domain.equals("crdnSttsHstry")) {
domainKey = "CRDN_ID";
CrdnSttsHstryQuery crdnSttsHstryQuery = new CrdnSttsHstryQuery();
crdnSttsHstryQuery.setSggCd(statQuery.getSggCd());
@ -174,6 +178,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
else if(domain.equals("sndb")) {
SndbQuery sndbQuery = new SndbQuery();
sndbQuery.setSggCd(statQuery.getSggCd());
sndbQuery.setTaskSeCd(statQuery.getTaskSeCd());
@ -185,6 +190,7 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
else if(domain.equals("excl")) {
LevyExclQuery levyExclQuery = new LevyExclQuery();
levyExclQuery.setSggCd(statQuery.getSggCd());
levyExclQuery.setTaskSeCd(statQuery.getTaskSeCd());
@ -198,9 +204,24 @@ public class StatServiceBean extends AbstractServiceBean implements StatService
}
else if(domain.equals("levy")) {
domainKey = "LEVY_ID";
}
else if(domain.equals("sprt")) {
domainKey = "CRDN_ID";
}
if(!domainKey.equals("")) {
Iterator<DataObject> iterator = queryResult.iterator();
while(iterator.hasNext()) {
DataObject dataObject = iterator.next();
String dataId = dataObject.string(domainKey);
dataObject.set("DATA_ID", dataId);
}
}
//차량구분 지정
if(!ifEmpty(statQuery.getCarGb(), ()->"").equals("")) {
queryResult.removeIf(item -> !(crdnStngBean.getCarGb(item.string("VHRNO")).equals(statQuery.getCarGb())));

@ -8,6 +8,7 @@
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.SGG_CD <!-- 시군구 코드 -->
, (SELECT SGG_NM FROM TB_SGG_INFO WHERE SGG_CD = C.SGG_CD) AS SGG_NM
, C.TASK_SE_CD <!-- 업무 구분 코드 -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->
, C.CRDN_INPT_SE_CD <!-- 단속 입력 구분 코드 -->
@ -18,10 +19,12 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_TM <!-- 단속 시각 -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 -->
, C.VHRNO <!-- 차량번호 -->
, L.RPM_SZR_VHRNO <!-- 대체차량번호 -->
, C.CRDN_STDG_NM <!-- 단속 법정동 명 -->
, C.CRDN_ROAD_NM <!-- 단속 도로 명 -->
, C.CRDN_PLC <!-- 단속 장소 -->
, C.VLTN_ID <!-- 위반 ID -->
, (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) AS VLTN_ARTCL
, C.GPS_X <!-- GPS X -->
, C.GPS_Y <!-- GPS Y -->
, C.ATCH_FILE_CNT <!-- 첨부 파일 수 -->
@ -36,7 +39,9 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.ADVNTCE_AMT <!-- 사전통지 금액 -->
, C.OPNN_SBMSN_YN <!-- 의견 제출 여부 -->
, L.LEVY_ID <!-- 부과 ID -->
, (CONCAT(L.FYR, '-', L.LEVY_NO)) AS GOJI_NO <!-- 고지 번호 -->
, C.CRDN_STTS_CD <!-- 단속 상태 코드 -->
, (SELECT GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM
, C.CRDN_STTS_CHG_DT <!-- 단속 상태 변경 일시 -->
, C.ADTN_AMT <!-- 가산 금액 -->
, C.MINUS_AMT <!-- 감경 금액 -->
@ -45,7 +50,9 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, CA.CRDN_SE_CD <!-- 단속 구분 코드 -->
, CA.DTL_CRDN_PLC <!-- 상세 단속 장소 -->
, CA.TEAM_ID <!-- 조 ID -->
, TI.TEAM_NM <!-- 조 명 -->
, CA.CRDN_SPAREA_CD <!-- 단속 특별구역 코드 -->
, (SELECT GET_CODE_NM('FIM007', CA.CRDN_SPAREA_CD) FROM DUAL) AS CRDN_SPAREA_NM
, CA.CRDN_BGNG_TM <!-- 단속 시작 시각 -->
, CA.CRDN_END_TM <!-- 단속 종료 시간 -->
, CA.CRDN_SN <!-- 단속 일련번호 -->
@ -77,6 +84,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, LE.LEVY_EXCL_RSN_CD <!-- 부과 제외 사유 코드 -->
, LE.LEVY_EXCL_YMD <!-- 부과 제외 일자 -->
, LE.ETC_CN AS LEVY_EXCL_ETC_CN <!-- 부과 제외 기타 내용 -->
, P.RTPYR_NM <!-- 납부자명 -->
, C.DEL_YN
, C.RGTR
, C.REG_DT
@ -85,11 +93,12 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.DLTR
, C.DEL_DT
FROM TB_CRDN C
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N')
LEFT OUTER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID)
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N')
LEFT OUTER JOIN TB_LEVY L ON (C.CRDN_ID = L.CRDN_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
WHERE C.DEL_YN = 'N'
AND C.SGG_CD = #{sggCd}
<if test="crdnId != null">AND C.CRDN_ID = #{crdnId}</if>

@ -5,7 +5,7 @@
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div id="statWrapper--${pageName}" class="card wrapper-list">
<span class="mb-1">
<!-- 상단 버튼 -->
<div class="container-page-btn">
@ -119,11 +119,11 @@
</form>
</span>
<span>
<span id="masterArea--${pageName}">
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive"
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
style="overflow-x: scroll;height:350px;overflow-y: scroll;">
<table id="masterTable--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
@ -139,11 +139,11 @@
</span>
<span id="detailArea--${pageName}" hidden>
<h2 class="mt-4">상세조회</h2>
<h2 class="mt-4">상세목록</h2>
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive"
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
style="overflow-x: scroll;height:350px;overflow-y: scroll;">
<table id="detailTable--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
@ -167,7 +167,9 @@
</div>
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
$(document).ready(function(){
@ -175,6 +177,51 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.statQuery = {};
$P.refListMap = {};
/**************************************************************************
* datasetControl
**************************************************************************/
$P.detailGridControl = new DatasetControl({
urls : { },
dataGetter : obj => Array.isArray(obj) ? obj : [],
appendData:false,
keymapper : info => info ? info.DATA_ID : "",
formats : {
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
LEVY_EXCL_YMD : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
FFNLG_AMT : numberFormat,
RCVMT_AMT : numberFormat
}
});
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.detailGridControl.onDatasetChange = () => {
var ds = $P.detailGridControl.dataset;
var empty = ds.empty;
var notFound = [""];
var found = document.getElementById("detailGridTbodyTemplate--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDetailGrid('" + dataItem.getValue("DATA_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblClickDetailGrid('" + dataItem.getValue("DATA_ID") + "');");
var trs = empty ? notFound : ds.inStrings(found, replacer);
$("#detailTbody--${pageName}").html(trs.join());
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
};
/**************************************************************************
* pageObject.function
**************************************************************************/
@ -341,6 +388,10 @@ $(document).ready(function(){
}
$("#masterThead--${pageName}").append("<th class='cmn dummy-th'></th>");
//하단 그리드
var detailTheadTemplate = document.getElementById("detailGridTheadTemplate--${pageName}");
$("#detailThead--${pageName}").append(detailTheadTemplate.innerHTML);
}
//상세 그리드 표시
@ -424,6 +475,7 @@ $(document).ready(function(){
$P.renderStat = (stat) => {
$("#masterTbody--${pageName}").html("");
$("#detailTbody--${pageName}").html("");
refListMap = {};
var statItems = stat.statItems;
@ -440,14 +492,18 @@ $(document).ready(function(){
var pointMove = Number.parseFloat(0.1 ** decimalPoint).toFixed(decimalPoint);
for(var i=0; i < statItems.length; i++){
var statItem = statItems[i];
var itemIds = statItem.itemId;
var itemNames = statItem.itemName;
var numberValues = statItem.numberValue;
var tr = "<tr>";
var itemKey = itemIds.join("_");
refListMap[itemKey] = statItem.refList == null ? [] : statItem.refList;
var tr = "<tr data-key='"+itemKey+"' >";
for(var j=0; j < itemNames.length; j++){
@ -475,6 +531,28 @@ $(document).ready(function(){
$("#masterTbody--${pageName}").append(tr);
}
$("#masterTbody--${pageName} tr").attr("onclick","pageObject['${pageName}'].clickMasterGrid(this);");
$("#masterTbody--${pageName} tr").attr("ondblclick","pageObject['${pageName}'].dblClickMasterGrid(this);");
}
$P.clickMasterGrid = (obj) => {
var dataKey = obj.dataset.key;
$("#masterTbody--${pageName}").setCurrentRow(dataKey);
}
$P.dblClickMasterGrid = (obj) => {
var dataKey = obj.dataset.key;
$P.detailGridControl.setData(refListMap[dataKey]);
var offset = $('#masterArea--${pageName}').offset();
$('#statWrapper--${pageName}').animate({scrollTop : offset.top}, 400);
}
$P.clickDetailGrid = (key) => {
$("#detailTbody--${pageName}").setCurrentRow(key);
}
$P.dblClickDetailGrid = (key) => {
}

@ -119,3 +119,5 @@
<script src="<c:url value="/resources/js/fims/stat/crdnGroupSubset.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/stat/crdnPreset.js?${ver}"/>"></script>
<jsp:include page="/WEB-INF/jsp/fims/stat/stat02020-info.jsp" />

@ -0,0 +1,45 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<template id="detailGridTheadTemplate--${pageName}">
<th style='width:160px'>시군구명</th>
<th style='width:160px'>단속차량번호</th>
<th style='width:200px'>단속일시</th>
<th style='width:160px'>단속금액</th>
<th style='width:160px'>단속동</th>
<th style='width:160px'>단속장소</th>
<th style='width:160px'>단속조</th>
<th style='width:160px'>위반내용</th>
<th style='width:160px'>특별구역</th>
<th style='width:160px'>고지번호</th>
<th style='width:160px'>대체차량번호</th>
<th style='width:160px'>납부자명</th>
<th style='width:160px'>부과금액</th>
<th style='width:160px'>수납금액</th>
<th style='width:160px'>감액금액</th>
<th style='width:160px'>미납금액</th>
<th style='width:160px'>처리상태</th>
</template>
<template id="detailGridTbodyTemplate--${pageName}">
<tr data-key="{DATA_ID}" onclick="{onclick}" ondblclick="{ondblclick}">
<td>{SGG_NM}</td>
<td>{VHRNO}</td>
<td>{CRDN_YMD_TM}</td>
<td>{FFNLG_CRDN_AMT}</td>
<td>{CRDN_STDG_NM}</td>
<td>{CRDN_PLC}</td>
<td>{TEAM_NM}</td>
<td>{VLTN_ARTCL}</td>
<td>{CRDN_SPAREA_NM}</td>
<td>{GOJI_NO}</td>
<td>{RPM_SZR_VHRNO}</td>
<td>{RTPYR_NM}</td>
<td>{부과금액}</td>
<td>{수납금액}</td>
<td>{감액금액}</td>
<td>{미납금액}</td>
<td>{CRDN_STTS_NM}</td>
</tr>
</template>

@ -75,3 +75,5 @@
<datalist id="presetDatalist--${pageName}">
</datalist>
<jsp:include page="/WEB-INF/jsp/fims/stat/stat03020-info.jsp" />

@ -0,0 +1,31 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<template id="detailGridTheadTemplate--${pageName}">
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
</template>
<template id="detailGridTbodyTemplate--${pageName}">
<tr data-key="{DATA_ID}">
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
</tr>
</template>

@ -25,3 +25,5 @@
>발송건수,열람건수,미열람건수,전송실패건수,비회원,수신거부,내부오류,요청오류,비허용사용자,전송실패,문서도달실패
</option>
</datalist>
<jsp:include page="/WEB-INF/jsp/fims/stat/stat04020-info.jsp" />

@ -0,0 +1,31 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<template id="detailGridTheadTemplate--${pageName}">
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
</template>
<template id="detailGridTbodyTemplate--${pageName}">
<tr data-key="{DATA_ID}">
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
</tr>
</template>

@ -112,3 +112,5 @@
</datalist>
<script src="<c:url value="/resources/js/fims/stat/sprtPreset.js?${ver}"/>"></script>
<jsp:include page="/WEB-INF/jsp/fims/stat/stat05020-info.jsp" />

@ -0,0 +1,30 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<template id="detailGridTheadTemplate--${pageName}">
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
<th style='width:160px'></th>
</template>
<template id="detailGridTbodyTemplate--${pageName}">
<tr data-key="{DATA_ID}">
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
</tr>
</template>
Loading…
Cancel
Save