발송반송 - 고지서 발송 현황 추가.

main
jjh 1 year ago
parent ee1ef8b0f5
commit 476553d009

@ -42,11 +42,15 @@ public class Sndb01Controller extends ApplicationController {
, getWrngSndngList = "/030/list.do" // 계도장 발송 현황 목록 조회
, getWrngSndngDltInfo = "/040/info.do" // 계도장 발송 상세 대장 조회
, advanceNoticeSendingTargetMain = "/050/main.do" // 사전통지 발송 대상 메인 화면
, getAdvntceSndngTrgtList = "/050/list.do" // 사전통지 발송 대상 목록 조회
, getAdvntceSndngTrgts = "/060/info.do" // 사전통지 발송 대상 조회
, getAdvanceNoticeSndngTrgtList = "/050/list.do" // 사전통지 발송 대상 목록 조회
, getAdvanceNoticeSndngTrgts = "/060/info.do" // 사전통지 발송 대상 조회
, advanceNoticeSendingMain = "/070/main.do" // 사전통지 발송 현황 메인 화면
, getAdvntceSndngList = "/070/list.do" // 사전통지 발송 대상 목록 조회
, getAdvntceSndngDltInfo = "/080/info.do" // 사전통지 발송 상세 대장 조회
, getAdvanceNoticeSndngList = "/070/list.do" // 사전통지 발송 대상 목록 조회
, getAdvanceNoticeSndngDltInfo = "/080/info.do" // 사전통지 발송 상세 대장 조회
, noticeSheetSendingMain = "/090/main.do" // 고지서 발송 현황 메인 화면
, getNoticeSheetSndngList = "/090/list.do" // 고지서 발송 대상 목록 조회
, getNoticeSheetSndngDltInfo = "/100/info.do" // 고지서 발송 상세 대장 조회
, createSndng = "/020/createSndng.do" // 발송 대상 등록
, createSndngLink = "/080/createSndngLink.do" // 우편 통합 발송 연계 등록
@ -233,7 +237,7 @@ public class Sndb01Controller extends ApplicationController {
* "sndngTotal":
* }</code></pre>
*/
public ModelAndView getAdvntceSndngTrgtList(SndbQuery req) {
public ModelAndView getAdvanceNoticeSndngTrgtList(SndbQuery req) {
List<?> result = sndngService.getAdvntceSndngTrgtList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, "advntceSndngTrgt");
@ -246,7 +250,7 @@ public class Sndb01Controller extends ApplicationController {
* "advntceSndngTrgs": [ ]
* }</pre>
*/
public ModelAndView getAdvntceSndngTrgts(SndbQuery req) {
public ModelAndView getAdvanceNoticeSndngTrgts(SndbQuery req) {
List<DataObject> advntceSndngTrgs = sndngService.getAdvntceSndngTrgts(req);
DataObject taskInfo = taskInfoService.getTaskInfo(new TaskInfoQuery().setSggCd(req.getSggCd())
@ -298,7 +302,7 @@ public class Sndb01Controller extends ApplicationController {
* "sndngTotal":
* }</code></pre>
*/
public ModelAndView getAdvntceSndngList(SndbQuery req) {
public ModelAndView getAdvanceNoticeSndngList(SndbQuery req) {
List<?> result = sndngService.getSndngList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, "sndng");
@ -311,7 +315,7 @@ public class Sndb01Controller extends ApplicationController {
* "sndngDtls": [ ]
* }</pre>
*/
public ModelAndView getAdvntceSndngDltInfo(SndbQuery req) {
public ModelAndView getAdvanceNoticeSndngDltInfo(SndbQuery req) {
List<?> sndngDtls = sndngService.getSndngDtls(req);
boolean json = jsonResponse();
@ -326,6 +330,65 @@ public class Sndb01Controller extends ApplicationController {
;
}
/** (sndb/sndb01/090-main) .
* {@link #getSndngList(SndbQuery) } .
* @return /sndb/sndb01/090-main
*/
public ModelAndView noticeSheetSendingMain() {
ModelAndView mav = new ModelAndView("fims/sndb/sndb01090-main");
// 사용자 정보
ManagedUser managedUser = (ManagedUser)currentUser().getUser();
// View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
return mav.addObject("pageName", "sndb01090") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "sndng") // prefix
.addObject("sggCd", managedUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
;
}
/** .<br />
* {@link SndngService#getSndngList(SndngQuery)}
* @param req
* @return jsonView
* <pre><code> {
* "sndngList": [ ]
* "sndngStart":
* "sndngFetch":
* "sndngTotal":
* }</code></pre>
*/
public ModelAndView getNoticeSheetSndngList(SndbQuery req) {
List<?> result = sndngService.getSndngList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, "sndng");
}
/** - (sndb/sndb01/100-info) .
* @param sndngId ID
* @return fims/sndb/sndb01100-info jsonView
* <pre>{
* "sndngDtls": [ ]
* }</pre>
*/
public ModelAndView getNoticeSheetSndngDltInfo(SndbQuery req) {
List<?> sndngDtls = sndngService.getSndngDtls(req);
boolean json = jsonResponse();
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/sndb/sndb01100-info");
return mav.addObject("pageName", "sndb01100")
.addObject("sggCd", req.getSggCd())
.addObject("taskSeCd", req.getTaskSeCd())
.addObject("sndngSeCd", req.getSndngSeCd()) // 발송 구분 코드
.addObject("nhtSndngDtlInfo", json ? sndngDtls : toJson(sndngDtls)) // 고지서 발송 현황 세부내용
;
}
/** .
* @param sndng
* @return jsonView

@ -246,10 +246,10 @@ public class CmnController {
}
@Controller
@RequestMapping(name = "발송", value = Sndb01Controller.CLASS_URL)
@RequestMapping(name = "발송반송", value = Sndb01Controller.CLASS_URL)
class Sndb01Controller extends cokr.xit.fims.sndb.web.Sndb01Controller {
/** .
/** .
* @return fims/sndb/sndb01010-main
*/
@Override
@ -267,7 +267,7 @@ public class CmnController {
return super.warningSendingMain();
}
/** .
/** .
* @return fims/sndb/sndb01050-main
*/
@Override
@ -276,7 +276,7 @@ public class CmnController {
return super.advanceNoticeSendingTargetMain();
}
/** .
/** .
* @return fims/sndb/sndb01070-main
*/
@Override
@ -285,6 +285,15 @@ public class CmnController {
return super.advanceNoticeSendingMain();
}
/** .
* @return fims/sndb/sndb01090-main
*/
@Override
@RequestMapping(name = "고지서 발송 현황", value = METHOD_URL.noticeSheetSendingMain)
public ModelAndView noticeSheetSendingMain() {
return super.noticeSheetSendingMain();
}
}
@Controller

@ -511,69 +511,85 @@ public class DpvController {
}
@Controller
@RequestMapping(name="장애인과태료업무 발송,반송 관리_계고장 발송", value=CLASS_URL+Sndb01Controller.CLASS_URL)
@RequestMapping(name="장애인 과태료 업무 발송,반송 관리", value=CLASS_URL+Sndb01Controller.CLASS_URL)
class Sndb01Controller extends cokr.xit.fims.sndb.web.Sndb01Controller {
@Override
@RequestMapping(name="장애인과태료업무 계고장 발송 대상 목록 조회", value=METHOD_URL.getWrngSndngTrgtList)
@RequestMapping(name="계고장 발송 대상 목록 조회", value=METHOD_URL.getWrngSndngTrgtList)
public ModelAndView getWrngSndngTrgtList(SndbQuery req) {
return super.getWrngSndngTrgtList(req);
}
@Override
@RequestMapping(name="장애인과태료업무 계고장 발송 대상 상세 조회", value=METHOD_URL.getWrngSndngTrgts)
@RequestMapping(name="계고장 발송 대상 상세 조회", value=METHOD_URL.getWrngSndngTrgts)
public ModelAndView getWrngSndngTrgts(SndbQuery req) {
return super.getWrngSndngTrgts(req);
}
@Override
@RequestMapping(name="장애인과태료업무 계고장 발송 현황 목록 조회", value=METHOD_URL.getWrngSndngList)
@RequestMapping(name="계고장 발송 현황 목록 조회", value=METHOD_URL.getWrngSndngList)
public ModelAndView getWrngSndngList(SndbQuery req) {
return super.getWrngSndngList(req);
}
@Override
@RequestMapping(name="장애인과태료업무 계고장 발송 상세 대장 조회", value=METHOD_URL.getWrngSndngDltInfo)
@RequestMapping(name="계고장 발송 현황 상세 조회", value=METHOD_URL.getWrngSndngDltInfo)
public ModelAndView getWrngSndngDltInfo(SndbQuery req) {
return super.getWrngSndngDltInfo(req);
}
@Override
@RequestMapping(name="장애인과태료업무 사전통지 발송 대상 목록 조회", value=METHOD_URL.getAdvntceSndngTrgtList)
public ModelAndView getAdvntceSndngTrgtList(SndbQuery req) {
return super.getAdvntceSndngTrgtList(req);
@RequestMapping(name="사전통지 발송 대상 목록 조회", value=METHOD_URL.getAdvanceNoticeSndngTrgtList)
public ModelAndView getAdvanceNoticeSndngTrgtList(SndbQuery req) {
return super.getAdvanceNoticeSndngTrgtList(req);
}
@Override
@RequestMapping(name="장애인과태료업무 사전통지 발송 대상 상세 조회", value=METHOD_URL.getAdvntceSndngTrgts)
public ModelAndView getAdvntceSndngTrgts(SndbQuery req) {
return super.getAdvntceSndngTrgts(req);
@RequestMapping(name="사전통지 발송 대상 상세 조회", value=METHOD_URL.getAdvanceNoticeSndngTrgts)
public ModelAndView getAdvanceNoticeSndngTrgts(SndbQuery req) {
return super.getAdvanceNoticeSndngTrgts(req);
}
@Override
@RequestMapping(name="장애인과태료업무 사전통지 발송 현황 목록 조회", value=METHOD_URL.getAdvntceSndngList)
public ModelAndView getAdvntceSndngList(SndbQuery req) {
return super.getAdvntceSndngList(req);
@RequestMapping(name="사전통지 발송 현황 목록 조회", value=METHOD_URL.getAdvanceNoticeSndngList)
public ModelAndView getAdvanceNoticeSndngList(SndbQuery req) {
return super.getAdvanceNoticeSndngList(req);
}
@Override
@RequestMapping(name="장애인과태료업무 사전통지 발송 상세 대장 조회", value=METHOD_URL.getAdvntceSndngDltInfo)
public ModelAndView getAdvntceSndngDltInfo(SndbQuery req) {
return super.getAdvntceSndngDltInfo(req);
@RequestMapping(name="사전통지 발송 현황 상세 조회", value=METHOD_URL.getAdvanceNoticeSndngDltInfo)
public ModelAndView getAdvanceNoticeSndngDltInfo(SndbQuery req) {
return super.getAdvanceNoticeSndngDltInfo(req);
}
@Override
@RequestMapping(name="장애인과태료업무 발송 등록", value=METHOD_URL.createSndng)
@RequestMapping(name="고지서 발송 현황 목록 조회", value=METHOD_URL.getNoticeSheetSndngList)
public ModelAndView getNoticeSheetSndngList(SndbQuery req) {
return super.getNoticeSheetSndngList(req);
}
@Override
@RequestMapping(name="고지서 발송 현황 상세 조회", value=METHOD_URL.getNoticeSheetSndngDltInfo)
public ModelAndView getNoticeSheetSndngDltInfo(SndbQuery req) {
return super.getNoticeSheetSndngDltInfo(req);
}
@Override
@RequestMapping(name="발송 등록", value=METHOD_URL.createSndng)
public ModelAndView createSndng(Sndng sndng) {
return super.createSndng(sndng);
}
@Override
@RequestMapping(name="장애인과태료업무 우편통합 발송 연계 등록", value=METHOD_URL.createSndngLink)
@RequestMapping(name="우편통합 발송 연계 등록", value=METHOD_URL.createSndngLink)
public ModelAndView createSndngLink(Sndng sndng) {
return super.createSndngLink(sndng);
}
@Override
@RequestMapping(name="장애인과태료업무 발송상세의 반송(미배달) 정보 조회", value=METHOD_URL.getSndbkInfo)
public ModelAndView getSndbkInfo(SndbQuery req) {

@ -137,7 +137,7 @@
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">NO.</th>
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('TASK_SE_CD', this.innerText, 'codeValue', 'FIM054');">업무구분</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('SNDNG_REG_SE_CD', this.innerText, 'codeValue', 'FIM067');">등록구분</th>
<th class="cmn" style="width: 100px;" onclick="searchFromGridTitle('SNDNG_REG_SE_CD', this.innerText, 'codeValue', 'FIM067');">등록구분</th>
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('VLTN_ARTCL', this.innerText, 'match', 'part');">위반항목</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('SNDNG_YMD', this.innerText, 'ymd', '');">발송일자</th>
<th class="cmn" style="width: 100px;" onclick="searchFromGridTitle('TNOCS', this.innerText, 'match', 'part');">총건수</th>

@ -0,0 +1,459 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!-- inner page html -->
<div class="content-wrapper">
<!-- Content -->
<div class="container-xxl flex-grow-1 px-0">
<c:set var="prefixName" scope="request">고지서 발송 현황</c:set>
<!-- Page Body -->
<div class="card">
<div class="wrapper-list">
<div>
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark" id="btnReset--${pageName}" title="초기화" onclick="fnReset${pageName}();">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색" onclick="fnSearchList${pageName}();">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀 저장" onclick="fnExcel${pageName}();">
엑셀 저장
</button>
</span>
</div>
<!-- / 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch">
<!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무구분 -->
<div class="col-12">
<label class="form-label fw-bold form-search-title">업무구분</label>
<span class="form-search-linebox">
<c:forEach items="${FIM054List}" var="item">
<label>
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분"
value="${item.code}" onchange="fnResetAndChangeBiz${pageName}(this.value);">
${item.value}
</label>
</c:forEach>
</span>
</div>
<!-- 발송일자 -->
<div class="col-6">
<label class="form-label fw-bold form-search-title">발송일자</label>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schSndngYmdFrom--${pageName}" name="schSndngYmdFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" id="schSndngYmdTo--${pageName}" name="schSndngYmdTo"
data-fmt-type="day" title="종료 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<!-- 동적검색 -->
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" class="form-control w-px-300" id="term--${pageName}" name="term" />
<!-- 상세 검색조건 버튼 -->
<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 g-1">
<!-- 등록일자, 수정일자 -->
<div class="col-6">
<select class="form-select text-center" id="schDetailRegDtOpt--${pageName}" name="schDetailRegDtOpt">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schDetailRegDtFrom--${pageName}" name="schDetailRegDtFrom"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" id="schDetailRegDtTo--${pageName}" name="schDetailRegDtTo"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-6">
<select class="form-select text-center" id="schDetailRgtrOpt--${pageName}" name="schDetailRgtrOpt">
<option value="rgtr">등록자</option>
<option value="mdfr">수정자</option>
</select>
<input type="text" class="form-control" id="schDetailRgtrNm--${pageName}" name="schDetailRgtrNm" />
</div>
</div>
</div>
<!-- / 상세 조건 -->
</form>
<!-- / 검색 조건 영역 -->
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<label class="dataTables_info" id="paging--${pageName}PagingInfo" role="status" aria-live="polite"></label>
<ul class="pagination pagination-primary" id="paging--${pageName}">
</ul>
</div>
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
</span>
</span>
</div>
<!-- / 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive" id="table-responsive--${pageName}" style="overflow-x:scroll; height:480px; overflow-y:scroll;" >
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<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="cmn" style="width: 72px;">NO.</th>
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('TASK_SE_CD', this.innerText, 'codeValue', 'FIM054');">업무구분</th>
<th class="cmn" style="width: 100px;" onclick="searchFromGridTitle('SNDNG_REG_SE_CD', this.innerText, 'codeValue', 'FIM067');">등록구분</th>
<th class="cmn" style="width: 160px;" onclick="searchFromGridTitle('VLTN_ARTCL', this.innerText, 'match', 'part');">위반항목</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('SNDNG_YMD', this.innerText, 'ymd', '');">발송일자</th>
<th class="cmn" style="width: 100px;" onclick="searchFromGridTitle('TNOCS', this.innerText, 'match', 'part');">총건수</th>
<th class="cmn" style="width: 140px;" onclick="searchFromGridTitle('GRAMT', this.innerText, 'match', 'part');">총금액</th>
<th class="cmn" style="width: 280px;" onclick="searchFromGridTitle('TTL_NM', this.innerText, 'match', 'part');">제목</th>
<th class="cmn" style="width: 200px;" onclick="searchFromGridTitle('DOC_NO', this.innerText, 'match', 'part');">문서번호</th>
<th class="cmn" style="width: 120px;" onclick="searchFromGridTitle('DUDT_YMD', this.innerText, 'ymd', '');">납기일자</th>
<th class="cmn" style="width: 180px;">등록일시</th>
<th class="cmn" style="width: 140px;">등록사용자</th>
<th class="cmn" style="width: 180px;">수정일시</th>
<th class="cmn" style="width: 140px;">수정사용자</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{SNDNG_ID}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{TASK_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_REG_SE_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VLTN_ARTCL}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_YMD}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{TNOCS}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{GRAMT}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{TTL_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DOC_NO}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DUDT_YMD}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="15" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- / DataTables(그리드) -->
</div>
</div> <!-- <div class="wrapper-list"> -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div>
<!-- / inner page html <div class="content-wrapper"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
// URL
var ${pageName}PrefixUrl = "/sndb/sndb01";
// FormFields
var ${pageName}Fields = new FormFields("#frmSearch--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "advntceSndngInfo"
, prefixName : "사전통지 발송 현황"
, infoSize : "xxl"
, keymapper : info => info ? info.SNDNG_ID : ""
, dataGetter : obj => obj.sndngList
, appendData : true
, tableRenderComplete : false // dataTables 에 자료 추가 완료 여부
, formats : {
SNDNG_YMD : dateFormat
, DUDT_YMD : dateFormat
, TNOCS : numberFormat
, GRAMT : numberFormat
, REG_DT : datetimeFormat
, MDFCN_DT : datetimeFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
${pageName}Control.onDatasetChange = obj => {
renderList${pageName}();
$("#paging--${pageName}").setPagingInfo({
list : ${pageName}Control.dataset
, prefix : "paging--${pageName}"
, start : obj.${infoPrefix}Start
, totalSize : obj.${infoPrefix}Total
, fetchSize : obj.${infoPrefix}Fetch
, func : "${pageName}Control.load({index})"
});
${pageName}Control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
};
// 현재 선택 자료 변경 이벤트
${pageName}Control.onCurrentChange = item => {
if (!item) return;
let key = item.data.SNDNG_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
// 선택(체크) 변경 이벤트
${pageName}Control.onSelectionChange = selected => {
let ${infoPrefix}List = ${pageName}Control.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#tbody--${pageName} input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});
$("#btnWrngSndngTrgInfo--${pageName}").prop("disabled", keys.length < 1);
};
// 발송 상세
${pageName}Control.getInfo = (sndngId) => {
let params = {
callPurpose : "view"
, sggCd : ${pageName}Control.dataset.getValue("SGG_CD") // 시군구 코드
, taskSeCd : ${pageName}Control.dataset.getValue("TASK_SE_CD") // 업무 구분 코드
, sndngId : sndngId // 발송 ID
};
ajax.get({
url : ${pageName}Control.urls.getInfo
, data : params || {}
, success : resp => {
dialog.open({
id : ${pageName}Control.prefixed("Dialog")
, title : "사전통지 세부 내용"
, content : resp
, size : ${pageName}Control.infoSize
, onClose : () => { ${pageName}Control.load(${pageName}Control.query.pageNum); } // callback
});
}
});
}
/**************************************************************************
*
**************************************************************************/
// DataTables에 click, dbclick 이벤트
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("SNDNG_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getInfo('" + dataItem.getValue("SNDNG_ID") + "');")
);
$("#tbody--${pageName}").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 초기화
initForm${pageName} = () => {
// 화면 초기화
$("#frmSearch--${pageName}")[0].reset();
// dataset 초기화
${pageName}Control.dataset.clear();
}
// 이벤트
setEvent${pageName} = () => {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
// DataTables width 변경 조정
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
if (el.scrollTop() == 0) {
return;
}
if (!${pageName}Control.tableRenderComplete) {
return;
}
let itemsCnt = ${pageName}Control.dataset._items.length;
let totCnt = ${pageName}Control.dataset.getValue("TOT_CNT"); // let totCnt = ${pageName}Control.dataset.getCurrent("item").data.TOT_CNT;
if (itemsCnt >= totCnt) {
return;
}
if ((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()) {
${pageName}Control.tableRenderComplete = false; // dataTables 에 자료 추가 완료
${pageName}Control.load(${pageName}Control.query.pageNum + 1);
}
});
}
// 화면 초기값 셋팅
setForm${pageName} = (taskSeCd) => {
// 업무 구분 코드
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
// 최고 관리자 경우 업무구분을 선택할 수 있도록 하자.
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
$("#schSndngYmdFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-90).date);
$("#schSndngYmdTo--${pageName}").datepicker("setDate", new Date());
}
// URL 설정
setURL${pageName} = (taskSeCd) => {
${pageName}Control.urls.load = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/070/list.do"); // 조회
${pageName}Control.urls.getInfo = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/080/info.do"); // 사전통지 세부내용
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경
fnResetAndChangeBiz${pageName} = (taskSeCd) => {
// 초기화
initForm${pageName}();
// 업무 구분 코드
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
}
// 화면 초기값 설정
setForm${pageName}(taskSeCd);
// URL 설정
setURL${pageName}(taskSeCd);
}
// 초기화 버튼 이벤트
fnReset${pageName} = () => {
fnResetAndChangeBiz${pageName}();
}
// 검색 버튼 이벤트
fnSearchList${pageName} = () => {
// 검색조건
${pageName}Control.query = ${pageName}Fields.get();
${pageName}Control.query.fetchSize = FETCH_XS; // 한번에 조회되는 자료 건수 FETCH_XS = 30
${pageName}Control.query.sndngSeCd = "02"; // 발송 구분 코드 - 02 사전통지
${pageName}Control.query.delYn = "N"; // 삭제 여부
${pageName}Control.load();
}
// 엑셀 버튼 이벤트
fnExcel${pageName} = () => {
}
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// 기본 데이터 설정
$("#sggCd--${pageName}").val("${sggCd}"); // 시군구 코드
// 이벤트 설정
setEvent${pageName}();
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
// 업무 구분 설정
let defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked", true);
// 화면 초기 설정 및 업무 구분 변경
fnResetAndChangeBiz${pageName}(defaultBizValue);
});
</script>
Loading…
Cancel
Save