1. url 매핑용 단속관리 컨트롤러와 처리용 단속관리 컨트롤러 분리

2. 과태료시스템 구분 라디오 버튼 조회조건 추가
main
이범준 1 year ago
parent 59c7fdfee9
commit 4d61a68480

@ -0,0 +1,35 @@
package cokr.xit.fims.crdn.web;
import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.fims.crdn.service.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.foundation.web.AbstractController;
public class AbstractCrdnController extends AbstractController {
@Resource(name="crdnService")
private CrdnService crdnService;
/** .<br />
* {@link CrdnService#getCrdnList(CrdnQuery)}
* @param req
* @return jsonView
* <pre><code> {
* "crdnList": [ ],
* "crdnStart": ,
* "crdnFetchTotal": ,
* "crdnTotal":
* }</code></pre>
*/
public ModelAndView getCrdnList(CrdnQuery req) {
setFetchSize(req);
return setCollectionInfo(
new ModelAndView("jsonView"),
crdnService.getCrdnList(req),
"crdn"
);
}
}

@ -12,47 +12,38 @@ import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.foundation.web.AbstractController; import cokr.xit.foundation.web.AbstractController;
/** .<br /> /** .<br />
* { }/{}/crdn/* . * { }/crdn/* .
* @author leebj * @author leebj
*/ */
@Controller @Controller
@RequestMapping(name="단속관리", value="/{biz}/crdn") @RequestMapping(name="단속관리", value="/crdn")
public class CrdnController extends AbstractController { public class CrdnController extends AbstractCrdnController {
@Resource(name="crdnService")
private CrdnService crdnService;
/** . /** .
* @return fims/crdn/initData-main * @return fims/crdn/initData-main
*/ */
@RequestMapping(name="단속 초기자료 메인", value="/initData/main.do") @RequestMapping(name="단속 초기자료 메인", value="/initData/main.do")
public ModelAndView initDataMain(@PathVariable(value = "biz") String biz) { public ModelAndView initDataMain() {
ModelAndView mav = new ModelAndView();
System.out.println(biz);
ModelAndView mav = this.getCrdnList(new CrdnQuery().setPageNum(1));
mav.setViewName("fims/crdn/initData-main"); mav.setViewName("fims/crdn/initData-main");
return mav.addObject("crdnList", toJson(mav.getModel().remove("crdnList"))).addObject("curBiz", biz); return mav;
} }
/** .<br /> @RequestMapping(name="주정차과태료업무 단속자료 목록", value="/PVS/list.do")
* {@link CrdnService#getCrdnList(CrdnQuery)} public ModelAndView getPvsCrdnList(CrdnQuery req) {
* @param req return getCrdnList(req);
* @return jsonView
* <pre><code> {
* "crdnList": [ ],
* "crdnStart": ,
* "crdnFetchTotal": ,
* "crdnTotal":
* }</code></pre>
*/
@RequestMapping(name="코드 그룹 목록", value="/list.do")
public ModelAndView getCrdnList(CrdnQuery req) {
setFetchSize(req);
return setCollectionInfo(
new ModelAndView("jsonView"),
crdnService.getCrdnList(req),
"crdn"
);
} }
@RequestMapping(name="전용차로과태료업무 단속자료 목록", value="/BPV/list.do")
public ModelAndView getBpvCrdnList(CrdnQuery req) {
return getCrdnList(req);
}
@RequestMapping(name="장애인과태료업무 단속자료 목록", value="/DPV/list.do")
public ModelAndView getDpvCrdnList(CrdnQuery req) {
return getCrdnList(req);
}
@RequestMapping(name="전기차과태료업무 단속자료 목록", value="/ECA/list.do")
public ModelAndView getEcaCrdnList(CrdnQuery req) {
return getCrdnList(req);
}
} }

@ -26,6 +26,19 @@
<div class="col-12"> <div class="col-12">
<label class="form-label fw-bold form-search-title">시스템구분</label> <label class="form-label fw-bold form-search-title">시스템구분</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="radio" id="sysSeCd1" name="sysSeCd" value="PVS"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd1">주정차</label>
<input type="radio" id="sysSeCd2" name="sysSeCd" value="BPV"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd2">전용차로</label>
<input type="radio" id="sysSeCd3" name="sysSeCd" value="DPV"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd3">장애인</label>
<input type="radio" id="sysSeCd4" name="sysSeCd" value="ECA"
onchange="fnResetAndChangeBiz(this.value);" />
<label for="sysSeCd4">전기차</label>
<%-- <%--
<code:radio <code:radio
@ -224,7 +237,7 @@ var crdnControl = new DatasetControl({
prefixName:"초기자료", prefixName:"초기자료",
infoSize:"xl", infoSize:"xl",
urls : { urls : {
load : wctx.url("/{biz}/crdn/list.do") load : ""
}, },
keymapper:info => info ? info.CRDN_ID : "", keymapper:info => info ? info.CRDN_ID : "",
dataGetter:obj => obj.crdnList, dataGetter:obj => obj.crdnList,
@ -249,6 +262,12 @@ crdnControl.onDatasetChange = obj => {
}; };
function fnResetAndChangeBiz(sysSeCd){
GRID.clear();
crdnControl.urls.load = wctx.url("/crdn/"+ sysSeCd +"/list.do");
}
function searchCrdnList(){ function searchCrdnList(){
crdnControl.query = fnBiz.getParams(); crdnControl.query = fnBiz.getParams();
GRID.clear(); GRID.clear();
@ -685,6 +704,10 @@ $(document).ready(function(){
$( "#frmSearch .form-date" ).next("button.bx-calendar").on("click", function() { $( "#frmSearch .form-date" ).next("button.bx-calendar").on("click", function() {
$(this).prev().focus(); $(this).prev().focus();
}); });
var defaultBizValue = $("#layout-navbar input[name='sysSeCd']:checked").val();
$("#frmSearch input[name='sysSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
fnResetAndChangeBiz(defaultBizValue);
}); });
</script> </script>

@ -52,10 +52,25 @@
<button type="button" class="btn btn-primary"> <button type="button" class="btn btn-primary">
사용자 메뉴얼 사용자 메뉴얼
</button> </button>
<!--
<button type="button" class="btn btn-secondary" onclick="fn_goMyView('${sessionScope.XitLoginSession.uniqId}','${sessionScope.XitLoginSession.userSe}');"> <button type="button" class="btn btn-secondary" onclick="fn_goMyView('${sessionScope.XitLoginSession.uniqId}','${sessionScope.XitLoginSession.userSe}');">
환경설정 환경설정
</button> </button>
-->
<div class="form-check-inline custom-option custom-option-basic" style="background-color: #d9dee3">
<span class="form-label">과태료업무 기본값 설정</span>
<br/>
<input type='radio' id='sysSeCdTop1' name='sysSeCd' value='PVS' checked />
<label for="sysSeCdTop1">주정차</label>
<input type='radio' id='sysSeCdTop2' name='sysSeCd' value='BPV' />
<label for="sysSeCdTop2">전용차로</label>
<input type='radio' id='sysSeCdTop3' name='sysSeCd' value='DPV' />
<label for="sysSeCdTop3">장애인</label>
<input type='radio' id='sysSeCdTop4' name='sysSeCd' value='ECA' />
<label for="sysSeCdTop4">전기차</label>
</div>
</div> </div>
<ul class="navbar-nav flex-row align-items-center ms-auto"> <ul class="navbar-nav flex-row align-items-center ms-auto">
<!-- Style Switcher --> <!-- Style Switcher -->

@ -1,10 +1,10 @@
/** . /** .
*/ */
class FimsMenuSupport extends MenuSupport { class FimsMenuSupport extends MenuSupport {
constructor(selector) { constructor(selector) {
super(selector); super(selector);
this._menuItem = '<li data-key="{menuID}" class="menu-item">' this._menuItem = '<li data-key="{menuID}" class="menu-item">'
+'<a data-url="{url}" onclick="openMenu(this)" class="menu-link{toggle}">' +'<a data-url="{url}" onclick="openMenu(this)" class="menu-link{toggle}">'
+'<i class="menu-icon tf-icons bx bx-layout"></i>' +'<i class="menu-icon tf-icons bx bx-layout"></i>'
@ -24,22 +24,18 @@ const innerPageMap = {},
openMax = 8; openMax = 8;
function openMenu(obj, params) { function openMenu(obj, params) {
let menuUrl = $(obj)[0].dataset.url; let menuUrl = $(obj)[0].dataset.url;
if(menuUrl == "javascript:void(0);"){ if(menuUrl == "javascript:void(0);"){
return; return;
} }
if(menuUrl.indexOf("{biz}") != -1){
menuUrl = menuUrl.replace("{biz}","parking"); // TODO : 과태료업무별 호출 URL
}
let menuNm = $(obj).find("div")[0].dataset.i18n; let menuNm = $(obj).find("div")[0].dataset.i18n;
let dataKey = $(obj).parent()[0].dataset.key; let dataKey = $(obj).parent()[0].dataset.key;
const OPEN_TAB_CNT = $('div#tabsForInnerPage > ul > li').length; const OPEN_TAB_CNT = $('div#tabsForInnerPage > ul > li').length;
if(innerPageMap[dataKey]){ if(innerPageMap[dataKey]){
@ -48,7 +44,7 @@ function openMenu(obj, params) {
if(data.dataset.bsTarget == ("#tab-"+dataKey)) { if(data.dataset.bsTarget == ("#tab-"+dataKey)) {
$(data).trigger("click"); $(data).trigger("click");
} }
}); });
return; return;
} }
@ -72,7 +68,7 @@ function openMenu(obj, params) {
$('div#innerPageTabContents').append('<div id="tab-' + dataKey + '" class="tab-pane"></div>'); $('div#innerPageTabContents').append('<div id="tab-' + dataKey + '" class="tab-pane"></div>');
if(params != null){ if(params != null){
menuUrl = menuUrl + params; menuUrl = menuUrl + params;
} }
@ -92,11 +88,11 @@ function openMenu(obj, params) {
; ;
$("#formForInnerPage").remove(); $("#formForInnerPage").remove();
$("#tab-" + dataKey)[0].appendChild(dynamicPage); $("#tab-" + dataKey)[0].appendChild(dynamicPage);
innerPageMap[dataKey] = dynamicPage; innerPageMap[dataKey] = dynamicPage;
@ -108,9 +104,9 @@ function openMenu(obj, params) {
$("#div"+dataKey).html(resp); $("#div"+dataKey).html(resp);
} }
}); });
$("div#tabsForInnerPage ul li button.nav-link").last().trigger("click"); $("div#tabsForInnerPage ul li button.nav-link").last().trigger("click");
} }

Loading…
Cancel
Save