diff --git a/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java b/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java index 2fe04dd4..1709a502 100644 --- a/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java +++ b/src/main/java/cokr/xit/fims/cvlc/dao/CrdnCvlcptMapper.java @@ -115,4 +115,10 @@ public interface CrdnCvlcptMapper extends AbstractMapper { */ DataObject selectCvlcptAnswerBasicWordsInfo(CrdnQuery crdnQuery); + /**지정한 민원자료의 민원 답변 내용을 변경한다. + * @param crdnCvlcpt 단속민원 정보 + * @return 저장된 정보 수 + */ + int updateAnswerContent(CrdnCvlcpt crdnCvlcpt); + } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java index cb8b502f..2217e5b8 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java @@ -56,5 +56,10 @@ public interface CrdnCvlcptService { */ boolean copyCvlcptCrdnInfo(String crdnId); + /** 단속민원의 답변내용을 변경한다. + * @param crdnCvlcpt 단속민원정보 + * @return 저장여부 + */ + boolean updateAnswerContent(CrdnCvlcpt crdnCvlcpt); } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java index 6ad3c1e1..7eced90c 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptServiceBean.java @@ -534,4 +534,16 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv return true; } + @Override + public boolean updateAnswerContent(CrdnCvlcpt crdnCvlcpt) { + + int effected = crdnCvlcptMapper.updateAnswerContent(crdnCvlcpt); + if(effected != 1) { + throw new RuntimeException("답변 내용 저장에 실패하였습니다."); + } + + return true; + + } + } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java index a360ba19..8e073157 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc01Controller.java @@ -342,4 +342,23 @@ public class Cvlc01Controller extends ApplicationController { return mav; } + /**지정한 민원 자료의 답변 내용을 저장한다. + * @param crdnCvlcpt 단속민원 정보 + * @return jsonView + *
{
+ * "affected": 저장된 정보수
+ * "saved": 저장되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ @RequestMapping(name="답변 내용 저장", value="/060/update.do")
+ public ModelAndView updateAnswerContent(CrdnCvlcpt crdnCvlcpt) {
+
+ boolean saved = false;
+
+ saved = crdnCvlcptService.updateAnswerContent(crdnCvlcpt);
+
+ return new ModelAndView("jsonView")
+ .addObject("saved", saved);
+ }
+
}
diff --git a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
index e309f2d6..fd21a4a5 100644
--- a/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/cvlc/crdnCvlcpt-mapper.xml
@@ -635,6 +635,7 @@ SELECT A.HEADER_CN
+