2,3순위 마이그레이션.
parent
e8e37bfe0c
commit
de8a0e42ea
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/publicBoard")
|
||||
@RequestMapping({"/publicBoard","/faics"})
|
||||
public class PublicBoardController {
|
||||
private final PublicBoardService publicBoardService;
|
||||
private final CodeMgtService codeMgtService;
|
||||
|
|
@ -105,6 +105,28 @@ public class PublicBoardController {
|
|||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/{board}")
|
||||
public ModelAndView faicsPage(@PathVariable String board, @AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) {
|
||||
ModelAndView mav = new ModelAndView("publicBoard/faics/board");
|
||||
switch (board){
|
||||
case "fa_info_rpt":
|
||||
publicBoard.setPublicType("외사정보보고");
|
||||
break;
|
||||
case "susa":
|
||||
publicBoard.setPublicType("외사수사업무공유");
|
||||
break;
|
||||
case "fa_arrest_rpt":
|
||||
publicBoard.setPublicType("기존사건자료");
|
||||
break;
|
||||
}
|
||||
publicBoard.setQueryInfo();
|
||||
mav.addObject("boardList", publicBoardService.selectContentList(publicBoard));
|
||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||
publicBoard.setPaginationInfo();
|
||||
mav.addObject("searchParams", publicBoard);
|
||||
mav.addObject("board", board);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/editModal")
|
||||
public ModelAndView editModal(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) {
|
||||
|
|
@ -154,6 +176,8 @@ public class PublicBoardController {
|
|||
case "PLB004": // Q&A
|
||||
mav = new ModelAndView("publicBoard/qna/qnaViewModal");
|
||||
break;
|
||||
default:
|
||||
mav = new ModelAndView("publicBoard/faics/viewModal");
|
||||
}
|
||||
mav.addObject("modalType", publicBoard.getModalType());
|
||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
group by public_key) c
|
||||
on a.public_key = c.public_key
|
||||
<include refid="selectContentListWhere"></include>
|
||||
order by public_key desc
|
||||
order by wrt_dt desc
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
</select>
|
||||
<select id="selectContentListCnt" resultType="int" parameterType="PublicBoard">
|
||||
|
|
|
|||
|
|
@ -44,6 +44,19 @@
|
|||
<li class="nav-item">
|
||||
<a href="/publicBoard/qnaPage" class="nav-link link-dark">Q&A</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle text-dark" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="d-lg-inline d-md-none">구시스템</span>
|
||||
<b class="caret ms-1"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/faics/fa_info_rpt" class="dropdown-item">외사정보보고</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item disabled">외사수사</a></li>
|
||||
<li><a href="/faics/susa" class="dropdown-item">├ 외사수사업무공유</a></li>
|
||||
<li><a href="/faics/fa_arrest_rpt" class="dropdown-item">└ 기존사건자료</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,132 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/publicBoard.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/board.js}"></script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main>
|
||||
<div class="mb-2">
|
||||
<div class="d-inline align-middle"><i class="bi bi-square-fill"></i></div>
|
||||
<h5 class="d-inline align-middle" th:text=" ${searchParams.publicType}"></h5>
|
||||
</div>
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="row mx-0">
|
||||
<div class="col-12 card bg-light text-center">
|
||||
<div class="card-body">
|
||||
<form method="get" th:action="${#strings.concat('/faics/', board)}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<div class="row justify-content-between py-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
||||
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="submit" class="btn btn-sm btn-primary" id="searchBtn" value="검색">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm table-hover table-bordered">
|
||||
<thead>
|
||||
<tr class="table-color">
|
||||
<th>순번</th>
|
||||
<th>제목</th>
|
||||
<th>첨부파일</th>
|
||||
<th>관서</th>
|
||||
<th>부서</th>
|
||||
<th>계급</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
<tr class="planTr" th:each="board,cnt:${boardList}">
|
||||
<input type="hidden" class="planKey" th:value="${board.publicKey}">
|
||||
<!--<td><input type="checkbox" class="trChkBox"></td>-->
|
||||
<td th:text="${cnt.count}"></td>
|
||||
<td class="text-start" th:text="${board.title}"></td>
|
||||
<td th:text="${board.fileCnt eq null?'파일 없음':#strings.concat(board.fileCnt,' 건')}"></td>
|
||||
<td th:text="${board.wrtOrgan}"></td>
|
||||
<td th:text="${board.wrtPart}"></td>
|
||||
<td th:text="${board.wrtUserGrd}"></td>
|
||||
<td th:text="${board.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(board.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination mb-0">
|
||||
<th:block th:if="${searchParams.pageIndex>3}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||
<a class="page-link" href="#" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||
<a class="page-link" href="#" th:text="${num}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||
<a class="page-link" href="#" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="등록" id="addBoardBtn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div class="modal fade" id="viewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="viewContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title text-white" id="publicViewModalLabel">게시글 열람</h5>
|
||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="publicKeyKey" id="viewModalPublicKey" th:value="${info.publicKey}">
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation" th:if="${#lists.size(info.fileList)>0}">
|
||||
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(info.fileList), ')')}"></button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content bg-white border border-top-0 p-2">
|
||||
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
|
||||
<div class="row mb-1">
|
||||
<div class="col-sm-0"></div>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
|
||||
<label class="col-sm-5 col-form-label col-form-label-sm text-start" th:text="${info.title}"></label>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtOrgan}" th:text="${commonCode.itemValue}"></th:block>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}" th:text="${commonCode.itemValue}"></th:block>
|
||||
</th:block>
|
||||
<th:block th:text="${info.wrtUserNm}"></th:block>
|
||||
</label>
|
||||
<hr class="my-1">
|
||||
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center">내용</label>
|
||||
<div class="col-sm-11 form-control-sm view-modal-content view-modal-content">
|
||||
<div id="content" th:utext="${info.content}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>파일명</th>
|
||||
<th>사이즈</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:if="${#lists.isEmpty(info.fileList)}">
|
||||
<tr>
|
||||
<td colspan="2">파일이 없습니다.</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
<th:block th:unless="${#lists.isEmpty(info.fileList)}">
|
||||
<th:block th:each="file:${info.fileList}">
|
||||
<tr class="fileInfoTr">
|
||||
<td><a href="#" class="fileDownLink" data-board="publicFile"
|
||||
th:data-parentkey="${file.publicKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
|
||||
<td th:text="${file.fileSize}"></td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue