diff --git a/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java b/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java new file mode 100644 index 00000000..6f37c08a --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/web/AbstractCrdnController.java @@ -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; + + /**단속자료 목록을 조회한다.
+ * {@link CrdnService#getCrdnList(CrdnQuery)} 참고 + * @param req 단속자료 목록 조회 조건 + * @return jsonView + *
 {
+	 *     "crdnList": [조회결과 목록],
+	 *     "crdnStart": 현재 페이지의 시작 자료 인덱스,
+	 *     "crdnFetchTotal": 한 페이지에 가져오는 자료 건 수,
+	 *     "crdnTotal": 조회 결과 찾은 전체 건 수
+	 * }
+ */ + public ModelAndView getCrdnList(CrdnQuery req) { + setFetchSize(req); + return setCollectionInfo( + new ModelAndView("jsonView"), + crdnService.getCrdnList(req), + "crdn" + ); + } +} diff --git a/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java index bb5f2168..6e33b3d5 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java +++ b/src/main/java/cokr/xit/fims/crdn/web/CrdnController.java @@ -12,47 +12,38 @@ import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.foundation.web.AbstractController; /**단속관리 서비스 웹 컨트롤러.
- * {웹 컨텍스트}/{과태료시스템구분}/crdn/*로 접근할 수 있다. + * {웹 컨텍스트}/crdn/*로 접근할 수 있다. * @author leebj */ @Controller -@RequestMapping(name="단속관리", value="/{biz}/crdn") -public class CrdnController extends AbstractController { - - @Resource(name="crdnService") - private CrdnService crdnService; - +@RequestMapping(name="단속관리", value="/crdn") +public class CrdnController extends AbstractCrdnController { + /** 단속 초기자료 관리 메인화면을 연다. * @return fims/crdn/initData-main */ @RequestMapping(name="단속 초기자료 메인", value="/initData/main.do") - public ModelAndView initDataMain(@PathVariable(value = "biz") String biz) { - - System.out.println(biz); - - ModelAndView mav = this.getCrdnList(new CrdnQuery().setPageNum(1)); + public ModelAndView initDataMain() { + ModelAndView mav = new ModelAndView(); mav.setViewName("fims/crdn/initData-main"); - return mav.addObject("crdnList", toJson(mav.getModel().remove("crdnList"))).addObject("curBiz", biz); + return mav; } - - /**단속자료 목록을 조회한다.
- * {@link CrdnService#getCrdnList(CrdnQuery)} 참고 - * @param req 단속자료 목록 조회 조건 - * @return jsonView - *
 {
-	 *     "crdnList": [조회결과 목록],
-	 *     "crdnStart": 현재 페이지의 시작 자료 인덱스,
-	 *     "crdnFetchTotal": 한 페이지에 가져오는 자료 건 수,
-	 *     "crdnTotal": 조회 결과 찾은 전체 건 수
-	 * }
- */ - @RequestMapping(name="코드 그룹 목록", value="/list.do") - public ModelAndView getCrdnList(CrdnQuery req) { - setFetchSize(req); - return setCollectionInfo( - new ModelAndView("jsonView"), - crdnService.getCrdnList(req), - "crdn" - ); + + @RequestMapping(name="주정차과태료업무 단속자료 목록", value="/PVS/list.do") + public ModelAndView getPvsCrdnList(CrdnQuery req) { + return getCrdnList(req); } + @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); + } + } diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp index fbc5c6cd..2edc18e9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp @@ -26,6 +26,19 @@
+ + + + + + + + + <%-- info ? info.CRDN_ID : "", 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(){ crdnControl.query = fnBiz.getParams(); GRID.clear(); @@ -685,6 +704,10 @@ $(document).ready(function(){ $( "#frmSearch .form-date" ).next("button.bx-calendar").on("click", function() { $(this).prev().focus(); }); + + var defaultBizValue = $("#layout-navbar input[name='sysSeCd']:checked").val(); + $("#frmSearch input[name='sysSeCd'][value='" + defaultBizValue + "']").prop("checked",true); + fnResetAndChangeBiz(defaultBizValue); }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/include/top.jsp b/src/main/webapp/WEB-INF/jsp/include/top.jsp index 320a0e3d..62c41040 100644 --- a/src/main/webapp/WEB-INF/jsp/include/top.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/top.jsp @@ -52,10 +52,25 @@ + +
+ 과태료업무 기본값 설정 +
+ + + + + + + + +
+