단속 > 단속 등록&열람: 불필요한 오류 처리 로직 제거 및 @ResponseBody 어노테이션 삭제, Controller/JS 리팩토링

dev
박성영 4 months ago
parent 666e83a40f
commit 000440bfa2

@ -129,7 +129,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/getAllStrctIdx.ajax")
@ResponseBody
public ResponseEntity<?> getAllStrctIdxAjax( @ModelAttribute CrdnStrctIdxVO vo ) {
log.debug("전체 구조지수 조회 요청");
List<CrdnStrctIdxVO> list = service.getAllStrctIdx(vo);
@ -146,7 +145,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/getAllVltnLwrg.ajax")
@ResponseBody
public ResponseEntity<?> getAllVltnLwrgAjax() {
log.debug("전체 위반법규 조회 요청");
List<CrdnVltnLwrgVO> list = service.getAllVltnLwrg();
@ -163,7 +161,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/getAllUsgIdx.ajax")
@ResponseBody
public ResponseEntity<?> getAllUsgIdxAjax() {
log.debug("전체 용도지수 조회 요청");
List<CrdnUsgIdxVO> list = service.getAllUsgIdx();
@ -180,7 +177,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/getAllPstnIdx.ajax")
@ResponseBody
public ResponseEntity<?> getAllPstnIdxAjax() {
log.debug("전체 위치지수 조회 요청");
List<CrdnPstnIdxVO> list = service.getAllPstnIdx();
@ -198,7 +194,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/insert.ajax")
@ResponseBody
public ResponseEntity<?> insertAjax(@ModelAttribute CrdnActInfoVO vo) {
log.debug("불법위반행위정보 등록 요청: {}", vo);
@ -225,7 +220,6 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/update.ajax")
@ResponseBody
public ResponseEntity<?> updateAjax(@ModelAttribute CrdnActInfoVO vo) {
log.debug("불법위반행위정보 수정 요청: {}", vo);
@ -249,13 +243,7 @@ public class CrdnActInfoController {
@ApiResponse(responseCode = "500", description = "서버 오류")
})
@PostMapping("/delete.ajax")
@ResponseBody
public ResponseEntity<?> deleteAjax(@RequestParam("actInfoIds[]") List<String> actInfoIds) {
log.debug("불법위반행위정보 삭제 요청: {}", actInfoIds);
if (actInfoIds == null || actInfoIds.isEmpty()) {
return ApiResponseUtil.error("삭제할 항목을 선택해 주세요.");
}
public ResponseEntity<?> deleteAjax(@RequestParam List<String> actInfoIds) {
int deletedCount = service.deleteActInfos(actInfoIds);

@ -300,10 +300,6 @@
} else {
alert(response.message || '삭제 중 오류가 발생했습니다.');
}
},
error: function(xhr, status, error) {
console.error('불법행위 정보 삭제 오류:', error);
alert('삭제 중 시스템 오류가 발생했습니다.');
}
});
}

@ -234,10 +234,6 @@
} else {
alert(response.message || '소유자 정보 삭제에 실패했습니다.');
}
},
error: function(xhr, status, error) {
alert('소유자 정보 삭제 중 오류가 발생했습니다.');
console.error('삭제 오류:', error);
}
});
}

@ -299,10 +299,6 @@
} else {
alert(response.message || '위치정보 삭제에 실패했습니다.');
}
},
error: function(xhr, status, error) {
alert('위치정보 삭제 중 오류가 발생했습니다.');
console.error('삭제 오류:', error);
}
});
}

Loading…
Cancel
Save