diff --git a/src/main/java/com/dbnt/faisp/publicBoard/PublicBoardController.java b/src/main/java/com/dbnt/faisp/publicBoard/PublicBoardController.java index 26bf4a38..68c16e65 100644 --- a/src/main/java/com/dbnt/faisp/publicBoard/PublicBoardController.java +++ b/src/main/java/com/dbnt/faisp/publicBoard/PublicBoardController.java @@ -1,5 +1,6 @@ package com.dbnt.faisp.publicBoard; +import com.dbnt.faisp.codeMgt.service.CodeMgtService; import com.dbnt.faisp.config.Role; import com.dbnt.faisp.publicBoard.model.PublicBoard; import com.dbnt.faisp.publicBoard.model.PublicComment; @@ -20,6 +21,7 @@ import java.util.List; @RequestMapping("/publicBoard") public class PublicBoardController { private final PublicBoardService publicBoardService; + private final CodeMgtService codeMgtService; @GetMapping("/noticePage") public ModelAndView organMgtPage(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) { @@ -69,6 +71,7 @@ public class PublicBoardController { mav.addObject("referenceList", publicBoardService.selectContentList(publicBoard)); publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard)); publicBoard.setPaginationInfo(); + mav.addObject("tabStatusList", codeMgtService.selectCodeMgtList("RPC")); mav.addObject("searchParams", publicBoard); return mav; } diff --git a/src/main/java/com/dbnt/faisp/publicBoard/model/PublicBoard.java b/src/main/java/com/dbnt/faisp/publicBoard/model/PublicBoard.java index 1df90f44..362da93e 100644 --- a/src/main/java/com/dbnt/faisp/publicBoard/model/PublicBoard.java +++ b/src/main/java/com/dbnt/faisp/publicBoard/model/PublicBoard.java @@ -44,6 +44,8 @@ public class PublicBoard extends BaseModel { private LocalDateTime wrtDt; @Column(name = "organ_chk") private String organChk; + @Column(name = "tab_status") + private String tabStatus; @Transient private Integer fileCnt; diff --git a/src/main/resources/mybatisMapper/PublicBoardMapper.xml b/src/main/resources/mybatisMapper/PublicBoardMapper.xml index fb6b084f..ccd45bd2 100644 --- a/src/main/resources/mybatisMapper/PublicBoardMapper.xml +++ b/src/main/resources/mybatisMapper/PublicBoardMapper.xml @@ -9,6 +9,9 @@ and a.public_type = #{publicType} + + and a.wrt_organ = #{wrtOrgan} + AND a.title LIKE CONCAT('%', #{title}, '%') @@ -18,6 +21,9 @@ and a.wrt_dt <= #{endDate}::date+1 + + and a.tab_status = #{tabStatus} + and a.public_key in ( diff --git a/src/main/resources/static/js/publicBoard/publicBoard.js b/src/main/resources/static/js/publicBoard/publicBoard.js index 7774a93c..30637236 100644 --- a/src/main/resources/static/js/publicBoard/publicBoard.js +++ b/src/main/resources/static/js/publicBoard/publicBoard.js @@ -168,6 +168,12 @@ function contentCheck(formId){ alert("제목을 입력해주세요.") flag = false; } + if($("#publicType").val()==="PLB003"){ + if(!$("#tabStatus").val()){ + alert("분류를 선택해주세요.") + flag = false; + } + } flag = fileCheck(flag, files); return flag; } \ No newline at end of file diff --git a/src/main/resources/static/js/publicBoard/reference.js b/src/main/resources/static/js/publicBoard/reference.js index c0a3b906..b8e24c49 100644 --- a/src/main/resources/static/js/publicBoard/reference.js +++ b/src/main/resources/static/js/publicBoard/reference.js @@ -17,4 +17,8 @@ $(document).on('click', '#saveBtn', function (){ $(document).on('click', '#editBtn', function (){ $("#viewModal").modal('hide') getEditModal($("#viewModalPublicKey").val(), "PLB003") -}) \ No newline at end of file +}) +$(document).on('click', '.referenceTab', function (){ + location.href = "/publicBoard/referencePage?tabStatus="+$(this).attr('data-tabcd') +}) + diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index 086c933b..ea8b2f2b 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -29,7 +29,7 @@ 공지사항 게시판 - 자료실 + 자료실 Q&A 마이페이지 로그아웃 diff --git a/src/main/resources/templates/publicBoard/board/boardPage.html b/src/main/resources/templates/publicBoard/board/boardPage.html index 9640eb5d..76ff91db 100644 --- a/src/main/resources/templates/publicBoard/board/boardPage.html +++ b/src/main/resources/templates/publicBoard/board/boardPage.html @@ -38,7 +38,7 @@ - + diff --git a/src/main/resources/templates/publicBoard/notice/noticePage.html b/src/main/resources/templates/publicBoard/notice/noticePage.html index 65a828c5..33cddc41 100644 --- a/src/main/resources/templates/publicBoard/notice/noticePage.html +++ b/src/main/resources/templates/publicBoard/notice/noticePage.html @@ -38,7 +38,7 @@ - + diff --git a/src/main/resources/templates/publicBoard/qna/qnaPage.html b/src/main/resources/templates/publicBoard/qna/qnaPage.html index 008dbc3f..4a128122 100644 --- a/src/main/resources/templates/publicBoard/qna/qnaPage.html +++ b/src/main/resources/templates/publicBoard/qna/qnaPage.html @@ -39,7 +39,7 @@ - + diff --git a/src/main/resources/templates/publicBoard/reference/referenceEditModal.html b/src/main/resources/templates/publicBoard/reference/referenceEditModal.html index 1e132e00..21b52410 100644 --- a/src/main/resources/templates/publicBoard/reference/referenceEditModal.html +++ b/src/main/resources/templates/publicBoard/reference/referenceEditModal.html @@ -9,7 +9,7 @@ - + @@ -18,14 +18,33 @@ - 작성일시 + 작성일시 - 소속관서에만 노출 + 소속관서에만 노출 + + + + + + + + + + + + 분류 선택 + + + + + + + 제목 diff --git a/src/main/resources/templates/publicBoard/reference/referencePage.html b/src/main/resources/templates/publicBoard/reference/referencePage.html index 6160d33e..bd285556 100644 --- a/src/main/resources/templates/publicBoard/reference/referencePage.html +++ b/src/main/resources/templates/publicBoard/reference/referencePage.html @@ -10,6 +10,14 @@ 자료실 + + + + + + + + @@ -17,6 +25,7 @@ + @@ -31,14 +40,15 @@ 관서 선택 - + - + diff --git a/src/main/resources/templates/publicBoard/reference/referenceViewModal.html b/src/main/resources/templates/publicBoard/reference/referenceViewModal.html index d8c86425..2a89f60d 100644 --- a/src/main/resources/templates/publicBoard/reference/referenceViewModal.html +++ b/src/main/resources/templates/publicBoard/reference/referenceViewModal.html @@ -8,6 +8,7 @@ + 작성자 @@ -21,6 +22,13 @@ 소속관서에만 노출 + + + + + + +