과태료감경자료 메인 화면 완료

main
이범준 1 year ago
parent 25e102ee22
commit a086b600ed

@ -23,6 +23,8 @@ public class CrdnQuery extends QueryRequest {
private String schDateFrom;
private String schDateTo;
private String vhrno;
private String schRductYmdFrom;
private String schRductYmdTo;
public String getGrid() {
return ifEmpty(grid, () -> null);
@ -87,6 +89,22 @@ public class CrdnQuery extends QueryRequest {
return self();
}
public String getSchRductYmdFrom() {
return ifEmpty(schRductYmdFrom, () -> null);
}
public <T extends CrdnQuery> T setSchRductYmdFrom(String schRductYmdFrom) {
this.schRductYmdFrom = schRductYmdFrom;
return self();
}
public String getSchRductYmdTo() {
return ifEmpty(schRductYmdTo, () -> null);
}
public <T extends CrdnQuery> T setSchRductYmdTo(String schRductYmdTo) {
this.schRductYmdTo = schRductYmdTo;
return self();
}
}

@ -28,21 +28,21 @@ public class Crdn06Bean extends AbstractComponent {
* @return
*/
public List<DataObject> getCrackdownList(CrdnQuery req) {
if(!isEmpty(req.getBy())) {
if(!req.getBy().startsWith("advancedOption")) {
switch (ifEmpty(req.getBy(), () -> "")) {
default:
req.setBy(EgovStringUtil.convertToUnderScore(req.getBy()).toUpperCase());
break;
}
}
}
//if(!isEmpty(req.getBy())) {
// if(!req.getBy().startsWith("advancedOption")) {
// switch (ifEmpty(req.getBy(), () -> "")) {
// default:
// req.setBy(EgovStringUtil.convertToUnderScore(req.getBy()).toUpperCase());
// break;
// }
// }
//}
switch (ifEmpty(req.getGrid(), () -> "")) {
case "TagInformationUndefinedData":
case "TagInformationUndefinedData":
return crdn06Mapper.selectTagInformationUndefinedDataList(req.setOrderBy("CRDN_ID"));
case "FineReductionData":
case "FineReductionData":
return crdn06Mapper.selectFineReductionDataList(req.setOrderBy("CRDN_ID"));
default:
return crdn06Mapper.selectCrackdownList(req.setOrderBy("CRDN_ID"));

@ -64,7 +64,7 @@ public class Crdn06Controller extends ApplicationController {
addCodes(commonCodes, mav, "FIM002", "FIM003", "FIM010", "FIM026");
return mav;
}
/** .
* @return fims/crdn/crdn06040-main
*/
@ -73,15 +73,13 @@ public class Crdn06Controller extends ApplicationController {
ModelAndView mav = new ModelAndView();
mav.setViewName("fims/crdn/crdn06040-main");
mav.addObject("pageName","crdn06040-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM001", "FIM002", "FIM003", "FIM010", "FIM026");
mav.addObject("FIM001List", commonCodes.get("FIM001"));
mav.addObject("FIM002List", commonCodes.get("FIM002"));
mav.addObject("FIM010List", commonCodes.get("FIM010"));
addCodes(commonCodes, mav, "FIM002", "FIM003", "FIM010", "FIM026");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054", "FIM010");
mav.addObject("FIM054List", commonCodes.get("FIM054"));
addCodes(commonCodes, mav, "FIM010");
return mav;
}
/** .<br />
* {@link Crdn06Service#getCrackdownList(CrdnQuery)}
* @param req
@ -101,6 +99,6 @@ public class Crdn06Controller extends ApplicationController {
"crdn"
);
}
}

@ -240,9 +240,6 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
IF(TI.TEAMER_2 != '', TI.TEAMER_2,
IF(TI.TEAMER_3 != '', TI.TEAMER_3,
TI.TEAMER_4)))) AS APLCNT_CRDN_NM <!-- 신고/단속자 -->
, CC.CVLCPT_APLCNT_NM <!-- 민원 신청인 명 -->
, C.TEAM_ID <!-- 조 ID -->
, C.VLTN_ID <!-- 위반 ID -->
<!-- 잔액 -->
<!-- 영상매체 -->
, C.ATCH_FILE_CNT <!-- 사진건수 -->
@ -292,50 +289,55 @@ AND C.${by} LIKE CONCAT('%', #{term}, '%')
<select id="selectFineReductionDataList" parameterType="map" resultType="dataobject">
/* 과태료 감경 자료 목록 조회(crdn06Mapper.selectFineReductionDataList) */
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
<!-- 감액일자 -->
<!-- 감액사유 -->
SELECT C.CRDN_ID <!-- 단속 ID -->
, SUBSTR(RD.REG_DT,1,8) AS RDUCT_YMD <!-- 감액일자 -->
, RD.RDUCT_RSN_CD <!-- 감액사유 -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 접수(위반)일시 -->
, C.VHRNO <!-- 차량번호 -->
<!-- 감액금액 -->
<!-- 잔액 -->
<!-- 감액특기사항 -->
, C.CRDN_STTS_CD <!-- 처리상태 -->
, C.DEL_YN
, C.RGTR
, C.REG_DT
, C.MDFR
, C.MDFCN_DT
, C.DLTR
, C.DEL_DT
, C.DEL_RSN
, C.VHRNO <!-- 차량번호 -->
, L.RDCAMT_PCPTAX <!-- 감액금액 -->
, L.SUM_AMT <!-- 잔액 -->
, RD.ETC_CN AS RDUCT_ETC_CN <!-- 감액특기사항 -->
, C.CRDN_STTS_CD <!-- 처리상태 -->
FROM TB_CRDN C
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
LEFT OUTER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID)
INNER JOIN TB_RDUCT RD ON (C.CRDN_ID = RD.CRDN_ID)
WHERE C.DEL_YN = 'N'
<if test="by != null and by != '' and term != null">
<choose>
<when test="by == 'advancedOption1'">
AND FN_GET_CODE_NM('FIM003', C.CRDN_INPT_SE_CD) LIKE CONCAT('%', #{term}, '%')
<when test="by == 'rductYmd'">
AND SUBSTR(RD.REG_DT,1,8) = REPLACE(#{term},'-','')
</when>
<when test="by == 'rductRsnCd'">
AND FN_GET_CODE_NM('FIM019', RD.RDUCT_RSN_CD) LIKE CONCAT('%', #{term}, '%')
</when>
<when test="by == 'crdnYmd'">
AND C.CRDN_YMD = REPLACE(#{term},'-','')
</when>
<when test="by == 'vhrno'">
AND C.VHRNO = REPLACE(#{term},'-','')
</when>
<when test="by == 'rdcamtPcptax'">
AND L.RDCAMT_PCPTAX = REPLACE(#{term},',','')
</when>
<when test="by == 'sumAmt'">
AND L.SUM_AMT = REPLACE(#{term},',','')
</when>
<when test="by == 'rductEtcCn'">
AND RD.ETC_CN LIKE CONCAT('%', #{term}, '%')
</when>
<when test="by == 'crdnSttsCd'">
AND FN_GET_CODE_NM('FIM010', C.CRDN_STTS_CD) LIKE CONCAT('%', #{term}, '%')
</when>
<otherwise>
AND C.${by} LIKE CONCAT('%', #{term}, '%')
</otherwise>
</choose>
</if>
<if test="crdnId != null">AND C.CRDN_ID = #{crdnId}</if>
<if test="taskSeCd != null">AND C.TASK_SE_CD = #{taskSeCd}</if>
<if test="vhrno != null">AND C.VHRNO LIKE CONCAT('%', #{vhrno}, '%')</if>
<if test="schDateFrom != null or schDateTo != null">
<if test="schDateOpt == 'crdnYmd'">
<if test="schDateFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
<if test="schDateOpt == 'regDt'">
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if>
</if>
<if test="schRductYmdFrom != null or schRductYmdTo != null">
<if test="schDateFrom != null">AND SUBSTR(RD.REG_DT,1,8) <![CDATA[ >= ]]> #{schRductYmdFrom} </if>
<if test="schDateTo != null">AND SUBSTR(RD.REG_DT,1,8) <![CDATA[ <= ]]> #{schRductYmdTo} </if>
</if>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/>
</select>

@ -259,11 +259,7 @@ $(document).ready(function(){
{ header: '등록구분', name: 'CRDN_REG_SE_CD', width: 50, className: 'text-center' },
{ header: '등록일시', name: 'REG_DT', width: 150, className: 'text-center' },
{ header: '최종처리일시', name: 'MDFCN_DT', width: 150, className: 'text-center' },
{ header: '상태', name: 'CRDN_STTS_CD', hidden: true },
{ header: '서손ID', name: 'LEVY_EXCL_ID', hidden: true },
{ header: '소유자ID', name: 'RTPYR_ID', hidden: true },
{ header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true },
{ header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true }
{ header: '상태', name: 'CRDN_STTS_CD', width: 150, className: 'text-center' }
];
$P.gridOptions = {
by : 'by--${pageName}',

@ -229,8 +229,7 @@ $(document).ready(function(){
{ header: '처리상태', name: 'CRDN_STTS_CD', width: 80, className: 'text-center' },
{ header: '등록일시', name: 'REG_DT', width: 150, className: 'text-center' },
{ header: '최종처리일시', name: 'MDFCN_DT', width: 150, className: 'text-center' },
{ header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true }
{ header: '최종처리일시', name: 'MDFCN_DT', width: 150, className: 'text-center' }
];
$P.gridOptions = {
by : 'by--${pageName}',

@ -9,7 +9,7 @@
<div class="wrapper-list">
<div>
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark">초기화</button>
<button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}">초기화</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search" id="btnSearch--${pageName}" title="검색">검색</button>
</span>
@ -21,27 +21,24 @@
<div class="col-6">
<label class="form-label fw-bold form-search-title">시스템구분</label>
<span class="form-search-linebox">
<c:forEach items="${FIM001List}" var="item">
<c:forEach items="${FIM054List}" var="item">
<label>
<input name="taskSeCd" type="radio" value="${item.code}"
class="form-check-input" alt="업무구분"
onchange="pageObject['${pageName}'].fnResetAndChangeBiz(this.value);">
${item.value}
</label>
</label>
</c:forEach>
</span>
</div>
<div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select">
<option value="crdnYmd">단속일자</option>
<option value="regDt">등록일자</option>
</select>
<span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" class="form-control form-date"
<label class="form-label fw-bold form-search-title">감액일자</label>
<span class="form-search-linebox">
<input type="text" id="schRductYmdFrom--${pageName}" name="schRductYmdFrom" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" class="form-control form-date"
<input type="text" id="schRductYmdTo--${pageName}" name="schRductYmdTo" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
@ -50,38 +47,8 @@
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
<span class="flr">
<button type="button" class="btn btn-open-detail"
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세조회조건
</button>
</span>
</div>
</div>
</div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row">
<div class="col-12">
<label class="form-label fw-bold form-search-title">차량번호</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
<label class="form-label fw-bold form-search-title">단속구분</label>
<select id="crdnSeCd--${pageName}" name="crdnSeCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM002List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
<label class="form-label fw-bold form-search-title">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
<option value="">전체</option>
<c:forEach items="${FIM010List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
</div>
</div>
</form>
<div>
@ -97,18 +64,42 @@
</div>
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:400px;overflow-y: scroll;">
<div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer"
aria-describedby="DataTables_Table_0_info"
>
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr id="crdnTheadTr--${pageName}">
<th width="80">No.</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_YMD',this.innerText);">감액일자</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_RSN_CD',this.innerText);">감액사유</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_YMD','위반일자');">접수(위반)일시</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','VHRNO',this.innerText);">차량번호</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDCAMT_PCPTAX',this.innerText);">감액금액</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','SUM_AMT',this.innerText);">잔액</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_ETC_CN',this.innerText);">감액특기사항</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_STTS_CD',this.innerText);">처리상태</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}">
</tbody>
<tbody id="crdnTbody--${pageName}"></tbody>
<template id="crdnRow--${pageName}">
<tr data-key="{CRDN_ID}">
<td {onclick} {ondblclick} class="text-end">{ROW_NUM}</td>
<td {onclick} {ondblclick} class="text-center">{RDUCT_YMD}</td>
<td {onclick} {ondblclick} class="text-start">{RDUCT_RSN_CD}</td>
<td {onclick} {ondblclick} class="text-center">{CRDN_YMD_TM}</td>
<td {onclick} {ondblclick} class="text-center">{VHRNO}</td>
<td {onclick} {ondblclick} class="text-end">{RDCAMT_PCPTAX}</td>
<td {onclick} {ondblclick} class="text-end">{SUM_AMT}</td>
<td {onclick} {ondblclick} class="text-start">{RDUCT_ETC_CN}</td>
<td {onclick} {ondblclick} class="text-center">{CRDN_STTS_CD}</td>
</tr>
</template>
<template id="crdnNotFound--${pageName}">
<tr>
<td valign="top" colspan="9" class="dataTables_empty text-center">단속 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
@ -130,61 +121,50 @@
/**************************************************************************
* Global Variable
**************************************************************************/
var FIM002 = new CommonCodes(${FIM002});
var FIM010 = new CommonCodes(${FIM010});
var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.crdnControl = new DatasetControl({
prefix:"crdn",
prefixName:"종합",
infoSize:"xl",
urls : {
load : "",
getInfo : ""
},
prefix:"crdn", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
formats: {
CRDN_YMD_TM : datetimeFormat,
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat,
CVLCPT_PRCS_PRNMNT_DT : dateFormat,
CVLCPT_RCPT_YMD : dateFormat,
RCVMT_AMT : numberFormat,
CRDN_SE_CD: FIM002,
CRDN_STTS_CD : FIM010,
CRDN_REG_SE_CD: FIM026,
RDUCT_YMD : dateFormat,
CRDN_YMD_TM : datetimeFormat,
RDCAMT_PCPTAX : numberFormat,
SUM_AMT : numberFormat,
CRDN_STTS_CD : FIM010
},
keymapper:info => info ? info.CRDN_ID : "",
dataGetter:obj => obj.crdnList,
appendData:true
keymapper:info => info ? info.CRDN_ID : "", dataGetter:obj => obj.crdnList, appendData:true
});
$P.crdnControl.onDatasetChange = obj => {
var prefix = obj.infoPrefix;
$P.renderCrdnList(obj);
$P.renderCrdnList();
$("#crdnPaging--${pageName}").setPagingInfo({
$("#crdnPaging--${pageName}").setPagingInfo({
list: $P.crdnControl.dataset,
prefix: "crdnPaging--${pageName}",
start: obj[prefix+"Start"],
totalSize: obj[prefix+"Total"],
fetchSize: obj[prefix+"Fetch"],
start: obj["crdnStart"],
totalSize: obj["crdnTotal"],
fetchSize: obj["crdnFetch"],
func: "pageObject['${pageName}'].crdnControl.load({index})"
});
};
$P.fnReset = () => {
$('#schRductYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schRductYmdTo--${pageName}').datepicker('setDate', new Date());
$P.crdnControl.setData([]);
}
$P.fnResetAndChangeBiz = taskSeCd => {
$("#crdnTbody--${pageName}").html("");
$P.fnReset();
$P.crdnControl.urls.load = wctx.url("/crdn/crdn06/040/"+ taskSeCd +"/list.do");
$P.crdnControl.urls.getInfo = wctx.url("/sprt/sprt01/020/"+ taskSeCd +"/info.do");
}
@ -199,19 +179,23 @@ $(document).ready(function(){
$P.crdnControl.load($P.crdnControl.query.pageNum + 1);
}
$P.renderCrdnList = data => {
if(!$P.crdnControl.appendData){
$("#crdnTbody--${pageName}").html("");
}
$P.renderCrdnList = () => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var trs = empty ? [ $P.tbodyTemplate.notFound ] : crdnList.inStrings($P.tbodyTemplate.found);
var trs = empty ?
[document.getElementById("crdnNotFound--${pageName}").innerHTML] :
crdnList.inStrings(
document.getElementById("crdnRow--${pageName}").innerHTML,
(str, dataItem) => str
.replace(/{onclick}/gi, 'onclick="pageObject[\'${pageName}\'].crdnControl.setCurrent(\'' + dataItem.getValue("CRDN_ID") + '\');"')
.replace(/{ondblclick}/gi, 'ondblclick="pageObject[\'${pageName}\'].crdnControl.getInfo(\'' + dataItem.getValue("CRDN_ID") + '\')"')
);
$("#crdnTbody--${pageName}").html(trs.join());
//보안모드
if($("#securityMode--top").is(":checked")){
fn_securityModeToggle(true);
@ -224,56 +208,18 @@ $(document).ready(function(){
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = 30;
return data;
}
/* *******************************
* Grid
******************************* */
$P.gridColumns = [
{ header: '감액일자', name: 'uknown1', width: 80, className: 'text-center' },
{ header: '감액사유', name: 'uknown2', width: 80, className: 'text-start' },
{ header: '접수(위반)일시', name: 'CRDN_YMD_TM', width: 80, className: 'text-center' },
{ header: '차량번호', name: 'VHRNO', width: 80, className: 'text-center' },
{ header: '감액금액', name: 'uknown4', width: 80, className: 'text-end' },
{ header: '감액잔액', name: 'uknown5', width: 80, className: 'text-end' },
{ header: '감액특기사항', name: 'uknown6', width: 80, className: 'text-start' },
{ header: '처리상태', name: 'CRDN_STTS_CD', width: 80},
{ header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true }
];
$P.gridOptions = {
by : 'by--${pageName}',
byOutput : 'byOutput--${pageName}',
theadTr: 'crdnTheadTr--${pageName}',
rowHeader: 'No.',
trDataKey: 'CRDN_ID',
infoPrefix: "crdn",
prefixName : "단속",
clickEvent : "pageObject['${pageName}'].crdnControl.setCurrent('{CRDN_ID}')",
dblClickEvent : "pageObject['${pageName}'].crdnControl.getInfo({})",
columns: $P.gridColumns
};
$P.tbodyTemplate = {};
//그리드 정보 초기화
$P.tbodyTemplate = initGrid($P.gridOptions);
//달력 초기화
initDatepicker("frmSearch--${pageName}");
$('#schDateFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDateTo--${pageName}').datepicker('setDate', new Date());
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
//스크롤 이벤트 추가
$("#table-responsive--${pageName}").scroll(function(){
var el = $(this);
@ -284,16 +230,13 @@ $(document).ready(function(){
$P.scrollCrdnList();
}
});
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
//보안모드
if($("#securityMode--top").is(":checked")){
fn_securityModeToggle(true);
} else {
fn_securityModeToggle(false);
}
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
</script>
Loading…
Cancel
Save