diff --git a/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java b/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java index 3c415bc3..de8b7931 100644 --- a/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java +++ b/src/main/java/cokr/xit/fims/cvlc/CrdnCvlcpt.java @@ -193,4 +193,14 @@ public class CrdnCvlcpt extends AbstractEntity { */ private java.lang.String prcsRsltCn; + /** + * 계도문 제목 + */ + private java.lang.String mailTtlNm; + + /** + * 계도문 내용 + */ + private java.lang.String mailCn; + } \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/cvlc/dao/WarningWordsMapper.java b/src/main/java/cokr/xit/fims/cvlc/dao/WarningWordsMapper.java index 65d0e72e..c22aa7ac 100644 --- a/src/main/java/cokr/xit/fims/cvlc/dao/WarningWordsMapper.java +++ b/src/main/java/cokr/xit/fims/cvlc/dao/WarningWordsMapper.java @@ -5,6 +5,7 @@ import java.util.List; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.data.DataObject; @@ -18,6 +19,18 @@ public interface WarningWordsMapper extends AbstractMapper { * @param crdnQuery 계도문 문구 조회 파라미터 * @return 계도문 문구 설정 정보 */ - List selectWarningWordsInfo(CrdnQuery crdnQuery); + List selectWarningWordsList(CrdnQuery crdnQuery); + + /**계도문 문구를 등록한다. + * @param crdnCvlcpt 계도문 문구 + * return 저장된 정보 수 + */ + int insertWarningWordsInfo(CrdnCvlcpt crdnCvlcpt); + + /**계도문 문구를 변경한다. + * @param crdnCvlcpt 계도문 문구 + * return 저장된 정보 수 + */ + int updateWarningWordsInfo(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 1786725e..651a47db 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/CrdnCvlcptService.java @@ -101,8 +101,12 @@ public interface CrdnCvlcptService { * @param crdnQuery 조회 조건 * @return 계도문 문구 설정 정보 */ - List getWarningWordsInfo(CrdnQuery crdnQuery); - + List getWarningWordsList(CrdnQuery crdnQuery); + /** 계도문 문구 설정 정보를 저장한다. + * @param crdnCvlcpt 계도문 문구 설정 + * @return 저장여부 + */ + boolean saveWarningWordsInfo(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 969e798d..03ee43da 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 @@ -714,8 +714,13 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv } @Override - public List getWarningWordsInfo(CrdnQuery crdnQuery) { - return crdnCvlcptSubBean.selectWarningWordsInfo(crdnQuery); + public List getWarningWordsList(CrdnQuery crdnQuery) { + return crdnCvlcptSubBean.selectWarningWordsList(crdnQuery); + } + + @Override + public boolean saveWarningWordsInfo(CrdnCvlcpt crdnCvlcpt) { + return crdnCvlcptSubBean.saveWarningWordsInfo(crdnCvlcpt); } } diff --git a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java index 6b93865b..997f9041 100644 --- a/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java +++ b/src/main/java/cokr/xit/fims/cvlc/service/bean/CrdnCvlcptSubBean.java @@ -7,8 +7,11 @@ import javax.annotation.Resource; import org.springframework.stereotype.Component; +import cokr.xit.base.code.dao.CodeMapper; +import cokr.xit.base.code.service.CodeQuery; import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.dao.WarningWordsMapper; import cokr.xit.foundation.AbstractComponent; @@ -24,6 +27,9 @@ public class CrdnCvlcptSubBean extends AbstractComponent { @Resource(name = "crdnCvlcptMapper") private CrdnCvlcptMapper crdnCvlcptMapper; + @Resource(name = "codeMapper") + private CodeMapper codeMapper; + @Resource(name = "warningWordsMapper") private WarningWordsMapper warningWordsMapper; @@ -75,8 +81,30 @@ public class CrdnCvlcptSubBean extends AbstractComponent { * @param crdnQuery 조회조건 * @return 계도문 문구 설정 */ - public List selectWarningWordsInfo(CrdnQuery crdnQuery) { - //TODO : warningWordsMapper.selectWarningWordsInfo(crdnQuery) - return null; + public List selectWarningWordsList(CrdnQuery crdnQuery) { + + return warningWordsMapper.selectWarningWordsList(crdnQuery); + } + + /** 계도문 문구 설정 정보를 저장한다. + * @param crdnCvlcpt 문구 정보 + * @return 저장 여부 + *
  • 저장됐으면 true
  • + *
  • 그렇지 않으면 false
  • + *
+ */ + public boolean saveWarningWordsInfo(CrdnCvlcpt crdnCvlcpt) { + if(ifEmpty(crdnCvlcpt.getAnsWordsId(), ()-> "").equals("")) { + + CodeQuery codeQuery = new CodeQuery(); + codeQuery.setGroupIDs("FIM022"); + codeQuery.setCodes(crdnCvlcpt.getAnsRsnCd()); + List codeList = codeMapper.getCodeList(codeQuery); + crdnCvlcpt.setAnsRsnNm(codeList.get(0).string("CODE_VAL")); + + return warningWordsMapper.insertWarningWordsInfo(crdnCvlcpt) == 1 ? true : false; + } else { + return warningWordsMapper.updateWarningWordsInfo(crdnCvlcpt) == 1 ? true : false; + } } } diff --git a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc06Controller.java b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc06Controller.java index 608eed92..8e69a563 100644 --- a/src/main/java/cokr/xit/fims/cvlc/web/Cvlc06Controller.java +++ b/src/main/java/cokr/xit/fims/cvlc/web/Cvlc06Controller.java @@ -5,10 +5,14 @@ import java.util.Map; import javax.annotation.Resource; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; +import cokr.xit.fims.crdn.CrdnQuery; +import cokr.xit.fims.crdn.dao.GlobalStngMapper; +import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.service.CrdnCvlcptService; /**계도문 문구 관리 서비스 웹 컨트롤러.
@@ -20,10 +24,14 @@ public class Cvlc06Controller extends ApplicationController { @Resource(name="crdnCvlcptService") private CrdnCvlcptService crdnCvlcptService; + @Resource(name="globalStngMapper") + private GlobalStngMapper globalStngMapper; + /** 계도문 문구 관리 메인화면을 연다. * @return fims/cvlc/cvlc06010-main */ public ModelAndView warningWordsManageMain() { + ModelAndView mav = new ModelAndView(); mav.setViewName("fims/cvlc/cvlc06010-main"); mav.addObject("pageName", "cvlc06010-main"); @@ -33,4 +41,36 @@ public class Cvlc06Controller extends ApplicationController { return mav; } + + /** 계도문 문구 설정 목록을 조회한다. + * @return fims/cvlc/cvlc06010-info + */ + @RequestMapping(name="계도문 문구 설정 목록", value="/010/list.do") + public ModelAndView getWarningWordsList(CrdnQuery crdnQuery) { + String currentSggCd = globalStngMapper.selectSggCdForCurrentUser(); + crdnQuery.setSggCd(currentSggCd); + return setCollectionInfo(new ModelAndView("jsonView"), crdnCvlcptService.getWarningWordsList(crdnQuery),""); + } + + /** 계도문 문구 설정을 저장한다. + * @param crdnCvlcpt 문구 정보 + * @return jsonView + *
 {
+	 *     "affected": 저장된 정보수
+	 *     "saved": 저장되었으면 true, 그렇지 않으면 false
+	 * }
+ */ + @RequestMapping(name="민원신고 답변 문구 설정 저장", value="/010/save.do") + public ModelAndView saveCvlcptAnswerWordsInfo(CrdnCvlcpt crdnCvlcpt) { + boolean saved = false; + + String currentSggCd = globalStngMapper.selectSggCdForCurrentUser(); + crdnCvlcpt.setSggCd(currentSggCd); + + saved = crdnCvlcptService.saveWarningWordsInfo(crdnCvlcpt); + + return new ModelAndView("jsonView") + .addObject("saved", saved); + } + } diff --git a/src/main/resources/sql/mapper/fims/cvlc/answer-words-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/answer-words-mapper.xml index 33b0df9b..38915c08 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/answer-words-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/answer-words-mapper.xml @@ -157,7 +157,7 @@ UPDATE TB_CVLCPT_BSC_WORDS AND TASK_SE_CD = #{taskSeCd} - + /* 본문 문구 설정 등록(answerWordsMapper.insertAnswerBodyWordsInfo) */ SELECT @@ -198,7 +198,7 @@ VALUES ( , , #{modifiedBy} ) - + /* 본문 문구 설정 변경(answerWordsMapper.updateAnswerBodyWordsInfo) */ diff --git a/src/main/resources/sql/mapper/fims/cvlc/warning-words-mapper.xml b/src/main/resources/sql/mapper/fims/cvlc/warning-words-mapper.xml index f3c99082..cf24ec53 100644 --- a/src/main/resources/sql/mapper/fims/cvlc/warning-words-mapper.xml +++ b/src/main/resources/sql/mapper/fims/cvlc/warning-words-mapper.xml @@ -2,4 +2,79 @@ + + + +/* 계도문 문구 설정 등록(warningWordsMapper.insertWarningWordsInfo) */ + +SELECT + LPAD(CAST(IFNULL(MAX(ANS_WORDS_ID) + 1, 1) AS INT), 10, '0') + AS NEW_ID +FROM TB_CVLCPT_ANS_WORDS + +INSERT + INTO TB_CVLCPT_ANS_WORDS( + ANS_WORDS_ID + , SGG_CD + , TASK_SE_CD + , ANS_SE_CD + , DSTRBNC_YN + , ANS_RSN_CD + , ANS_RSN_NM + , PRCS_SUMRY + , MAIL_TTL_NM + , MAIL_CN + , USE_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + ) +VALUES ( + #{ansWordsId} + , #{sggCd} + , #{taskSeCd} + , '2' + , 'N' + , #{ansRsnCd} + , #{ansRsnNm} + , '과태료 계고' + , #{mailTtlNm} + , #{mailCn} + , 'Y' + , + , #{modifiedBy} + , + , #{modifiedBy} + ) + + + +/* 계도문 문구 설정 변경(warningWordsMapper.updateWarningWordsInfo) */ +UPDATE TB_CVLCPT_ANS_WORDS + SET MAIL_TTL_NM = #{mailTtlNm} + , MAIL_CN = #{mailCn} + , MDFCN_DT = + , MDFR = #{modifiedBy} + WHERE ANS_WORDS_ID = #{ansWordsId} + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp index af483f72..2ed08a44 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp @@ -203,7 +203,8 @@
- @@ -443,7 +444,6 @@ $(document).ready(function(){ $P.ansBodyControl[gridType].setCurrent(dataKey); var tbodyId = ""; - var radioName = ""; if(gridType == "levy"){ tbodyId = "vltnTbody--${pageName}"; } else if(gridType == "warning"){ diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp new file mode 100644 index 00000000..fc7c77a9 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp @@ -0,0 +1,318 @@ +<%@ 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