From b9886d197148b66f0882d4e6a30a4d77c4675c2a Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 29 Feb 2024 09:10:50 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/mngt/web/Mngt01Controller.java | 8 ++++ .../sql/mapper/fims/mngt/ntc-mapper.xml | 10 +++-- .../WEB-INF/jsp/fims/mngt/mngt01010-main.jsp | 4 +- .../WEB-INF/jsp/fims/mngt/mngt01020-info.jsp | 40 +++++++++++++------ 4 files changed, 46 insertions(+), 16 deletions(-) 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 @@