From a75f78c24aefb9092c36871c5e478c6cebbab5a3 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 19 Oct 2023 16:05:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=B4=EC=A0=9C=EC=B0=A8=EB=9F=89=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=ED=99=94=EB=A9=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/dao/ExmptnVhclMapper.java | 6 + .../fims/crdn/service/CrdnStngService.java | 7 + .../fims/crdn/service/bean/CrdnStngBean.java | 8 + .../service/bean/CrdnStngServiceBean.java | 5 + .../xit/fims/crdn/web/Crdn08Controller.java | 22 +++ .../cokr/xit/fims/task/web/BpvController.java | 6 + .../mapper/fims/crdn/exmptn-vhcl-mapper.xml | 15 ++ .../WEB-INF/jsp/fims/crdn/crdn08010-main.jsp | 37 +++- .../WEB-INF/jsp/fims/crdn/crdn08020-info.jsp | 173 ++++++++++++++++++ 9 files changed, 272 insertions(+), 7 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp diff --git a/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java b/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java index d32bc5c8..a075d9a7 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java @@ -17,4 +17,10 @@ public interface ExmptnVhclMapper extends AbstractMapper { */ List selectExemptionVehicleList(CrdnQuery query); + /**면제차량 정보를 조회한다.
+ * @param exemptionVehicleId 면제차량 ID + * @return 면제차량 정보 + */ + DataObject selectExemptionVehicleInfo(String exemptionVehicleId); + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java index dd59bd85..8a6bc405 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java @@ -31,4 +31,11 @@ public interface CrdnStngService { * @return 단속팀 목록 */ List getExemptionVehicleList(CrdnQuery query); + + /** 면제차량 정보을 조회한다. + * @param exemptionVehicleId 면제차량 ID + * @return 면제차량 정보 + */ + DataObject getExemptionVehicleInfo(String exemptionVehicleId); + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java index b8e955c4..ce21642d 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngBean.java @@ -240,4 +240,12 @@ public class CrdnStngBean extends AbstractComponent { return exmptnVhclMapper.selectExemptionVehicleList(query); } + /**면제차량 정보를 조회한다. + * @param exemptionVehicleId 면제차량 ID + * @return 면제차량 정보 + */ + public DataObject getExemptionVehicleInfo(String exemptionVehicleId) { + return exmptnVhclMapper.selectExemptionVehicleInfo(exemptionVehicleId); + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java index c49aa1d5..aa39061f 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnStngServiceBean.java @@ -43,4 +43,9 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng return crdnStngBean.selectExemptionVehicleList(query); } + @Override + public DataObject getExemptionVehicleInfo(String exemptionVehicleId) { + return crdnStngBean.getExemptionVehicleInfo(exemptionVehicleId); + } + } diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java index 09a27777..0109c1cf 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java @@ -14,6 +14,7 @@ import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.service.CrdnStngService; +import cokr.xit.foundation.data.DataObject; /**면제차량 관리 서비스 웹 컨트롤러.
* {웹 컨텍스트}/crdn/crdn08 로 접근할 수 있다. @@ -27,6 +28,7 @@ public class Crdn08Controller extends ApplicationController { public static final String exemptionVehicleManagementMain = "/010/main.do" , getExemptionVehicleList = "/010/list.do" + , getExemptionVehicleInfo = "/020/info.do" ; } @@ -68,4 +70,24 @@ public class Crdn08Controller extends ApplicationController { return setCollectionInfo(new ModelAndView("jsonView"), crdnStngService.getExemptionVehicleList(query),""); } + /**면제차량 상세조회 팝업 화면을 연다.
+ * @return fims/crdn/crdn08020-info + */ + public ModelAndView getExemptionVehicleInfo(String exmptnVhclId) { + + String pageName = "crdn08020-info"; + + ModelAndView mav = new ModelAndView("fims/crdn/"+pageName); + mav.addObject("pageName", pageName); + + DataObject info = new DataObject(); + + if(!ifEmpty(exmptnVhclId, () -> "").equals("")) { + info = crdnStngService.getExemptionVehicleInfo(exmptnVhclId); + } + mav.addObject("exmptnVhclInfo", toJson(info)); + + return mav; + } + } diff --git a/src/main/java/cokr/xit/fims/task/web/BpvController.java b/src/main/java/cokr/xit/fims/task/web/BpvController.java index ceb4107a..429f55c8 100644 --- a/src/main/java/cokr/xit/fims/task/web/BpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/BpvController.java @@ -318,6 +318,12 @@ public class BpvController { return super.getExemptionVehicleList(query); } + @Override + @RequestMapping(name="전용차로과태료업무 면제차량 정보 조회", value=METHOD_URL.getExemptionVehicleInfo) + public ModelAndView getExemptionVehicleInfo(String exmptnVhclId) { + return super.getExemptionVehicleInfo(exmptnVhclId); + } + } @Controller diff --git a/src/main/resources/sql/mapper/fims/crdn/exmptn-vhcl-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/exmptn-vhcl-mapper.xml index a07428d1..900db0aa 100644 --- a/src/main/resources/sql/mapper/fims/crdn/exmptn-vhcl-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/exmptn-vhcl-mapper.xml @@ -19,6 +19,7 @@ SELECT A.EXMPTN_VHCL_ID , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = A.DLTR) AS DLTR_NM , A.DEL_RSN , A.DEL_DT + , A.DEL_YN FROM TB_EXMPTN_VHCL A WHERE A.SGG_CD = #{sggCd} @@ -35,4 +36,18 @@ SELECT A.EXMPTN_VHCL_ID + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp index 6d06021a..a8d8ca21 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp @@ -130,11 +130,14 @@ $(document).ready(function(){ $P.exmptnVhclControl = new DatasetControl({ urls : { load : wctx.url("/BPV/crdn/crdn08/010/list.do"), - newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do") + newInfo : wctx.url("/BPV/crdn/crdn08/020/info.do"), + getInfo : wctx.url("/BPV/crdn/crdn08/020/info.do") }, dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.EXMPTN_VHCL_ID : "", formats: { + EXMPTN_BGNG_YMD : dateFormat, + EXMPTN_END_YMD : dateFormat, REG_DT : datetimeFormat, MDFCN_DT : datetimeFormat, DEL_DT : datetimeFormat @@ -153,15 +156,31 @@ $(document).ready(function(){ success:resp => { dialog.open({ id: "exmptnvhcldialog", - title: "면제차량등록", + title: "면제차량 등록", content:resp, - size: "xl", + size: "lg", init:() => {} }); } }); }; - + + $P.exmptnVhclControl.getInfo = (param) => { + ajax.get({ + url : $P.exmptnVhclControl.urls.getInfo, + data: param, + success:resp => { + dialog.open({ + id: "exmptnvhcldialog", + title: "면제차량 수정", + content:resp, + size: "lg", + init:() => {} + }); + } + }); + }; + /************************************************************************** * DatasetControl.on **************************************************************************/ @@ -253,8 +272,12 @@ $(document).ready(function(){ if(dataKey == ""){ return; } - - // TODO : + var data = $P.exmptnVhclControl.dataset.getData(dataKey); + if(data.DEL_YN == "Y"){ + dialog.alert("삭제된 자료입니다."); + return; + } + $P.exmptnVhclControl.getInfo({"exmptnVhclId" : dataKey}); } $P.renderExmptnVhclList = (total) => { @@ -301,7 +324,7 @@ $(document).ready(function(){ $('#btnReset--${pageName}').on('click', () => $P.fnReset()); $("#btnSearch--${pageName}").on("click", () => $P.searchExmptnVhclList()); - //$("#btnCreate--${pageName}").on('click', () => { ; }); + $("#btnCreate--${pageName}").on('click', () => { $P.exmptnVhclControl.newInfo(); }); //$("#btnRemove--${pageName}").on('click', () => { ; }); //$("#btnHistory--${pageName}").on('click', () => { ; }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp new file mode 100644 index 00000000..3717cb5f --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + + +
+
+ + + +
+ +
+ + +
+
+ + + + ~ + + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ +
+
+
+
+ +
+
+ + + + + \ No newline at end of file