From 9fb4a259558c3133459ac16a22cf3da440ca03f9 Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Mon, 2 Feb 2026 14:56:04 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EC=9C=A0=EC=9D=B8=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99=20API=20=EC=8B=A4=ED=83=9C=EC=A1=B0=EC=82=AC=20?= =?UTF-8?q?=EC=A0=81=ED=95=A9=EC=97=AC=EB=B6=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gukyuin/GukYuinApiController.java | 61 +++++++++++++++ .../gukyuin/dto/ChngDetectMastDto.java | 60 +++++++++++++++ .../gukyuin/service/GukYuinApiService.java | 75 ++++++++++++++++++- 3 files changed, 195 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/gukyuin/GukYuinApiController.java b/src/main/java/com/kamco/cd/kamcoback/gukyuin/GukYuinApiController.java index 19f0783f..dbdf9a0e 100644 --- a/src/main/java/com/kamco/cd/kamcoback/gukyuin/GukYuinApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/gukyuin/GukYuinApiController.java @@ -187,6 +187,29 @@ public class GukYuinApiController { return ApiResponseDto.ok(gukYuinApiService.findChnContList(chnDtctId, pageIndex, pageSize)); } + @Operation(summary = "탐지객체 조회 (탐지객체 1건 조회)", description = "탐지객체 조회 (탐지객체 1건 조회)") + @GetMapping("/chn/cont/{chnDtctId}/objt/{chnDtctObjtId}") + @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 ApiResponseDto findChnPnuToContObject( + @PathVariable String chnDtctId, + @PathVariable String chnDtctObjtId, + @RequestParam(defaultValue = "0") Integer pageIndex, + @RequestParam(defaultValue = "10") Integer pageSize) { + return ApiResponseDto.ok( + gukYuinApiService.findChnPnuToContObject(chnDtctId, chnDtctObjtId, pageIndex, pageSize)); + } + @Operation(summary = "탐지객체 조회 (PNU에 해당하는 탐지객체)", description = "탐지객체 조회 (PNU에 해당하는 탐지객체)") @GetMapping("/chn/cont/{chnDtctId}/pnu/{pnu}") @ApiResponses( @@ -259,4 +282,42 @@ public class GukYuinApiController { @Parameter(description = "어제 날짜", example = "2026-01-29") LocalDate yesterday) { return ApiResponseDto.ok(gukYuinApiService.findLabelingCompleteSendList(yesterday)); } + + @Operation(summary = "탐지객체 적합여부 조회 (리스트조회)", description = "탐지객체 적합여부 조회 (리스트조회)") + @GetMapping("/rlb/dtct/{chnDtctId}") + @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 ApiResponseDto findRlbDtctList( + @PathVariable String chnDtctId) { + return ApiResponseDto.ok(gukYuinApiService.findRlbDtctList(chnDtctId)); + } + + @Operation(summary = "탐지객체 적합여부 조회 (리스트조회)", description = "탐지객체 적합여부 조회 (리스트조회)") + @GetMapping("/rlb/objt/{chnDtctObjtId}") + @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 ApiResponseDto findRlbDtctObject( + @PathVariable String chnDtctObjtId) { + return ApiResponseDto.ok(gukYuinApiService.findRlbDtctObject(chnDtctObjtId)); + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/gukyuin/dto/ChngDetectMastDto.java b/src/main/java/com/kamco/cd/kamcoback/gukyuin/dto/ChngDetectMastDto.java index caacc7c6..644b77b7 100644 --- a/src/main/java/com/kamco/cd/kamcoback/gukyuin/dto/ChngDetectMastDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/gukyuin/dto/ChngDetectMastDto.java @@ -228,4 +228,64 @@ public class ChngDetectMastDto { private String error; private String path; } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + public static class RlbDtctDto { + + private Integer code; + private String message; + private List result; + private Boolean success; + } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + public static class RlbDtctMastDto { + + private String pnuDtctId; + private String pnu; + private String lrmSyncYmd; + private String pnuSyncYmd; + private String mpqdNo; // 도엽번호 + private String cprsYr; // 비교년도 + private String crtrYr; // 기준년도 + private String chnDtctSno; // 회차 + private String chnDtctId; + + private String chnDtctMstId; + private String chnDtctObjtId; + private String chnDtctContId; + private String chnCd; + private String chnDtctProb; + + private String bfClsCd; // 이전분류코드 + private String bfClsProb; // 이전분류정확도 + private String afClsCd; // 이후분류코드 + private String afClsProb; // 이후분류정확도 + + private String pnuSqms; + private String pnuDtctSqms; + private String chnDtctSqms; + private String stbltYn; + private String incyCd; + private String incyRsnCont; + private String lockYn; + private String lblYn; + private String chgYn; + private String rsatctNo; + private String rmk; + + private String crtDt; // 생성일시 + private String crtEpno; // 생성사원번호 + private String crtIp; // 생성사원아이피 + private String chgDt; + private String chgEpno; + private String chgIp; + private String delYn; // 삭제여부 + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/gukyuin/service/GukYuinApiService.java b/src/main/java/com/kamco/cd/kamcoback/gukyuin/service/GukYuinApiService.java index 9d1a42e5..e3dba75e 100644 --- a/src/main/java/com/kamco/cd/kamcoback/gukyuin/service/GukYuinApiService.java +++ b/src/main/java/com/kamco/cd/kamcoback/gukyuin/service/GukYuinApiService.java @@ -19,6 +19,7 @@ import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ErrorResDto; import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.LabelSendDto; import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn; import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResultDto; +import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.RlbDtctDto; import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.GukYuinLinkFacts; import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.GukYuinLinkFailCode; import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto.GukYuinLinkableRes; @@ -250,7 +251,11 @@ public class GukYuinApiService { List contList = result.body().getResult(); if (contList == null || contList.isEmpty()) { - return new ResultContDto(); + return new ResultContDto( + result.body().getCode(), + result.body().getMessage(), + result.body().getResult(), + result.body().getSuccess()); } for (ContBasic cont : contList) { @@ -429,4 +434,72 @@ public class GukYuinApiService { public List findLabelingCompleteSendList(LocalDate yesterday) { return gukyuinCoreService.findLabelingCompleteSendList(yesterday); } + + public ResultContDto findChnPnuToContObject( + String chnDtctId, String chnDtctObjtId, Integer pageIndex, Integer pageSize) { + + String url = + gukyuinCdiUrl + + "/chn/cont/" + + chnDtctId + + "/chnDtctObjtId/" + + chnDtctObjtId + + "?pageIndex=" + + pageIndex + + "&pageSize=" + + pageSize; + + ExternalCallResult result = + externalHttpClient.call( + url, + HttpMethod.GET, + null, + netUtils.jsonHeaders(), + ChngDetectContDto.ResultContDto.class); + + this.insertGukyuinAuditLog( + EventType.DETAIL.getId(), + netUtils.getLocalIP(), + userUtil.getId(), + url.replace(gukyuinUrl, ""), + null, + result.body() != null && result.body().getSuccess()); + return result.body(); + } + + public ChngDetectMastDto.RlbDtctDto findRlbDtctList(String chnDtctId) { + + String url = gukyuinCdiUrl + "/rlb/dtct/" + chnDtctId; + + ExternalCallResult result = + externalHttpClient.call( + url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class); + + this.insertGukyuinAuditLog( + EventType.LIST.getId(), + netUtils.getLocalIP(), + userUtil.getId(), + url.replace(gukyuinUrl, ""), + null, + result.body() != null && result.body().getSuccess()); + return result.body(); + } + + public RlbDtctDto findRlbDtctObject(String chnDtctObjtId) { + + String url = gukyuinCdiUrl + "/rlb/objt/" + chnDtctObjtId; + + ExternalCallResult result = + externalHttpClient.call( + url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class); + + this.insertGukyuinAuditLog( + EventType.DETAIL.getId(), + netUtils.getLocalIP(), + userUtil.getId(), + url.replace(gukyuinUrl, ""), + null, + result.body() != null && result.body().getSuccess()); + return result.body(); + } }