diff --git a/src/main/java/cokr/xit/fims/mngt/web/Mngt01Controller.java b/src/main/java/cokr/xit/fims/mngt/web/Mngt01Controller.java index 6dca60e3..b4092a61 100644 --- a/src/main/java/cokr/xit/fims/mngt/web/Mngt01Controller.java +++ b/src/main/java/cokr/xit/fims/mngt/web/Mngt01Controller.java @@ -10,6 +10,7 @@ import cokr.xit.base.user.ManagedUser; import cokr.xit.base.web.ApplicationController; import cokr.xit.fims.mngt.Ntc; import cokr.xit.fims.mngt.NtcQuery; +import cokr.xit.fims.mngt.dao.FactionMapper; import cokr.xit.fims.mngt.service.NtcService; import cokr.xit.foundation.data.DataObject; @@ -35,6 +36,9 @@ public class Mngt01Controller extends ApplicationController { @Resource(name="ntcService") private NtcService ntcService; + @Resource(name = "factionMapper") + private FactionMapper factionMapper; + /** 공지사항 메인화면을 연다. * @return fims/mngt/mngt01010-main */ @@ -84,6 +88,10 @@ public class Mngt01Controller extends ApplicationController { info = null; } mav.addObject("ntcInfo", json ? info : toJson(info)); + + List allSggList = factionMapper.selectAllSggList(); + mav.addObject("sggList", allSggList); + return mav; } 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 ec9cec31..23b113c9 100644 --- a/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml +++ b/src/main/resources/sql/mapper/fims/mngt/ntc-mapper.xml @@ -25,6 +25,10 @@ SELECT A.NTC_ID , A.SGG_CD + , (CASE + WHEN (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = A.SGG_CD) IS NOT NULL + THEN (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = A.SGG_CD) + ELSE '전체' END) AS SGG_NM , A.NTC_TTL , A.NTC_CN , A.DEL_YN @@ -43,9 +47,9 @@ SELECT A.NTC_ID WHERE A.DEL_YN = 'N' - - AND A.SGG_CD = #{sggCd} - + + AND (A.SGG_CD = #{sggCd} OR A.SGG_CD = '' OR A.SGG_CD IS NULL) + AND A.${by} LIKE CONCAT('%',#{term},'%') 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 8b5cf50d..45b01978 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 @@ -59,6 +59,7 @@ No. + 시군구명 제목 작성일시 @@ -69,6 +70,7 @@