민원 개별 등록 jsp 추가

main
이범준 1 year ago
parent 376c5607b2
commit 0d5f3d43da

@ -295,16 +295,10 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
//자동등록된 연계자료이며, 전송 작업 처리 전 자료에 대해 민원 정보를 업데이트한다.
if (isFirstBorn && isNotYetTransmit) {
// 답변내용 초기화
boolean retSuccess = crdnCvlcptBean.initCvlcptPrcsRsltCn(crdnInfo.string("CVLCPT_LINK_ID"));
if (!retSuccess) {
throw new RuntimeException("반송 처리 중 단속민원 대장의 민원처리결과내용 초기화에 실패하였습니다.");
}
CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt();
crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID"));
crdnCvlcpt.setCvlcptPrcsCd("01");
retSuccess = crdnCvlcptBean.updateCvlcptPrcsSe(crdnCvlcpt);
boolean retSuccess = crdnCvlcptBean.updateCvlcptPrcsSe(crdnCvlcpt);
if (!retSuccess) {
throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다.");

@ -1,9 +1,13 @@
package cokr.xit.fims.cvlc.web;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
@ -28,6 +32,9 @@ public class Cvlc04Controller extends ApplicationController {
mav.setViewName("fims/cvlc/cvlc04010-main");
mav.addObject("pageName", "cvlc04010-main");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
mav.addObject("FIM054List", commonCodes.get("FIM054"));
return mav;
}

@ -1,4 +1,449 @@
<%@ 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">
<div class="container-xxl flex-grow-1 px-0">
<c:set var="pageKorName" scope="request">민원 개별 등록</c:set>
민원 개별 등록
<div class="card">
<div class="wrapper-list">
<div>
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark" title="초기화">초기화</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}" class="btn btn-search" title="검색">검색</button>
</span>
</div>
<form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<label class="form-label fw-bold form-search-title">업무구분</label>
<span class="form-search-linebox">
<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>
</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" id="schRequestYmdFrom--${pageName}" name="schRequestYmdFrom"
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="schRequestYmdTo--${pageName}" name="schRequestYmdTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
</div>
</div>
</form>
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<label id="requestPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></label>
<ul id="requestPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnOpenRequestPop--${pageName}"
class="btn btn-primary" title="요청 등록">요청 등록</button>
<button type="button" id="btnDelete--${pageName}"
class="btn btn-primary" title="한 건 삭제">한 건 삭제</button>
<button type="button" id="btnDeleteAllCompleteData--${pageName}"
class="btn btn-primary" title="요청 완료자료 전체 삭제">요청 완료자료 전체 삭제</button>
</span>
</span>
</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:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead id="requestThead--${pageName}">
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th style="min-width: 80px;">No.</th>
<th style="min-width: 80px;">요청일시</th>
<th style="min-width: 80px;">요청구분</th>
<th style="min-width: 80px;">접수일자</th>
<th style="min-width: 80px;">목록번호</th>
<th style="min-width: 80px;">요청자</th>
<th style="min-width: 80px;">등록일시</th>
<th style="min-width: 80px;">상태</th>
</tr>
</thead>
<tbody id="requestTbody--${pageName}"></tbody>
<template id="requestRow--${pageName}">
<tr data-key="{REQUEST_ID}">
<td onclick="{onclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" class="text-center">{요청일시}</td>
<td onclick="{onclick}" class="text-center">{요청구분}</td>
<td onclick="{onclick}" class="text-center">{접수일자}</td>
<td onclick="{onclick}" class="text-center">{목록번호}</td>
<td onclick="{onclick}" class="text-center">{요청자}</td>
<td onclick="{onclick}" class="text-center">{등록일시}</td>
<td onclick="{onclick}" class="text-center">{상태}</td>
</tr>
</template>
<template id="requestNotFound--${pageName}">
<tr>
<td valign="top" colspan="8" class="dataTables_empty text-center">요청 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white">
삭제 되었습니다.
</div>
</div>
</div>
</div>
</div>
</div>
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div>
<template id="rcptRequestDialogTemplate--${pageName}">
<form id="frmEdit--${pageName}">
<div class="card">
<div class="row g-1">
<div class="col-md-12">
<label for="requestYmd--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수일자</label>
<input type="text" id="requestYmd--${pageName}" name="requestYmd" required
class="form-control form-date" data-fmt-type="day" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<div class="col-md-12">
<label for="listNo--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">목록번호</label>
<input type="text" id="listNo--${pageName}" name="listNo" required
class="form-control" />
</div>
</div>
</div>
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<button class="btn btn-primary" id="btnCreate--${pageName}" title="확인">확인</button>
</span>
</span>
</div>
</form>
</template>
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
//var 상태 = new CommonCodes();
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true,
autohide: true,
delay: 2000
});
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.requestControl = new DatasetControl({
urls : { load : "", create : "", remove : "" },
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.REQUEST_ID : "",
formats : {
//STTS : [],
REQUEST_DT : datetimeFormat,
RCPT_YMD : dateFormat
}
});
$P.requestControl.defaultFetchSize = FETCH_XS;
$P.requestControl.untilPageNum = 0;
$P.requestControl.beforeCurrent = null;
$P.requestControl.tableRenderComplete = false;
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.requestControl.onDatasetChange = (obj) => {
$P.renderRequestList(obj["Total"]);
$("#requestPaging--${pageName}").setPagingInfo({
list: $P.requestControl.dataset,
prefix: "requestPaging--${pageName}",
start: obj["Start"],
totalSize: obj["Total"],
fetchSize: obj["Fetch"],
func: "pageObject['${pageName}'].requestControl.load({index})"
});
$P.requestControl.tableRenderComplete = true;
};
$P.requestControl.onCurrentChange = (item) => {
if(!$P.requestControl.tableRenderComplete){
return;
}
if($P.requestControl.beforeCurrent != null){
var beforeCurrentKey = $P.requestControl.beforeCurrent.key;
var beforeCurrentIndex = $P.requestControl.beforeCurrent.index;
$P.requestControl.beforeCurrent = null;
if(!$P.requestControl.dataset.empty){
var info = $P.requestControl.dataset.getData(beforeCurrentKey);
if(info != null){
$P.requestControl.dataset.setCurrent(beforeCurrentKey,true);
return;
}
if(beforeCurrentIndex > ($P.requestControl.dataset.length - 1)){
info = $P.requestControl.dataset.getDataset()[$P.requestControl.dataset.length - 1];
} else {
info = $P.requestControl.dataset.getDataset()[beforeCurrentIndex];
}
$P.requestControl.dataset.setCurrent(info["REQUEST_ID"],true);
return;
}
}
$P.requestControl.tableRenderComplete = false;
if(!item){
$P.clickRequestList("", true);
} else {
$P.clickRequestList($P.requestControl.getCurrent()["REQUEST_ID"], true);
}
}
$P.requestControl.onRemove = (selected, resp) => {
if (resp.saved){
$P.toast.show();
$P.refreshRequestList();
}
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => {
$('#schRequestYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schRequestYmdTo--${pageName}').datepicker('setDate', new Date());
$P.requestControl.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.requestControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do");
$P.requestControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
$P.requestControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
}
$P.refreshRequestList = () => {
$P.requestControl.untilPageNum = $P.requestControl.query.pageNum;
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize * $P.requestControl.query.pageNum;
$P.requestControl.beforeCurrent = {
key : $P.requestControl.getCurrent()["REQUEST_ID"],
index : $P.requestControl.getCurrent()["ROW_NUM"] - 1
};
$P.requestControl.load(1);
}
$P.searchRequestList = () => {
$("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show();
$P.requestControl.query = $P.getParams();
// TODO : 요청자료 조회 서비스 // $P.requestControl.load(1);
}
$P.scrollEnd = (obj) => {
if(obj.dataset.scrollStatus){
return;
}
var el = $(obj);
if(el.scrollTop() == 0){
return;
}
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
obj.dataset.scrollStatus = "waiting";
$P.scrollRequestList();
}
}
$P.scrollRequestList = () => {
$P.requestControl.load($P.requestControl.query.pageNum + 1);
}
$P.clickRequestList = (dataKey, auto) => {
if(dataKey == ""){
if(auto){
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
}
return;
}
$("#requestTbody--${pageName}").setCurrentRow(dataKey);
if(!auto){
$P.requestControl.setCurrent(dataKey);
} else {
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
}
}
$P.renderRequestList = (total) => {
var requestList = $P.requestControl.dataset;
var empty = requestList.empty;
var notFound = [document.getElementById("requestNotFound--${pageName}").innerHTML];
var found = document.getElementById("requestRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickRequestList('" + dataItem.getValue("REQUEST_ID") + "');");
var trs = empty ? notFound : requestList.inStrings(found, replacer);
$("#requestTbody--${pageName}").html(trs.join());
if(total == requestList.length){
$("#table-responsive--${pageName}").attr("data-scroll-status", "complete");
} else {
$("#table-responsive--${pageName}").removeAttr("data-scroll-status");
}
if($P.requestControl.untilPageNum != 0){
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize;
$P.requestControl.query.pageNum = $P.requestControl.untilPageNum;
$P.requestControl.untilPageNum = 0;
}
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = $P.requestControl.defaultFetchSize;
return data;
}
$P.fnRemove = (allCompleteData) => {
if(allCompleteData != null){
var ds = $P.requestControl.dataset.getDataset();
var requestIds = ds.map(function(item){
if(item['STTS_CD'] == 'complete'){
return item["REQUEST_ID"];
}
});
$P.requestControl.select(requestIds,true);
} else {
var cur = $P.requestControl.getCurrent();
if(cur == null){
return;
}
var curKey = cur["REQUEST_ID"];
$P.requestControl.select(curKey,true);
}
// TODO : 요청 삭제 서비스 //$P.requestControl.remove();
}
$P.fnRemoveAllCompleteData = () => {
var cur = $P.requestControl.getCurrent();
if(cur == null){
return;
}
dialog.alert({
content : "완료된 자료를 모두 삭제하시겠습니까?"
, onOK : () => {
$P.fnRemove('allCompleteData');
}
});
}
//요청 등록 팝업 호출
$P.fnOpenRequestPop = () => {
dialog.open({
id : "rcptRequestDialog--${pageName}",
title : "새올 접수 요청",
content : document.getElementById("rcptRequestDialogTemplate--${pageName}").innerHTML,
size : "lg",
init : () => {
initDatepicker("rcptRequestDialog--${pageName}");
$('#requestYmd--${pageName}').datepicker('setDate', new Date());
$('#btnCreate--${pageName}').on("click", () => $P.fnCreateRequest());
},
onClose : () => {}
});
}
//요청 등록
$P.fnCreateRequest = () => {
if(!customValidate($("#frmEdit--${pageName} input"))) return;
var info = (new FimsFormFields("#frmEdit--${pageName}")).get();
// TODO : 요청 등록 서비스 //ajax
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchRequestList());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#btnOpenRequestPop--${pageName}").on("click", () => $P.fnOpenRequestPop());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
$("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData());
/**************************************************************************
* 초기화
**************************************************************************/
//달력 초기화
initDatepicker("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue);
});
</script>
Loading…
Cancel
Save