의견제출 관리 수정.

main
jjh 1 year ago
parent 0331ce5535
commit af02617b05

@ -29,20 +29,20 @@ public interface Excl01Mapper extends AbstractMapper {
*/ */
List<DataObject> selectLevyExclList(Excl01Query req); List<DataObject> selectLevyExclList(Excl01Query req);
/** . /** .
* @param req * @param req
* @return * @return
*/ */
List<DataObject> selectLevyExcls(Excl01Query req); List<DataObject> selectLevyExcls(Excl01Query req);
/** ID . /** ID .
* @param levyExclId ID * @param levyExclId ID
* @return * @return
*/ */
default DataObject selectLevyExclInfo(String levyExclId) { default DataObject selectLevyExclInfo(String levyExclId) {
List<DataObject> levyExclList = selectLevyExcls(new Excl01Query().setLevyExclId(levyExclId).setOrderBy("LEVY_EXCL_ID")); List<DataObject> levyExcl = selectLevyExcls(new Excl01Query().setLevyExclId(levyExclId).setOrderBy("LEVY_EXCL_ID"));
return !levyExclList.isEmpty() ? levyExclList.get(0) : null; return !levyExcl.isEmpty() ? levyExcl.get(0) : null;
} }
/** . /** .

@ -33,18 +33,16 @@ public interface Excl02Mapper extends AbstractMapper {
* @param req * @param req
* @return * @return
*/ */
List<Excl02> selectOpnnSbmsns(Excl02Query req); List<DataObject> selectOpnnSbmsns(Excl02Query req);
/** ID . /** ID .
* @param levyExclId ID * @param opnnId ID
* @return * @return
*/ */
DataObject selectOpnnSbmsnInfo(Excl02Query req);
default DataObject selectOpnnSbmsnInfo(String opnnId) { default DataObject selectOpnnSbmsnInfo(String opnnId) {
DataObject opnnSbmsnInfo = selectOpnnSbmsnInfo(new Excl02Query().setBy("opnnId").setTerm(opnnId)); List<DataObject> opnnSbmsn = selectOpnnSbmsns(new Excl02Query().setOpnnId(opnnId).setOrderBy("OPNN_ID"));
return opnnSbmsnInfo; return !opnnSbmsn.isEmpty() ? opnnSbmsn.get(0) : null;
} }
/** . /** .

@ -28,7 +28,7 @@ public interface Excl02Service {
* @param req * @param req
* @return * @return
*/ */
List<Excl02> getOpinionSubmissions(Excl02Query req); List<DataObject> getOpinionSubmissions(Excl02Query req);
/** ID .<br /> /** ID .<br />
* @param opnnId ID * @param opnnId ID

@ -41,7 +41,7 @@ public class Excl02Bean extends AbstractComponent {
* @param req * @param req
* @return * @return
*/ */
public List<Excl02> getOpinionSubmissions(Excl02Query req) { public List<DataObject> getOpinionSubmissions(Excl02Query req) {
return excl02Mapper.selectOpnnSbmsns(req); return excl02Mapper.selectOpnnSbmsns(req);
} }

@ -35,7 +35,7 @@ public class Excl02ServiceBean extends AbstractServiceBean implements Excl02Serv
} }
@Override @Override
public List<Excl02> getOpinionSubmissions(Excl02Query req) { public List<DataObject> getOpinionSubmissions(Excl02Query req) {
return excl02Bean.getOpinionSubmissions(req); return excl02Bean.getOpinionSubmissions(req);
} }

