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,18 +19,10 @@
</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">
<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">
@ -138,7 +130,6 @@
<textarea class="form-control form-control-sm" rows="5" cols="30" id="asfcovActionDetail" name="asfcovActionDetail" th:value="${asfCov.asfcovActionDetail}"></textarea>
</div>
</div>
</form>
</div>
</div>
<div class="tab-pane fade p-2 mx-2" id="history" role="tabpanel" aria-labelledby="history-tab" tabindex="0">