강석 최 2023-01-28 11:16:22 +09:00
commit 5c8a57c9e3
18 changed files with 104 additions and 48 deletions

View File

@ -65,6 +65,8 @@ public class UserCareer{
@Column(name = "wrt_dt") @Column(name = "wrt_dt")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime wrtDt; private LocalDateTime wrtDt;
@Column(name = "in_office_yn")
private String inOfficeYn;
@Transient @Transient

View File

@ -111,6 +111,7 @@ $(document).on('change', '#positionCheckBox', function (){
$(document).on('click', '#saveBtn', function (){ $(document).on('click', '#saveBtn', function (){
if(checkValue()){ if(checkValue()){
contentFade("in"); contentFade("in");
document.getElementById("endDate").disabled = false;
const formData = new FormData($("#careerForm")[0]); const formData = new FormData($("#careerForm")[0]);
$.ajax({ $.ajax({
type : 'POST', type : 'POST',
@ -205,3 +206,30 @@ function checkValue(){
} }
return flag; return flag;
} }
$(document).on('change', '#inOfficeYn', function (){
const today = new Date();
const year = today.getFullYear();
const month = ('0' + (today.getMonth() + 1)).slice(-2);
const day = ('0' + today.getDate()).slice(-2);
const dateString = year + '-' + month + '-' + day;
if($("#startDate").val() == ""){
alert("근무시작일을 입력해주세요");
$('#startDate').focus();
this.checked = false;
}
if(this.checked){
$(this).attr('value', 'Y');
$("#endDate").val(dateString);
$("#endDate").attr("disabled",true);
}else{
$(this).attr('value', 'N');
$("#endDate").val('');
$("#endDate").removeAttr("disabled");
}
console.log($("#inOfficeYn").val());
})

View File

@ -101,15 +101,15 @@
<th rowspan="3">사건담당경찰서</th> <th rowspan="3">사건담당경찰서</th>
<th rowspan="3">단속경찰서</th> <th rowspan="3">단속경찰서</th>
<th rowspan="3">단속함정</th> <th rowspan="3">단속함정</th>
<th rowspan="2">압송</th> <th width="80px" rowspan="2">압송</th>
<th colspan="2">미압송</th> <th colspan="2">미압송</th>
</tr> </tr>
<tr class="table-secondary"> <tr class="table-secondary">
<th>현장조사</th> <th width="80px">현장조사</th>
<th>기타</th> <th width="80px">기타</th>
<th>검사인원</th> <th width="80px">검사인원</th>
<th>양성</th> <th width="80px">양성</th>
<th>음성</th> <th width="80px">음성</th>
</tr> </tr>
<tr class="table-secondary"> <tr class="table-secondary">
<th></th> <th></th>

View File

@ -57,7 +57,7 @@
<div class="col-sm-2"> <div class="col-sm-2">
<select class="form-select form-select-sm" name="arrestCd" id="arrestCd"> <select class="form-select form-select-sm" name="arrestCd" id="arrestCd">
<option value="">검거유형1 선택-</option> <option value="">검거유형1 선택-</option>
<th:block th:each="commonCode:${session.commonCode.get('AT')}"> <th:block th:each="commonCode:${session.commonCode.get('CTH')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option> th:selected="${boardInvestigation.arrestType != null and commonCode.itemCd eq boardInvestigation.arrestType.arrestCd}"></option>
</th:block> </th:block>

View File

@ -67,15 +67,25 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row my-1"> <div class="row my-1">
<label for="dateSelectorDiv" class="col-sm-2 col-form-label col-form-label-sm text-center fs-13">근무일</label> <label class="col-sm-2 col-form-label col-form-label-sm text-center fs-13">근무일</label>
<div class="col-sm-4"> <div class="col-sm-10">
<div class="input-group w-auto input-daterange" id="dateSelectorDiv"> <div class="row border m-0 py-1">
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly> <div class="col-12">
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly> <input type="checkbox" id="inOfficeYn" name="inOfficeYn">
<label for="inOfficeYn" class="col-sm-2 col-form-label col-form-label-sm px-2">현재재직중</label>
</div>
<div class="col-sm-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>
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer row justify-content-between bg-light"> <div class="modal-footer row justify-content-between bg-light">

View File

@ -80,6 +80,7 @@
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th>순번</th> <th>순번</th>
<th>직책</th>
<th>계급</th> <th>계급</th>
<th>성명</th> <th>성명</th>
<th></th> <th></th>
@ -98,6 +99,7 @@
<tr class="policeTr" th:each="police:${policeList}"> <tr class="policeTr" th:each="police:${policeList}">
<input type="hidden" class="userSeq" th:value="${police.userSeq}"> <input type="hidden" class="userSeq" th:value="${police.userSeq}">
<td th:text="${police.rownum}"></td> <td th:text="${police.rownum}"></td>
<td></td>
<td th:text="${police.titleCd}"></td> <td th:text="${police.titleCd}"></td>
<td th:text="${police.userNm}"></td> <td th:text="${police.userNm}"></td>
<td th:text="${police.organNm}"></td> <td th:text="${police.organNm}"></td>

View File

@ -81,18 +81,14 @@
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th>순번</th> <th>순번</th>
<th>직책</th>
<th>계급</th> <th>계급</th>
<th>성명</th> <th>성명</th>
<th></th> <th></th>
<th>현부서<br></th> <th>현부서<br></th>
<th>생년월일</th> <th>생년월일</th>
<th>성별</th> <th>성별</th>
<th>고등학교</th>
<th>전문대</th>
<th>대학교</th>
<th>석사</th>
<th>박사</th>
<th>전공</th>
<th>최종수정일</th> <th>최종수정일</th>
</tr> </tr>
</thead> </thead>
@ -102,18 +98,14 @@
<input type="hidden" class="userSeq" th:value="${list.userSeq}"> <input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block> </th:block>
<td th:text="${list.rownum}"></td> <td th:text="${list.rownum}"></td>
<td></td>
<td th:text="${list.titleCd}"></td> <td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td> <td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td> <td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td> <td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td> <td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td> <td th:text="${list.sex}"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td th:text="${#temporals.format(list.lastWrtDt, 'yyyy-MM-dd')}"></td> <td th:text="${#temporals.format(list.lastWrtDt, 'yyyy-MM-dd')}"></td>
</tr> </tr>
</tbody> </tbody>

View File

@ -94,6 +94,7 @@
<thead> <thead>
<tr class="table-secondary"> <tr class="table-secondary">
<th>순번</th> <th>순번</th>
<th>직책</th>
<th>계급</th> <th>계급</th>
<th>성명</th> <th>성명</th>
<th></th> <th></th>
@ -121,6 +122,7 @@
<input type="hidden" class="userSeq" th:value="${list.userSeq}"> <input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block> </th:block>
<td th:text="${list.rownum}"></td> <td th:text="${list.rownum}"></td>
<td></td>
<td th:text="${list.titleCd}"></td> <td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td> <td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td> <td th:text="${list.organNm}"></td>

View File

@ -66,6 +66,8 @@
</form> </form>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
<button type="button" class="btn btn-primary" id="saveBtn">저장</button> <button type="button" class="btn btn-primary" id="saveBtn">저장</button>
</div> </div>

View File

@ -65,22 +65,25 @@
<table class="table table-sm table-hover table-bordered"> <table class="table table-sm table-hover table-bordered">
<thead> <thead>
<tr class="table-color"> <tr class="table-color">
<th></th> <th>순번</th>
<th>제목</th> <th>제목</th>
<th>첨부파일</th>
<th>댓글</th>
<th>관서</th> <th>관서</th>
<th>부서</th> <th>부서</th>
<th>계급</th> <th>계급</th>
<th>작성자</th> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th>
<th>댓글</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="planTr" th:each="board:${boardList}"> <tr class="planTr" th:each="board,cnt:${boardList}">
<input type="hidden" class="planKey" th:value="${board.publicKey}"> <input type="hidden" class="planKey" th:value="${board.publicKey}">
<td><input type="checkbox" class="trChkBox"></td> <!--<td><input type="checkbox" class="trChkBox"></td>-->
<td th:text="${cnt.count}"></td>
<td align="left" th:text="${board.title}"></td> <td align="left" th:text="${board.title}"></td>
<td th:text="${board.fileCnt eq null?'파일 없음':#strings.concat(board.fileCnt,' 건')}"></td>
<td th:text="${board.commentCnt eq null?'0':board.commentCnt}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${board.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${board.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
@ -92,8 +95,6 @@
</th:block> </th:block>
<td th:text="${board.wrtUserNm}"></td> <td th:text="${board.wrtUserNm}"></td>
<td th:text="${#temporals.format(board.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(board.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${board.fileCnt eq null?'파일 없음':#strings.concat(board.fileCnt,' 건')}"></td>
<td th:text="${board.commentCnt eq null?'0':board.commentCnt}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -165,5 +165,7 @@
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용--> <th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editBtn">수정</button> <button type="button" class="btn btn-warning" id="editBtn">수정</button>
</th:block> </th:block>
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
</div> </div>

View File

@ -67,6 +67,8 @@
</form> </form>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
<button type="button" class="btn btn-primary" id="saveBtn">저장</button> <button type="button" class="btn btn-primary" id="saveBtn">저장</button>
</div> </div>

View File

@ -68,22 +68,27 @@
<table class="table table-sm table-hover table-bordered"> <table class="table table-sm table-hover table-bordered">
<thead> <thead>
<tr class="table-color"> <tr class="table-color">
<th></th> <th>순번</th>
<th>제목</th> <th>제목</th>
<th>첨부파일</th>
<th>댓글</th>
<th>관서</th> <th>관서</th>
<th>부서</th> <th>부서</th>
<th>계급</th> <th>계급</th>
<th>작성자</th> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th>
<th>댓글</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="noticeTr" th:each="notice:${noticeList}"> <tr class="noticeTr" th:each="notice,cnt:${noticeList}">
<input type="hidden" class="publicKey" th:value="${notice.publicKey}"> <input type="hidden" class="publicKey" th:value="${notice.publicKey}">
<!--
<td><input type="checkbox" class="trChkBox"></td> <td><input type="checkbox" class="trChkBox"></td>
-->
<td th:text="${cnt.count}"></td>
<td align="left" th:text="${notice.title}"></td> <td align="left" th:text="${notice.title}"></td>
<td th:text="${notice.fileCnt eq null?'파일 없음':#strings.concat(notice.fileCnt,' 건')}"></td>
<td th:text="${notice.commentCnt eq null?'0':notice.commentCnt}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${notice.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${notice.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
@ -95,8 +100,6 @@
</th:block> </th:block>
<td th:text="${notice.wrtUserNm}"></td> <td th:text="${notice.wrtUserNm}"></td>
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${notice.fileCnt eq null?'파일 없음':#strings.concat(notice.fileCnt,' 건')}"></td>
<td th:text="${notice.commentCnt eq null?'0':notice.commentCnt}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -165,5 +165,7 @@
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용--> <th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editBtn">수정</button> <button type="button" class="btn btn-warning" id="editBtn">수정</button>
</th:block> </th:block>
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
</div> </div>

View File

@ -66,22 +66,25 @@
<table class="table table-sm table-hover table-bordered"> <table class="table table-sm table-hover table-bordered">
<thead> <thead>
<tr class="table-color"> <tr class="table-color">
<th></th> <th>순번</th>
<th>제목</th> <th>제목</th>
<th>첨부파일</th>
<th>댓글</th>
<th>관서</th> <th>관서</th>
<th>부서</th> <th>부서</th>
<th>계급</th> <th>계급</th>
<th>작성자</th> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th>
<th>댓글</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="planTr" th:each="qna:${qnaList}"> <tr class="planTr" th:each="qna,cnt:${qnaList}">
<input type="hidden" class="planKey" th:value="${qna.publicKey}"> <input type="hidden" class="planKey" th:value="${qna.publicKey}">
<td><input type="checkbox" class="trChkBox"></td> <!--<td><input type="checkbox" class="trChkBox"></td>-->
<td th:text="${cnt.count}"></td>
<td align="left" th:text="${qna.title}"></td> <td align="left" th:text="${qna.title}"></td>
<td th:text="${qna.fileCnt eq null?'파일 없음':#strings.concat(qna.fileCnt,' 건')}"></td>
<td th:text="${qna.commentCnt eq null?'0':qna.commentCnt}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${qna.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${qna.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block> </th:block>
@ -93,8 +96,6 @@
</th:block> </th:block>
<td th:text="${qna.wrtUserNm}"></td> <td th:text="${qna.wrtUserNm}"></td>
<td th:text="${#temporals.format(qna.wrtDt, 'yyyy-MM-dd HH:mm')}"></td> <td th:text="${#temporals.format(qna.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${qna.fileCnt eq null?'파일 없음':#strings.concat(qna.fileCnt,' 건')}"></td>
<td th:text="${qna.commentCnt eq null?'0':qna.commentCnt}"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -85,6 +85,8 @@
</form> </form>
</div> </div>
<div class="modal-footer bg-light"> <div class="modal-footer bg-light">
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
<button type="button" class="btn btn-primary" id="saveBtn">저장</button> <button type="button" class="btn btn-primary" id="saveBtn">저장</button>
</div> </div>

View File

@ -71,21 +71,24 @@
<table class="table table-sm table-hover table-bordered"> <table class="table table-sm table-hover table-bordered">
<thead> <thead>
<tr class="table-color"> <tr class="table-color">
<th></th> <th>순번</th>
<th>제목</th> <th>제목</th>
<th>첨부파일</th>
<th>댓글</th>
<th>관서</th> <th>관서</th>
<th>부서</th> <th>부서</th>
<th>계급</th> <th>계급</th>
<th>작성자</th> <th>작성자</th>
<th>작성일시</th> <th>작성일시</th>
<th>첨부파일</th>
<th>댓글</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider"> <tbody class="table-group-divider">
<tr class="planTr" th:each="reference:${referenceList}"> <tr class="planTr" th:each="reference,cnt:${referenceList}">
<input type="hidden" class="planKey" th:value="${reference.publicKey}"> <input type="hidden" class="planKey" th:value="${reference.publicKey}">
<!--
<td><input type="checkbox" class="trChkBox"></td> <td><input type="checkbox" class="trChkBox"></td>
-->
<td th:text="${cnt.count}"></td>
<td align="left" th:text="${reference.title}"></td> <td align="left" th:text="${reference.title}"></td>
<th:block th:each="commonCode:${session.commonCode.get('OG')}"> <th:block th:each="commonCode:${session.commonCode.get('OG')}">
<td th:if="${reference.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td> <td th:if="${reference.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>

View File

@ -171,5 +171,7 @@
<th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용--> <th:block th:if="${userSeq eq info.wrtUserSeq}"><!--작성자일 경우 수정 허용-->
<button type="button" class="btn btn-warning" id="editBtn">수정</button> <button type="button" class="btn btn-warning" id="editBtn">수정</button>
</th:block> </th:block>
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
</div> </div>