@ -5,7 +5,6 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -27,7 +26,6 @@ import cokr.xit.foundation.data.DataObject;
* ================================ * ================================
* </pre> * </pre>
*/ */
@RequestMapping(name = "의견제출 대장", value = "/excl/excl02")
public class Excl02Controller extends ApplicationController { public class Excl02Controller extends ApplicationController {
/**의견제출 대장 서비스*/ /**의견제출 대장 서비스*/
@ -44,6 +42,8 @@ public class Excl02Controller extends ApplicationController {
// View(jsp)에서 사용할 공통코드를 조회 // View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM031", "FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM031", "FIM054");
addCodes(commonCodes, mav, "FIM021", "FIM022");
return mav.addObject("pageName", "excl02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix return mav.addObject("pageName", "excl02010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("urlPrefix", "/excl/excl02") // URL로 사용할 prefix .addObject("urlPrefix", "/excl/excl02") // URL로 사용할 prefix
.addObject("infoPrefix", "opnnSbmsn") // prefix .addObject("infoPrefix", "opnnSbmsn") // prefix

@ -114,13 +114,13 @@
<otherwise> <otherwise>
</otherwise> </otherwise>
</choose> </choose>
<if test = "schLevyExclSeCd != null"> <if test="schLevyExclSeCd != null">
AND A.LEVY_EXCL_SE_CD = #{schLevyExclSeCd} /* 부과 제외 구분 코드 */ AND A.LEVY_EXCL_SE_CD = #{schLevyExclSeCd} /* 부과 제외 구분 코드 */
</if> </if>
<if test = "schVhrno != null"> <if test="schVhrno != null">
AND C.VHRNO = #{schVhrno} /* 차량번호 */ AND C.VHRNO = #{schVhrno} /* 차량번호 */
</if> </if>
<if test = "schRtpyrNm != null"> <if test="schRtpyrNm != null">
AND D.RTPYR_NM = #{schRtpyrNm} /* 납부자 명 */ AND D.RTPYR_NM = #{schRtpyrNm} /* 납부자 명 */
</if> </if>
<choose> <choose>

@ -160,10 +160,10 @@
<if test="schOpnnSbmsnSttsCd != null"> <if test="schOpnnSbmsnSttsCd != null">
AND A.OPNN_SBMSN_STTS_CD = #{schOpnnSbmsnSttsCd} /* 의견 제출 상태 코드 */ AND A.OPNN_SBMSN_STTS_CD = #{schOpnnSbmsnSttsCd} /* 의견 제출 상태 코드 */
</if> </if>
<if test = "schVhrno != null"> <if test="schVhrno != null">
AND C.VHRNO = #{schVhrno} /* 차량번호 */ AND C.VHRNO = #{schVhrno} /* 차량번호 */
</if> </if>
<if test = "schSttrNm != null"> <if test="schSttrNm != null">
AND A.STTR_NM = #{schSttrNm} /* 진술자 명 */ AND A.STTR_NM = #{schSttrNm} /* 진술자 명 */
</if> </if>
<choose> <choose>
@ -200,6 +200,36 @@
<otherwise> <otherwise>
</otherwise> </otherwise>
</choose> </choose>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'rcptYmd'"> A.RCPT_YMD </when>
<when test="by == 'rcptNo'"> A.RCPT_NO </when>
<when test="by == 'rcptSeNm'"> A.RCPT_SE_CD </when>
<when test="by == 'ntfctnSeNm'"> A.NTFCTN_SE_CD </when>
<when test="by == 'sttrNm'"> A.STTR_NM </when>
<when test="by == 'opnnSbmsnSttsNm'"> A.OPNN_SBMSN_STTS_CD </when>
<when test="by == 'opnnSbmsnSeNm'"> A.OPNN_SBMSN_SE_CD </when>
<when test="by == 'opnnSbmsnGist'"> A.OPNN_SBMSN_GIST </when>
<when test="by == 'crdnYmd'"> C.CRDN_YMD </when>
<when test="by == 'vhrno'"> C.VHRNO </when>
<when test="by == 'crdnPlc'"> C.CRDN_PLC </when>
<when test="by == 'crdnSttsNm'"> C.CRDN_STTS_CD </when>
<when test="by == 'DOC_NO'"> A.DOC_NO </when>
<when test="by == 'ANS_YMD'"> A.ANS_YMD </when>
<when test="by == 'ANS_CN'"> A.ANS_CN </when>
<when test="by == 'rtpyrNm'"> D.RTPYR_NM </when>
<when test="by == 'rtpyrNo'"> D.RTPYR_NO </when>
<when test="by == 'rtpyrBrdt'"> D.RTPYR_BRDT </when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
</otherwise>
</choose>
</if>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /> <include refid="utility.paging-suffix" />
</select> </select>

@ -41,7 +41,7 @@
<c:forEach items="${FIM054List}" var="item"> <c:forEach items="${FIM054List}" var="item">
<label> <label>
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분" <input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분"
value="${item.code}" onchange="fnResetAndChangeBiz${pageName}(this.value);" required> value="${item.code}" onchange="fnResetAndChangeBiz${pageName}(this.value);">
${item.value} ${item.value}
</label> </label>
</c:forEach> </c:forEach>
@ -70,7 +70,7 @@
<label class="form-label fw-bold form-search-title">부과제외구분</label> <label class="form-label fw-bold form-search-title">부과제외구분</label>
</div> </div>
<div class="col-5"> <div class="col-5">
<select class="form-select w-px-100" id="schLevyExclSeCd--${pageName}" name="schLevyExclSeCd"> <select class="form-select w-px-150" id="schLevyExclSeCd--${pageName}" name="schLevyExclSeCd">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM021List}" var="item"> <c:forEach items="${FIM021List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
@ -112,12 +112,12 @@
<!-- 동적검색 --> <!-- 동적검색 -->
<div class="col-1 text-end"> <div class="col-1 text-end">
<input type="hidden" id="by--${pageName}" name="by" /> <input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control w-100 text-end" id="byOutput--${pageName}" value="동적 검색" readonly /> <input type="text" class="form-control w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
</div> </div>
<div class="col-3"> <div class="col-3">
<input type="hidden" id="mainOption--${pageName}" name="mainOption" /> <input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" /> <input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" class="form-control" id="term--${pageName}" name="term" /> <input type="text" class="form-control w-px-250" id="term--${pageName}" name="term" />
</div> </div>
<div class="col-2"> <div class="col-2">
<!-- 상세 검색조건 버튼 --> <!-- 상세 검색조건 버튼 -->
@ -162,12 +162,6 @@
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<button class="btn btn-primary" id="btnCreateNotLevy--${pageName}" title="비부과 등록" onclick="fnCreate${pageName}('1');">
비부과 등록
</button>
<button class="btn btn-primary" id="btnCreateWarning--${pageName}" title="계고 등록" onclick="fnCreate${pageName}('2');">
계고 등록
</button>
<button class="btn btn-primary" id="btnUpdate--${pageName}" title="수정" onclick="fnModify${pageName}();"> <button class="btn btn-primary" id="btnUpdate--${pageName}" title="수정" onclick="fnModify${pageName}();">
수정 수정
</button> </button>
@ -202,7 +196,7 @@
<th onclick="searchFromGridTitle('CRDN_PLC', this.innerText, 'match', 'part');">단속장소</th> <th onclick="searchFromGridTitle('CRDN_PLC', this.innerText, 'match', 'part');">단속장소</th>
<th onclick="searchFromGridTitle('CRDN_STTS_NM', this.innerText, 'codeValue', 'FIM010');">처리상태명</th> <th onclick="searchFromGridTitle('CRDN_STTS_NM', this.innerText, 'codeValue', 'FIM010');">처리상태명</th>
<th onclick="searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'part');">납부자명</th> <th onclick="searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'part');">납부자명</th>
<th onclick="searchFromGridTitle('RTPYR_BRDT', this.innerText, 'match', 'part');">납부자생년월일</th> <th onclick="searchFromGridTitle('RTPYR_BRDT', this.innerText, 'ymd', '');">납부자생일</th>
<th>등록일시</th> <th>등록일시</th>
<th>등록사용자</th> <th>등록사용자</th>
<th>수정일시</th> <th>수정일시</th>
@ -338,24 +332,6 @@
$("#btnRemove--${pageName}").prop("disabled", keys.length < 1); $("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
}; };
// DataTables에 click, dbclick 이벤트
function renderList${pageName}() {
let ${infoPrefix}List = ${pageName}Control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
);
$("#tbody--${pageName}").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
}
// 개별총정보 dialog // 개별총정보 dialog
${pageName}Control.getTotalInfo = (params) => { ${pageName}Control.getTotalInfo = (params) => {
let info = ${pageName}Control.dataset.getCurrent("item"); let info = ${pageName}Control.dataset.getCurrent("item");
@ -455,18 +431,23 @@
}); });
} }
// 일자 포맷 // DataTables에 click, dbclick 이벤트
$("frmSearch--${pageName}").find(".form-date").each(function() { function renderList${pageName}() {
$(this).on("input",function() { let ${infoPrefix}List = ${pageName}Control.dataset;
let value = this.value.replaceAll("-", ""); let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("LEVY_EXCL_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
);
if (value.length > 7) { $("#tbody--${pageName}").html(trs.join());
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6); $("th input[type='checkbox']").prop("checked", false);
} else if(value.length > 5){
this.value = value.substring(0, 4) + "-" + value.substring(4);
} }
});
});
/************************************************************************** /**************************************************************************
* function * function
@ -510,7 +491,7 @@
// 수정 // 수정
function fnModify${pageName}() { function fnModify${pageName}() {
let levyExclId = excl01010Control.dataset.getValue("LEVY_EXCL_ID"); let levyExclId = ${pageName}Control.dataset.getValue("LEVY_EXCL_ID");
// 부과 제외 ID 가 없다면.. return // 부과 제외 ID 가 없다면.. return
if (levyExclId == undefined || levyExclId == "") { if (levyExclId == undefined || levyExclId == "") {

@ -5,7 +5,6 @@
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목</h4--%>
<c:set var="prefixName" scope="request">의견제출</c:set> <c:set var="prefixName" scope="request">의견제출</c:set>
<!-- Page Body --> <!-- Page Body -->
@ -14,10 +13,16 @@
<div> <div>
<!-- 상단 버튼 --> <!-- 상단 버튼 -->
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}" title="초기화">초기화</button> <button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}" title="초기화" onclick="fnReset${pageName}();">
초기화
</button>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" class="btn btn-search" id="btnSearch--${pageName}" title="검색">검색</button> <button type="button" class="btn btn-search" id="btnSearch--${pageName}" title="검색" onclick="fnSearchList${pageName}();">
<button type="button" class="btn btn-search" id="btnExcel--${pageName}" title="엑셀">엑셀</button> 검색
</button>
<button type="button" class="btn btn-search" id="btnExcel--${pageName}" title="엑셀" onclick="fnExcel${pageName}();">
엑셀
</button>
</span> </span>
</div> </div>
<!-- / 상단 버튼 --> <!-- / 상단 버튼 -->
@ -35,10 +40,8 @@
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${FIM054List}" var="item"> <c:forEach items="${FIM054List}" var="item">
<label> <label>
<input type="radio" class="form-check-input" id="rdoTaskSeCd--${pageName}" name="taskSeCd" alt="업무구분" <input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분"
value="${item.code}" value="${item.code}" onchange="fnResetAndChangeBiz${pageName}(this.value);">
onchange="pageObject['${pageName}'].fnResetAndChangeBiz(this.value);"
required>
${item.value} ${item.value}
</label> </label>
</c:forEach> </c:forEach>
@ -68,7 +71,7 @@
<label class="form-label fw-bold form-search-title">의견제출상태</label> <label class="form-label fw-bold form-search-title">의견제출상태</label>
</div> </div>
<div class="col-5"> <div class="col-5">
<select id="schOpnnSbmsnSttsCd--${pageName}" name="schOpnnSbmsnSttsCd" class="form-select"> <select class="form-select w-px-150" id="schOpnnSbmsnSttsCd--${pageName}" name="schOpnnSbmsnSttsCd">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM031List}" var="item"> <c:forEach items="${FIM031List}" var="item">
<option value="${item.code}">${item.value}</option> <option value="${item.code}">${item.value}</option>
@ -80,14 +83,14 @@
<label class="form-label fw-bold form-search-title">차량번호</label> <label class="form-label fw-bold form-search-title">차량번호</label>
</div> </div>
<div class="col-5"> <div class="col-5">
<input type="text" class="form-control" id="schVhrno--${pageName}" name="schVhrno" /> <input type="text" class="form-control w-px-150" id="schVhrno--${pageName}" name="schVhrno" />
</div> </div>
<!-- 진술자명 --> <!-- 진술자명 -->
<div class="col-1 text-end"> <div class="col-1 text-end">
<label class="form-label fw-bold form-search-title">진술자명</label> <label class="form-label fw-bold form-search-title">진술자명</label>
</div> </div>
<div class="col-5"> <div class="col-5">
<input type="text" class="form-control" id="schSttrNm--${pageName}" name="schSttrNm" /> <input type="text" class="form-control w-px-150" id="schSttrNm--${pageName}" name="schSttrNm" />
</div> </div>
<!-- 등록일자 --> <!-- 등록일자 -->
<div class="col-1 text-end"> <div class="col-1 text-end">
@ -110,10 +113,12 @@
<!-- 동적검색 --> <!-- 동적검색 -->
<div class="col-1 text-end"> <div class="col-1 text-end">
<input type="hidden" id="by--${pageName}" name="by" /> <input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control w-100 text-end" id="byOutput--${pageName}" value="동적 검색" readonly /> <input type="text" class="form-control w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
</div> </div>
<div class="col-3"> <div class="col-3">
<input type="text" class="form-control" id="term--${pageName}" name="term" /> <input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" class="form-control w-px-250" id="term--${pageName}" name="term" />
</div> </div>
<div class="col-2"> <div class="col-2">
<!-- 상세 검색조건 버튼 --> <!-- 상세 검색조건 버튼 -->
@ -158,8 +163,15 @@
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<a href="#" class="btn btn-blue" id="" title="업무처리1">업무 처리1</a> <button class="btn btn-primary" id="btnCreateNotLevy--${pageName}" title="등록" onclick="fnCreate${pageName}();">
<a href="#" class="btn btn-blue" id="" title="업무처리2">업무 처리2</a> 등록
</button>
<button class="btn btn-primary" id="btnUpdate--${pageName}" title="수정" onclick="fnModify${pageName}();">
수정
</button>
<button class="btn btn-primary" id="btnRemove--${pageName}" title="삭제" onclick="fnRemove${pageName}();">
삭제
</button>
</span> </span>
</span> </span>
</div> </div>
@ -172,62 +184,68 @@
<table class="datatables-ajax table table-bordered dataTable no-footer" <table class="datatables-ajax table table-bordered dataTable no-footer"
id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead> <thead>
<tr id="theadTr--${pageName}" style="text-align:center;"> <tr id="theadTr--${pageName}" data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;">NO.</th> <th class="sorting" style="width: 24px;">NO.</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 24px;"> <th class="sorting" style="width: 24px;">
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);"> <input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
</th> </th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">접수일자</th> <th onclick="searchFromGridTitle('RCPT_YMD', this.innerText, 'ymd', '');">접수일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">접수번호</th> <th onclick="searchFromGridTitle('RCPT_NO', this.innerText, 'match', 'part');">접수번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">접수구분명</th> <th onclick="searchFromGridTitle('RCPT_SE_NM', this.innerText, 'codeValue', 'FIM029');">접수구분명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">통보구분명</th> <th onclick="searchFromGridTitle('NTFCTN_SE_NM', this.innerText, 'codeValue', 'FIM030');">통보구분명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">진술자명</th> <th onclick="searchFromGridTitle('STTR_NM', this.innerText, 'match', 'part');">진술자명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속일시</th> <th onclick="searchFromGridTitle('OPNN_SBMSN_STTS_NM', this.innerText, 'codeValue', 'FIM031');">의견제출상태</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">차량번호</th> <th onclick="searchFromGridTitle('OPNN_SBMSN_SE_NM', this.innerText, 'codeValue', 'FIM033');">의견제출분류</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">단속장소</th> <th onclick="searchFromGridTitle('OPNN_SBMSN_GIST', this.innerText, 'match', 'part');">의견제출요지</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 80px;">의견제출상태</th> <th onclick="searchFromGridTitle('CRDN_YMD', this.innerText, 'ymd', '');">단속일시</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">의견제출분류</th> <th onclick="searchFromGridTitle('VHRNO', this.innerText, 'match', 'part');">차량번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 320px;">의견제출요지</th> <th onclick="searchFromGridTitle('CRDN_PLC', this.innerText, 'match', 'part');">단속장소</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">문서번호</th> <th onclick="searchFromGridTitle('CRDN_STTS_NM', this.innerText, 'codeValue', 'FIM010');">처리상태명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">답변일자</th> <th onclick="searchFromGridTitle('DOC_NO', this.innerText, 'ymd', '');">문서번호</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 320px;">답변내용</th> <th onclick="searchFromGridTitle('ANS_YMD', this.innerText, 'ymd', '');">답변일자</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록일시</th> <th onclick="searchFromGridTitle('ANS_CN', this.innerText, 'match', 'part');">답변내용</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">등록사용자</th> <th onclick="searchFromGridTitle('RTPYR_NM', this.innerText, 'match', 'part');">납부자명</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정일시</th> <th onclick="searchFromGridTitle('RTPYR_BRDT', this.innerText, 'ymd', '');">납부자생일</th>
<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" style="width: 120px;">수정사용자</th> <th>등록일시</th>
<th>등록사용자</th>
<th>수정일시</th>
<th>수정사용자</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}"> <tbody id="tbody--${pageName}">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="{OPNN_ID}"> <tr data-key="OPNN_ID">
<td style="text-align:center;" {onclick} {ondblclick}>{ROW_NUM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td style="text-align:center;"> <td class="text-center">
<input value="{OPNN_ID}" onchange="${pageName}Control.select('{OPNN_ID}', this.checked);" type="checkbox" class="form-check-input"> <input type="checkbox" class="form-check-input" value="{OPNN_ID}" onchange="${pageName}Control.select('{OPNN_ID}', this.checked);">
</td> </td>
<td style="text-align:center;" {onclick} {ondblclick}>{RCPT_YMD}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RCPT_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{RCPT_NO}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RCPT_NO}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{RCPT_SE_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RCPT_SE_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{NTFCTN_SE_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{NTFCTN_SE_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{STTR_NM}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{STTR_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{CRDN_YMD_TM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{OPNN_SBMSN_STTS_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{VHRNO}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{OPNN_SBMSN_SE_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{CRDN_PLC}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{OPNN_SBMSN_GIST}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{OPNN_SBMSN_STTS_NM}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{OPNN_SBMSN_SE_NM}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{OPNN_SBMSN_GIST}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{DOC_NO}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STTS_NM}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{ANS_YMD}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DOC_NO}</td>
<td style="text-align:left;" {onclick} {ondblclick}>{ANS_CN}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ANS_YMD}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{REG_DT}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ANS_CN}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{RGTR}</td> <td class="text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFCN_DT}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_BRDT_FORMAT}</td>
<td style="text-align:center;" {onclick} {ondblclick}>{MDFR}</td> <td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR}</td>
</tr> </tr>
</template> </template>
<template id="${infoPrefix}NotFound--${pageName}"> <template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd"> <tr class="odd">
<td valign="top" colspan="14" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td> <td valign="top" colspan="23" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
</table> </table>
@ -249,71 +267,46 @@
</div> </div>
<!-- Content wrapper --> <!-- Content wrapper -->
<!-- js -->
<script src="<c:url value="/resources/js/fims/excl/excl02010.js?${ver}"/>"></script>
<script> <script>
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
// Control 생성 // URL
var ${pageName}Control = new OpnnSbmsnControl("${urlPrefix}"); var prefixUrl = "/excl/excl02";
// 공통 코드
/************************************************************************** /**************************************************************************
* 초기 셋팅 * DatasetControl
**************************************************************************/ **************************************************************************/
// 검색조건 초기값 셋팅 var ${pageName}Control = new DatasetControl({
function initSearch${pageName}() { prefix : "opnnSbmsn"
// 업무구분 , prefixName : "의견제출"
let defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); , infoSize : "lg"
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); , keymapper : info => info ? info.OPNN_ID : ""
, dataGetter : obj => obj.opnnSbmsnList
// 달력 초기화 , appendData : true
initDatepicker("frmSearch--${pageName}"); , urls : {
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-365).date); load : wctx.url(prefixUrl + "/010/list.do") // 검색
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); , getInfo : wctx.url(prefixUrl + "/020/info.do") // 등록 및 수정 팝업
, create : wctx.url(prefixUrl + "/020/create.do") // 신규 등록
, update : wctx.url(prefixUrl + "/020/update.do") // 자료 수정
, remove : wctx.url(prefixUrl + "/010/remove.do") // 자료 삭제
, getTotalInfo : wctx.url("/sprt/sprt01/020/info.do") // 개별총정보
} }
, formats : {
// RCPT_YMD : dateFormat
function setEvent${pageName}() { , ANS_YMD : dateFormat
// 버튼 이벤트 , ANS_YMD_TM : datetimeFormat
$("#btnSearch--${pageName}").on("click", () => searchList${pageName}()); // 검색 , CRDN_YMD_TM : dateFormat
$("#term--${pageName}").onEnterPress(() => searchList${pageName}()); // 동적 검색 , REG_DT : datetimeFormat
, MDFCN_DT : datetimeFormat
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
if (el.scrollTop() == 0) return;
if ((el[0].scrollHeight - el.scrollTop() + 15) == el.outerHeight()) {
searchList${pageName}(${pageName}Control.query.pageNum + 1);
} }
}); });
}
/************************************************************************** /**************************************************************************
* Event * DatasetControl
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트 // onDatasetChange 이벤트
function renderList${pageName}() {
let ${infoPrefix}List = ${pageName}Control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, 'onclick="${pageName}Control.setCurrent(\'' + dataItem.getValue("OPNN_ID") + '\');"')
.replace(/{ondblclick}/gi, 'ondblclick="${pageName}Control.getInfo(\'' + 'opnnId=' + dataItem.getValue("OPNN_ID") + '\')"')
);
$("#tbody--${pageName}").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
}
// Dataset 변경
${pageName}Control.onDatasetChange = obj => { ${pageName}Control.onDatasetChange = obj => {
renderList${pageName}(); renderList${pageName}();
@ -327,7 +320,7 @@
}); });
}; };
// DataTables 클릭 이벤트 // onCurrentChange 이벤트
${pageName}Control.onCurrentChange = item => { ${pageName}Control.onCurrentChange = item => {
// //
if (!item) return; if (!item) return;
@ -337,7 +330,7 @@
$("#tbody--${pageName}").setCurrentRow(key); $("#tbody--${pageName}").setCurrentRow(key);
}; };
// DataTables checkbox 클릭 이벤트 // onSelectionChange 이벤트
${pageName}Control.onSelectionChange = selected => { ${pageName}Control.onSelectionChange = selected => {
let ${infoPrefix}List = ${pageName}Control.dataset; let ${infoPrefix}List = ${pageName}Control.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e)); let keys = selected.map(e => ${infoPrefix}List.getKey(e));
@ -348,26 +341,82 @@
checkbox.prop("checked", keys.includes(checkbox.val())); checkbox.prop("checked", keys.includes(checkbox.val()));
}); });
// $("#btnRemove${infoPrefix}s").prop("disabled", keys.length < 1); $("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
}; };
// 개별총정보 dialog
${pageName}Control.getTotalInfo = (params) => {
let info = ${pageName}Control.dataset.getCurrent("item");
ajax.get({
url : ${pageName}Control.urls.getTotalInfo
, data : params || {}
, success : resp => {
resp = resp.replace(/infoPrefix/g, this.prefix)
.replace(/prefixName/g, this.prefixName)
dialog.open({
id : ${pageName}Control.prefixed("dialog")
, title : "개별총정보"
, content : resp
, size : ${pageName}Control.infoSize
, init : () => ${pageName}Control.setInfo(info)
});
}
});
}
/************************************************************************** /**************************************************************************
* function *
**************************************************************************/ **************************************************************************/
// 검색 // 초기 설정
function searchList${pageName}(pageNumber) { function initForm${pageName}() {
// pageNumber 값 확인 // 달력 초기화
if (!pageNumber) pageNumber = 1; initDatepicker("frmSearch--${pageName}");
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-365).date);
$("#schDateTo--${pageName}").datepicker("setDate", new Date());
${pageName}Control.query = fnGetParams${pageName}(); // 검색조건 ${pageName}Control.dataset.clear();
${pageName}Control.query.orderBy = "OPNN_ID"; // 정렬 }
${pageName}Control.load(pageNumber); // 이벤트
function setEvent${pageName}() {
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
if (el.scrollTop() == 0) return;
if ((el[0].scrollHeight - el.scrollTop() + 17) == el.outerHeight()) {
fnSearchList${pageName}(${pageName}Control.query.pageNum + 1);
} }
});
}
// DataTables에 click, dbclick 이벤트
function renderList${pageName}() {
let ${infoPrefix}List = ${pageName}Control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("OPNN_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
);
$("#tbody--${pageName}").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
}
/**************************************************************************
* function
**************************************************************************/
// 업무구분 변경 // 업무구분 변경
function fnResetAndChangeBiz(taskSeCd) { function fnResetAndChangeBiz${pageName}(taskSeCd) {
$("tbody--${pageName}").html(""); fnReset${pageName}();
} }
// 검색 조건 파라미터 가져오기 // 검색 조건 파라미터 가져오기
@ -381,17 +430,68 @@
return formData; return formData;
} }
// 초기화
function fnReset${pageName}() {
initForm${pageName}();
}
// 검색
function fnSearchList${pageName}(pageNumber) {
// pageNumber 값 확인
if (!pageNumber) pageNumber = 1;
${pageName}Control.query = fnGetParams${pageName}(); // 검색조건
${pageName}Control.query.orderBy = "OPNN_ID"; // 정렬
${pageName}Control.load(pageNumber);
}
// 엑셀
function fnExcel${pageName}() {
}
// 수정
function fnModify${pageName}() {
let opnnId = ${pageName}Control.dataset.getValue("OPNN_ID");
// 부과 제외 ID 가 없다면.. return
if (opnnId == undefined || opnnId == "") {
return;
}
let params = {
opnnId : opnnId
};
${pageName}Control.getInfo(params);
}
// 삭제
function fnRemove${pageName}() {
dialog.alert({
content : "선택한 ${prefixName} 정보를 삭제하시겠습니까?"
, onOK : () => {
${pageName}Control.remove();
}
});
}
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
**************************************************************************/ **************************************************************************/
$(document).ready(function() { $(document).ready(function() {
// 검색조건 초기값 설정 // 업무구분 및 화면 초기 설정
initSearch${pageName}(); let defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked", true);
fnResetAndChangeBiz${pageName}(defaultBizValue);
// 이벤트 설정 // 이벤트 설정
setEvent${pageName}(); setEvent${pageName}();
${pageName}Control.addData(${opnnSbmsn}); // Dataset 셋팅 - List 일경우 addData 하여 자료를 추가
${pageName}Control.addData(${levyExcl});
}); });
// #sourceURL=excl02010-main.jsp // #sourceURL=excl02010-main.jsp

