asf 및 코로나19 관련조치사항 삭제오류수정

master
DESKTOP-QGC5RJO\DBNT 2023-01-12 18:50:48 +09:00
parent 8bb6c123fd
commit 72b9da084d
4 changed files with 105 additions and 112 deletions

View File

@ -77,6 +77,7 @@ public class AsfCovController {
return asfCovService.saveContent(asfCov);
}
@PostMapping("/deleteContent")
@ResponseBody
public void deleteContent(@RequestBody AsfCov asfCov){

View File

@ -68,7 +68,7 @@ public class AsfCovService extends BaseService {
@Transactional
public void deleteContent(AsfCov asfCov){
asfCov=asfCovRepository.findById(asfCov.getAsfCovKey()).orElse(null);
asfCov=asfCovRepository.findTop1ByAsfCovKeyOrderByVersionNoDesc(asfCov.getAsfCovKey()).orElse(null);
asfCov.setContentStatus("DST008");
}

View File

@ -75,13 +75,13 @@ $(function(){
$(document).on('click', '#deleteMajorBtn', function (){
const asfCovKey = $('input[name=asfCovKey]').val();
const asfCovKey = $('#processResultEditBody').find(".asfCovKey").val();
console.log(asfCovKey);
if(confirm("삭제하시겠습니까?")){
//contentFade("in");
$.ajax({
type : 'POST',
url : "/ivsgt/deleteContent",
url : "/faStatistics/deleteContent",
data : JSON.stringify({asfCovKey:asfCovKey}),
contentType: 'application/json',
beforeSend: function (xhr){
@ -115,7 +115,8 @@ function getEditModal(asfCovKey){
}
$("#asfCovEditModalContent").empty().append(html);
$("#asfCovEditModal").modal('show');
$("#editContent").empty().append(html);
setUploadDiv();
},
error:function(e){
ajaxErrorAction(e);

View File

@ -19,126 +19,117 @@
</li>
</ul>
<!-- 내용 -->
<div class="tab-content" style="overflow-y: auto;">
<div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade show active" id="processResult" role="tabpanel" aria-labelledby="processResult-tab">
<div class="modal-body" id="processResultEditBody">
<form action="#" method="post" id="processResultEditForm">
<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" name="cdsKey" th:value="${asfCov.cdsKey}">
<input type="hidden" name="wrtOrgan" th:value="${asfCov.wrtOrgan}">
<input type="hidden" name="wrtUserNm" th:value="${asfCov.wrtUserNm}">
<input type="hidden" name="wrtDt" th:value="${#temporals.format(asfCov.wrtDt, 'yyyy-MM-dd HH:mm')}">
<input type="hidden" id="saveYn" name="saveYn">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<th:block th:if="${asfCov.wrtUserGrd eq null}">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" th:value="${asfCov.wrtUserNm}" readonly>
</th:block>
<th:block th:unless="${asfCov.wrtUserGrd eq null}">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq asfCov.wrtUserGrd}">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" th:value="|${code.itemValue} ${asfCov.wrtUserNm}|" readonly>
</th:block>
<input type="hidden" class="asfCovKey" th:value="${asfCov.asfCovKey}">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<th:block th:if="${asfCov.wrtUserGrd eq null}">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" th:value="${asfCov.wrtUserNm}" readonly>
</th:block>
<th:block th:unless="${asfCov.wrtUserGrd eq null}">
<th:block th:each="code:${session.commonCode.get('JT')}">
<th:block th:if="${code.itemCd eq asfCov.wrtUserGrd}">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" th:value="|${code.itemValue} ${asfCov.wrtUserNm}|" readonly>
</th:block>
</th:block>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(asfCov.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</th:block>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(asfCov.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
</div>
<div class="row mb-1">
<label for="boatNameKr" class="col-sm-1 col-form-label col-form-label-sm text-center">선명</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm cdsInfo" id="boatNameKr" name="boatNameKr" th:value="${asfCov.boatNameKr}" disabled>
</div>
<label for="caseNum" class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" class="form-control form-control-sm cdsInfo" id="caseNum" name="caseNum" th:value="${asfCov.caseNum}" disabled>
<input type="button" class="btn btn-sm btn-outline-primary crackdownStatusInfo w-auto" id="caseNumBtn" value="불러오기">
</div>
</div>
<div class="row mb-1">
<label for="boatNameKr" class="col-sm-1 col-form-label col-form-label-sm text-center">선명</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm cdsInfo" id="boatNameKr" name="boatNameKr" th:value="${asfCov.boatNameKr}" disabled>
</div>
<label for="caseNum" class="col-sm-1 col-form-label col-form-label-sm text-center">사건번호</label>
<div class="col-sm-2">
<div class="input-group">
<input type="text" class="form-control form-control-sm cdsInfo" id="caseNum" name="caseNum" th:value="${asfCov.caseNum}" disabled>
<input type="button" class="btn btn-sm btn-outline-primary crackdownStatusInfo w-auto" id="caseNumBtn" value="불러오기">
</div>
</div>
<label for="caseNum" class="col-sm-2 col-form-label col-form-label-sm text-center">*사건번호로 불러와주세요</label>
<label for="caseNum" class="col-sm-2 col-form-label col-form-label-sm text-center">*사건번호로 불러와주세요</label>
</div>
<div class="row mb-1">
<label for="caseAgency" class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당기관</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" id="caseAgency" name="caseAgency" disabled>
<option value=""></option>
<th:block th:each="commonCode:${session.commonCode.get('ATA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq asfCov.caseAgency}"></option>
</th:block>
</select>
</div>
<div class="row mb-1">
<label for="caseAgency" class="col-sm-1 col-form-label col-form-label-sm text-center">사건담당기관</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" id="caseAgency" name="caseAgency" disabled>
<option value=""></option>
<th:block th:each="commonCode:${session.commonCode.get('ATA')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq asfCov.caseAgency}"></option>
<label for="casePoliceOfficer" class="col-sm-1 col-form-label col-form-label-sm text-center fs-13">사건담당경찰관</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm cdsInfo" id="casePoliceOfficer" name="casePoliceOfficer" th:value="${asfCov.casePoliceOfficer}" disabled>
</div>
<label for="crackdownPolice" class="col-sm-1 col-form-label col-form-label-sm text-center">단속경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" name="crackdownPolice" id="crackdownPolice" disabled>
<option value=""></option>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq asfCov.crackdownPolice}"></option>
</th:block>
</select>
</div>
<label for="crackdownBoat" class="col-sm-1 col-form-label col-form-label-sm text-center">단속함정</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" name="crackdownBoat" id="crackdownBoat" disabled>
<option value=""></option>
<th:block th:each="cpoCode:${session.commonCode.get('CPO')}">
<th:block th:each="boatCode:${session.commonCode.get(cpoCode.itemCd)}">
<option th:value="${boatCode.itemCd}" th:text="${boatCode.itemValue}"></option>
</th:block>
</select>
</div>
<label for="casePoliceOfficer" class="col-sm-1 col-form-label col-form-label-sm text-center fs-13">사건담당경찰관</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm cdsInfo" id="casePoliceOfficer" name="casePoliceOfficer" th:value="${asfCov.casePoliceOfficer}" disabled>
</div>
<label for="crackdownPolice" class="col-sm-1 col-form-label col-form-label-sm text-center">단속경찰서</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" name="crackdownPolice" id="crackdownPolice" disabled>
<option value=""></option>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq asfCov.crackdownPolice}"></option>
</th:block>
</select>
</div>
<label for="crackdownBoat" class="col-sm-1 col-form-label col-form-label-sm text-center">단속함정</label>
<div class="col-sm-2">
<select class="form-select form-select-sm cdsInfo" name="crackdownBoat" id="crackdownBoat" disabled>
<option value=""></option>
<th:block th:each="cpoCode:${session.commonCode.get('CPO')}">
<th:block th:each="boatCode:${session.commonCode.get(cpoCode.itemCd)}">
<option th:value="${boatCode.itemCd}" th:text="${boatCode.itemValue}"></option>
</th:block>
</th:block>
</select>
</div>
</th:block>
</select>
</div>
<div class="row mb-1">
<label for="pressurizedYn" class="col-sm-1 col-form-label col-form-label-sm text-center">전용부두 압송여부</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownStatusInfo" name="pressurizedYn" id="pressurizedYn">
<option value="">선택</option>
<option value="Y" th:selected="${asfCov.pressurizedYn eq 'Y'}">압송</option>
<option value="N" th:selected="${asfCov.pressurizedYn eq 'N'}">미압송</option>
</select>
</div>
<label for="pressurizedN" class="col-sm-1 col-form-label col-form-label-sm text-center">미압송시</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownStatusInfo" name="pressurizedN" id="pressurizedN">
<option value="">선택</option>
<option value="Y" th:selected="${asfCov.pressurizedN eq 'A'}">현장조사</option>
<option value="N" th:selected="${asfCov.pressurizedN eq 'O'}">기타</option>
</select>
</div>
</div>
<div class="row mb-1">
<label for="pressurizedYn" class="col-sm-1 col-form-label col-form-label-sm text-center">전용부두 압송여부</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownStatusInfo" name="pressurizedYn" id="pressurizedYn">
<option value="">선택</option>
<option value="Y" th:selected="${asfCov.pressurizedYn eq 'Y'}">압송</option>
<option value="N" th:selected="${asfCov.pressurizedYn eq 'N'}">미압송</option>
</select>
</div>
<div class="row mb-1">
<label for="personCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">검사인원</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personCnt" name="personCnt" th:value="${asfCov.personCnt}">
</div>
<label for="pressurizedN" class="col-sm-1 col-form-label col-form-label-sm text-center">코로나19 검사결과</label>
<label for="personPositiveCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">양성</label>
<div class="col-sm-1">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personPositiveCnt" name="personPositiveCnt" th:value="${asfCov.personPositiveCnt}">
</div>
<label for="personNegativeCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">음성</label>
<div class="col-sm-1">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personNegativeCnt" name="personNegativeCnt" th:value="${asfCov.personNegativeCnt}">
</div>
<label for="pressurizedN" class="col-sm-1 col-form-label col-form-label-sm text-center">미압송시</label>
<div class="col-sm-2">
<select class="form-select form-select-sm crackdownStatusInfo" name="pressurizedN" id="pressurizedN">
<option value="">선택</option>
<option value="Y" th:selected="${asfCov.pressurizedN eq 'A'}">현장조사</option>
<option value="N" th:selected="${asfCov.pressurizedN eq 'O'}">기타</option>
</select>
</div>
<div class="row mb-1">
<label for="asfcovActionDetail" class="col-sm-1 col-form-label col-form-label-sm text-center">검/방역조치내용</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" rows="5" cols="30" id="asfcovActionDetail" name="asfcovActionDetail" th:value="${asfCov.asfcovActionDetail}"></textarea>
</div>
</div>
<div class="row mb-1">
<label for="personCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">검사인원</label>
<div class="col-sm-2">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personCnt" name="personCnt" th:value="${asfCov.personCnt}">
</div>
</form>
<label for="pressurizedN" class="col-sm-1 col-form-label col-form-label-sm text-center">코로나19 검사결과</label>
<label for="personPositiveCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">양성</label>
<div class="col-sm-1">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personPositiveCnt" name="personPositiveCnt" th:value="${asfCov.personPositiveCnt}">
</div>
<label for="personNegativeCnt" class="col-sm-1 col-form-label col-form-label-sm text-center">음성</label>
<div class="col-sm-1">
<input type="text" class="form-control form-control-sm crackdownStatusInfo" id="personNegativeCnt" name="personNegativeCnt" th:value="${asfCov.personNegativeCnt}">
</div>
</div>
<div class="row mb-1">
<label for="asfcovActionDetail" class="col-sm-1 col-form-label col-form-label-sm text-center">검/방역조치내용</label>
<div class="col-sm-11">
<textarea class="form-control form-control-sm" rows="5" cols="30" id="asfcovActionDetail" name="asfcovActionDetail" th:value="${asfCov.asfcovActionDetail}"></textarea>
</div>
</div>
</div>
</div>
<div class="tab-pane fade p-2 mx-2" id="history" role="tabpanel" aria-labelledby="history-tab" tabindex="0">