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 d17fa14c..572e07ca 100644 --- a/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java +++ b/src/main/java/cokr/xit/fims/crdn/dao/ExmptnVhclMapper.java @@ -28,12 +28,19 @@ public interface ExmptnVhclMapper extends AbstractMapper { * @param exmptnVhcl 면제차량 정보 * return 저장된 정보 수 */ - int insertExmptnVhclInfo(ExmptnVhcl exmptnVhcl); + int insertExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); /**면제차량 정보를 수정한다. * @param exmptnVhcl 면제차량 정보 * return 저장된 정보 수 */ - int updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl); + int updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); + + /**면제차량 정보를 삭제한다. + * @param exmptnVhcl 면제차량 정보 + * return 저장된 정보 수 + */ + int deleteExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); + } 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 bd7dce51..f0958d8a 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java +++ b/src/main/java/cokr/xit/fims/crdn/service/CrdnStngService.java @@ -43,12 +43,18 @@ public interface CrdnStngService { * @param exmptnVhcl 면제차량 정보 * @return 저장여부 */ - boolean createExmptnVhclInfo(ExmptnVhcl exmptnVhcl); + boolean createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); /** 면제차량 정보를 수정한다. * @param exmptnVhcl 면제차량 정보 * @return 저장여부 */ - boolean updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl); + boolean updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); + + /** 면제차량 정보를 삭제한다. + * @param exmptnVhcl 면제차량 정보 + * @return 저장여부 + */ + boolean removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl); } 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 17b04e51..32bf2bd5 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 @@ -256,8 +256,8 @@ public class CrdnStngBean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean createExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return exmptnVhclMapper.insertExmptnVhclInfo(exmptnVhcl) == 1 ? true : false; + public boolean createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return exmptnVhclMapper.insertExemptionVehicleInfo(exmptnVhcl) == 1 ? true : false; } /**면제차량 정보를 수정한다. @@ -267,8 +267,20 @@ public class CrdnStngBean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return exmptnVhclMapper.updateExmptnVhclInfo(exmptnVhcl) == 1 ? true : false; + public boolean updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return exmptnVhclMapper.updateExemptionVehicleInfo(exmptnVhcl) == 1 ? true : false; + } + + /**면제차량 정보를 삭제한다. + * @param exmptnVhcl 면제차량 정보 + * @return 저장 여부 + * + */ + public boolean removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + exmptnVhcl.setRemovedBy(currentUser().getId()); + return exmptnVhclMapper.deleteExemptionVehicleInfo(exmptnVhcl) == 1 ? true : false; } } 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 947e0fef..a053e88c 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 @@ -50,13 +50,18 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng } @Override - public boolean createExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return crdnStngBean.createExmptnVhclInfo(exmptnVhcl); + public boolean createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return crdnStngBean.createExemptionVehicleInfo(exmptnVhcl); } @Override - public boolean updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return crdnStngBean.updateExmptnVhclInfo(exmptnVhcl); + public boolean updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return crdnStngBean.updateExemptionVehicleInfo(exmptnVhcl); + } + + @Override + public boolean removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return crdnStngBean.removeExemptionVehicleInfo(exmptnVhcl); } } 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 f58b2aa6..361e0401 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn08Controller.java @@ -29,9 +29,10 @@ public class Crdn08Controller extends ApplicationController { public static final String exemptionVehicleManagementMain = "/010/main.do" , getExemptionVehicleList = "/010/list.do" + , removeExemptionVehicleInfo = "/010/remove.do" , getExemptionVehicleInfo = "/020/info.do" - , createExmptnVhclInfo = "/020/create.do" - , updateExmptnVhclInfo = "/020/update.do" + , createExemptionVehicleInfo = "/020/create.do" + , updateExemptionVehicleInfo = "/020/update.do" ; } @@ -94,14 +95,14 @@ public class Crdn08Controller extends ApplicationController { } /** 면제차량 정보를 등록한다. - * {@link CrdnStngService#createExmptnVhclInfo(exmptnVhcl)} 참고 + * {@link CrdnStngService#createExemptionVehicleInfo(exmptnVhcl)} 참고 * @param exmptnVhcl 면제차량 정보 * @return jsonView *
     {
     	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
     	 * }
    */ - public ModelAndView createExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { + public ModelAndView createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute()); String deptCd = currentUser.getDeptCode(); @@ -109,7 +110,7 @@ public class Crdn08Controller extends ApplicationController { boolean saved = false; - saved = crdnStngService.createExmptnVhclInfo(exmptnVhcl); + saved = crdnStngService.createExemptionVehicleInfo(exmptnVhcl); return new ModelAndView("jsonView") .addObject("saved", saved); @@ -117,14 +118,14 @@ public class Crdn08Controller extends ApplicationController { } /** 면제차량 정보를 수정한다. - * {@link CrdnStngService#updateExmptnVhclInfo(exmptnVhcl)} 참고 + * {@link CrdnStngService#updateExemptionVehicleInfo(exmptnVhcl)} 참고 * @param exmptnVhcl 면제차량 정보 * @return jsonView *
     {
     	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
     	 * }
    */ - public ModelAndView updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { + public ModelAndView updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute()); String deptCd = currentUser.getDeptCode(); @@ -132,11 +133,29 @@ public class Crdn08Controller extends ApplicationController { boolean saved = false; - saved = crdnStngService.updateExmptnVhclInfo(exmptnVhcl); + saved = crdnStngService.updateExemptionVehicleInfo(exmptnVhcl); return new ModelAndView("jsonView") .addObject("saved", saved); } + /** 면제차량 정보를 삭제한다. + * {@link CrdnStngService#removeExemptionVehicleInfo(exmptnVhclId)} 참고 + * @param exmptnVhcl 면제차량 정보 + * @return jsonView + *
     {
    +	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
    +	 * }
    + */ + public ModelAndView removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + + boolean saved = false; + + saved = crdnStngService.removeExemptionVehicleInfo(exmptnVhcl); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + + } } 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 f791f6d7..aa1ca4d2 100644 --- a/src/main/java/cokr/xit/fims/task/web/BpvController.java +++ b/src/main/java/cokr/xit/fims/task/web/BpvController.java @@ -326,16 +326,23 @@ public class BpvController { } @Override - @RequestMapping(name="전용차로과태료업무 면제차량 정보 등록", value=METHOD_URL.createExmptnVhclInfo) - public ModelAndView createExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return super.createExmptnVhclInfo(exmptnVhcl); + @RequestMapping(name="전용차로과태료업무 면제차량 정보 등록", value=METHOD_URL.createExemptionVehicleInfo) + public ModelAndView createExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return super.createExemptionVehicleInfo(exmptnVhcl); } @Override - @RequestMapping(name="전용차로과태료업무 면제차량 정보 수정", value=METHOD_URL.updateExmptnVhclInfo) - public ModelAndView updateExmptnVhclInfo(ExmptnVhcl exmptnVhcl) { - return super.updateExmptnVhclInfo(exmptnVhcl); + @RequestMapping(name="전용차로과태료업무 면제차량 정보 수정", value=METHOD_URL.updateExemptionVehicleInfo) + public ModelAndView updateExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return super.updateExemptionVehicleInfo(exmptnVhcl); } + + @Override + @RequestMapping(name="전용차로과태료업무 면제차량 정보 삭제", value=METHOD_URL.removeExemptionVehicleInfo) + public ModelAndView removeExemptionVehicleInfo(ExmptnVhcl exmptnVhcl) { + return super.removeExemptionVehicleInfo(exmptnVhcl); + } + } @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 8a9a6eda..6a18a88b 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 @@ -50,8 +50,8 @@ SELECT A.EXMPTN_VHCL_ID WHERE A.EXMPTN_VHCL_ID = #{exmptnVhclId} - -/* 면제차량 정보 등록(exmptnVhclMapper.insertExmptnVhclInfo) */ + +/* 면제차량 정보 등록(exmptnVhclMapper.insertExemptionVehicleInfo) */ SELECT LPAD(CAST(IFNULL(MAX(EXMPTN_VHCL_ID) + 1, 1) AS INT), 10, '0') @@ -82,23 +82,33 @@ INSERT INTO TB_EXMPTN_VHCL ( , #{exmptnBgngYmd} , #{exmptnEndYmd} , 'N' - , #{createdAt} - , #{createdBy} - , #{lastModified} - , #{modifiedBy} + , + , #{createdBy} + , + , #{modifiedBy} ) - -/* 면제차량 정보 수정(exmptnVhclMapper.updateExmptnVhclInfo) */ + +/* 면제차량 정보 수정(exmptnVhclMapper.updateExemptionVehicleInfo) */ UPDATE TB_EXMPTN_VHCL SET EXMPTN_RSN = #{exmptnRsn} , DOC_NO = #{docNo} , OWNR_NM = #{ownrNm} , EXMPTN_BGNG_YMD = #{exmptnBgngYmd} , EXMPTN_END_YMD = #{exmptnEndYmd} - , MDFCN_DT = #{lastModified} - , MDFR = #{modifiedBy} + , MDFCN_DT = + , MDFR = #{modifiedBy} + WHERE EXMPTN_VHCL_ID = #{exmptnVhclId} + + + +/* 면제차량 정보 삭제(exmptnVhclMapper.deleteExemptionVehicleInfo) */ +UPDATE TB_EXMPTN_VHCL + SET DEL_YN = 'Y' + , DEL_RSN = #{delRsn} + , DEL_DT = + , DLTR = #{removedBy} WHERE EXMPTN_VHCL_ID = #{exmptnVhclId} 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 da9e4587..90331b98 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 @@ -42,7 +42,7 @@ - @@ -112,6 +112,29 @@
    + + +