diff --git a/src/main/java/com/xit/biz/ctgy/controller/ResidentAndDisabledController.java b/src/main/java/com/xit/biz/ctgy/controller/ResidentAndDisabledController.java index 7118971..8695747 100644 --- a/src/main/java/com/xit/biz/ctgy/controller/ResidentAndDisabledController.java +++ b/src/main/java/com/xit/biz/ctgy/controller/ResidentAndDisabledController.java @@ -78,6 +78,13 @@ public class ResidentAndDisabledController { return RestResponse.of(service.findJudgeData(scCode)); } + @Operation(summary = "거주자/장애인 의견진술 자료 삭제" , description = "거주자/장애인 의견진술 자료 삭제") + @PostMapping(value="/data/remove", produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity removeJudgeData(final Long scCode) { + service.removeJudgeData(scCode); + return RestResponse.of(HttpStatus.OK); + } + @Operation(summary = "거주자/장애인 의견진술 심의대상 조회" , description = "거주자/장애인 의견진술 심의대상 조회") @GetMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE) @Parameters({ @@ -147,7 +154,7 @@ public class ResidentAndDisabledController { @Operation(summary = "거주자/장애인 의견진술 심의 자료 삭제" , description = "거주자/장애인 의견진술 심의 자료 삭제") @PostMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity removeParkinJudge( + public ResponseEntity removeJudge( @Valid @RequestBody final JudgeListDto dto) { diff --git a/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java index c56611c..f6d1b49 100644 --- a/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/IResidentAndDisabledService.java @@ -42,6 +42,8 @@ public interface IResidentAndDisabledService { */ void saveJudgeData(GnRecallScDto entity); + void removeJudgeData(Long scCode); + /** * 거주자 / 장애인 의견진술 심의 목록 조회 * @param dto JudgeListDto @@ -71,4 +73,6 @@ public interface IResidentAndDisabledService { void saveJudgeTargets(JudgeTargetDto dto); void removeJudge(final JudgeListDto dto); + + } diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java index 00b2dd2..644a3ca 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java @@ -103,6 +103,13 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { } + + @Override + @Transactional + public void removeJudgeData(final Long scCode){ + gnReacallRepository.deleteById(scCode); + } + private void setFileInfoAndFileUpload(GnRecallScDto dto, MultipartFile[] mfs, String setMethodName) { String makePath = fileService.uploadFiles(mfs, rootPath, CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(dto.getScDatagb())? uploadPath[0] : uploadPath[1]); makePath = makePath + File.separator; @@ -175,6 +182,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { } @Override + @Transactional(readOnly = true) public Page findJudges(JudgeListDto dto, Pageable pageable) { pageable = JpaUtil.getPagingInfo(pageable); @@ -182,6 +190,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { } @Override + @Transactional(readOnly = true) public Map findJudgeResults(JudgeListDto dto) { Map resultMap = new HashMap<>();