From dbb0f0d7b5ef8d530b837f129adbfe6ba1a8026e Mon Sep 17 00:00:00 2001 From: minuk926 Date: Fri, 22 Apr 2022 14:06:09 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B1=B0=EC=A3=BC=EC=9E=90/=EC=9E=A5?= =?UTF-8?q?=EC=95=A0=EC=9D=B8=20=EC=9E=90=EB=A3=8C=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ctgy/controller/ResidentAndDisabledController.java | 9 ++++++++- .../biz/ctgy/service/IResidentAndDisabledService.java | 4 ++++ .../ctgy/service/impl/ResidentAndDisabledService.java | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) 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<>();