diff --git a/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java b/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java index 6eb69902..bf7bb61b 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java +++ b/src/main/java/cokr/xit/fims/sprt/service/Sprt04Service.java @@ -3,7 +3,6 @@ package cokr.xit.fims.sprt.service; import java.util.List; import cokr.xit.foundation.data.DataObject; -import cokr.xit.fims.excl.ExclQuery; import cokr.xit.fims.sprt.CvlcptDscsnCn; import cokr.xit.fims.sprt.SprtQuery; @@ -44,7 +43,7 @@ public interface Sprt04Service { *
  • 그렇지 않으면 false
  • * */ - boolean create(CvlcptDscsnCn cvlcptDscsnCn); + boolean createCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn); /**민원 상담 내용 정보를 수정한다. * @param cvlcptDscsnCn 민원 상담 내용 @@ -53,7 +52,7 @@ public interface Sprt04Service { *
  • 그렇지 않으면 false
  • * */ - boolean update(CvlcptDscsnCn cvlcptDscsnCn); + boolean updateCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn); /**민원 상담 내용 정보를 삭제한다. * @param cvlcptDscsnCn 민원 상담 내용 @@ -62,6 +61,6 @@ public interface Sprt04Service { *
  • 그렇지 않으면 false
  • * */ - boolean remove(CvlcptDscsnCn cvlcptDscsnCn); + boolean removeCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn); } diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java index c37687db..e6926600 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04Bean.java @@ -72,7 +72,7 @@ public class Sprt04Bean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean create(CvlcptDscsnCn cvlcptDscsnCn) { + public boolean createCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { if (cvlcptDscsnCn.getCvlcptRcptSeCd().equals("01")) { cvlcptDscsnCn.setVhrno(null); cvlcptDscsnCn.setRtpyrNo(null); @@ -92,7 +92,7 @@ public class Sprt04Bean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean update(CvlcptDscsnCn cvlcptDscsnCn) { + public boolean updateCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { return cvlcptDscsnCnMapper.update(cvlcptDscsnCn); } @@ -103,7 +103,7 @@ public class Sprt04Bean extends AbstractComponent { *
  • 그렇지 않으면 false
  • * */ - public boolean remove(CvlcptDscsnCn cvlcptDscsnCn) { + public boolean removeCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { return cvlcptDscsnCnMapper.delete(cvlcptDscsnCn); } diff --git a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java index 3f501b14..f2385d94 100644 --- a/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java +++ b/src/main/java/cokr/xit/fims/sprt/service/bean/Sprt04ServiceBean.java @@ -50,18 +50,18 @@ public class Sprt04ServiceBean extends AbstractServiceBean implements Sprt04Serv } @Override - public boolean create(CvlcptDscsnCn cvlcptDscsnCn) { - return sprt04Bean.create(cvlcptDscsnCn); + public boolean createCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + return sprt04Bean.createCvlcptDscsnCn(cvlcptDscsnCn); } @Override - public boolean update(CvlcptDscsnCn cvlcptDscsnCn) { - return sprt04Bean.update(cvlcptDscsnCn); + public boolean updateCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + return sprt04Bean.updateCvlcptDscsnCn(cvlcptDscsnCn); } @Override - public boolean remove(CvlcptDscsnCn cvlcptDscsnCn) { - return sprt04Bean.remove(cvlcptDscsnCn); + public boolean removeCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + return sprt04Bean.removeCvlcptDscsnCn(cvlcptDscsnCn); } } diff --git a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java index 29562231..9f3e7ad6 100644 --- a/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java +++ b/src/main/java/cokr/xit/fims/sprt/web/Sprt04Controller.java @@ -95,8 +95,8 @@ public class Sprt04Controller extends ApplicationController { * } */ @PostMapping(name = "민원 상담 내용 등록", value = "/020/create.do") - public ModelAndView create(CvlcptDscsnCn cvlcptDscsnCn) { - boolean saved = sprt04Service.create(cvlcptDscsnCn); + public ModelAndView createCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + boolean saved = sprt04Service.createCvlcptDscsnCn(cvlcptDscsnCn); return new ModelAndView("jsonView") .addObject("saved", saved); @@ -110,8 +110,8 @@ public class Sprt04Controller extends ApplicationController { * } */ @PostMapping(name = "민원 상담 내용 수정", value = "/020/update.do") - public ModelAndView update(CvlcptDscsnCn cvlcptDscsnCn) { - boolean saved = sprt04Service.update(cvlcptDscsnCn); + public ModelAndView updateCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + boolean saved = sprt04Service.updateCvlcptDscsnCn(cvlcptDscsnCn); return new ModelAndView("jsonView") .addObject("saved", saved); @@ -126,8 +126,8 @@ public class Sprt04Controller extends ApplicationController { * } */ @PostMapping(name = "민원 상담 내용 제거", value = "/010/remove.do") - public ModelAndView remove(CvlcptDscsnCn cvlcptDscsnCn) { - boolean saved = sprt04Service.remove(cvlcptDscsnCn); + public ModelAndView removeCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) { + boolean saved = sprt04Service.removeCvlcptDscsnCn(cvlcptDscsnCn); return new ModelAndView("jsonView") .addObject("saved", saved); diff --git a/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsnCn-mapper.xml b/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsnCn-mapper.xml index 3d58c1d5..2f5d94ac 100644 --- a/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsnCn-mapper.xml +++ b/src/main/resources/sql/mapper/fims/sprt/cvlcptDscsnCn-mapper.xml @@ -179,6 +179,7 @@ , C.TASK_SE_CD /* 업무 구분 코드 */ , C.VHRNO /* 차량번호 */ , P.RTPYR_ID /* 납부자 ID */ + , P.RTPYR_NO /* 납부자 번호 */ FROM TB_CRDN C LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) WHERE C.CRDN_ID = #{crdnId} /* 단속 ID */ diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02010-main.jsp index 55076235..1e35aba0 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02010-main.jsp @@ -32,8 +32,8 @@
    - - + +
    diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02080-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02080-info.jsp index 51860b11..a94bbc20 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02080-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02080-info.jsp @@ -12,13 +12,13 @@ - - - @@ -70,7 +70,7 @@
    -
    @@ -94,7 +94,7 @@ **************************************************************************/ var ${pageName}Control = new DatasetControl({ prefix : "cvlcptDscsnCn" - , prefixName : "민원상담 정보" + , prefixName : "민원상담내용" , infoSize : "lg" , keymapper : info => info ? info.CVLCPT_DSCSN_ID : "" , dataGetter : obj => obj.cvlcptDscsnCnList @@ -136,13 +136,29 @@ , content : resp , size : "lg" , init : () => { } - , onClose : () => { fnDataRefreshInfo(); } // callback 자료 조회 + , onClose : () => { fnDataRefreshInfo(); } // callback 자료 재조회 }); } }); } - // 재조회 + // 삭제 callback + ${pageName}Control.onRemove = (resp) => { + if (resp.saved) { + fnDataRefreshInfo(); // 자료 재조회 + } + } + + // 삭제 + ${pageName}Control.remove = (params) => { + ajax.post({ + url : wctx.url("/" + params.taskSeCd + ${pageName}PrefixUrl + "/010/remove.do") + , data : params || {} + , success : resp => ${pageName}Control.onRemove(resp) + }); + } + + // 자료 재조회 fnDataRefreshInfo = () => { let crdnId = $("#crdnId--${pageNameMain}").val(); let vhrno = $("#vhrno--${pageNameMain}").val(); @@ -188,7 +204,6 @@ ); $("#tbody--${pageName}").html(trs.join()); - $("th input[type='checkbox']").prop("checked", false); } /************************************************************************** @@ -208,7 +223,7 @@ * function **************************************************************************/ // 민원 상담 내용 등록 - fnBtnCvlcptDscsnCnCreate${pageName} = () => { + fnCreateCvlcptDscsnCn${pageName} = () => { let crdnId = $("#crdnId--${pageNameMain}").val(); let sggCd = $("#sggCd--${pageNameMain}").val(); let taskSeCd = $("#taskSeCd--${pageNameMain}").val(); @@ -229,7 +244,7 @@ } // 민원 상담 내용 수정 - fnBtnCvlcptDscsnCnUpdate${pageName} = () => { + fnUpdateCvlcptDscsnCn${pageName} = () => { let crdnId = $("#crdnId--${pageNameMain}").val(); let sggCd = $("#sggCd--${pageNameMain}").val(); let taskSeCd = $("#taskSeCd--${pageNameMain}").val(); @@ -252,8 +267,31 @@ } // 민원 상담 내용 삭제 - fnBtnCvlcptDscsnCnRemove${pageName} = () => { - alert("민원 상담 삭제"); + fnRemoveCvlcptDscsnCn${pageName} = () => { + let crdnId = $("#crdnId--${pageNameMain}").val(); + let sggCd = $("#sggCd--${pageNameMain}").val(); + let taskSeCd = $("#taskSeCd--${pageNameMain}").val(); + let cvlcptDscsnId = ${pageName}Control.dataset.getValue("CVLCPT_DSCSN_ID"); + + // 민원 상담 ID 가 없다면.. return + if (cvlcptDscsnId == undefined || cvlcptDscsnId == "") { + return; + } + + let params = { + callPurpose : "remove" + , crdnId : crdnId + , sggCd : sggCd + , taskSeCd : taskSeCd + , cvlcptDscsnId : cvlcptDscsnId + }; + + dialog.alert({ + content : "선택한 민원상담 내용을 삭제하시겠습니까?" + , onOK : () => { + ${pageName}Control.remove(params); + } + }); } /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04020-info.jsp index 2c179d11..a534e448 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt04020-info.jsp @@ -11,7 +11,7 @@ - +
    @@ -60,7 +60,7 @@ **************************************************************************/ var ${pageName}Control = new DatasetControl({ prefix : "cvlcptDscsnCn" - , prefixName : "민원상담" + , prefixName : "민원상담내용" , keymapper : info => info ? info.CVLCPT_DSCSN_ID : "" , dataGetter : obj => obj.cvlcptDscsnCn , urls : { @@ -103,7 +103,13 @@ **************************************************************************/ // 검색조건 초기값 셋팅 function initForm${pageName}() { + let initDataset = ${cvlcptDscsnCn}; + $("#cvlcptRcptSeCd--${pageName}").prop("disabled", true); + + if (initDataset.CVLCPT_DSCSN_ID == undefined || initDataset.CVLCPT_DSCSN_ID == null) { + $("#cvlcptRcptSeCd--${pageName}").prop("disabled", false); + } } // 이벤트 설정