|
|
|
@ -5,6 +5,8 @@ import com.xit.biz.ctgy.dto.JudgeListDto;
|
|
|
|
|
import com.xit.biz.ctgy.dto.JudgeTargetDto;
|
|
|
|
|
import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
|
|
|
|
|
import com.xit.biz.ctgy.service.IResidentAndDisabledService;
|
|
|
|
|
import com.xit.core.annotation.Secured;
|
|
|
|
|
import com.xit.core.annotation.SecurityPolicy;
|
|
|
|
|
import com.xit.core.api.IRestResponse;
|
|
|
|
|
import com.xit.core.api.RestResponse;
|
|
|
|
|
import com.xit.core.util.AssertUtils;
|
|
|
|
@ -34,7 +36,7 @@ import javax.validation.constraints.NotNull;
|
|
|
|
|
*/
|
|
|
|
|
@Tag(name = "ResidentAndDisabledController", description = "거주자/장애인 의견진술 관리")
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/api/v1/ctgy/judge")
|
|
|
|
|
@RequestMapping("/api/v1/ctgy")
|
|
|
|
|
@Validated
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class ResidentAndDisabledController {
|
|
|
|
@ -43,22 +45,28 @@ public class ResidentAndDisabledController {
|
|
|
|
|
|
|
|
|
|
private final GnRecallScMapstruct mapstruct = Mappers.getMapper(GnRecallScMapstruct.class);
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
|
// 관리자
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// TODO :: 파라메터 정의 필요
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견지술자료 목록 조회" , description = "거주자/장애인 의견진술자료 목록 조회")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "scDatagb", description = "데이타구분", required = true, example = "1"),
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"),
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
|
|
|
|
|
})
|
|
|
|
|
@GetMapping(value="/data", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@GetMapping(value="/admin/data", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findJudgeDatas(
|
|
|
|
|
@NotNull final String scDatagb,
|
|
|
|
|
@Parameter(hidden = true)
|
|
|
|
|
final Pageable pageable) {
|
|
|
|
|
return RestResponse.of(service.findJudgeDatas(scDatagb, pageable)); }
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 자료 등록", description = "거주자/장애인 의견진술 자료 등록")
|
|
|
|
|
@PostMapping(value = "/data", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
@PostMapping(value = "/admin/data", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> saveJudgeData(@Nonnull GnRecallScDto dto) {
|
|
|
|
|
AssertUtils.isTrue(!Checks.isEmpty(dto), "등록할 거주자 의견진술 자료가 없습니다");
|
|
|
|
|
AssertUtils.isTrue(!Checks.isEmpty(dto.getScDatagb()), "데이타구분 값은 필수입니다(1-거주자,2-장애인)");
|
|
|
|
@ -67,24 +75,27 @@ public class ResidentAndDisabledController {
|
|
|
|
|
return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 자료 상세" , description = "거주자/장애인 의견진술 자료 상세")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.PATH, name = "scCode", description = "의견진술번호", required = true, example = "3778"),
|
|
|
|
|
})
|
|
|
|
|
@GetMapping(value = "/data/{scCode}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@GetMapping(value = "/admin/data/{scCode}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findJudgeData(@PathVariable final Long scCode) {
|
|
|
|
|
return RestResponse.of(service.findJudgeData(scCode));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 자료 삭제" , description = "거주자/장애인 의견진술 자료 삭제")
|
|
|
|
|
@PostMapping(value="/data/remove", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@PostMapping(value="/admin/data/remove", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> removeJudgeData(final Long scCode) {
|
|
|
|
|
service.removeJudgeData(scCode);
|
|
|
|
|
return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 심의대상 조회" , description = "거주자/장애인 의견진술 심의대상 조회")
|
|
|
|
|
@GetMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@GetMapping(value="/admin/target", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "scDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "scTransfer", description = "전송상태(미접수-1,접수-2)", required = true, example = "1"),
|
|
|
|
@ -100,8 +111,9 @@ public class ResidentAndDisabledController {
|
|
|
|
|
return RestResponse.of(service.findJudgeTargets(dto));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/징애인 의견진술 심의대상 등록" , description = "거주자/장애인 의견진술 심의대상 등록")
|
|
|
|
|
@PostMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@PostMapping(value="/admin/target", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> saveJudgeTargets(
|
|
|
|
|
@Valid
|
|
|
|
|
@RequestBody
|
|
|
|
@ -111,6 +123,7 @@ public class ResidentAndDisabledController {
|
|
|
|
|
return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 심의목록 조회" , description = "거주자/장애인 의견진술 심의목록 조회")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "scDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
|
|
|
|
@ -120,8 +133,8 @@ public class ResidentAndDisabledController {
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findResidents(
|
|
|
|
|
@GetMapping(value = "/admin", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findJudges(
|
|
|
|
|
@Valid
|
|
|
|
|
@Parameter(hidden = true)
|
|
|
|
|
final JudgeListDto dto,
|
|
|
|
@ -133,6 +146,7 @@ public class ResidentAndDisabledController {
|
|
|
|
|
return RestResponse.of(service.findJudges(dto, pageable));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 심의 결과 목록" , description = "거주자/장애인 의견진술 심의 결과 목록")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
|
|
|
|
@ -141,7 +155,7 @@ public class ResidentAndDisabledController {
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = true, example = "12"),
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = false, example = "003")
|
|
|
|
|
})
|
|
|
|
|
@GetMapping(value="/result", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@GetMapping(value="/admin/result", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findJudgeResults(
|
|
|
|
|
@Valid
|
|
|
|
|
@Parameter(hidden = true)
|
|
|
|
@ -150,8 +164,9 @@ public class ResidentAndDisabledController {
|
|
|
|
|
return RestResponse.of(service.findJudgeResults(dto));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "거주자/장애인 의견진술 심의 자료 삭제" , description = "거주자/장애인 의견진술 심의 자료 삭제")
|
|
|
|
|
@PostMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
@PostMapping(value="/admin/remove", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> removeJudge(
|
|
|
|
|
@Valid
|
|
|
|
|
@RequestBody
|
|
|
|
@ -159,4 +174,28 @@ public class ResidentAndDisabledController {
|
|
|
|
|
service.removeJudge(dto);
|
|
|
|
|
return RestResponse.of(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
|
// 심사자
|
|
|
|
|
//---------------------------------------------------------------------------------
|
|
|
|
|
//@Secured(policy = SecurityPolicy.TOKEN)
|
|
|
|
|
@Operation(summary = "심사자별 거주자/장애인 의견진술 심의목록 조회" , description = "심사자별 거주자/장애인 의견진술 심의목록 조회")
|
|
|
|
|
@Parameters({
|
|
|
|
|
@Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"),
|
|
|
|
|
//@Parameter(in = ParameterIn.QUERY, name = "scYear", description = "심사년도", required = true, example = "2021"),
|
|
|
|
|
//@Parameter(in = ParameterIn.QUERY, name = "scChasu", description = "차수", required = false, example = " "),
|
|
|
|
|
//@Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"),
|
|
|
|
|
//@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
@GetMapping(value = "/judge", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
public ResponseEntity<? extends IRestResponse> findByUserJudges(
|
|
|
|
|
@Valid
|
|
|
|
|
@Parameter(hidden = true)
|
|
|
|
|
final JudgeListDto dto) {
|
|
|
|
|
AssertUtils.isTrue(!Checks.isEmpty(dto), "필수 검색 조건이 입력되지 않았습니다.");
|
|
|
|
|
AssertUtils.isTrue(!Checks.isEmpty(dto.getMsDatagb()), "데이타구분 값은 필수입니다(1-거주자,2-장애인)");
|
|
|
|
|
return RestResponse.of(service.findByUserJudges(dto));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|