단속자료검사 업무별, 화면별 조회조건 추가

main
이범준 1 year ago
parent ce5fcad263
commit 4cfc09b8aa

@ -29,6 +29,12 @@ public class CrdnQuery extends QueryRequest {
private String schRductYmdTo; private String schRductYmdTo;
private String schCrdnYmdFrom; private String schCrdnYmdFrom;
private String schCrdnYmdTo; private String schCrdnYmdTo;
private Integer schCrdnCntFrom;
private Integer schCrdnCntTo;
private String schOnlySamePlace;
private String schOnlyUnpay;
private String schExclEnd;
private String schExclTimeout;
private String crdnInptSeCd; private String crdnInptSeCd;
public String getGrid() { public String getGrid() {
@ -148,6 +154,60 @@ public class CrdnQuery extends QueryRequest {
return self(); return self();
} }
public Integer getSchCrdnCntFrom() {
return ifEmpty(schCrdnCntFrom, () -> null);
}
public <T extends CrdnQuery> T setSchCrdnCntFrom(Integer schCrdnCntFrom) {
this.schCrdnCntFrom = schCrdnCntFrom;
return self();
}
public Integer getSchCrdnCntTo() {
return ifEmpty(schCrdnCntTo, () -> null);
}
public <T extends CrdnQuery> T setSchCrdnCntTo(Integer schCrdnCntTo) {
this.schCrdnCntTo = schCrdnCntTo;
return self();
}
public String getSchOnlySamePlace() {
return ifEmpty(schOnlySamePlace, () -> null);
}
public <T extends CrdnQuery> T setSchOnlySamePlace(String schOnlySamePlace) {
this.schOnlySamePlace = schOnlySamePlace;
return self();
}
public String getSchOnlyUnpay() {
return ifEmpty(schOnlyUnpay, () -> null);
}
public <T extends CrdnQuery> T setSchOnlyUnpay(String schOnlyUnpay) {
this.schOnlyUnpay = schOnlyUnpay;
return self();
}
public String getSchExclEnd() {
return ifEmpty(schExclEnd, () -> null);
}
public <T extends CrdnQuery> T setSchExclEnd(String schExclEnd) {
this.schExclEnd = schExclEnd;
return self();
}
public String getSchExclTimeout() {
return ifEmpty(schExclTimeout, () -> null);
}
public <T extends CrdnQuery> T setSchExclTimeout(String schExclTimeout) {
this.schExclTimeout = schExclTimeout;
return self();
}
public String getCrdnInptSeCd() { public String getCrdnInptSeCd() {
return ifEmpty(crdnInptSeCd, () -> null); return ifEmpty(crdnInptSeCd, () -> null);
} }

@ -238,6 +238,7 @@ AND C.${by} LIKE CONCAT('%', #{term}, '%')
SELECT C.CRDN_ID <!-- 단속 ID --> SELECT C.CRDN_ID <!-- 단속 ID -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 --> , CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 -->
, C.VHRNO <!-- 차량번호 --> , C.VHRNO <!-- 차량번호 -->
, C.VLTN_NMTM <!-- 위반횟수 -->
<!-- 검사결과 --> <!-- 검사결과 -->
<!-- 처리방법 --> <!-- 처리방법 -->
, C.CRDN_STDG_NM <!-- 단속 법정동 명 --> , C.CRDN_STDG_NM <!-- 단속 법정동 명 -->
@ -249,14 +250,24 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_INPT_SE_CD <!-- 자료출처 --> , C.CRDN_INPT_SE_CD <!-- 자료출처 -->
FROM TB_CRDN C FROM TB_CRDN C
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
<if test="by != null and by != '' and term != null"> AND C.TASK_SE_CD = #{taskSeCd}
</if>
<if test="crdnId != null">AND C.CRDN_ID = #{crdnId}</if>
<if test="taskSeCd != null">AND C.TASK_SE_CD = #{taskSeCd}</if>
<if test="schCrdnYmdFrom != null or schCrdnYmdTo != null"> <if test="schCrdnYmdFrom != null or schCrdnYmdTo != null">
<if test="schCrdnYmdFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schCrdnYmdFrom} </if> <if test="schCrdnYmdFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schCrdnYmdFrom} </if>
<if test="schCrdnYmdTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schCrdnYmdTo} </if> <if test="schCrdnYmdTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schCrdnYmdTo} </if>
</if>
<if test="crdnInptSeCd != null">AND C.CRDN_INPT_SE_CD = #{crdnInptSeCd}</if>
<if test="vhrno != null">AND C.VHRNO = #{vhrno}</if>
<if test="schExclEnd == 'on'">AND C.CRDN_STTS_CD != '81'</if>
<if test="schOnlyUnpay == 'on'">
<!-- TODO : 미납만 조회 -->
</if>
<if test="taskSeCd == 'PVS'">
<if test="schExclTimeout == on">
<!-- TODO : 2시간 초과 제외 -->
</if>
</if>
<if test="by != null and by != '' and term != null">
</if> </if>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
@ -267,22 +278,38 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<include refid="utility.paging-prefix"/> <include refid="utility.paging-prefix"/>
SELECT GROUP_CONCAT(C.CRDN_ID) AS CRDN_ID_LIST <!-- 단속 ID --> SELECT GROUP_CONCAT(C.CRDN_ID) AS CRDN_ID_LIST <!-- 단속 ID -->
, C.VHRNO <!-- 차량번호 --> , C.VHRNO <!-- 차량번호 -->
<choose>
<when test="schOnlySamePlace == 'on'">
, C.CRDN_STDG_NM <!-- 단속 법정동 명 --> , C.CRDN_STDG_NM <!-- 단속 법정동 명 -->
</when>
<otherwise>
, '' AS CRDN_STDG_NM
</otherwise>
</choose>
, COUNT(*) AS CRDN_CNT <!-- 단속건수 --> , COUNT(*) AS CRDN_CNT <!-- 단속건수 -->
FROM TB_CRDN C FROM TB_CRDN C
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd} AND C.TASK_SE_CD = #{taskSeCd}
AND C.VHRNO != '' AND C.VHRNO != ''
AND C.CRDN_STDG_NM != '' AND C.CRDN_STDG_NM != ''
<if test="by != null and by != '' and term != null">
</if>
<if test="crdnId != null">AND C.CRDN_ID = #{crdnId}</if>
<if test="schCrdnYmdFrom != null or schCrdnYmdTo != null"> <if test="schCrdnYmdFrom != null or schCrdnYmdTo != null">
<if test="schCrdnYmdFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schCrdnYmdFrom} </if> <if test="schCrdnYmdFrom != null">AND C.CRDN_YMD <![CDATA[ >= ]]> #{schCrdnYmdFrom} </if>
<if test="schCrdnYmdTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schCrdnYmdTo} </if> <if test="schCrdnYmdTo != null">AND C.CRDN_YMD <![CDATA[ <= ]]> #{schCrdnYmdTo} </if>
</if> </if>
GROUP BY C.VHRNO, C.CRDN_STDG_NM HAVING COUNT(*) <![CDATA[ >= ]]> 2 <if test="crdnInptSeCd != null">AND C.CRDN_INPT_SE_CD = #{crdnInptSeCd}</if>
<if test="vhrno != null">AND C.VHRNO = #{vhrno}</if>
<if test="schExclEnd == 'on'">AND C.CRDN_STTS_CD != '81'</if>
<if test="by != null and by != '' and term != null">
</if>
GROUP BY C.VHRNO<if test="schOnlySamePlace == 'on'">, C.CRDN_STDG_NM </if>
HAVING COUNT(*) <![CDATA[ >= ]]>
<choose>
<when test="schCrdnCntFrom != null"> #{schCrdnCntFrom} </when>
<otherwise> 2 </otherwise>
</choose>
<if test="schCrdnCntTo != null"> AND COUNT(*) <![CDATA[ <= ]]> #{schCrdnCntTo} </if>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
@ -297,11 +324,12 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_STDG_NM <!-- 단속 법정동 명 --> , C.CRDN_STDG_NM <!-- 단속 법정동 명 -->
, C.CRDN_PLC <!-- 단속장소 --> , C.CRDN_PLC <!-- 단속장소 -->
, C.CRDN_STTS_CD <!-- 처리상태 --> , C.CRDN_STTS_CD <!-- 처리상태 -->
<!-- 금액 --> , C.FFNLG_AMT <!-- 금액 -->
<!-- 성명 --> , P.RTPYR_NM <!-- 성명 -->
<!-- 주민번호 --> , P.RTPYR_NO <!-- 주민번호 -->
FROM TB_CRDN C FROM TB_CRDN C
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID) LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd} AND C.TASK_SE_CD = #{taskSeCd}
AND C.CRDN_ID IN (<foreach collection="crdnIDs" item="CRDN_ID" separator=",">#{CRDN_ID}</foreach>) AND C.CRDN_ID IN (<foreach collection="crdnIDs" item="CRDN_ID" separator=",">#{CRDN_ID}</foreach>)

@ -45,7 +45,7 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-4">
<label class="form-label fw-bold form-search-title">단속구분</label> <label class="form-label fw-bold form-search-title">단속구분</label>
<select id="crdnInptSeCd--${pageName}" name="crdnInptSeCd" class="form-select"> <select id="crdnInptSeCd--${pageName}" name="crdnInptSeCd" class="form-select">
<option value="">전체</option> <option value="">전체</option>
@ -54,14 +54,33 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-6"> <div class="col-4">
<label class="form-label fw-bold form-search-title">차량번호</label> <label class="form-label fw-bold form-search-title">차량번호</label>
<input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" /> <input type="text" id="vhrno--${pageName}" name="vhrno" class="form-control" />
</div> </div>
<div class="col-4">
<span class="sameVehicleInspectionArea">
<label class="form-label fw-bold form-search-title">단속건수</label>
<input type="text" name="schCrdnCntFrom" class="form-control w-px-50" placeholder="2" />
~ <input type="text" name="schCrdnCntTo" class="form-control w-px-50"/>
</span>
</div>
<div class="col-12"> <div class="col-12">
<input type="hidden" id="by--${pageName}" name="by" /> <label>
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" /> <input type="checkbox" name="schExclEnd" class="form-check-input" />
<input type="text" id="term--${pageName}" name="term" class="form-control" /> 서손자료제외
</label>
<label class="sameVehicleInspectionArea">
<input type="checkbox" name="schOnlySamePlace" class="form-check-input" />
동일장소만조회
</label>
<label class="photoInspectionArea">
<input type="checkbox" name="schOnlyUnpay" class="form-check-input" />
미납만조회
</label>
<span id="searchByTaskArea--${pageName}">
</span>
<span class="flr"> <span class="flr">
<button type="button" class="btn btn-open-detail" <button type="button" class="btn btn-open-detail"
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}"> data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
@ -74,6 +93,11 @@
</div> </div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse"> <div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row"> <div class="row">
<div class="col-6">
<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" />
</div>
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title">자료상태</label> <label class="form-label fw-bold form-search-title">자료상태</label>
<select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select"> <select id="crdnSttsCd--${pageName}" name="crdnSttsCd" class="form-select">
@ -98,21 +122,17 @@
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-6">
<input type="checkbox" name="" value="Y" /><label for="">동일장소만조회</label>
<input type="checkbox" name="" value="Y" /><label for="">미납만조회</label>
<input type="checkbox" name="" value="Y" /><label for="">서손자료제외</label>
</div>
</div>
<div class="row" id="searchByTaskArea--${pageName}">
</div> </div>
</div> </div>
</form> </form>
<template id="taskSearchOption--${pageName}"> <template id="taskSearchOption--${pageName}">
<div class="col-6 pvs"> <span class="pvs">
<input type="checkbox" name="exclude" value="Y" /><label for="exclude">2시간초과제외</label>(사진검사일때) <label class="photoInspectionArea">
</div> <input type="checkbox" name="schExclTimeout" class="form-check-input" />
2시간초과제외
</label>
</span>
</template> </template>
<div class="photoInspectionArea"> <div class="photoInspectionArea">
@ -137,7 +157,7 @@
<tr> <tr>
<th width="80px">단속일시</th> <th width="80px">단속일시</th>
<th width="80px">차량번호</th> <th width="80px">차량번호</th>
<th width="80px">단속건수?</th> <th width="80px">위반횟수</th>
<th width="80px">검사결과</th> <th width="80px">검사결과</th>
<th width="80px">처리방법</th> <th width="80px">처리방법</th>
<th width="80px">위반동</th> <th width="80px">위반동</th>
@ -154,7 +174,7 @@
<tr data-key="{CRDN_ID}"> <tr data-key="{CRDN_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD_TM}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_CNT}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{VLTN_NMTM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{unknown}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{unknown}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{unknown}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{unknown}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STDG_NM}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STDG_NM}</td>
@ -276,8 +296,8 @@
<th>처리상태</th> <th>처리상태</th>
<th>금액</th> <th>금액</th>
<th>성명</th> <th>성명</th>
<th>주민번호(전체)</th> <th class="privacy">주민번호(전체)</th>
<th>주민번호(마스크)</th> <th class="privacy-mask">주민번호(마스크)</th>
</tr> </tr>
</thead> </thead>
<tbody id="sameVehicleInspectionSubTbody--${pageName}"></tbody> <tbody id="sameVehicleInspectionSubTbody--${pageName}"></tbody>
@ -290,10 +310,10 @@
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STDG_NM}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STDG_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STTS_CD}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_STTS_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{unknown}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{FFNLG_AMT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{성명}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{RTPYR_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center privacy">{주민번호}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center privacy">{RTPYR_NO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center privacy-mask">{주민번호마스크}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center privacy-mask">************</td>
</tr> </tr>
</template> </template>
<template id="sameVehicleInspectionSubNotFound--${pageName}"> <template id="sameVehicleInspectionSubNotFound--${pageName}">
@ -373,7 +393,7 @@ $(document).ready(function(){
$P.sameVehicleControl = new InspectionControl({ $P.sameVehicleControl = new InspectionControl({
prefix:"sameVehicleInspectionMain", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"sameVehicleInspectionMain", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
keymapper:info => info ? info.CRDN_ID_LIST : "", dataGetter:obj => obj.crdnList, keymapper:info => info ? info.CRDN_ID_LIST : "", dataGetter:obj => obj.crdnList,
formats: { CRDN_CNT : numberFormat } formats: { CRDN_CNT : numberFormat, FFNLG_AMT : numberFormat }
}, },
{ {
prefix:"sameVehicleInspectionSub", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" }, prefix:"sameVehicleInspectionSub", prefixName:"종합", infoSize:"xl", urls : { load : "", getInfo : "" },
@ -402,8 +422,6 @@ $(document).ready(function(){
$P.sameVehicleControl.sub.onDatasetChange = obj => { $P.sameVehicleControl.sub.onDatasetChange = obj => {
$P.renderInspectionDataList("sameVehicleInspectionSub"); $P.renderInspectionDataList("sameVehicleInspectionSub");
//총 건수만 표시
}; };
$P.fnReset = () => { $P.fnReset = () => {
@ -428,6 +446,8 @@ $(document).ready(function(){
var searchOption = document.getElementById("taskSearchOption--${pageName}").content.querySelector("."+cssForTask)?.outerHTML; var searchOption = document.getElementById("taskSearchOption--${pageName}").content.querySelector("."+cssForTask)?.outerHTML;
if(!searchOption) searchOption = ""; if(!searchOption) searchOption = "";
$("#searchByTaskArea--${pageName}").html(searchOption); $("#searchByTaskArea--${pageName}").html(searchOption);
$('#btnPhotoInspection--${pageName}').trigger("click");
} }
$P.searchInspectionList = () => { $P.searchInspectionList = () => {
@ -555,13 +575,21 @@ $(document).ready(function(){
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); //초기화버튼 $('#btnReset--${pageName}').on('click', () => $P.fnReset()); //초기화버튼
$('#btnPhotoInspection--${pageName}').on('click', () => { $('#btnPhotoInspection--${pageName}').on('click', () => {
$(".photoInspectionArea").show(); $(".photoInspectionArea").show();
$(".sameVehicleInspectionArea").hide(); $(".sameVehicleInspectionArea").hide();
$('#btnPhotoInspection--${pageName}').addClass("active");
$('#btnSameVehicleInspection--${pageName}').removeClass("active");
$P.currentDisplay = "photoInspection"; $P.currentDisplay = "photoInspection";
}); });
$('#btnSameVehicleInspection--${pageName}').on('click', () => { $('#btnSameVehicleInspection--${pageName}').on('click', () => {
$(".sameVehicleInspectionArea").show(); $(".sameVehicleInspectionArea").show();
$(".photoInspectionArea").hide(); $(".photoInspectionArea").hide();
$('#btnSameVehicleInspection--${pageName}').addClass("active");
$('#btnPhotoInspection--${pageName}').removeClass("active");
$P.currentDisplay = "sameVehicleInspection"; $P.currentDisplay = "sameVehicleInspection";
}); });
$('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼 $('#btnSearch--${pageName}').on('click', () => $P.searchInspectionList()); //검색버튼
@ -570,9 +598,7 @@ $(document).ready(function(){
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$(".photoInspectionArea").show(); $('#btnPhotoInspection--${pageName}').trigger("click");
$(".sameVehicleInspectionArea").hide();
$P.currentDisplay = "photoInspection";
}); });
</script> </script>
Loading…
Cancel
Save