From 2bf06bd6bf35d3e8c1a790a9c8ee523a4b0c4385 Mon Sep 17 00:00:00 2001 From: KNKIM Date: Thu, 9 Sep 2021 17:09:43 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=96=B4=ED=8C=9D=EC=97=85?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80,=20=EC=95=8C=EB=A6=BC=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EB=B3=80=EA=B2=BD=EC=9E=91?= =?UTF-8?q?=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nlib/cmm/service/NotificationService.java | 33 ++++-- .../java/nlib/cmm/service/NotificationVO.java | 51 +++++---- .../cmm/service/impl/NotificationDAO.java | 37 +++++-- .../service/impl/NotificationServiceImpl.java | 61 ++++++----- .../java/nlib/cmm/web/MainController.java | 12 +- .../nlib/cmm/web/NotificationController.java | 99 +++++++++++------ .../mapper/config/mapper-config.xml | 2 +- .../mapper/nlib/cmm/NotificationDAO_SQL.xml | 59 +++++++--- src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp | 2 +- .../jsp/nlib/cmm/listNotifications.jsp | 36 +++--- .../WEB-INF/jsp/nlib/code/listCodesPopup.jsp | 103 ++++++++++++++++++ src/main/webapp/WEB-INF/tiles/inc/menu.jsp | 2 +- src/main/webapp/js/nlib.js | 2 + src/main/webapp/temp/layerPopup.html | 51 +++++++++ src/main/webapp/temp/layerPopup2.html | 45 ++++++++ src/main/webapp/temp/layerPopup_data1.html | 10 ++ src/main/webapp/temp/test.html | 35 ++++++ 17 files changed, 495 insertions(+), 145 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/nlib/code/listCodesPopup.jsp create mode 100644 src/main/webapp/temp/layerPopup.html create mode 100644 src/main/webapp/temp/layerPopup2.html create mode 100644 src/main/webapp/temp/layerPopup_data1.html create mode 100644 src/main/webapp/temp/test.html diff --git a/src/main/java/nlib/cmm/service/NotificationService.java b/src/main/java/nlib/cmm/service/NotificationService.java index 7b6c12a1..b1d02260 100644 --- a/src/main/java/nlib/cmm/service/NotificationService.java +++ b/src/main/java/nlib/cmm/service/NotificationService.java @@ -7,13 +7,13 @@ import java.util.Map; import nlib.user.service.NlibLoginVO; -public interface AlertService +public interface NotificationService { /* * 사용자 알림 목록을 조회한다. */ - public List listAlerts(AlertVO alertVO) throws Exception; + public List listNotifications(NotificationVO notificationVO) throws Exception; /** @@ -23,18 +23,27 @@ public interface AlertService * @return * @throws Exception */ - public int countUnreadAlert(String mbInfoId) throws Exception; + public int countUnreadNotification(String mbInfoId) throws Exception; + + /** + * 알림을 읽음으로 변경한다. + * 만일, 이미 읽음표시된 경우에는 변경 없다. + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public int updateRead(NotificationVO notiVO) throws Exception; -// /* -// * 사용자 미확인 신규 알림 건수를 조회한다. -// */ -// public HashMap selectNewAlertCount(NlibLoginVO nlibLoginVO) throws Exception; -// -// /* -// * 가장 최근 알림건을 읽음 처리하고 내용을 조회한다. -// */ -// public HashMap selectAlert(NlibLoginVO nlibLoginVO, int nlibAlertId) throws Exception; + /** + * 알림내용 상세 조회 + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public NotificationVO selectNotification(NotificationVO notiVO) throws Exception; } diff --git a/src/main/java/nlib/cmm/service/NotificationVO.java b/src/main/java/nlib/cmm/service/NotificationVO.java index b145a6c0..4067fef2 100644 --- a/src/main/java/nlib/cmm/service/NotificationVO.java +++ b/src/main/java/nlib/cmm/service/NotificationVO.java @@ -1,25 +1,26 @@ package nlib.cmm.service; -public class AlertVO extends PagingVO { +public class NotificationVO extends PagingVO { - private String nlibAlertId; /* 알림ID */ + private String notiId; /* 알림ID */ private String title; /* 알림제목 */ private String content; /* 알림내용 */ - private String alertType; /* 알림유형 */ - private String alertDivCd; /* 알림내용구분코드 */ + private String notiMethod; /* 알림방법 */ + private String notiTypeCd; /* 알림유형코드(알림내용구분코드) */ + private String notiTypeNm; /* 알림유형코드명 */ private String readDd; /* 알림확인일시 */ private String RegId; /* 등록자아이디 */ private String regDd; /* 등록일자 */ - private String mbInfoId; /* 알림대상자 회원아이디 */ + private String recvUserId; /* 알림대상자 회원아이디 */ private String readYn; /* 알림확인여부 */ - private int totCnt = 0; + private int totCnt = 0; /* 알림건수(최근1개월) */ - public String getNlibAlertId() { - return nlibAlertId; + public String getNotiId() { + return notiId; } - public void setNlibAlertId(String nlibAlertId) { - this.nlibAlertId = nlibAlertId; + public void setNotiId(String notiId) { + this.notiId = notiId; } public String getTitle() { return title; @@ -33,17 +34,17 @@ public class AlertVO extends PagingVO { public void setContent(String content) { this.content = content; } - public String getAlertType() { - return alertType; + public String getNotiMethod() { + return notiMethod; } - public void setAlertType(String alertType) { - this.alertType = alertType; + public void setNotiMethod(String notiMethod) { + this.notiMethod = notiMethod; } - public String getAlertDivCd() { - return alertDivCd; + public String getNotiTypeCd() { + return notiTypeCd; } - public void setAlertDivCd(String alertDivCd) { - this.alertDivCd = alertDivCd; + public void setNotiTypeCd(String notiTypeCd) { + this.notiTypeCd = notiTypeCd; } public String getReadDd() { return readDd; @@ -63,11 +64,11 @@ public class AlertVO extends PagingVO { public void setRegDd(String regDd) { this.regDd = regDd; } - public String getMbInfoId() { - return mbInfoId; + public String getRecvUserId() { + return recvUserId; } - public void setMbInfoId(String mbInfoId) { - this.mbInfoId = mbInfoId; + public void setRecvUserId(String recvUserId) { + this.recvUserId = recvUserId; } public int getTotCnt() { return totCnt; @@ -81,5 +82,11 @@ public class AlertVO extends PagingVO { public void setReadYn(String readYn) { this.readYn = readYn; } + public String getNotiTypeNm() { + return notiTypeNm; + } + public void setNotiTypeNm(String notiTypeNm) { + this.notiTypeNm = notiTypeNm; + } } diff --git a/src/main/java/nlib/cmm/service/impl/NotificationDAO.java b/src/main/java/nlib/cmm/service/impl/NotificationDAO.java index 3ccb3830..be2c16db 100644 --- a/src/main/java/nlib/cmm/service/impl/NotificationDAO.java +++ b/src/main/java/nlib/cmm/service/impl/NotificationDAO.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository; import egovframework.com.cmm.service.impl.EgovComAbstractDAO; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import nlib.cmm.service.AlertVO; +import nlib.cmm.service.NotificationVO; import nlib.cmm.service.NlibProperty; import nlib.user.service.NlibLoginVO; import nlib.util.StringUtil; @@ -37,22 +37,45 @@ import nlib.util.StringUtil; */ -@Repository("alertDAO") -public class AlertDAO extends EgovComAbstractDAO { +@Repository("notificationDAO") +public class NotificationDAO extends EgovComAbstractDAO { /* * 사용자 알림 목록을 조회한다. */ - public List listAlerts(AlertVO searchAlertVO) throws Exception { + public List listNotifications(NotificationVO searchNotificationVO) throws Exception { - return selectList("AlertDAO.listAlerts", searchAlertVO); + return selectList("NotificationDAO.listNotifications", searchNotificationVO); } /* * 사용자가 확인하지 않은 알림 건수를 조회한다. */ - public int countUnreadAlert(String mbInfoId) throws Exception { + public int countUnreadNotification(String recvUserId) throws Exception { - return selectOne("AlertDAO.countUnreadAlert", mbInfoId); + return selectOne("NotificationDAO.countUnreadNotification", recvUserId); + } + + /** + * 알림을 읽음으로 변경한다. + * 만일, 이미 읽음표시된 경우에는 변경 없다. + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public int updateRead(NotificationVO notiVO) throws Exception { + return update("NotificationDAO.updateRead", notiVO); + } + + /** + * 알림내용 상세 조회 + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public NotificationVO selectNotification(NotificationVO notiVO) throws Exception { + return selectOne("NotificationDAO.selectNotification", notiVO); } } diff --git a/src/main/java/nlib/cmm/service/impl/NotificationServiceImpl.java b/src/main/java/nlib/cmm/service/impl/NotificationServiceImpl.java index 81d246b9..cbafa8b9 100644 --- a/src/main/java/nlib/cmm/service/impl/NotificationServiceImpl.java +++ b/src/main/java/nlib/cmm/service/impl/NotificationServiceImpl.java @@ -10,29 +10,28 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import nlib.cmm.service.AlertService; -import nlib.cmm.service.AlertVO; +import nlib.cmm.service.NotificationService; +import nlib.cmm.service.NotificationVO; import nlib.cmm.service.NlibProperty; import nlib.user.service.NlibLoginVO; import nlib.util.StringUtil; -@Service("alertService") -public class AlertServiceImpl implements AlertService +@Service("notificationService") +public class NotificationServiceImpl implements NotificationService { - private static final Logger log = LoggerFactory.getLogger(AlertServiceImpl.class); + private static final Logger log = LoggerFactory.getLogger(NotificationServiceImpl.class); - @Resource(name="alertDAO") - private AlertDAO alertDAO; + @Resource(name="notificationDAO") + private NotificationDAO notificationDAO; /** * 사용자 알림 목록을 조회한다. */ - public List listAlerts(AlertVO alertVO) throws Exception { + public List listNotifications(NotificationVO notificationVO) throws Exception { - return alertDAO.listAlerts(alertVO); + return notificationDAO.listNotifications(notificationVO); } - /** * 읽지 않은 알림 건수를 조회한다. * @@ -40,25 +39,33 @@ public class AlertServiceImpl implements AlertService * @return * @throws Exception */ - public int countUnreadAlert(String mbInfoId) throws Exception { + public int countUnreadNotification(String recvUserId) throws Exception { - return alertDAO.countUnreadAlert(mbInfoId); + return notificationDAO.countUnreadNotification(recvUserId); } -// -// /* -// * 사용자 미확인 신규 알림 건수를 조회한다. -// */ -// public int selectNewAlertCount(String mbInfoId) throws Exception { -// return alertDAO.selectNewAlertCount(mbInfoId); -// } -// -// /* -// * 알림건을 읽음 처리하고 내용을 조회한다. -// * 이미 읽은 건의 경우, 내용만 조회한다. -// */ -// public HashMap selectUserAlert(AlertVO alertVO) throws Exception { -// return alertDAO.selectUserAlert(alertVO); -// } + /** + * 알림을 읽음으로 변경한다. + * 만일, 이미 읽음표시된 경우에는 변경 없다. + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public int updateRead(NotificationVO notiVO) throws Exception { + return notificationDAO.updateRead(notiVO); + } + + /** + * 알림내용 상세 조회 + * + * @param notiVO (notiId, recvUserId 필수) + * @return + * @throws Exception + */ + public NotificationVO selectNotification(NotificationVO notiVO) throws Exception { + updateRead(notiVO); + return notificationDAO.selectNotification(notiVO); + } } \ No newline at end of file diff --git a/src/main/java/nlib/cmm/web/MainController.java b/src/main/java/nlib/cmm/web/MainController.java index e4ec6394..ffaf7ad1 100644 --- a/src/main/java/nlib/cmm/web/MainController.java +++ b/src/main/java/nlib/cmm/web/MainController.java @@ -14,7 +14,7 @@ import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import nlib.cmm.NlibCommonController; -import nlib.cmm.service.AlertService; +import nlib.cmm.service.NotificationService; import nlib.user.service.NlibLoginVO; import nlib.util.StringUtil; @@ -45,8 +45,8 @@ public class MainController extends NlibCommonController { private static final Logger log = LoggerFactory.getLogger(MainController.class); - @Resource(name="alertService") - private AlertService alertService; + @Resource(name="notificationService") + private NotificationService notificationService; @RequestMapping( {"/index.do"} ) public String setContent( @@ -63,13 +63,13 @@ public class MainController extends NlibCommonController { // 알림 확인 String mbInfoId = getMbInfoId(req); - int unreadAlertCnt = 0; + int unreadNotiCnt = 0; if(!isAlerted(req) && StringUtil.isNotEmpty(mbInfoId)) { - unreadAlertCnt = alertService.countUnreadAlert(mbInfoId); + unreadNotiCnt = notificationService.countUnreadNotification(mbInfoId); setAlerted(req, true); } - model.addAttribute("unreadAlertCnt", unreadAlertCnt); + model.addAttribute("unreadNotiCnt", unreadNotiCnt); return "nlib/cmm/home"; } diff --git a/src/main/java/nlib/cmm/web/NotificationController.java b/src/main/java/nlib/cmm/web/NotificationController.java index 67f2e069..3c62182c 100644 --- a/src/main/java/nlib/cmm/web/NotificationController.java +++ b/src/main/java/nlib/cmm/web/NotificationController.java @@ -21,8 +21,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import nlib.cmm.NlibCommonController; -import nlib.cmm.service.AlertService; -import nlib.cmm.service.AlertVO; +import nlib.cmm.service.NotificationService; +import nlib.cmm.service.NotificationVO; import nlib.cmm.service.NlibProperty; import nlib.restful.service.DataApiReqVO; import nlib.restful.service.DataApiResVO; @@ -30,7 +30,7 @@ import nlib.util.StringUtil; /** *
- * @Class Name : AlertController.java
+ * @Class Name : NotificationController.java
  * 
  * @Description : 사용자 홈페이지 알림 안내 컨트롤러 
  * 
@@ -51,24 +51,24 @@ import nlib.util.StringUtil;
  *
  */
 @Controller
-public class AlertController extends NlibCommonController {
+public class NotificationController extends NlibCommonController {
 	
-	private static final Logger log = LoggerFactory.getLogger(AlertController.class);
+	private static final Logger log = LoggerFactory.getLogger(NotificationController.class);
 	
 	static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
 	
-	@Resource(name="alertService")
-	private AlertService alertService;
+	@Resource(name="notificationService")
+	private NotificationService notificationService;
 
 
 	/**
-	 * 알림 목록 조회한다.
+	 * 알림 목록 화면을 표시한다. 
 	 * 
 	 * @param req
 	 * @return
 	 */
-	@RequestMapping("/cmm/listAlerts.do")
-	public String listAlerts(
+	@RequestMapping("/cmm/listNotifications.do")
+	public String listNotifications(
 			HttpServletRequest req, 
 			@RequestParam Map paramMap,
 			ModelMap model
@@ -78,22 +78,25 @@ public class AlertController extends NlibCommonController {
 		String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
 		String pageSize  = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
 		
-		log.debug("listAlerts > pageIndex = " + pageIndex);
-		log.debug("listAlerts > pageSize = " + pageSize);
+		log.debug("listNotifications > pageIndex = " + pageIndex);
+		log.debug("listNotifications > pageSize = " + pageSize);
     	
-		AlertVO searchAlertVO = new AlertVO();
-		searchAlertVO.setPageIndex(pageIndex);
-		searchAlertVO.setPageSize(pageSize);
-		searchAlertVO.setMbInfoId(mbInfoId);
-		List list = alertService.listAlerts(searchAlertVO);
+		NotificationVO searchNotificationVO = new NotificationVO();
+		searchNotificationVO.setPageIndex(pageIndex);
+		searchNotificationVO.setPageSize(pageSize);
+		searchNotificationVO.setRecvUserId(mbInfoId);
+		List list = notificationService.listNotifications(searchNotificationVO);
 		
 		int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt();
-		searchAlertVO.setTotRecordCount(totRecordCount);
+		searchNotificationVO.setTotRecordCount(totRecordCount);
+		
+		model.addAttribute("notificationList", list);
+		model.addAttribute("searchNotificationVO", searchNotificationVO);
+		model.addAttribute("pageSize", NlibProperty.getString("list.paging.page.size"));
+		model.addAttribute("pageIndex", "1");
 		
-		model.addAttribute("alertList", list);
-		model.addAttribute("searchAlertVO", searchAlertVO);
     	
-    	return "nlib/cmm/listAlerts";
+    	return "nlib/cmm/listNotifications";
 	}
 
 	/**
@@ -102,26 +105,26 @@ public class AlertController extends NlibCommonController {
 	 * @param req
 	 * @return
 	 */
-	@RequestMapping(value="/cmm/listAlertsAjax.do")
-	public ResponseEntity listAlertsAjax(HttpServletRequest req, 
+	@RequestMapping(value="/cmm/listNotificationsAjax.do")
+	public ResponseEntity listNotificationsAjax(HttpServletRequest req, 
 			Authentication authentication, @RequestBody Map paramMap) throws Exception {
 
 		String mbInfoId = getMbInfoId(req);
 		String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
 		String pageSize  = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
 		
-		log.debug("listAlertsAjax > pageIndex = " + pageIndex);
-		log.debug("listAlertsAjax > pageSize = " + pageSize);
+		log.debug("listNotificationsAjax > pageIndex = " + pageIndex);
+		log.debug("listNotificationsAjax > pageSize = " + pageSize);
 		
 
-		AlertVO searchAlertVO = new AlertVO();
-		searchAlertVO.setPageIndex(pageIndex);
-		searchAlertVO.setPageSize(pageSize);
-		searchAlertVO.setMbInfoId(mbInfoId);
-		List list = alertService.listAlerts(searchAlertVO);
+		NotificationVO searchNotificationtVO = new NotificationVO();
+		searchNotificationtVO.setPageIndex(pageIndex);
+		searchNotificationtVO.setPageSize(pageSize);
+		searchNotificationtVO.setRecvUserId(mbInfoId);
+		List list = notificationService.listNotifications(searchNotificationtVO);
 		
 		int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt();
-		searchAlertVO.setTotRecordCount(totRecordCount);
+		searchNotificationtVO.setTotRecordCount(totRecordCount);
 		
 		//-------------------------------
 		// JSON변환 응답 처리
@@ -137,4 +140,38 @@ public class AlertController extends NlibCommonController {
     	return makeResponseEntityJson(retMap);
 	}
 
+
+	/**
+	 * 알림 상세 내용 조회한다.
+	 * 
+	 * @param req
+	 * @return
+	 */
+	@RequestMapping("/cmm/selectNotificationAjax.do")
+	public ResponseEntity selectNotificationAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map paramMap) throws Exception {
+
+		String notiId = paramMap.get("notiId"); // 알림ID 
+		
+		log.debug("selectNotificationAjax > notiId = " + notiId);
+		
+		NotificationVO paramNotiVO = new NotificationVO();
+		paramNotiVO.setNotiId(notiId);
+		paramNotiVO.setRecvUserId(getMbInfoId(req));
+		
+		// 읽음처리 및 상세내용 조회 
+		NotificationVO notiVO = notificationService.selectNotification(paramNotiVO);
+
+		//-------------------------------
+		// JSON변환 응답 처리
+		//-------------------------------
+    	// JS-GRID 페이징 처리를 포함한 응답값 처리
+    	// {data: [{...}], 
+    	//  itemsCount: 255
+    	// }
+    	HashMap retMap = new HashMap();
+    	retMap.put("data", notiVO);
+    	
+    	return makeResponseEntityJson(retMap);
+	}
+
 }
\ No newline at end of file
diff --git a/src/main/resources/egovframework/mapper/config/mapper-config.xml b/src/main/resources/egovframework/mapper/config/mapper-config.xml
index e0ec797c..5dc56aa3 100644
--- a/src/main/resources/egovframework/mapper/config/mapper-config.xml
+++ b/src/main/resources/egovframework/mapper/config/mapper-config.xml
@@ -16,7 +16,7 @@
         
         
         
-        
+        
     
     
 
\ No newline at end of file
diff --git a/src/main/resources/egovframework/mapper/nlib/cmm/NotificationDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/cmm/NotificationDAO_SQL.xml
index 7e7eca91..82c56d18 100644
--- a/src/main/resources/egovframework/mapper/nlib/cmm/NotificationDAO_SQL.xml
+++ b/src/main/resources/egovframework/mapper/nlib/cmm/NotificationDAO_SQL.xml
@@ -1,35 +1,58 @@
 
 
-
+
 
- 	
  	     DATE_SUB(NOW(), INTERVAL 1 MONTH)
-		ORDER BY NLIB_ALERT_ID DESC
+		AND B.L_CODE_ID = 'NOTI_TYPE_CD'
+		AND B.USE_YN = 'Y'
+		ORDER BY A.NOTI_ID DESC
 		]]>
  	
  	
- 	
         
     
+    
+    
+    
+    
+        
+    
  	
 
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp
index 966c73e6..ee8da69e 100644
--- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp
+++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp
@@ -19,7 +19,7 @@
 
 
       
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp
index d7483ea9..40e6346a 100644
--- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp
+++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp
@@ -1,7 +1,7 @@
 <%
 /**
  * 
- * @Class Name : lisAlerts.jsp
+ * @Class Name : lisNotifications.jsp
  * 
  * @Description : 알림 목록을 조회한다.
  * 
@@ -59,9 +59,11 @@
                  //======================================
                  // 요청 정보 구성 : 시작  (각 요청에 맞게 조정)
                  //======================================
-                 var reqUrl = "${pageContext.request.contextPath}/cmm/listAlertsAjax.do";
+                 var reqUrl = "${pageContext.request.contextPath}/cmm/listNotificationsAjax.do";
                  var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
                  var pageSize  = ( filter && filter.pageSize  ? filter.pageSize  : $("#pageSize").val());
+                 
+                 alert("page index : " + pageIndex + ", " + pageSize);
 
                  $("#pageIndex").val(pageIndex);
 
@@ -104,20 +106,23 @@
              var getData = args.item;
              
              // 추출할 컬럼의 데이터 가져오기 
-             var articleNo = getData["articleNo"];
+             var notiId = getData["notiId"];
              var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row');
              
              // 상세 내용 보기 
-             fn_viewDetail(articleNo, selectedRow);
+             fn_viewDetail(notiId, selectedRow);
          },
            
          //======================================
          // 그리드 컬럼 정의  (각 요청에 맞게 조정)
          //======================================
          fields: [
-             { title:"ID",   name: "nlibAlertId" , type: "text", width: 200, align: "left" },
-             { title:"구분",   name: "alertDivCd" , type: "text", width: 100, align: "center"},
+             { title:"ID",   name: "notiId" , type: "text", width: 200, align: "left" },
+             { title:"알림방법",   name: "notiMethod" , type: "text", width: 100, align: "center"},
+             { title:"구분코드",   name: "notiTypeCd" , type: "text", width: 100, align: "center"},
+             { title:"구분",   name: "notiTypeNm" , type: "text", width: 100, align: "center"},
              { title:"제목",   name: "title"      , type: "text", width: 200, align: "left" },
+             { title:"확인여부",   name: "readYn"      , type: "text", width: 100, align: "center"},
              { title:"날짜",   name: "regDd"      , type: "text", width: 100, align: "center"}
          ]
      });
@@ -133,21 +138,12 @@
  }); // document ready
 
 
- // 선택한 게시글 상세 보기로 이동
- function fn_viewDetail(articleNo, selectedRow) {
+ // 선택한 글 상세 보기로 이동
+ function fn_viewDetail(notiId, selectedRow) {
 
      var $selectedRow = $(selectedRow);
-     var reqUrl = "${pageContext.request.contextPath}/board/selectFAQAjax.do";
-     
-     var searchKeyword  = document.articleForm.searchKeyword.value;
-     var pageIndex = $("#pageIndex").val();
-     var pageSize  = $("#pageSize").val();
-     var faqType  = document.articleForm.faqType.value;
-     var inputData = {
-               "searchKeyword" : searchKeyword
-             , "pageIndex" : pageIndex
-             , "pageSize": pageSize
-             , "faqType": faqType};
+     var reqUrl = "${pageContext.request.contextPath}/cmm/selectNotificationAjax.do";
+     var inputData = { "notiId" : notiId };
      
      //--------------------------------------
      // 요청 처리 
@@ -167,6 +163,8 @@
                  + "
" + jsonObj.content + "
" + jsonObj.content + "
" + jsonObj.content + + "
readYn=" + jsonObj.readYn + + "
regDd=" + jsonObj.regDd + ""); //alert("DDDDDDDD add = " + $("#jsGrid")[0].scrollHeight); //$("#jsGrid").find('table.jsgrid-table.jsgrid-grid-body').height($("#jsGrid").find('table.jsgrid-table')[0].scrollHeight + 100); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/code/listCodesPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/code/listCodesPopup.jsp new file mode 100644 index 00000000..48e569af --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/nlib/code/listCodesPopup.jsp @@ -0,0 +1,103 @@ +<% +/** + *
+ * @Class Name : listCodes.jsp
+ * 
+ * @Description : 묻고답하기 목록을 조회한다.
+ * 
+ * 
+ * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
+ *
+ * 
+ * + * @ ------------ -------- --------------------------- + * @ 수정일 수정자 수정내용 + * @ ------------ -------- --------------------------- + * @ 2021. 8. 5. KNKIM 최초 생성 + * + * + * @author 이씨플라자 * DIGITALSHIP KNKIM + * @since 2021. 8. 5. + * @version 1.0 + * + */ + %> +<%@ page language="java" contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> + +공통코드 + + + + +${pageTitle} + + + + + + +

${pageTitle }

+ +메시지 Popup : ${message} + 
+ +
+ + + + + + + + + PAGE_SIZE_OPTION + +
+ + + + + + + + + + + + +
코드2222코드명22222222
+ +팝업내에서 링크이동 + + diff --git a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp index 323c0ff7..eca2e963 100644 --- a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp @@ -20,7 +20,7 @@
  • 예약
  • 열람요청
  • 관심자료
  • -
  • 알림
  • +
  • 알림
  • 통신API
  • diff --git a/src/main/webapp/js/nlib.js b/src/main/webapp/js/nlib.js index 88adc2b4..1e41a322 100644 --- a/src/main/webapp/js/nlib.js +++ b/src/main/webapp/js/nlib.js @@ -119,3 +119,5 @@ function fn_layerPopFormSubmit(formName) { $("#" + formName).html(response); }); } + +// 콜백 diff --git a/src/main/webapp/temp/layerPopup.html b/src/main/webapp/temp/layerPopup.html new file mode 100644 index 00000000..5688a228 --- /dev/null +++ b/src/main/webapp/temp/layerPopup.html @@ -0,0 +1,51 @@ + + + + + + + + + + +Insert title here + + + + | + | + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup2.html b/src/main/webapp/temp/layerPopup2.html new file mode 100644 index 00000000..56eb59ed --- /dev/null +++ b/src/main/webapp/temp/layerPopup2.html @@ -0,0 +1,45 @@ + + + + + +Insert title here + + + + + + + + + + + + + +

    +
    POP
    + + \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup_data1.html b/src/main/webapp/temp/layerPopup_data1.html new file mode 100644 index 00000000..42c83801 --- /dev/null +++ b/src/main/webapp/temp/layerPopup_data1.html @@ -0,0 +1,10 @@ + + + + +감사 + + +감사합니다. + + \ No newline at end of file diff --git a/src/main/webapp/temp/test.html b/src/main/webapp/temp/test.html new file mode 100644 index 00000000..f9b5bd84 --- /dev/null +++ b/src/main/webapp/temp/test.html @@ -0,0 +1,35 @@ + + + + + +Insert title here + + + + + + + + + + + +
    +가테스트1 +

    가테스트2 + R테스트 3 +

    +
    + + + + \ No newline at end of file