@ -1,28 +0,0 @@
class OpnnSbmsnControl extends DatasetControl {
constructor(prefixUrl) {
let conf = {
prefix : "opnnSbmsn"
, prefixName : "의견제출"
, infoSize : "xl"
, keymapper : info => info ? info.OPNN_ID : ""
, dataGetter : obj => obj.opnnSbmsnList
, appendData : true
, urls : {
load : wctx.url(prefixUrl + "/010/list.do")
, getInfo : wctx.url(prefixUrl + "/020/info.do")
, create : wctx.url(prefixUrl + "/020/create.do")
, update : wctx.url(prefixUrl + "/020/update.do")
, remove : wctx.url(prefixUrl + "/020/remove.do")
}
, formats : {
RCPT_YMD : dateFormat
, ANS_YMD : dateFormat
, ANS_YMD_TM : datetimeFormat
, CRDN_YMD_TM : datetimeFormat
, REG_DT : datetimeFormat
, MDFCN_DT : datetimeFormat
}
}
super(conf);
}
}

@ -1,25 +0,0 @@
class CrdnReControl extends DatasetControl {
constructor(prefixUrl) {
let conf = {
prefix : "crdnRe"
, prefixName : "단속재등록"
, infoSize : "xl"
, keymapper : info => info ? info.RE_REG_ID : ""
, dataGetter : obj => obj.crdnReList
, appendData : true
, urls : {
load : wctx.url(prefixUrl + "/010/list.do")
, create : wctx.url(prefixUrl + "/010/create.do")
, update : wctx.url(prefixUrl + "/010/update.do")
, remove : wctx.url(prefixUrl + "/010/remove.do")
}
, formats : {
CRDN_REG_YMD : dateFormat
, CRDN_YMD_TM : datetimeFormat
, REG_DT : datetimeFormat
}
}
super(conf);
}
}
Loading…
Cancel
Save