@ -1,10 +1,10 @@
package com.xit.biz.ctgy.controller ;
package com.xit.biz.ctgy.controller ;
import com.xit.biz.ctgy.dto.GnRecallScDto ;
import com.xit.biz.ctgy.dto.GnRecallScDto ;
import com.xit.biz.ctgy.dto.ResidentTargetDto ;
import com.xit.biz.ctgy.dto.JudgeListDto ;
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.dto.struct.GnRecallScMapstruct ;
import com.xit.biz.ctgy.service.IResident Service;
import com.xit.biz.ctgy.service.IResident AndDisabled Service;
import com.xit.core.api.IRestResponse ;
import com.xit.core.api.IRestResponse ;
import com.xit.core.api.RestResponse ;
import com.xit.core.api.RestResponse ;
import com.xit.core.util.AssertUtils ;
import com.xit.core.util.AssertUtils ;
@ -26,51 +26,55 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Nonnull ;
import javax.annotation.Nonnull ;
import javax.validation.Valid ;
import javax.validation.Valid ;
@Tag ( name = "ResidentController" , description = "거주자의견진술 관리" )
/ * *
* 거 주 자 / 장 애 인 의 견 진 술
* 거 주 자 : scDatagb = "1"
* 장 애 인 : scDatagb = "2"
* /
@Tag ( name = "ResidentAndDisabledController" , description = "거주자/장애인 의견진술 관리" )
@RestController
@RestController
@RequestMapping ( "/api/v1/ctgy/resident" )
@RequestMapping ( "/api/v1/ctgy/ judge ")
@Validated
@Validated
@RequiredArgsConstructor
@RequiredArgsConstructor
public class ResidentController {
public class Resident AndDisabled Controller {
private final IResident Service service ;
private final IResident AndDisabled Service service ;
private final GnRecallScMapstruct mapstruct = Mappers . getMapper ( GnRecallScMapstruct . class ) ;
private final GnRecallScMapstruct mapstruct = Mappers . getMapper ( GnRecallScMapstruct . class ) ;
// TODO :: 파라메터 정의 필요
// TODO :: 파라메터 정의 필요
@Operation ( summary = "거주자 의견지술자료 목록 조회" , description = "거주자 의견진술자료 목록 조회")
@Operation ( summary = "거주자 /장애인 의견지술자료 목록 조회" , description = "거주자 /장애인 의견진술자료 목록 조회")
@Parameters ( {
@Parameters ( {
@Parameter ( in = ParameterIn . QUERY , name = "page" , description = "페이지" , required = true , example = "0" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "page" , description = "페이지" , required = true , example = "0" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "size" , description = "페이지당갯수" , required = true , example = "10" )
@Parameter ( in = ParameterIn . QUERY , name = "size" , description = "페이지당갯수" , required = true , example = "10" )
} )
} )
@GetMapping ( value = "/data" , produces = MediaType . APPLICATION_JSON_VALUE )
@GetMapping ( value = "/data" , produces = MediaType . APPLICATION_JSON_VALUE )
public ResponseEntity < ? extends IRestResponse > find Resident Datas(
public ResponseEntity < ? extends IRestResponse > find Judge Datas(
@Parameter ( hidden = true )
@Parameter ( hidden = true )
final Pageable pageable ) {
final Pageable pageable ) {
return RestResponse . of ( service . findResidentDatas ( pageable ) ) ;
return RestResponse . of ( service . findJudgeDatas ( pageable ) ) ; }
}
@Operation ( summary = "거주자 의견진술 자료 등록", description = "거주자 의견진술 자료 등록")
@Operation ( summary = "거주자 /장애인 의견진술 자료 등록", description = "거주자 /장애인 의견진술 자료 등록")
@PostMapping ( value = "/data" , consumes = MediaType . MULTIPART_FORM_DATA_VALUE )
@PostMapping ( value = "/data" , consumes = MediaType . MULTIPART_FORM_DATA_VALUE )
public ResponseEntity < ? extends IRestResponse > save Resident Data( @Nonnull GnRecallScDto dto ) {
public ResponseEntity < ? extends IRestResponse > save Judge Data( @Nonnull GnRecallScDto dto ) {
AssertUtils . isTrue ( ! Checks . isEmpty ( dto ) , "등록할 거주자 의견진술 자료가 존재하지 않습니다." ) ;
AssertUtils . isTrue ( ! Checks . isEmpty ( dto ) , "등록할 거주자 의견진술 자료가 존재하지 않습니다." ) ;
service . save Resident Data( dto ) ;
service . save Judge Data( dto ) ;
//service.saveResidentData(mapstruct.toEntity(dto), dto.getPicadFiles(), dto.getFrecadFiles(), dto.getContadFiles());
//service.saveResidentData(mapstruct.toEntity(dto), dto.getPicadFiles(), dto.getFrecadFiles(), dto.getContadFiles());
return RestResponse . of ( HttpStatus . OK ) ;
return RestResponse . of ( HttpStatus . OK ) ;
// return RestResponse.of(HttpStatus.OK);
// return RestResponse.of(HttpStatus.OK);
}
}
@Operation ( summary = "거주자 의견진술 상세" , description = "거주자 의견진술 상세")
@Operation ( summary = "거주자 /장애인 의견진술 자료 상세" , description = "거주자 /장애인 의견진술 자료 상세")
@Parameters ( {
@Parameters ( {
@Parameter ( in = ParameterIn . PATH , name = "scCode" , description = "의견진술번호" , required = true , example = "3778" ) ,
@Parameter ( in = ParameterIn . PATH , name = "scCode" , description = "의견진술번호" , required = true , example = "3778" ) ,
} )
} )
@GetMapping ( value = "/ {scCode}", produces = MediaType . APPLICATION_JSON_VALUE )
@GetMapping ( value = "/ data/ {scCode}", produces = MediaType . APPLICATION_JSON_VALUE )
public ResponseEntity < ? extends IRestResponse > find Resident ( @PathVariable final Long scCode ) {
public ResponseEntity < ? extends IRestResponse > find JudgeData ( @PathVariable final Long scCode ) {
return RestResponse . of ( service . find Resident Data( scCode ) ) ;
return RestResponse . of ( service . find Judge Data( scCode ) ) ;
}
}
@Operation ( summary = "거주자 의견진술 심의대상 조회" , description = "거주자 의견진술 심의대상 조회")
@Operation ( summary = "거주자 /장애인 의견진술 심의대상 조회" , description = "거주자 /장애인 의견진술 심의대상 조회")
@GetMapping ( value = "/target" , produces = MediaType . APPLICATION_JSON_VALUE )
@GetMapping ( value = "/target" , produces = MediaType . APPLICATION_JSON_VALUE )
@Parameters ( {
@Parameters ( {
@Parameter ( in = ParameterIn . QUERY , name = "scDatagb" , description = "데이타구분(1-거주자, 2-장애인)" , required = true , example = "1" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "scDatagb" , description = "데이타구분(1-거주자, 2-장애인)" , required = true , example = "1" ) ,
@ -78,22 +82,22 @@ public class ResidentController {
@Parameter ( in = ParameterIn . QUERY , name = "scSeq1" , description = "접수번호-시작" , required = true , example = "2022200801" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "scSeq1" , description = "접수번호-시작" , required = true , example = "2022200801" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "scSeq2" , description = "접수번호-종료" , required = true , example = "2022200899" ) ,
@Parameter ( in = ParameterIn . QUERY , name = "scSeq2" , description = "접수번호-종료" , required = true , example = "2022200899" ) ,
} )
} )
public ResponseEntity < ? extends IRestResponse > findResidentJudgeTargets ( @Parameter ( hidden = true ) final Resident TargetDto dto ) {
public ResponseEntity < ? extends IRestResponse > findResidentJudgeTargets ( @Parameter ( hidden = true ) final Judge TargetDto dto ) {
return RestResponse . of ( service . find Resident JudgeTargets( dto ) ) ;
return RestResponse . of ( service . find JudgeTargets( dto ) ) ;
}
}
@Operation ( summary = "거주자 의견진술 심의대상 등록" , description = "거주자 의견진술 심의대상 등록")
@Operation ( summary = "거주자 /징애인 의견진술 심의대상 등록" , description = "거주자 /장애인 의견진술 심의대상 등록")
@PostMapping ( value = "/target" , produces = MediaType . APPLICATION_JSON_VALUE )
@PostMapping ( value = "/target" , produces = MediaType . APPLICATION_JSON_VALUE )
public ResponseEntity < ? extends IRestResponse > save Resident JudgeTargets(
public ResponseEntity < ? extends IRestResponse > save JudgeTargets(
@Valid
@Valid
@RequestBody
@RequestBody
final Resident TargetDto dto ) {
final Judge TargetDto dto ) {
service . save Resident JudgeTargets( dto ) ;
service . save JudgeTargets( dto ) ;
//service.saveParkingSimsaJudgeTargets(dto);
//service.saveParkingSimsaJudgeTargets(dto);
return RestResponse . of ( HttpStatus . OK ) ;
return RestResponse . of ( HttpStatus . OK ) ;
}
}
@Operation ( summary = "거주자 의견진술 심의 목록" , description = "거주자 의견진술 심의 목록")
@Operation ( summary = "거주자 /장애인 의견진술 심의목록 조회 " , description = "거주자 /장애인 의견진술 심의목록 조회 ")
@Parameters ( {
@Parameters ( {
@Parameter ( in = ParameterIn . QUERY , name = "scYear" , description = "심사년도" , required = true , example = "2021" ) ,
@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 = "scChasu" , description = "차수" , required = false , example = " " ) ,
@ -108,7 +112,7 @@ public class ResidentController {
final JudgeListDto dto ,
final JudgeListDto dto ,
@Parameter ( hidden = true )
@Parameter ( hidden = true )
final Pageable pageable ) {
final Pageable pageable ) {
return RestResponse . of ( service . find Resident s( dto , pageable ) ) ;
return RestResponse . of ( service . find Judge s( dto , pageable ) ) ;
}
}
}
}