feat: 심사자 - 거주자/장애인 심의대상 조회 반영

dev
minuk926 3 years ago
parent 158cc9bf18
commit f8741c4416

@ -18,6 +18,10 @@ public class CtgyConstants {
DATA_STATE_ACCEPT("3", "수용"), DATA_STATE_ACCEPT("3", "수용"),
DATA_STATE_NON_ACCEPT("4", "미수용"), DATA_STATE_NON_ACCEPT("4", "미수용"),
// 심의결과코드
RESULT_JUDGE_PRE("0", "심의전"),
RESULT_JUDGE_IMPOSE("0", "부과"),
RESULT_JUDGE_NON_IMPOSE("0", "미부과"),
// 데이타구분 // 데이타구분
DATAGB_RESIDENT("1", "거주자"), DATAGB_RESIDENT("1", "거주자"),
DATAGB_DISABLED("2", "장애인") DATAGB_DISABLED("2", "장애인")

@ -2,6 +2,8 @@ package com.xit.biz.ctgy.controller;
import com.xit.biz.ctgy.dto.BoardDto; import com.xit.biz.ctgy.dto.BoardDto;
import com.xit.biz.ctgy.service.IBoardService; import com.xit.biz.ctgy.service.IBoardService;
import com.xit.core.annotation.Secured;
import com.xit.core.annotation.SecurityPolicy;
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;
@ -32,6 +34,7 @@ public class BoardController {
// TODO :: 파라메터 정의 필요 // TODO :: 파라메터 정의 필요
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "게시글 목록 조회" , description = "게시글 목록 조회") @Operation(summary = "게시글 목록 조회" , description = "게시글 목록 조회")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "ciTitle", description = "제목", required = false, example = " "), @Parameter(in = ParameterIn.QUERY, name = "ciTitle", description = "제목", required = false, example = " "),
@ -48,6 +51,7 @@ public class BoardController {
return RestResponse.of(service.findAll(dto, pageable)); return RestResponse.of(service.findAll(dto, pageable));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "게시글 조회수 증가" , description = "게시글 조회수 증가") @Operation(summary = "게시글 조회수 증가" , description = "게시글 조회수 증가")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.PATH, name = "ciCode", description = "게시글번호", required = true, example = "18"), @Parameter(in = ParameterIn.PATH, name = "ciCode", description = "게시글번호", required = true, example = "18"),
@ -57,6 +61,7 @@ public class BoardController {
return RestResponse.of(service.modifyByCiCode(ciCode)); return RestResponse.of(service.modifyByCiCode(ciCode));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "게시글 등록" , description = "게시글 등록") @Operation(summary = "게시글 등록" , description = "게시글 등록")
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> saveBoard(BoardDto dto) { public ResponseEntity<? extends IRestResponse> saveBoard(BoardDto dto) {
@ -64,6 +69,7 @@ public class BoardController {
return RestResponse.of(HttpStatus.OK); return RestResponse.of(HttpStatus.OK);
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "게시글 삭제", description = "게시글 삭제") @Operation(summary = "게시글 삭제", description = "게시글 삭제")
@PostMapping(value = "/{ciCode}") @PostMapping(value = "/{ciCode}")
public ResponseEntity<? extends IRestResponse> removeBoard(@PathVariable @Nonnull final Long ciCode) { public ResponseEntity<? extends IRestResponse> removeBoard(@PathVariable @Nonnull final Long ciCode) {

@ -36,6 +36,7 @@ public class MinUserController {
private final MinUserinfoMapstruct mapstruct = Mappers.getMapper(MinUserinfoMapstruct.class); private final MinUserinfoMapstruct mapstruct = Mappers.getMapper(MinUserinfoMapstruct.class);
// TODO :: 파라메터 정의 필요 // TODO :: 파라메터 정의 필요
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "사용자 목록 조회" , description = "사용자 목록 조회") @Operation(summary = "사용자 목록 조회" , description = "사용자 목록 조회")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "userid", description = "사용자ID", required = false, example = " "), @Parameter(in = ParameterIn.QUERY, name = "userid", description = "사용자ID", required = false, example = " "),
@ -68,6 +69,7 @@ public class MinUserController {
return RestResponse.of(service.findMinUserByUserid(userid)); return RestResponse.of(service.findMinUserByUserid(userid));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "사용자 정보 저장" , description = "사용자 정보 저장") @Operation(summary = "사용자 정보 저장" , description = "사용자 정보 저장")
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> saveMinUser( public ResponseEntity<? extends IRestResponse> saveMinUser(
@ -77,6 +79,7 @@ public class MinUserController {
return RestResponse.of(HttpStatus.OK); return RestResponse.of(HttpStatus.OK);
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "사용자 삭제" , description = "사용자 삭제") @Operation(summary = "사용자 삭제" , description = "사용자 삭제")
@PutMapping(produces = MediaType.APPLICATION_JSON_VALUE) @PutMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> removeMinUser( public ResponseEntity<? extends IRestResponse> removeMinUser(

@ -5,6 +5,8 @@ import com.xit.biz.ctgy.dto.ParkingTargetDto;
import com.xit.biz.ctgy.dto.struct.JudgeListMapstruct; import com.xit.biz.ctgy.dto.struct.JudgeListMapstruct;
import com.xit.biz.ctgy.dto.struct.MinSimsa680Mapstruct; import com.xit.biz.ctgy.dto.struct.MinSimsa680Mapstruct;
import com.xit.biz.ctgy.service.IParkingService; import com.xit.biz.ctgy.service.IParkingService;
import com.xit.core.annotation.Secured;
import com.xit.core.annotation.SecurityPolicy;
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 io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -35,6 +37,11 @@ public class ParkingController {
private final MinSimsa680Mapstruct mapstruct = Mappers.getMapper(MinSimsa680Mapstruct.class); private final MinSimsa680Mapstruct mapstruct = Mappers.getMapper(MinSimsa680Mapstruct.class);
private final JudgeListMapstruct groupMapstruct = Mappers.getMapper(JudgeListMapstruct.class); private final JudgeListMapstruct groupMapstruct = Mappers.getMapper(JudgeListMapstruct.class);
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "주정차 의견진술 심의 목록" , description = "주정차 의견진술 심의 목록") @Operation(summary = "주정차 의견진술 심의 목록" , description = "주정차 의견진술 심의 목록")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msYear", description = "심사년도", required = true, example = "2021"), @Parameter(in = ParameterIn.QUERY, name = "msYear", description = "심사년도", required = true, example = "2021"),
@ -53,6 +60,7 @@ public class ParkingController {
return RestResponse.of(service.findParkings(dto, pageable)); return RestResponse.of(service.findParkings(dto, pageable));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "주정차 의견진술 심의 결과" , description = "주정차 의견진술 심의 결과") @Operation(summary = "주정차 의견진술 심의 결과" , description = "주정차 의견진술 심의 결과")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-01-04"), @Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-01-04"),
@ -68,6 +76,7 @@ public class ParkingController {
return RestResponse.of(service.findParkingResults(dto)); return RestResponse.of(service.findParkingResults(dto));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "주정차 의견진술 심의대상 조회" , description = "주정차 의견진술 심의대상 조회") @Operation(summary = "주정차 의견진술 심의대상 조회" , description = "주정차 의견진술 심의대상 조회")
@GetMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value="/target", produces = MediaType.APPLICATION_JSON_VALUE)
@Parameters({ @Parameters({
@ -79,6 +88,7 @@ public class ParkingController {
return RestResponse.of(service.findParkingJudgeTargets(dto)); return RestResponse.of(service.findParkingJudgeTargets(dto));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@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> saveParkinJudgeTargets( public ResponseEntity<? extends IRestResponse> saveParkinJudgeTargets(
@ -89,6 +99,7 @@ public class ParkingController {
return RestResponse.of(HttpStatus.OK); return RestResponse.of(HttpStatus.OK);
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "주정차 의견진술 심의 자료 삭제" , description = "주정차 의견진술 심의 자료 삭제") @Operation(summary = "주정차 의견진술 심의 자료 삭제" , description = "주정차 의견진술 심의 자료 삭제")
@PostMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> removeParkinJudge( public ResponseEntity<? extends IRestResponse> removeParkinJudge(
@ -99,5 +110,8 @@ public class ParkingController {
return RestResponse.of(HttpStatus.OK); return RestResponse.of(HttpStatus.OK);
} }
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
} }

@ -3,6 +3,8 @@ package com.xit.biz.ctgy.controller;
import com.xit.biz.ctgy.dto.MinInfoBoard680Dto; import com.xit.biz.ctgy.dto.MinInfoBoard680Dto;
import com.xit.biz.ctgy.dto.struct.MinInfoBoard680Mapstruct; import com.xit.biz.ctgy.dto.struct.MinInfoBoard680Mapstruct;
import com.xit.biz.ctgy.service.IPublicBoardService; import com.xit.biz.ctgy.service.IPublicBoardService;
import com.xit.core.annotation.Secured;
import com.xit.core.annotation.SecurityPolicy;
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 io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -30,6 +32,7 @@ public class PublicBoardController {
private final MinInfoBoard680Mapstruct mapstruct = Mappers.getMapper(MinInfoBoard680Mapstruct.class); private final MinInfoBoard680Mapstruct mapstruct = Mappers.getMapper(MinInfoBoard680Mapstruct.class);
// TODO :: 파라메터 정의 필요 // TODO :: 파라메터 정의 필요
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "공지사항 목록 조회" , description = "공지사항 목록 조회") @Operation(summary = "공지사항 목록 조회" , description = "공지사항 목록 조회")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "inTitle", description = "제목", required = false, example = " "), @Parameter(in = ParameterIn.QUERY, name = "inTitle", description = "제목", required = false, example = " "),
@ -46,6 +49,7 @@ public class PublicBoardController {
return RestResponse.of(service.findAll(mapstruct.toEntity(dto), pageable)); return RestResponse.of(service.findAll(mapstruct.toEntity(dto), pageable));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "공지사항상세" , description = "공지사항상세") @Operation(summary = "공지사항상세" , description = "공지사항상세")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.PATH, name = "inCode", description = "공지사항번호", required = true, example = "18"), @Parameter(in = ParameterIn.PATH, name = "inCode", description = "공지사항번호", required = true, example = "18"),
@ -55,6 +59,7 @@ public class PublicBoardController {
return RestResponse.of(service.findByInCode(inCode)); return RestResponse.of(service.findByInCode(inCode));
} }
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "공지사항 조회수 증가" , description = "공지사항 조회수 증가") @Operation(summary = "공지사항 조회수 증가" , description = "공지사항 조회수 증가")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.PATH, name = "inCode", description = "공지사항번호", required = true, example = "18"), @Parameter(in = ParameterIn.PATH, name = "inCode", description = "공지사항번호", required = true, example = "18"),

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

@ -41,4 +41,16 @@ public class JudgeListDto {
@Schema(title = "심사팀코드", example = " ", description = "심사팀코드") @Schema(title = "심사팀코드", example = " ", description = "심사팀코드")
private String msuTeam; private String msuTeam;
@Schema(title = "민원코드", example = " ", description = "민원코드")
private Long msMainCode;
@Schema(title = "접수번호", example = " ", description = "접수번호")
private String msSeq;
@Schema(title = "차량번호", example = " ", description = "차량번호")
private String msCarnum;
@Schema(title = "민원별 심사결과", example = " ", description = "심의건별 심사결과")
private String msResult;
@Schema(title = "심사자별 심사결과", example = " ", description = "심사자별 심사결과")
private String msuResult;
} }

@ -13,7 +13,9 @@ import org.springframework.transaction.annotation.Transactional;
* : scDatagb = "2" * : scDatagb = "2"
*/ */
public interface IResidentAndDisabledRepository extends JpaRepository<GnRecallSc, Long>, IResidentAndDisabledRepositoryCustom { public interface IResidentAndDisabledRepository extends JpaRepository<GnRecallSc, Long>, IResidentAndDisabledRepositoryCustom {
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
// TODO : Ansi - sql 미사용, 채번테이블 사용하도록 변경 필요 // TODO : Ansi - sql 미사용, 채번테이블 사용하도록 변경 필요
//@Query(value = "SELECT max(e.sc_code) + 1 FROM gn_recall_sc e, nativeQuery = true) //@Query(value = "SELECT max(e.sc_code) + 1 FROM gn_recall_sc e, nativeQuery = true)
@ -37,4 +39,8 @@ public interface IResidentAndDisabledRepository extends JpaRepository<GnRecallSc
@Modifying @Modifying
@Query(value = "UPDATE #{#entityName} m SET m.scTransfer = '1', m.scState = '1' WHERE m.scDatagb = :scDatagb AND m.scCode = :msMaincode") @Query(value = "UPDATE #{#entityName} m SET m.scTransfer = '1', m.scState = '1' WHERE m.scDatagb = :scDatagb AND m.scCode = :msMaincode")
int updateScTransferAndScState(@Param("scDatagb") String scDatagb, @Param("msMaincode")Long msMaincode); int updateScTransferAndScState(@Param("scDatagb") String scDatagb, @Param("msMaincode")Long msMaincode);
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
} }

@ -16,6 +16,9 @@ import java.util.List;
* : scDatagb = "2" * : scDatagb = "2"
*/ */
public interface IResidentAndDisabledRepositoryCustom { public interface IResidentAndDisabledRepositoryCustom {
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
/** /**
* / * /
@ -53,4 +56,9 @@ public interface IResidentAndDisabledRepositoryCustom {
*/ */
List<JudgeTargetDto> findJudgeTargets(final JudgeTargetDto dto); List<JudgeTargetDto> findJudgeTargets(final JudgeTargetDto dto);
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
List<JudgeListDto> findByUserJudges(JudgeListDto dto);
} }

@ -12,6 +12,7 @@ import com.xit.biz.ctgy.dto.GnRecallScDto;
import com.xit.biz.ctgy.dto.JudgeDetailDto; import com.xit.biz.ctgy.dto.JudgeDetailDto;
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.JudgeTargetDto;
import com.xit.core.oauth2.utils.HeaderUtil;
import com.xit.core.util.Checks; import com.xit.core.util.Checks;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
@ -35,9 +36,12 @@ import static com.xit.biz.ctgy.entity.QMinUserinfo.minUserinfo;
*/ */
@RequiredArgsConstructor @RequiredArgsConstructor
public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledRepositoryCustom { public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledRepositoryCustom {
private final JPAQueryFactory queryFactory; private final JPAQueryFactory queryFactory;
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
@Override @Override
public Page<GnRecallScDto> findJudgeDatas(@NotNull final String scDatagb, Pageable pageable) { public Page<GnRecallScDto> findJudgeDatas(@NotNull final String scDatagb, Pageable pageable) {
@ -310,4 +314,44 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
if(Checks.isEmpty(seq)) return null; if(Checks.isEmpty(seq)) return null;
return gnRecallSc.scSeq.lt(seq); return gnRecallSc.scSeq.lt(seq);
} }
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
@Override
public List<JudgeListDto> findByUserJudges(final JudgeListDto dto) {
BooleanBuilder builder = new BooleanBuilder();
builder.and(minSimsa680Sc.msDatagb.eq(dto.getMsDatagb()));
// TODO : test를 위하 임시로 코멘트 처리
//builder.and(minSimsaUser680Sc.msuUserid.eq(HeaderUtil.getUserId()));
// 심의전
builder.and(minSimsa680Sc.msResult.eq(CtgyConstants.Judge.RESULT_JUDGE_PRE.getCode()));
return queryFactory
.select(Projections.fields(
JudgeListDto.class,
minSimsa680Sc.msMaincode,
minSimsa680Sc.msSeq,
minSimsa680Sc.msCarnum,
minSimsa680Sc.msResult,
minSimsaUser680Sc.msuResult,
minSimsa680Sc.msYear,
minSimsa680Sc.msChasu,
minSimsa680Sc.msSdate,
minSimsa680Sc.msStartsi,
minSimsa680Sc.msEdate,
minSimsa680Sc.msCdate,
minSimsa680Sc.msClosesi,
minSimsa680Sc.msDatagb
))
.from(minSimsa680Sc)
.join(minSimsaUser680Sc)
.on(minSimsa680Sc.msMaincode.eq(minSimsaUser680Sc.msuMaincode))
.where(builder)
//.groupBy(minSimsa680Sc.msDatagb, minSimsa680Sc.msYear, minSimsaUser680Sc.msuUserid, minSimsa680Sc.msChasu, minSimsa680Sc.msSdate, minSimsa680Sc.msStartsi, minSimsa680Sc.msEdate, minSimsa680Sc.msCdate, minSimsa680Sc.msClosesi)
.orderBy(minSimsa680Sc.msYear.desc(), minSimsa680Sc.msChasu.desc())
.fetch();
}
} }

@ -16,7 +16,9 @@ import java.util.Map;
* : scDatagb = "2" * : scDatagb = "2"
*/ */
public interface IResidentAndDisabledService { public interface IResidentAndDisabledService {
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
/** /**
* / * /
@ -75,4 +77,9 @@ public interface IResidentAndDisabledService {
void removeJudge(final JudgeListDto dto); void removeJudge(final JudgeListDto dto);
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
List<JudgeListDto> findByUserJudges(JudgeListDto dto);
} }

@ -62,6 +62,9 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
private final ICmmFileService fileService; private final ICmmFileService fileService;
private final EntityManager entityManager; private final EntityManager entityManager;
//---------------------------------------------------------------------------------
// 관리자
//---------------------------------------------------------------------------------
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public Page<GnRecallScDto> findJudgeDatas(@NotNull final String scDatagb, Pageable pageable) { public Page<GnRecallScDto> findJudgeDatas(@NotNull final String scDatagb, Pageable pageable) {
@ -276,4 +279,14 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
private void changeFileUpload(GnRecallScDto dto, MultipartFile[] mfs) { private void changeFileUpload(GnRecallScDto dto, MultipartFile[] mfs) {
fileService.uploadFiles(mfs, rootPath, CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(dto.getScDatagb())? uploadPath[0] : uploadPath[1]); fileService.uploadFiles(mfs, rootPath, CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(dto.getScDatagb())? uploadPath[0] : uploadPath[1]);
} }
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------
@Override
@Transactional(readOnly = true)
public List<JudgeListDto> findByUserJudges(JudgeListDto dto) {
return gnReacallRepository.findByUserJudges(dto);
}
} }

@ -17,7 +17,7 @@ api:
file: file:
cmm: cmm:
upload: upload:
root: /data/file/upload root: c:/data/file/upload
# root: /Users/minuk/data/file/upload # root: /Users/minuk/data/file/upload
# 공지사항 # 공지사항
path: /kangnamSIM/simUpFile path: /kangnamSIM/simUpFile

Loading…
Cancel
Save