feat: 거주자/장애인 자료 삭제 반영

dev
minuk926 3 years ago
parent b4a29faf95
commit dbb0f0d7b5

@ -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<? extends IRestResponse> 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<? extends IRestResponse> removeParkinJudge(
public ResponseEntity<? extends IRestResponse> removeJudge(
@Valid
@RequestBody
final JudgeListDto dto) {

@ -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);
}

@ -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<JudgeListDto> findJudges(JudgeListDto dto, Pageable pageable) {
pageable = JpaUtil.getPagingInfo(pageable);
@ -182,6 +190,7 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
}
@Override
@Transactional(readOnly = true)
public Map<String,Object> findJudgeResults(JudgeListDto dto) {
Map<String, Object> resultMap = new HashMap<>();

Loading…
Cancel
Save