개별총정보 이전, 다음 버튼 수정.

main
jjh 1 year ago
parent 33464c2de8
commit 21bed67a7c

@ -6,6 +6,8 @@ public class SprtQuery extends CmmnQuery {
private static final long serialVersionUID = 1L;
// 필수
private String callControlName; // 호출한 페이지의 Control 이름
// ID
private String crdnId; // 단속 ID
private String levyExclId; // 부과 제외 ID
@ -23,6 +25,16 @@ public class SprtQuery extends CmmnQuery {
private String delRsn; // 삭제 사유
private String inquiryCondition; // 조회 조건
public String getCallControlName() {
return ifEmpty(callControlName, () -> null);
}
public <T extends SprtQuery> T setCallControlName(String callControlName) {
this.callControlName = callControlName;
return self();
}
public String getCrdnId() {
return ifEmpty(crdnId, () -> null);
}

@ -90,8 +90,9 @@ public class Sprt02Controller extends ApplicationController {
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/sprt/sprt02010-main");
return mav
.addObject("callControlName", req.getCallControlName())
.addObject("pageName", "sprt02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("pageNameMain", "sprt02010")
.addObject("pageNameMain", "sprt02010") // 개별총정보 메인 화면명
.addObject("totalInfo", json ? totalInfo : toJson(totalInfo)) // 개별총정보
;
}

@ -27,8 +27,6 @@
<sql id="select">
SELECT R.RDUCT_ID /* 감경 ID */
, R.CRDN_ID /* 단속 ID */
, R.RTPYR_ID /* 납부자 ID */
, R.RDUCT_YMD /* 감경 일자 */
, R.RDUCT_RSN_CD /* 감경 사유 코드 */
, (SELECT FN_GET_CODE_NM('FIM019', R.RDUCT_RSN_CD) FROM DUAL) AS RDUCT_RSN_NM /* 감경 사유 명 */
@ -45,20 +43,25 @@
, R.DLTR /* 삭제자 */
, (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = R.DLTR) AS DLTR_NM /* 삭제자 명 */
, R.DEL_RSN /* 삭제 사유 */
, C.CRDN_ID /* 단속 ID */
, C.SGG_CD /* 시군구 코드 */
, C.TASK_SE_CD /* 업무 구분 코드 */
, CONCAT(C.CRDN_YMD,C.CRDN_TM) AS CRDN_YMD_TM /* 단속 일시 */
, C.VHRNO /* 차량 번호 */
, C.FFNLG_CRDN_AMT /* 과태료 단속 금액 */
, C.FFNLG_RDUCT_RT /* 과태료 감경 율 */
, C.FFNLG_AMT /* 과태료 금액 */
, C.ADVNTCE_AMT /* 사전통지금액 */
, C.MINUS_AMT
, C.ADTN_AMT
, C.RCVMT_AMT
, C.CRDN_STTS_CD /* 단속 상태 코드 */
, (SELECT FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) FROM DUAL) AS CRDN_STTS_NM /* 단속 상태 명 */
, P.RTPYR_ID /* 납부자 ID */
, P.RTPYR_NO /* 납부자 번호 */
, P.RTPYR_NM /* 납부자 명 */
, L.LEVY_ID /* 부과 ID */
, L.LEVY_PCPTAX + LEVY_ADAMT AS LEVY_AMT /* 부과 금액 */
, L.RCVMT_PCPTAX + RCVMT_ADAMT AS RCVMT_AMT /* 수납 금액 */
, L.RDCAMT_PCPTAX + RDCAMT_ADAMT AS RDCAMT_AMT /* 감액 금액 */
, L.SUM_AMT /* 합계 금액 */
FROM TB_RDUCT R
INNER JOIN TB_CRDN C ON (R.CRDN_ID = C.CRDN_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)

@ -349,9 +349,14 @@
return;
}
let params = {
callControlName : "${pageName}Control"
, crdnId : crdnId
}
ajax.get({
url : ${pageName}Control.urls.getInfo
, data : { crdnId : crdnId }
, data : params || {}
, success : resp => {
dialog.open({
id : "totalInfoMainDialog"

@ -102,7 +102,8 @@
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');" style="min-width: 80px;">차량번호</th>
<th onclick="searchFromGridTitle('FFNLG_CRDN_AMT',this.innerText,'match','perfect');">과태료단속원금</th>
<th onclick="searchFromGridTitle('RDUCT_AMT',this.innerText,'match','perfect');">감경금액</th>
<th class="text-orange" style="min-width: 80px;">잔액</th>
<th onclick="searchFromGridTitle('FFNLG_AMT',this.innerText,'match','perfect');">과태료금액</th>
<th class="text-orange" style="min-width: 80px;">미납금액</th>
<th onclick="searchFromGridTitle('ETC_CN',this.innerText,'match','part');" style="min-width: 80px;">감경특기사항</th>
<th onclick="searchFromGridTitle('CRDN_STTS_CD',this.innerText,'codeValue','FIM010');" style="min-width: 80px;">처리상태</th>
</tr>
@ -117,14 +118,15 @@
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{FFNLG_CRDN_AMT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{RDUCT_AMT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{BLNC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{FFNLG_AMT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{SUM_AMT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{ETC_CN}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STTS_CD}</td>
</tr>
</template>
<template id="rductNotFound--${pageName}">
<tr>
<td valign="top" colspan="9" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="11" class="dataTables_empty text-center">과태료 감경 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
@ -170,8 +172,9 @@ $(document).ready(function(){
CRDN_YMD_TM : datetimeFormat,
FFNLG_CRDN_AMT : numberFormat,
RDUCT_AMT : numberFormat,
FFNLG_AMT : numberFormat,
CRDN_STTS_CD : FIM010,
BLNC : numberFormat
SUM_AMT : numberFormat
}
});
$P.rductControl.defaultFetchSize = FETCH_XS;
@ -271,9 +274,14 @@ $(document).ready(function(){
}
$P.dblclickRductList = (dataKey) => {
let params = {
callControlName : "pageObject['${pageName}'].rductControl"
, crdnId : dataKey
}
ajax.get({
url : $P.rductControl.urls.getInfo,
data : { "crdnId" : dataKey },
data : params,
success : resp => {
dialog.open({
id : "totalInfoMainDialog",

@ -32,8 +32,8 @@
<!-- 자료 이동 버튼 -->
<div class="col-md-2 text-end">
<input type="text" id="countStauts--${pageName}" class="form-control w-px-120 text-center fw-bold" readonly />
<button type="button" id="btnPrev--${pageName}" class="w-px-50 btn-PageUp">◀</button>
<button type="button" id="btnNext--${pageName}" class="w-px-50 btn-PageDown">▶</button>
<button type="button" id="btnPrev--${pageName}" class="w-px-50 btn-PageUp" onClick="fnPrev${pageName}();">◀</button>
<button type="button" id="btnNext--${pageName}" class="w-px-50 btn-PageDown" onClick="fnNext${pageName}();">▶</button>
</div>
</div> <!-- <div class="row g-1"> -->
</form> <!-- /입력 영역 -->
@ -43,43 +43,43 @@
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<button type="button" class="nav-link active" role="tab" data-bs-toggle="tab" data-bs-target="#crdnPayerInfo"
aria-controls="crdnPayerInfo" aria-selected="true" onClick="fnBtnCrdnPayerInfo${pageName}();">
aria-controls="crdnPayerInfo" aria-selected="true" onClick="fnCrdnPayerInfo${pageName}();">
단속 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#opnnSbmsnInfo"
aria-controls="opnnSbmsnInfo" aria-selected="false" onClick="fnBtnOpnnSbmsnInfo${pageName}();">
aria-controls="opnnSbmsnInfo" aria-selected="false" onClick="fnOpnnSbmsnInfo${pageName}();">
의견제출 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#sndngInfo"
aria-controls="sndngInfo" aria-selected="false" onClick="fnBtnSndngInfo${pageName}();">
aria-controls="sndngInfo" aria-selected="false" onClick="fnSndngInfo${pageName}();">
발송반송 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#prcsDtlInfo"
aria-controls="prcsDtlInfo" aria-selected="false" onClick="fnBtnPrcsDtlInfo${pageName}();">
aria-controls="prcsDtlInfo" aria-selected="false" onClick="fnPrcsDtlInfo${pageName}();">
처리상세 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#levyNpmntInfo"
aria-controls="levyNpmntInfo" aria-selected="false" onClick="fnBtnLevyNpmntInfo${pageName}();">
aria-controls="levyNpmntInfo" aria-selected="false" onClick="fnLevyNpmntInfo${pageName}();">
부과체납 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#rcvmtInfo"
aria-controls="rcvmtInfo" aria-selected="false" onClick="fnBtnRcvmtInfo${pageName}();">
aria-controls="rcvmtInfo" aria-selected="false" onClick="fnRcvmtInfo${pageName}();">
수납 정보
</button>
</li>
<li class="nav-item">
<button type="button" class="nav-link" role="tab" data-bs-toggle="tab" data-bs-target="#cvlcptDscsnInfo"
aria-controls="cvlcptDscsnCnInfo" aria-selected="false" onClick="fnBtnCvlcptDscsnInfo${pageName}();">
aria-controls="cvlcptDscsnCnInfo" aria-selected="false" onClick="fnCvlcptDscsnInfo${pageName}();">
민원상담 정보
</button>
</li>
@ -106,6 +106,8 @@
var ${pageName}PrefixUrl = "/sprt/sprt02";
// FormFields
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
// 자료 이동을 위한 자료의 Index. 0부터 시작.
var curDataIndex;
/**************************************************************************
* DatasetControl
@ -124,6 +126,9 @@
${pageName}Control.onCurrentChange = item => {
// Dataset 셋팅
${pageName}Fields.set(item);
// 건수 표기
fnChangeCountStauts();
}
/**************************************************************************
@ -134,9 +139,9 @@
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 검색조건 초기값 셋팅
// 화면 초기값 셋팅
initForm${pageName} = () => {
curDataIndex = null; // 화면이 열릴때 초기 값으로 null로 설정해야 건수가 정상 표시 된다.
}
// 이벤트 설정
@ -147,8 +152,122 @@
/**************************************************************************
* function
**************************************************************************/
// 건수 표기
fnChangeCountStauts = () => {
// curDataIndex 에 값이 없다면..
if (curDataIndex == null) {
let mainDataItems = ${callControlName}.dataset._items;
let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
for (iLoop = 0; iLoop < mainDataItems.length; iLoop++) {
if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
curDataIndex = iLoop;
break;
}
}
}
let viewNumber = curDataIndex + 1;
$("#countStauts--${pageName}").val(viewNumber + " of " + ${callControlName}.dataset._items.length);
}
// 이전 자료 조회
fnPrev${pageName} = () => {
let mainDataItems = ${callControlName}.dataset._items;
let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 초기 값은 callControl dataset 의 총 건수 - 1
if (curDataIndex == null) {
curDataIndex = mainDataItems.length - 1;
}
for (iLoop = curDataIndex; iLoop >= 0; iLoop--) {
if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
if (iLoop - 1 < 0) { return; } // 종료
curDataIndex = iLoop - 1;
break;
}
}
let crdnId = mainDataItems[curDataIndex].data.CRDN_ID;
// 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") {
return;
}
let params = {
callPurpose : "view"
, callControlName : "${callControlName}"
, crdnId : crdnId
, sggCd : mainDataItems[curDataIndex].data.SGG_CD
, taskSeCd : mainDataItems[curDataIndex].data.TASK_SE_CD
, delYn : "N"
};
fnDataRefreshInfo(params);
}
// 다음 자료 조회
fnNext${pageName} = () => {
let mainDataItems = ${callControlName}.dataset._items;
let curCrdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 초기 값은 0
if (curDataIndex == null) {
curDataIndex = 0;
}
for (iLoop = curDataIndex; iLoop < mainDataItems.length; iLoop++) {
if (mainDataItems[iLoop].data.CRDN_ID == curCrdnId) {
if (iLoop + 1 >= mainDataItems.length) { return; } // 종료
curDataIndex = iLoop + 1;
break;
}
}
let crdnId = mainDataItems[curDataIndex].data.CRDN_ID;
// 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") {
return;
}
let params = {
callPurpose : "view"
, callControlName : "${callControlName}"
, crdnId : crdnId
, sggCd : mainDataItems[curDataIndex].data.SGG_CD
, taskSeCd : mainDataItems[curDataIndex].data.TASK_SE_CD
, delYn : "N"
};
fnDataRefreshInfo(params);
}
// 자료 재조회
fnDataRefreshInfo = (params) => {
ajax.get({
url : wctx.url("/" + params.taskSeCd + "/sprt/sprt02/010/main.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data : params || {}
, success : resp => {
if (resp.totalInfo) {
// 최상단 단속 Data 셋팅
${pageName}Control.setData([resp.totalInfo]);
// 단속 납부자 Data 셋팅
fnCrdnPayerInfo${pageName}();
}
}
});
}
// 단속 정보
fnBtnCrdnPayerInfo${pageName} = () => {
fnCrdnPayerInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
let sggCd = ${pageName}Control.dataset.getValue("SGG_CD");
let taskSeCd = ${pageName}Control.dataset.getValue("TASK_SE_CD");
@ -176,7 +295,7 @@
}
// 의견제출 정보
fnBtnOpnnSbmsnInfo${pageName} = () => {
fnOpnnSbmsnInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
let sggCd = ${pageName}Control.dataset.getValue("SGG_CD");
let taskSeCd = ${pageName}Control.dataset.getValue("TASK_SE_CD");
@ -204,7 +323,7 @@
}
// 발송 반송 정보
fnBtnSndngInfo${pageName} = () => {
fnSndngInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
@ -228,7 +347,7 @@
}
// 처리 상세 정보
fnBtnPrcsDtlInfo${pageName} = () => {
fnPrcsDtlInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
@ -252,7 +371,7 @@
}
// 부과체납 정보
fnBtnLevyNpmntInfo${pageName} = () => {
fnLevyNpmntInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
@ -276,7 +395,7 @@
}
// 수납 정보
fnBtnRcvmtInfo${pageName} = () => {
fnRcvmtInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
// 단속 ID 가 없다면.. return
@ -300,7 +419,7 @@
}
// 민원상담 정보
fnBtnCvlcptDscsnInfo${pageName} = () => {
fnCvlcptDscsnInfo${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
let vhrno = ${pageName}Control.dataset.getValue("VHRNO");
@ -340,7 +459,7 @@
${pageName}Control.setData([${totalInfo}]);
//
fnBtnCrdnPayerInfo${pageName}();
fnCrdnPayerInfo${pageName}();
});
// #sourceURL=sprt02010-main.jsp

Loading…
Cancel
Save