Innopam -> gukyuin 이름 변경
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
package com.kamco.cd.kamcoback.gukyuin;
|
||||
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ChnDetectMastReqDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ChngDetectMastSearchDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.DetectMastDto.Basic;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.DetectMastDto.DetectMastReq;
|
||||
import com.kamco.cd.kamcoback.gukyuin.service.GukYuinApiService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "국유인 연동 API", description = "국유인 연동 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/gukyuin/")
|
||||
public class GukYuinApiController {
|
||||
|
||||
private final GukYuinApiService gukYuinApiService;
|
||||
|
||||
/** 탐지결과 등록 */
|
||||
@Operation(summary = "탐지결과 등록", description = "탐지결과 등록")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "등록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = DetectMastReq.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/mast/regist")
|
||||
public ChngDetectMastDto.Basic regist(
|
||||
@RequestBody @Valid ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||
return gukYuinApiService.regist(chnDetectMastReq);
|
||||
}
|
||||
|
||||
@Operation(summary = "탐지결과 삭제", description = "탐지결과 삭제")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "등록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = ChnDetectMastReqDto.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/mast/remove")
|
||||
public ResReturn remove(
|
||||
@RequestBody @Valid ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||
return gukYuinApiService.remove(chnDetectMastReq);
|
||||
}
|
||||
|
||||
@Operation(summary = "탐지결과 등록목록 조회", description = "탐지결과 등록목록 조회")
|
||||
@GetMapping("/mast/list")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "목록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
public List<ChngDetectMastDto.Basic> selectChangeDetectionList(
|
||||
@RequestParam(required = false) String chnDtctId,
|
||||
@RequestParam(required = false) String cprsYr,
|
||||
@RequestParam(required = false) String crtrYr,
|
||||
@RequestParam(required = false) String chnDtctSno) {
|
||||
ChngDetectMastSearchDto searchDto = new ChngDetectMastSearchDto();
|
||||
searchDto.setChnDtctId(chnDtctId);
|
||||
searchDto.setCprsYr(cprsYr);
|
||||
searchDto.setCrtrYr(crtrYr);
|
||||
searchDto.setChnDtctSno(chnDtctSno);
|
||||
return gukYuinApiService.list(searchDto);
|
||||
}
|
||||
|
||||
public ApiResponseDto<Boolean> getIsLinkGukYuin(UUID uuid) {
|
||||
gukYuinApiService.getIsLinkGukYuin(uuid);
|
||||
return ApiResponseDto.ok(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user