주요사건처리현황 완료
parent
5ed8983fa1
commit
f266046b1e
|
|
@ -3,6 +3,8 @@ package com.dbnt.faisp.main.ivsgtMgt.majorStatus;
|
||||||
|
|
||||||
|
|
||||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||||
|
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
||||||
|
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
||||||
import com.dbnt.faisp.main.equip.model.Equip;
|
import com.dbnt.faisp.main.equip.model.Equip;
|
||||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus;
|
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.model.MajorStatus;
|
||||||
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.repository.MajorStatusRepository;
|
import com.dbnt.faisp.main.ivsgtMgt.majorStatus.repository.MajorStatusRepository;
|
||||||
|
|
@ -26,12 +28,15 @@ public class MajorStatusController {
|
||||||
|
|
||||||
private final AuthMgtService authMgtService;
|
private final AuthMgtService authMgtService;
|
||||||
private final MajorStatusService majorStatusService;
|
private final MajorStatusService majorStatusService;
|
||||||
|
private final CodeMgtService codeMgtService;
|
||||||
|
|
||||||
@GetMapping("/majorStatusPage")
|
@GetMapping("/majorStatusPage")
|
||||||
public ModelAndView majorStatus(@AuthenticationPrincipal UserInfo loginUser, MajorStatus majorStatus){
|
public ModelAndView majorStatus(@AuthenticationPrincipal UserInfo loginUser, MajorStatus majorStatus){
|
||||||
|
|
||||||
ModelAndView mav = new ModelAndView("ivsgt/majorStatus/majorStatusPage");
|
ModelAndView mav = new ModelAndView("ivsgt/majorStatus/majorStatusPage");
|
||||||
|
|
||||||
|
mav.addObject("mstList", codeMgtService.selectCodeMgtList("MST"));
|
||||||
|
|
||||||
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
|
||||||
mav.addObject("searchParams", majorStatus);
|
mav.addObject("searchParams", majorStatus);
|
||||||
|
|
||||||
|
|
@ -61,6 +66,7 @@ public class MajorStatusController {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//mav.addObject("mstList", codeMgtService.selectCodeMgtList("MST"));
|
||||||
mav.addObject("majorStatus", majorStatus);
|
mav.addObject("majorStatus", majorStatus);
|
||||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||||
return mav;
|
return mav;
|
||||||
|
|
|
||||||
|
|
@ -87,17 +87,10 @@ public class MajorStatusService extends BaseService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
public void deleteContent(MajorStatus majorStatus){
|
public void deleteContent(MajorStatus majorStatus){
|
||||||
|
majorStatus = majorStatusRepository.findById(majorStatus.getMajorKey()).orElse(null);
|
||||||
//파일삭제
|
majorStatus.setContentStatus("DST008");
|
||||||
List<MajorFile> MajorFileList = majorFileRepository.findByMajorKey(majorStatus.getMajorKey());
|
|
||||||
if(MajorFileList != null) {
|
|
||||||
for(MajorFile file: MajorFileList){
|
|
||||||
deleteStoredFile(new File(file.getSavePath(), file.getConvNm()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
majorFileRepository.deleteByMajorKey(majorStatus.getMajorKey());
|
|
||||||
majorStatusRepository.deleteById(majorStatus.getMajorKey());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteMajorFile(Integer majorKey, List<Integer> deleteFileSeq) {
|
private void deleteMajorFile(Integer majorKey, List<Integer> deleteFileSeq) {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
<sql id="selectMajorListWhere">
|
<sql id="selectMajorListWhere">
|
||||||
<where>
|
<where>
|
||||||
|
a.content_status <> 'DST008'
|
||||||
<if test='majorType != null and majorType != ""'>
|
<if test='majorType != null and majorType != ""'>
|
||||||
and a.major_type = #{majorType}
|
and a.major_type = #{majorType}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
$("#jqueryBtn").click(function(){
|
||||||
|
$(".quiz-text").text("Javascript");
|
||||||
|
$(".quiz-text").css('color', 'blue');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '#addMajorBtn', function (){
|
$(document).on('click', '#addMajorBtn', function (){
|
||||||
getEditModal(null)
|
getEditModal(null)
|
||||||
|
|
@ -20,7 +25,7 @@ $(document).on('click', '.tr', function (){
|
||||||
// });
|
// });
|
||||||
|
|
||||||
$(document).on('click', '#saveBtn', function (){
|
$(document).on('click', '#saveBtn', function (){
|
||||||
saveContent("boardEditForm")
|
saveContent("MajorEditForm")
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#editBtn', function (){
|
$(document).on('click', '#editBtn', function (){
|
||||||
|
|
@ -45,7 +50,7 @@ $(document).on('click', '#deleteMajorBtn', function (){
|
||||||
const majorKey = $('input[name=majorKey]').val();
|
const majorKey = $('input[name=majorKey]').val();
|
||||||
console.log(majorKey);
|
console.log(majorKey);
|
||||||
if(confirm("삭제하시겠습니까?")){
|
if(confirm("삭제하시겠습니까?")){
|
||||||
contentFade("in");
|
//contentFade("in");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : "/ivsgt/deleteContent",
|
url : "/ivsgt/deleteContent",
|
||||||
|
|
@ -56,10 +61,12 @@ $(document).on('click', '#deleteMajorBtn', function (){
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
alert("삭제 처리되었습니다.");
|
alert("삭제 처리되었습니다.");
|
||||||
|
//contentFade("out");
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
alert("삭제 처리에 실패하였습니다");
|
alert("삭제 처리에 실패하였습니다");
|
||||||
|
//contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -132,12 +139,17 @@ function getViewModal(majorKey){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveContent(formId, majorType){
|
function saveContent(contentStatus){
|
||||||
if(contentCheck(formId)){
|
if(confirm("저장하시겠습니까?")){
|
||||||
if(confirm("저장하시겠습니까?")){
|
let flag = true;
|
||||||
|
if(contentStatus === "DST007"){
|
||||||
|
flag = contentCheck();
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
$("#content").val("");
|
const MajorEditForm = $("#MajorEditForm");
|
||||||
const formData = new FormData($("#"+formId)[0]);
|
MajorEditForm.find("contentStatus").val(contentStatus);
|
||||||
|
const formData = new FormData(MajorEditForm[0]);
|
||||||
for(const file of files) {
|
for(const file of files) {
|
||||||
if(!file.isDelete)
|
if(!file.isDelete)
|
||||||
formData.append('uploadFiles', file, file.name);
|
formData.append('uploadFiles', file, file.name);
|
||||||
|
|
|
||||||
|
|
@ -5,28 +5,37 @@
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="MajorEditBody">
|
<div class="modal-body" id="MajorEditBody">
|
||||||
<form action="#" method="post" id="boardEditForm">
|
<form action="#" method="post" id="MajorEditForm">
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
<input type="hidden" name="majorKey" th:value="${majorStatus.majorKey}">
|
<input type="hidden" name="majorKey" th:value="${majorStatus.majorKey}">
|
||||||
<input type="hidden" name="majorType" th:value="${majorStatus.majorType}">
|
|
||||||
<input type="hidden" name="wrtOrgan" th:value="${majorStatus.wrtOrgan}">
|
<input type="hidden" name="wrtOrgan" th:value="${majorStatus.wrtOrgan}">
|
||||||
<input type="hidden" name="wrtPart" th:value="${majorStatus.wrtPart}">
|
<input type="hidden" name="wrtPart" th:value="${majorStatus.wrtPart}">
|
||||||
<input type="hidden" name="wrtUserSeq" th:value="${majorStatus.wrtUserSeq}">
|
<input type="hidden" name="wrtUserSeq" th:value="${majorStatus.wrtUserSeq}">
|
||||||
<input type="hidden" name="wrtUserGrd" th:value="${majorStatus.wrtUserGrd}">
|
<input type="hidden" name="wrtUserGrd" th:value="${majorStatus.wrtUserGrd}">
|
||||||
<input type="hidden" name="wrtUserNm" th:value="${majorStatus.wrtUserNm}">
|
<input type="hidden" name="wrtUserNm" th:value="${majorStatus.wrtUserNm}">
|
||||||
|
<input type="hidden" name="contentStatus" id="contentStatus" th:value="${majorStatus.contentStatus}">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
|
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||||
<th:block th:if="${commonCode.itemCd eq majorStatus.wrtUserGrd}">
|
<th:block th:if="${commonCode.itemCd eq majorStatus.wrtUserGrd}">
|
||||||
<input type="text" class="form-control" id="wrtUserNm" th:value="|${commonCode.itemValue} ${majorStatus.wrtUserNm}|" readonly>
|
<input type="text" class="form-control form-control-sm" id="wrtUserNm" th:value="|${commonCode.itemValue} ${majorStatus.wrtUserNm}|" readonly>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
<label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(majorStatus.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(majorStatus.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||||
|
</div>
|
||||||
|
<label for="majorType" class="col-sm-2 col-form-label col-form-label-sm text-center">종류</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<select class="form-select form-select-sm" id="majorType" name="majorType">
|
||||||
|
<option value="">선택해주세요.</option>
|
||||||
|
<th:block th:each="commonCode:${session.commonCode.get('MST')}">
|
||||||
|
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq majorStatus.majorType}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-sm-auto my-auto">-->
|
<!-- <div class="col-sm-auto my-auto">-->
|
||||||
<!-- <input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${majorStatus.organChk eq 'T'}">-->
|
<!-- <input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${majorStatus.organChk eq 'T'}">-->
|
||||||
|
|
@ -34,20 +43,20 @@
|
||||||
<!-- <label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>-->
|
<!-- <label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="contentTitle" class="col-sm-2 col-form-label text-center">제목</label>
|
<label for="contentTitle" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" id="contentTitle" name="contentTitle" th:value="${majorStatus.contentTitle}" autocomplete="off">
|
<input type="text" class="form-control form-control-sm" id="contentTitle" name="contentTitle" th:value="${majorStatus.contentTitle}" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 justify-content-center">
|
<div class="row mb-1 justify-content-center">
|
||||||
<label for="editor" class="col-sm-2 col-form-label text-center">내용</label>
|
<label for="editor" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div id="editor"></div>
|
<div id="editor"></div>
|
||||||
<textarea id="content" class="d-none" th:utext="${majorStatus.contentInfo}"></textarea>
|
<textarea id="content" class="d-none" th:utext="${majorStatus.contentInfo}"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="fileInputer" class="col-sm-2 col-form-label text-center">첨부파일</label>
|
<label for="fileInputer" class="col-sm-2 col-form-label col-form-label-sm text-center">첨부파일</label>
|
||||||
<div class="col-sm-10" style="min-height: 70px;">
|
<div class="col-sm-10" style="min-height: 70px;">
|
||||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
||||||
<th:block th:if="${#arrays.isEmpty(majorStatus.fileList)}">
|
<th:block th:if="${#arrays.isEmpty(majorStatus.fileList)}">
|
||||||
|
|
@ -66,6 +75,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
|
<button type="button" class="btn btn-warning" id="saveTempBtn" data-ContentStatus="DST001">임시저장</button>
|
||||||
<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>
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<table class="table table-sm table-hover table-bordered">
|
<table class="table table-sm table-hover table-bordered">
|
||||||
<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>
|
||||||
|
|
@ -78,9 +78,9 @@
|
||||||
<tbody class="table-group-divider">
|
<tbody class="table-group-divider">
|
||||||
<tr class="tr" th:each="major:${majorList}">
|
<tr class="tr" th:each="major:${majorList}">
|
||||||
<input type="hidden" class="majorKey" th:value="${major.majorKey}">
|
<input type="hidden" class="majorKey" th:value="${major.majorKey}">
|
||||||
<td><input type="checkbox" class="trChkBox"></td>
|
<!-- <td><input type="checkbox" class="trChkBox"></td>-->
|
||||||
<td th:test="${major.majorType}"></td>
|
<td th:text="${major.majorType}"></td>
|
||||||
<td th:text="${major.contentTitle}"></td>
|
<td th:text="|${major.contentStatus eq 'DST001'?'[임시]':''}${major.contentTitle}|"></td>
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||||
<td th:if="${major.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
<td th:if="${major.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue