list = ntcService.getNtcList(req);
+ return setCollectionInfo(mav, list, "", "");
+ }
+
+ /**공지사항 상세 내용을 조회하여 반환한다.
+ * {@link NtcService#getNtcInfo(NtcQuery)} 참고
+ * @param ntcId 공지사항 ID
+ * @return jsonView
+ */
+ public ModelAndView getNtcInfo(String ntcId) {
+ boolean json = jsonResponse();
+ ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/mngt/mngt01020-info");
+ mav.addObject("pageName", "mngt01020");
+ DataObject info = new DataObject();
+ if(!ifEmpty(ntcId, ()->"").equals("")) {
+ info = ntcService.getNtcInfo(ntcId);
+ } else {
+ info = null;
+ }
+ mav.addObject("ntcInfo", json ? info : toJson(info));
+ return mav;
+ }
+
+ /**공지사항를 등록한다.
+ * @param ntc 공지사항 정보
+ * @return jsonView
+ * {
+ * "saved": 등록되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ public ModelAndView create(Ntc ntc) {
+ ModelAndView mav = new ModelAndView("jsonView");
+ boolean saved = false;
+
+ String rtnMsg = ntcService.create(ntc);
+
+ if(rtnMsg.contains("[S]")) {
+ saved = true;
+ }
+ mav.addObject("saved", saved);
+ return mav;
+ }
+
+ /**공지사항 정보를 수정한다.
+ * @param ntc 공지사항 정보
+ * @return jsonView
+ * {
+ * "saved": 수정되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ public ModelAndView update(Ntc ntc) {
+ ModelAndView mav = new ModelAndView("jsonView");
+ boolean saved = false;
+
+ String rtnMsg = ntcService.update(ntc);
+
+ if(rtnMsg.contains("[S]")) {
+ saved = true;
+ }
+ mav.addObject("saved", saved);
+ return mav;
+ }
+
+ /**지정한 공지사항를 제거한다.
+ * @param ntcIDs 공지사항 아이디
+ * @return jsonView
+ * {
+ * "affected": 저장된 정보수
+ * "saved": 저장되었으면 true, 그렇지 않으면 false
+ * }
+ */
+ public ModelAndView remove(Ntc ntc) {
+ ModelAndView mav = new ModelAndView("jsonView");
+ boolean saved = false;
+
+ String rtnMsg = ntcService.remove(ntc);
+
+ if(rtnMsg.contains("[S]")) {
+ saved = true;
+ }
+ mav.addObject("saved", saved);
+ return mav;
+
+ }
}
diff --git a/src/main/java/cokr/xit/fims/task/web/CmnController.java b/src/main/java/cokr/xit/fims/task/web/CmnController.java
index cd7341db..5e58d194 100644
--- a/src/main/java/cokr/xit/fims/task/web/CmnController.java
+++ b/src/main/java/cokr/xit/fims/task/web/CmnController.java
@@ -16,6 +16,8 @@ import cokr.xit.fims.cmmn.PrintOption;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.mngt.FineIntegrationDepartment;
import cokr.xit.fims.mngt.FineIntegrationSigungu;
+import cokr.xit.fims.mngt.Ntc;
+import cokr.xit.fims.mngt.NtcQuery;
import cokr.xit.fims.mngt.Task;
import cokr.xit.fims.mngt.VltnQuery;
import cokr.xit.fims.sprt.SprtQuery;
@@ -576,6 +578,36 @@ public class CmnController {
return super.ntcMain();
}
+ @Override
+ @RequestMapping(name="공지사항 목록 조회", value=METHOD_URL.getNtcList)
+ public ModelAndView getNtcList(NtcQuery req) {
+ return super.getNtcList(req);
+ }
+
+ @Override
+ @RequestMapping(name="공지사항 상세 조회", value=METHOD_URL.getNtcInfo)
+ public ModelAndView getNtcInfo(String ntcId) {
+ return super.getNtcInfo(ntcId);
+ }
+
+ @Override
+ @RequestMapping(name="공지사항 등록", value=METHOD_URL.create)
+ public ModelAndView create(Ntc ntc) {
+ return super.create(ntc);
+ }
+
+ @Override
+ @RequestMapping(name="공지사항 수정", value=METHOD_URL.update)
+ public ModelAndView update(Ntc ntc) {
+ return super.update(ntc);
+ }
+
+ @Override
+ @RequestMapping(name="공지사항 삭제", value=METHOD_URL.remove)
+ public ModelAndView remove(Ntc ntc) {
+ return super.remove(ntc);
+ }
+
}
@Controller
diff --git a/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml b/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml
index e6b979d7..c2b22ff1 100644
--- a/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml
+++ b/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml
@@ -1,4 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+SELECT A.NTC_ID
+ , A.SGG_CD
+ , A.NTC_TTL
+ , A.NTC_CN
+ , A.DEL_YN
+ , A.REG_DT
+ , A.RGTR
+ , A.MDFCN_DT
+ , A.MDFR
+ , A.DEL_DT
+ , A.DLTR
+ , A.DEL_RSN
+ FROM TB_NOTICE A
+
+
+
+
+
+
+
+/* 공지사항 등록(ntcMapper.insertNtc) */
+
+SELECT
+ LPAD(CAST(IFNULL(MAX(NTC_ID) + 1, 1) AS INT), 10, '0')
+ AS NEW_ID
+FROM TB_NOTICE
+
+INSERT
+ INTO TB_NOTICE (
+ NTC_ID
+ , SGG_CD
+ , NTC_TTL
+ , NTC_CN
+ , DEL_YN
+ , REG_DT
+ , RGTR
+ , MDFCN_DT
+ , MDFR
+) VALUES (
+ #{ntc.ntcId}
+ , #{ntc.sggCd}
+ , #{ntc.ntcTtl}
+ , #{ntc.ntcCn}
+ , 'N'
+ ,
+ , #{currentUser.id}
+ ,
+ , #{currentUser.id}
+)
+
+
+
+/* 공지사항 수정(ntcMapper.updateNtc) */
+UPDATE TB_NOTICE
+ SET NTC_TTL = #{ntc.ntcTtl}
+ , NTC_CN = #{ntc.ntcCn}
+ , MDFCN_DT =
+ , MDFR = #{currentUser.id}
+ WHERE NTC_ID = #{ntc.ntcId}
+
+
+
+/* 공지사항 삭제(ntcMapper.deleteNtc) */
+UPDATE TB_NOTICE
+ SET DEL_YN = 'Y'
+ , MDFCN_DT =
+ , MDFR = #{currentUser.id}
+ WHERE NTC_ID = #{ntc.ntcId}
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp
index 29cda737..8b5cf50d 100644
--- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp
@@ -1,4 +1,314 @@
<%@ 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
+공지사항 관리
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp
new file mode 100644
index 00000000..33584360
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp
@@ -0,0 +1,167 @@
+<%@ 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