forked from kimhyungsik/ax_hub_mcp_tool
Refactor: rename modules to was and remove MCP gateway integration
This commit is contained in:
8
dap-was-oth/Dockerfile
Normal file
8
dap-was-oth/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY dap-tool-oth/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8084
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
12
dap-was-oth/build.gradle
Normal file
12
dap-was-oth/build.gradle
Normal file
@@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':dap-was-lib')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_O;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.converter
|
||||
* @className MetaCommonCodeConverter
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface MetaCommonCodeConverter {
|
||||
@Mapping(target = "csNo", source = "groupCode", defaultValue = "GRP_COMM_CD")
|
||||
CLCNNB00001_I toLegacyRequest(MetaCommonCodeRequest req);
|
||||
|
||||
@Mapping(target = "codeList", ignore = true)
|
||||
MetaCommonCodeResponse toResponse(CLCNNB00001_O mciRes);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_O;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.converter
|
||||
* @className MetaTableConverter
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface MetaTableConverter {
|
||||
@Mapping(target = "csNo", source = "tableName", defaultValue = "TB_META_BAS")
|
||||
CLCNNB00001_I toLegacyRequest(MetaTableRequest req);
|
||||
|
||||
@Mapping(target = "tableList", ignore = true)
|
||||
MetaTableResponse toResponse(CLCNNB00001_O mciRes);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BalanceRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BalanceRequest {
|
||||
@McpParameter(description = "고객의 계좌번호 (- 제외) ", required = true)
|
||||
@McpValidation(pattern = "\\S")
|
||||
private String accountNumber;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BalanceResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BalanceResponse {
|
||||
private String status;
|
||||
private String message;
|
||||
private String accountNumber;
|
||||
private long balance;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BillingProcessRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BillingProcessRequest {
|
||||
|
||||
@McpParameter(description = "처리할 청구 접수 번호", required = true)
|
||||
@McpValidation(pattern = "\\S")
|
||||
private String billingId;
|
||||
|
||||
@McpParameter(description = "심사 승인 여부 (예: APPROVE, REJECT)")
|
||||
@McpValidation(required = true, allowedValues = {"APPROVE", "REJECT"})
|
||||
private String approvalStatus;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BillingStatusRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BillingStatusRequest {
|
||||
|
||||
@McpParameter(description = "조회할 청구 접수 번호", required = true)
|
||||
private String billingId;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BondCheckRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BondCheckRequest {
|
||||
|
||||
@McpParameter(description = "확인하고자 하는 디지털 증권 발행 금액", required = true)
|
||||
private Long amount;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className BondIssueRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BondIssueRequest {
|
||||
|
||||
@McpParameter(description = "발행할 디지털 증권 금액", required = true)
|
||||
@McpValidation(minimum = 1)
|
||||
private Long amount;
|
||||
|
||||
@McpParameter(description = "발행 대상 계좌 번호", required = true)
|
||||
@McpValidation(pattern = "\\S")
|
||||
private String targetAccount;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpAnyOf;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 보험금 청구 조회 Tool의 입력 DTO 샘플이다.
|
||||
* 청구번호 또는 계약번호 중 하나를 반드시 입력받는다.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@McpAnyOf({"claimNo", "contractNo"})
|
||||
public class ClaimSearchRequest {
|
||||
|
||||
@McpParameter(description = "청구번호. CLM 다음 숫자 13자리 형식이다.")
|
||||
@McpValidation(pattern = "^CLM[0-9]{13}$", examples = {"CLM2026070100123"})
|
||||
private String claimNo;
|
||||
|
||||
@McpParameter(description = "계약번호. 숫자 11자리 형식이다.")
|
||||
@McpValidation(pattern = "^[0-9]{11}$", examples = {"10023456789"})
|
||||
private String contractNo;
|
||||
|
||||
@McpParameter(description = "청구 상태 필터")
|
||||
@McpValidation(allowedValues = {
|
||||
"RECEIVED", "REVIEWING", "ADDITIONAL_DOC_REQUIRED",
|
||||
"APPROVED", "PAID", "REJECTED", "WITHDRAWN"
|
||||
})
|
||||
private String status;
|
||||
|
||||
@McpParameter(description = "청구 유형 필터")
|
||||
@McpValidation(allowedValues = {
|
||||
"MEDICAL", "SURGERY", "HOSPITALIZATION",
|
||||
"DIAGNOSIS", "DEATH", "DISABILITY"
|
||||
})
|
||||
private String claimType;
|
||||
|
||||
@McpParameter(description = "접수일 조회 시작일(YYYY-MM-DD)")
|
||||
@McpValidation(format = "date", examples = {"2026-01-01"})
|
||||
private String fromDate;
|
||||
|
||||
@McpParameter(description = "접수일 조회 종료일(YYYY-MM-DD)")
|
||||
@McpValidation(format = "date", examples = {"2026-07-31"})
|
||||
private String toDate;
|
||||
|
||||
@McpParameter(description = "반환할 최대 건수")
|
||||
@McpValidation(minimum = 1, maximum = 50, defaultValue = "20")
|
||||
private Integer size;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpOutputSchema;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* Claim search response sample.
|
||||
* Complex response rules are defined by outputSchemaResource; annotations document
|
||||
* the same simple field constraints for automatic schema generation examples.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@McpOutputSchema
|
||||
public class ClaimSearchResponse {
|
||||
|
||||
@McpParameter(description = "Execution result code.")
|
||||
@McpValidation(required = true, allowedValues = {"SUCCESS", "FAILURE"})
|
||||
private String resultCode;
|
||||
|
||||
@McpParameter(description = "User-readable label for resultCode.")
|
||||
@McpValidation(required = true, maxLength = 100)
|
||||
private String resultLabel;
|
||||
|
||||
@McpParameter(description = "Current claim processing status code.")
|
||||
@McpValidation(required = true, allowedValues = {
|
||||
"RECEIVED", "REVIEWING", "ADDITIONAL_DOC_REQUIRED",
|
||||
"APPROVED", "PAID", "REJECTED", "WITHDRAWN"
|
||||
})
|
||||
private String status;
|
||||
|
||||
@McpParameter(description = "User-readable label for status.")
|
||||
@McpValidation(required = true, maxLength = 100)
|
||||
private String statusLabel;
|
||||
|
||||
@McpParameter(description = "Approved amount. Null before review; do not interpret null as zero.")
|
||||
@McpValidation(minimum = 0, nullable = true)
|
||||
private Long approvedAmount;
|
||||
|
||||
@McpParameter(description = "Present only when status is REJECTED; otherwise null.")
|
||||
@McpValidation(maxLength = 200, nullable = true)
|
||||
private String rejectionReason;
|
||||
|
||||
@McpParameter(description = "Claim summaries, ordered by received date descending.")
|
||||
@McpValidation(required = true)
|
||||
private List<ClaimSummary> items;
|
||||
|
||||
@McpParameter(description = "True when additional results exist beyond this response.")
|
||||
@McpValidation(required = true)
|
||||
private Boolean hasMore;
|
||||
|
||||
@McpParameter(description = "Total number of matched claims.")
|
||||
@McpValidation(required = true, minimum = 0)
|
||||
private Integer totalCount;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ClaimSummary {
|
||||
|
||||
@McpParameter(description = "Claim processing status code.")
|
||||
@McpValidation(required = true)
|
||||
private String status;
|
||||
|
||||
@McpParameter(description = "User-readable label for status.")
|
||||
@McpValidation(required = true)
|
||||
private String statusLabel;
|
||||
|
||||
@McpParameter(description = "Received date in YYYY-MM-DD format.")
|
||||
@McpValidation(required = true, format = "date")
|
||||
private String receivedDate;
|
||||
|
||||
@McpParameter(description = "Approved amount. Null before review; do not interpret null as zero.")
|
||||
@McpValidation(minimum = 0, nullable = true)
|
||||
private Long approvedAmount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className ContractDetailRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractDetailRequest {
|
||||
|
||||
@McpParameter(description = "고객명", required = true)
|
||||
private String customerName;
|
||||
|
||||
@McpParameter(description = "조회할 계약 번호", required = true)
|
||||
private String contractId;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className ContractStatusRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractStatusRequest {
|
||||
|
||||
@McpParameter(description = "고객명", required = true)
|
||||
private String customerName;
|
||||
|
||||
@McpParameter(description = "조회할 계약 번호")
|
||||
private String contractId;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className CustomerDetailRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CustomerDetailRequest {
|
||||
|
||||
@McpParameter(description = "고객명", required = true)
|
||||
private String customerName;
|
||||
|
||||
@McpParameter(description = "고객 식별 번호 (CID)")
|
||||
private String customerId;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className CustomerGradeRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CustomerGradeRequest {
|
||||
|
||||
@McpParameter(description = "고객 이름 (예: 김신한)", required = true)
|
||||
private String customerName;
|
||||
|
||||
@McpParameter(description = "고객 식별 번호 (CID)")
|
||||
private String customerId;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className LeaveCountRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class LeaveCountRequest {
|
||||
|
||||
@McpParameter(description = "연차 내역을 조회할 사원 번호", required = true)
|
||||
private String employeeId;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.glow.GlowMciFieldInfo;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className MciSampleStringResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MciSampleStringResponse {
|
||||
@GlowMciFieldInfo(order = 1, length = 10, description = "이름")
|
||||
private String name;
|
||||
|
||||
@GlowMciFieldInfo(order = 2, length = 3, description = "나이")
|
||||
private int age;
|
||||
|
||||
@GlowMciFieldInfo(order = 3, length = 8, description = "가입일자(YYYYMMDD)")
|
||||
private String joinDate;
|
||||
|
||||
@GlowMciFieldInfo(order = 4, length = 2, description = "상태코드")
|
||||
private String statusCode;
|
||||
|
||||
@GlowMciFieldInfo(order = 5, length = 30, description = "타겟 리스트", target = MciSampleTargetDto.class)
|
||||
private List<MciSampleTargetDto> targetList;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import io.shinhanlife.glow.GlowMciFieldInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className MciSampleTargetDto
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
*/
|
||||
@Data
|
||||
public class MciSampleTargetDto {
|
||||
@GlowMciFieldInfo(order = 1, length = 5, description = "항목 코드")
|
||||
private String itemCode;
|
||||
|
||||
@GlowMciFieldInfo(order = 2, length = 5, description = "항목 값")
|
||||
private String itemValue;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.dto
|
||||
* @className MetaCommonCodeRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MetaCommonCodeRequest {
|
||||
@McpParameter(description = "통합코드 그룹 ID (예: GRP_SYS_01, GRP_COMM_CD)", required = false)
|
||||
private String groupCode;
|
||||
|
||||
@McpParameter(description = "코드명 검색 키워드 (예: 사용, 상태)", required = false)
|
||||
private String codeName;
|
||||
|
||||
@McpParameter(description = "사용여부 (예: Y, N)", required = false)
|
||||
private String useYn;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.dto
|
||||
* @className MetaCommonCodeResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MetaCommonCodeResponse {
|
||||
private List<MetaCommonCodeItem> codeList;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class MetaCommonCodeItem {
|
||||
private String groupCode;
|
||||
private String code;
|
||||
private String codeName;
|
||||
private String codeDesc;
|
||||
private Integer sortSeq;
|
||||
private String useYn;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.dto
|
||||
* @className MetaTableRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MetaTableRequest {
|
||||
@McpParameter(description = "테이블 물리명 키워드 (예: TB_CUST_BAS, TB_CONT)", required = false)
|
||||
private String tableName;
|
||||
|
||||
@McpParameter(description = "테이블 논리명(한글) 키워드 (예: 고객기본, 계약)", required = false)
|
||||
private String tableLogicalName;
|
||||
|
||||
@McpParameter(description = "스키마/소유자명 (예: DAPADM, SHLOWN)", required = false)
|
||||
private String owner;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.dto
|
||||
* @className MetaTableResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MetaTableResponse {
|
||||
private List<MetaTableItem> tableList;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class MetaTableItem {
|
||||
private String owner;
|
||||
private String tableName;
|
||||
private String tableLogicalName;
|
||||
private String tableDesc;
|
||||
private Integer columnCount;
|
||||
private Long rowCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className SampleStringRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SampleStringRequest {
|
||||
private String query;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className SampleStringResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SampleStringResponse {
|
||||
@GlowTrgmField(order = 1, length = 10, description = "이름")
|
||||
private String name;
|
||||
|
||||
@GlowTrgmField(order = 2, length = 3, description = "나이")
|
||||
private int age;
|
||||
|
||||
@GlowTrgmField(order = 3, length = 8, description = "가입일자(YYYYMMDD)")
|
||||
private String joinDate;
|
||||
|
||||
@GlowTrgmField(order = 4, length = 2, description = "상태코드")
|
||||
private String statusCode;
|
||||
|
||||
@GlowTrgmField(order = 5, length = 10, description = "타겟")
|
||||
private String target;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className TemplateDownloadRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Builder
|
||||
@ToString
|
||||
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||
@AllArgsConstructor
|
||||
public class TemplateDownloadRequest {
|
||||
|
||||
/**
|
||||
* 다운로드할 템플릿의 종류 ID (예: CUSTOMER_EXCEL, PRODUCT_PDF 등)
|
||||
*/
|
||||
private String templateId;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import io.shinhanlife.dap.lib.annotation.McpValidation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className VacationRegisterRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VacationRegisterRequest {
|
||||
|
||||
@McpParameter(description = "연차를 등록할 사원 번호", required = true)
|
||||
@McpValidation(pattern = "\\S")
|
||||
private String employeeId;
|
||||
|
||||
@McpParameter(description = "휴가 일자 (YYYY-MM-DD 형식)", required = true)
|
||||
@McpValidation(pattern = "^\\d{4}-\\d{2}-\\d{2}$")
|
||||
private String date;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(routingType = "MCI", categoryKey = "cmm")
|
||||
public interface BalanceUseCase {
|
||||
@McpFunction(register = false, displayName = "balance 툴", name = "oth.cmm.balance.inquiry",
|
||||
description = "고객의 계좌 잔액을 조회합니다.",
|
||||
prompt = "고객 계좌 잔액을 조회해줘.",
|
||||
mappingId = "ACC_001"
|
||||
)
|
||||
Object execute(BalanceRequest req);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "MCI",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface BillingProcessUseCase {
|
||||
Object getStatus(BillingStatusRequest req);
|
||||
|
||||
@McpFunction(register = false, displayName = "process 툴", name = "oth.cmm.billing.process", description = "청구 처리", prompt = "현재 접수된 청구건에 대한 심사 처리를 진행해.", mappingId = "BILL_002")
|
||||
Object processBilling(BillingProcessRequest data);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "EAI",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface BondIssueUseCase {
|
||||
Object check(BondCheckRequest req);
|
||||
|
||||
@McpFunction(displayName = "issue 툴", name = "oth.cmm.bond.issue", register = false, description = "증권 발행 테스트1", prompt = "디지털 증권 발행 프로세스를 실행해.", mappingId = "BOND_002")
|
||||
Object issue(BondIssueRequest data);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ClaimSearchRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ClaimSearchResponse;
|
||||
|
||||
@McpTool(
|
||||
routingType = "DIRECT",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface ClaimSearchSchemaSampleUseCase {
|
||||
|
||||
@McpFunction(
|
||||
register = false,
|
||||
displayName = "Claim search JSON Schema sample",
|
||||
name = "oth.cmm.claim.search",
|
||||
description = "Claim search Tool sample using input and output JSON Schema resources.",
|
||||
prompt = "Search an insurance claim by claim number or contract number.",
|
||||
inputSchemaResource = "classpath:tool-schemas/cmm/claim-search-resource-input-schema.json",
|
||||
outputSchemaResource = "classpath:tool-schemas/cmm/claim-search-resource-output-schema.json",
|
||||
readOnlyHint = true,
|
||||
idempotentHint = true
|
||||
)
|
||||
ClaimSearchResponse search(ClaimSearchRequest request);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "HTTP",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface CommonUtilityUseCase {
|
||||
Object registerVacation(VacationRegisterRequest req);
|
||||
|
||||
@McpFunction(register = false, displayName = "get_leave_count 툴", name = "oth.cmm.leave.count", description = "연차 갯수 조회", prompt = "현재 사용 가능한 남은 연차 일수를 알려줘.", mappingId = "HR_VAC_02")
|
||||
Object getLeaveCount(LeaveCountRequest data);
|
||||
|
||||
@McpFunction(register = false, displayName = "secret_tool 툴", name = "oth.cmm.secret.execute", description = "비공개 툴 테스트", prompt = "숨겨진 툴 강제 호출", mappingId = "SECRET_001", visible = false)
|
||||
Object secretTool(LeaveCountRequest data);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "HTTP",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface ContractInquiryUseCase {
|
||||
Object getStatus(ContractStatusRequest req);
|
||||
|
||||
@McpFunction(register = false, displayName = "contract_detail 툴", name = "oth.cmm.contract.detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
||||
Object getDetail(ContractDetailRequest data);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "TCP",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface CustomerInfoUseCase {
|
||||
Object getGrade(CustomerGradeRequest req);
|
||||
|
||||
@McpFunction(register = false, displayName = "detail 툴", name = "oth.cmm.customer.detail", description = "고객상세 정보 조회", prompt = "이 고객의 상세 기본정보(주소, 연락처 등)를 알려줘.", mappingId = "CRM_002")
|
||||
Object getDetail(CustomerDetailRequest data);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeRequest;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.usecase
|
||||
* @className MetaCommonCodeUseCase
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@McpTool(
|
||||
routingType = "MCI",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface MetaCommonCodeUseCase {
|
||||
@McpFunction(
|
||||
displayName = "메타 통합코드 조회 툴",
|
||||
name = "oth.cmm.common-code.lookup",
|
||||
description = "메타 통합코드 목록을 조회해줘",
|
||||
prompt = "메타 통합코드 목록을 조회해줘",
|
||||
mappingId = "CLCNNB00001",
|
||||
register = false,
|
||||
requiresApproval = false,
|
||||
openWorldHint = true
|
||||
)
|
||||
Object execute(MetaCommonCodeRequest req);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableRequest;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.usecase
|
||||
* @className MetaTableUseCase
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@McpTool(
|
||||
routingType = "MCI",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface MetaTableUseCase {
|
||||
@McpFunction(
|
||||
displayName = "메타 테이블 조회 툴",
|
||||
name = "oth.cmm.meta.table",
|
||||
description = "메타 테이블 정보 목록을 조회해줘",
|
||||
prompt = "메타 테이블 정보 목록을 조회해줘",
|
||||
mappingId = "CLCNNB00001",
|
||||
register = false,
|
||||
requiresApproval = false,
|
||||
openWorldHint = true
|
||||
)
|
||||
Object execute(MetaTableRequest req);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@McpTool(
|
||||
routingType = "HTTP",
|
||||
categoryKey = "cmm"
|
||||
)
|
||||
public interface TemplateUtilityUseCase {
|
||||
@McpFunction(
|
||||
displayName = "템플릿 유틸리티",
|
||||
name = "oth.cmm.template.url",
|
||||
description = "요청한 템플릿(엑셀, 워드 등) 파일(양식)을 다운로드 받을 수 있는 시스템 URL을 반환합니다. AI는 이 URL을 사용자에게 마크다운 링크 형태로 제공해야 합니다.",
|
||||
prompt = "요청하신 템플릿 양식 파일 다운로드 URL은 다음과 같습니다. 클릭하여 다운로드하세요:"
|
||||
)
|
||||
Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest req);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className BalanceService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BalanceUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BalanceRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BalanceUseCaseImpl extends AbstractMcpToolUseCase implements BalanceUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object execute(BalanceRequest req) {
|
||||
log.info("[Balance] 계좌 잔액 조회 요청 수신. 계좌번호: {}", req.getAccountNumber());
|
||||
|
||||
// 레거시 연동
|
||||
Map<String, Object> result = executeLegacy("MCI", "ACC_001", req);
|
||||
|
||||
// 가짜 데이터 응답 매핑 (AI 에이전트가 그럴듯하게 보여주기 위함)
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("accountNumber", req.getAccountNumber());
|
||||
result.put("balance", 1520300); // 1,520,300원 (가상의 잔액)
|
||||
result.put("currency", "KRW");
|
||||
result.put("message", "잔액 조회가 완료되었습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BillingProcessUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BillingProcessRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BillingStatusRequest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className BillingProcessService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@lombok.extern.slf4j.Slf4j
|
||||
@Service
|
||||
public class BillingProcessUseCaseImpl extends AbstractMcpToolUseCase implements BillingProcessUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object getStatus(BillingStatusRequest data) {
|
||||
return executeBillingLogic("BILL_001", data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object processBilling(BillingProcessRequest data) {
|
||||
return executeBillingLogic("BILL_002", data);
|
||||
}
|
||||
|
||||
private Object executeBillingLogic(String mappingId, Object data) {
|
||||
log.info(" [Billing] 청구 처리 전용 커스텀 전/후처리 로직 수행 시작");
|
||||
|
||||
Map<String, Object> payload;
|
||||
if (data == null) {
|
||||
payload = new HashMap<>();
|
||||
} else {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
payload = mapper.convertValue(data, new TypeReference<Map<String, Object>>() {});
|
||||
}
|
||||
|
||||
// 커스텀 전처리
|
||||
payload.put("custom_injected_data", "Billing System Check OK");
|
||||
log.info(" [Billing] 커스텀 파라미터 주입 완료");
|
||||
|
||||
// 부모 클래스의 레거시 공통 연동 메서드 호출 (PII 마스킹 포함)
|
||||
Map<String, Object> result = executeLegacy("MCI", mappingId, payload);
|
||||
|
||||
// 커스텀 후처리
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("billing_custom_insight", "청구 특화 후처리 로직이 적용되었습니다.");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BondIssueUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondCheckRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondIssueRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className BondIssueService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service
|
||||
public class BondIssueUseCaseImpl extends AbstractMcpToolUseCase implements BondIssueUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object check(BondCheckRequest data) {
|
||||
return executeLegacy("EAI", "BOND_001", data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object issue(BondIssueRequest data) {
|
||||
return executeLegacy("EAI", "BOND_002", data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ClaimSearchRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ClaimSearchResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.ClaimSearchSchemaSampleUseCase;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Non-exposed sample Tool. It does not call MCI or EIMS.
|
||||
*/
|
||||
@Service
|
||||
public class ClaimSearchSchemaSampleUseCaseImpl implements ClaimSearchSchemaSampleUseCase {
|
||||
|
||||
@Override
|
||||
public ClaimSearchResponse search(ClaimSearchRequest request) {
|
||||
ClaimSearchResponse.ClaimSummary item = ClaimSearchResponse.ClaimSummary.builder()
|
||||
.status("REVIEWING")
|
||||
.statusLabel("Under review")
|
||||
.receivedDate("2026-08-04")
|
||||
.approvedAmount(null)
|
||||
.build();
|
||||
|
||||
return ClaimSearchResponse.builder()
|
||||
.resultCode("SUCCESS")
|
||||
.resultLabel("Success")
|
||||
.status("REVIEWING")
|
||||
.statusLabel("Under review")
|
||||
.approvedAmount(null)
|
||||
.rejectionReason(null)
|
||||
.items(List.of(item))
|
||||
.hasMore(false)
|
||||
.totalCount(1)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CommonUtilityUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.LeaveCountRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.VacationRegisterRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className CommonUtilityService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service
|
||||
public class CommonUtilityUseCaseImpl extends AbstractMcpToolUseCase implements CommonUtilityUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object registerVacation(VacationRegisterRequest data) {
|
||||
return executeLegacy("HTTP", "HR_VAC_01", data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getLeaveCount(LeaveCountRequest data) {
|
||||
return executeLegacy("HTTP", "HR_VAC_02", data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object secretTool(LeaveCountRequest data) {
|
||||
return executeLegacy("HTTP", "SECRET_001", data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.ContractInquiryUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractDetailRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractStatusRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className ContractInquiryService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service
|
||||
public class ContractInquiryUseCaseImpl extends AbstractMcpToolUseCase implements ContractInquiryUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object getStatus(ContractStatusRequest data) {
|
||||
return executeLegacy("HTTP", "CNTR_001", data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getDetail(ContractDetailRequest data) {
|
||||
return executeLegacy("HTTP", "CNTR_002", data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CustomerInfoUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerDetailRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerGradeRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className CustomerInfoService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Service
|
||||
public class CustomerInfoUseCaseImpl extends AbstractMcpToolUseCase implements CustomerInfoUseCase {
|
||||
|
||||
|
||||
@Override
|
||||
public Object getGrade(CustomerGradeRequest req) {
|
||||
return executeLegacy("TCP", "CRM_001", req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getDetail(CustomerDetailRequest data) {
|
||||
return executeLegacy("TCP", "CRM_002", data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.converter.MetaCommonCodeConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeResponse.MetaCommonCodeItem;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.MetaCommonCodeUseCase;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl
|
||||
* @className MetaCommonCodeUseCaseImpl
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MetaCommonCodeUseCaseImpl implements MetaCommonCodeUseCase {
|
||||
|
||||
private final MciCfpaClient mci;
|
||||
private final MetaCommonCodeConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(MetaCommonCodeRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "metaCommonCode", req);
|
||||
try {
|
||||
CLCNNB00001_I mciRequest = converter.toLegacyRequest(req);
|
||||
|
||||
Object mciResponse = mci.callCfpa0001(mciRequest);
|
||||
log.info("[MCI Tool] CLCNNB00001 MCI call completed. Returning response status: {}",
|
||||
mciResponse != null);
|
||||
|
||||
// 현업 테스트용으로 MCI 통신을 바이패스하고 하드코딩된 메타 통합코드 샘플 결과를 반환합니다.
|
||||
MetaCommonCodeResponse res = new MetaCommonCodeResponse();
|
||||
List<MetaCommonCodeItem> list = new ArrayList<>();
|
||||
|
||||
MetaCommonCodeItem item1 = new MetaCommonCodeItem();
|
||||
item1.setGroupCode(req.getGroupCode() != null ? req.getGroupCode() : "GRP_COMM_CD");
|
||||
item1.setCode("CD001");
|
||||
item1.setCodeName("진행중");
|
||||
item1.setCodeDesc("SR 요청 처리 진행 중 상태");
|
||||
item1.setSortSeq(1);
|
||||
item1.setUseYn("Y");
|
||||
list.add(item1);
|
||||
|
||||
MetaCommonCodeItem item2 = new MetaCommonCodeItem();
|
||||
item2.setGroupCode(req.getGroupCode() != null ? req.getGroupCode() : "GRP_COMM_CD");
|
||||
item2.setCode("CD002");
|
||||
item2.setCodeName("완료");
|
||||
item2.setCodeDesc("SR 요청 처리 완료 상태");
|
||||
item2.setSortSeq(2);
|
||||
item2.setUseYn("Y");
|
||||
list.add(item2);
|
||||
|
||||
MetaCommonCodeItem item3 = new MetaCommonCodeItem();
|
||||
item3.setGroupCode(req.getGroupCode() != null ? req.getGroupCode() : "GRP_COMM_CD");
|
||||
item3.setCode("CD003");
|
||||
item3.setCodeName("보류");
|
||||
item3.setCodeDesc("SR 요청 처리 일시 보류 상태");
|
||||
item3.setSortSeq(3);
|
||||
item3.setUseYn("N");
|
||||
list.add(item3);
|
||||
|
||||
res.setCodeList(list);
|
||||
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
return Map.of("status", "ERROR", "message", e.getMessage() != null ? e.getMessage() : "Unknown error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.converter.MetaTableConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableResponse.MetaTableItem;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.MetaTableUseCase;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl
|
||||
* @className MetaTableUseCaseImpl
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 09863409
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 09863409 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MetaTableUseCaseImpl implements MetaTableUseCase {
|
||||
|
||||
private final MciCfpaClient mci;
|
||||
private final MetaTableConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(MetaTableRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "metaTable", req);
|
||||
try {
|
||||
CLCNNB00001_I mciRequest = converter.toLegacyRequest(req);
|
||||
|
||||
Object mciResponse = mci.callCfpa0001(mciRequest);
|
||||
log.info("[MCI Tool] CLCNNB00001 MCI call completed. Returning response status: {}",
|
||||
mciResponse != null);
|
||||
|
||||
// 현업 테스트용으로 MCI 통신을 바이패스하고 하드코딩된 메타 테이블 샘플 결과를 반환합니다.
|
||||
MetaTableResponse res = new MetaTableResponse();
|
||||
List<MetaTableItem> list = new ArrayList<>();
|
||||
|
||||
MetaTableItem item1 = new MetaTableItem();
|
||||
item1.setOwner(req.getOwner() != null ? req.getOwner() : "DAPADM");
|
||||
item1.setTableName(req.getTableName() != null ? req.getTableName() : "TB_CUST_BAS");
|
||||
item1.setTableLogicalName("고객기본정보");
|
||||
item1.setTableDesc("고객 기본 프로필 및 인적사항 관리 테이블");
|
||||
item1.setColumnCount(35);
|
||||
item1.setRowCount(1250000L);
|
||||
list.add(item1);
|
||||
|
||||
MetaTableItem item2 = new MetaTableItem();
|
||||
item2.setOwner(req.getOwner() != null ? req.getOwner() : "DAPADM");
|
||||
item2.setTableName("TB_CONT_MCD");
|
||||
item2.setTableLogicalName("계약주계약정보");
|
||||
item2.setTableDesc("보험 계약 주계약 상세 원장 테이블");
|
||||
item2.setColumnCount(58);
|
||||
item2.setRowCount(3400000L);
|
||||
list.add(item2);
|
||||
|
||||
MetaTableItem item3 = new MetaTableItem();
|
||||
item3.setOwner(req.getOwner() != null ? req.getOwner() : "DAPADM");
|
||||
item3.setTableName("TB_CLAIM_DTL");
|
||||
item3.setTableLogicalName("청구접수상세");
|
||||
item3.setTableDesc("보험금 청구 접수 건별 내역 테이블");
|
||||
item3.setColumnCount(42);
|
||||
item3.setRowCount(890000L);
|
||||
list.add(item3);
|
||||
|
||||
res.setTableList(list);
|
||||
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
return Map.of("status", "ERROR", "message", e.getMessage() != null ? e.getMessage() : "Unknown error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.TemplateUtilityUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.TemplateDownloadRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className TemplateUtilityService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class TemplateUtilityUseCaseImpl extends AbstractMcpToolUseCase implements TemplateUtilityUseCase {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest data) {
|
||||
try {
|
||||
String templateId = (data != null && data.getTemplateId() != null) ? data.getTemplateId().toLowerCase() : "default";
|
||||
log.info("MCP 툴 호출됨: get_template_file_url, 요청 템플릿 ID: {}", templateId);
|
||||
|
||||
String fileName = "sample_" + templateId + ".xlsx";
|
||||
String downloadUrl = "https://axhub-file-server.shinhanlife.io/downloads/" + fileName;
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("status", "success");
|
||||
|
||||
Map<String, Object> contract = new HashMap<>();
|
||||
contract.put("fileName", fileName);
|
||||
contract.put("downloadUrl", downloadUrl);
|
||||
contract.put("message", "다운로드 링크가 성공적으로 생성되었습니다. AI는 이 링크를 마크다운 형식으로 사용자에게 전달해야 합니다.");
|
||||
contract.put("status", "success");
|
||||
|
||||
result.put("contracts", Collections.singletonList(contract));
|
||||
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
log.error("getTemplateFileUrl 내부 예외 발생", e);
|
||||
throw new RuntimeException("템플릿 URL 생성 실패", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package io.shinhanlife.dap.mcc.biz.oth.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.converter
|
||||
* @className Onnba3011Converter
|
||||
* @description Converts ONNBA tool input into the CLCNNB00001 MCI payload
|
||||
* @author 0986406
|
||||
* @create 2026.07.27
|
||||
* <pre>
|
||||
* ---------- revision history ----------
|
||||
* date author description
|
||||
* ---------- --------- ---------------------------
|
||||
* 2026.07.27 0986406 initial creation
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface Onnba3011Converter {
|
||||
|
||||
CLCNNB00001_I toMciRequest(Onnba3011Request source);
|
||||
|
||||
CLCNNB00001_I.UnfcPrbuIrcoAdduDto toUnfcPrbuIrcoAddu(
|
||||
Onnba3011Request.UnfcPrbuIrcoAdduDto source);
|
||||
|
||||
CLCNNB00001_I.SucoIspaBasDto toSucoIspaBas(Onnba3011Request.SucoIspaBasDto source);
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package io.shinhanlife.dap.mcc.biz.oth.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className Onnba3011ReqDto
|
||||
* @description 보종By가입설계한도계산조회 MCI 요청 전문 (ONNBA3011_I)
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
*/
|
||||
@Data
|
||||
public class Onnba3011Request {
|
||||
|
||||
@JsonPropertyDescription("통합기계약보험 (유형: gs, 길이: 72)")
|
||||
@JsonProperty("unfcPrbuIrcoAddu")
|
||||
private UnfcPrbuIrcoAdduDto unfcPrbuIrcoAddu;
|
||||
|
||||
@JsonPropertyDescription("처리구분코드 (길이: 1)")
|
||||
@JsonProperty("dalScCd")
|
||||
private String dalScCd;
|
||||
|
||||
@JsonPropertyDescription("고객청약관계 (길이: 2)")
|
||||
@JsonProperty("cstSucoRltyCd")
|
||||
private String cstSucoRltyCd;
|
||||
|
||||
@JsonPropertyDescription("고객번호 (길이: 12)")
|
||||
@JsonProperty("csNo")
|
||||
private String csNo;
|
||||
|
||||
@JsonPropertyDescription("주민등록번호 (길이: 50)")
|
||||
@JsonProperty("rdreNo")
|
||||
private String rdreNo;
|
||||
|
||||
@JsonPropertyDescription("통합급부계산 (길이: 1)")
|
||||
@JsonProperty("unfcPvsCalReqYn")
|
||||
private String unfcPvsCalReqYn;
|
||||
|
||||
@JsonPropertyDescription("한국신용정보 (길이: 1)")
|
||||
@JsonProperty("kcisPymmTnnrRequest")
|
||||
private String kcisPymmTnnrRequest;
|
||||
|
||||
@JsonPropertyDescription("한도초과여부 (길이: 1)")
|
||||
@JsonProperty("lmovYn")
|
||||
private String lmovYn;
|
||||
|
||||
@JsonPropertyDescription("일반경유승인 (길이: 1)")
|
||||
@JsonProperty("genPsthApvTrgtYn")
|
||||
private String genPsthApvTrgtYn;
|
||||
|
||||
@JsonPropertyDescription("보험사한도초과 (길이: 1)")
|
||||
@JsonProperty("ircoLmovEcpbTrgtYn")
|
||||
private String ircoLmovEcpbTrgtYn;
|
||||
|
||||
@JsonPropertyDescription("진단계산여부 (길이: 1)")
|
||||
@JsonProperty("digCalYn")
|
||||
private String digCalYn;
|
||||
|
||||
@JsonPropertyDescription("기계약포함진단 (길이: 1)")
|
||||
@JsonProperty("prbuIciDigCalYn")
|
||||
private String prbuIciDigCalYn;
|
||||
|
||||
@JsonPropertyDescription("청약심사기본Dto (유형: gs, 길이: 2532)")
|
||||
@JsonProperty("sucoIspaBasDto")
|
||||
private SucoIspaBasDto sucoIspaBasDto;
|
||||
|
||||
// ----- Nested DTO Classes -----
|
||||
|
||||
@Data
|
||||
public static class UnfcPrbuIrcoAdduDto {
|
||||
// 실제 필요한 하위 필드들 추가 (사진 생략부분)
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SucoIspaBasDto {
|
||||
|
||||
@JsonPropertyDescription("계약처리유형 (길이: 2)")
|
||||
@JsonProperty("ccnDalTypCd")
|
||||
private String ccnDalTypCd;
|
||||
|
||||
@JsonPropertyDescription("신계약입력경로 (길이: 2)")
|
||||
@JsonProperty("nwcnptCursCd")
|
||||
private String nwcnptCursCd;
|
||||
|
||||
@JsonPropertyDescription("개인단체계약 (길이: 2)")
|
||||
@JsonProperty("induAsctScCd")
|
||||
private String induAsctScCd;
|
||||
|
||||
@JsonPropertyDescription("모집조직번호 (길이: 7)")
|
||||
@JsonProperty("cepeOgnzNo")
|
||||
private String cepeOgnzNo;
|
||||
|
||||
@JsonPropertyDescription("모집자사번번호 (길이: 8)")
|
||||
@JsonProperty("cepePrafNo")
|
||||
private String cepePrafNo;
|
||||
|
||||
@JsonPropertyDescription("수금조직번호 (길이: 7)")
|
||||
@JsonProperty("clmoOgnzNo")
|
||||
private String clmoOgnzNo;
|
||||
|
||||
@JsonPropertyDescription("수금자사번번호 (길이: 8)")
|
||||
@JsonProperty("clmoPrafNo")
|
||||
private String clmoPrafNo;
|
||||
|
||||
@JsonPropertyDescription("청약일자 (길이: 20)")
|
||||
@JsonProperty("sucoYmd")
|
||||
private String sucoYmd;
|
||||
|
||||
@JsonPropertyDescription("발행일자 (길이: 20)")
|
||||
@JsonProperty("ispDt")
|
||||
private String ispDt;
|
||||
|
||||
@JsonPropertyDescription("계약일자 (길이: 20)")
|
||||
@JsonProperty("contYmd")
|
||||
private String contYmd;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package io.shinhanlife.dap.mcc.biz.oth.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.oth.dto.*;
|
||||
|
||||
@McpTool(routingType = "MCI", categoryKey = "oth")
|
||||
public interface Onnba3011UseCase {
|
||||
Object callOnnba3011(Onnba3011Request req);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package io.shinhanlife.dap.mcc.biz.oth.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.oth.converter.Onnba3011Converter;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import io.shinhanlife.dap.mcc.biz.oth.usecase.Onnba3011UseCase;
|
||||
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className OnnbaMciToolService
|
||||
* @description 보종By가입설계한도계산조회 MCI 연동 툴
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class Onnba3011UseCaseImpl implements Onnba3011UseCase {
|
||||
|
||||
private static final String INTERFACE_CODE_3011 = "CLCNNB00001";
|
||||
|
||||
// 공통 MCI Client 주입
|
||||
private final MciCfpaClient mciCfpaClient;
|
||||
private final Onnba3011Converter onnba3011Converter;
|
||||
/**
|
||||
* AI Agent가 호출하게 될 메서드입니다.
|
||||
* @McpFunction 어노테이션 하나로 AI 도구로 자동 노출 및 라우팅됩니다.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Object callOnnba3011(Onnba3011Request req) {
|
||||
log.info("[MCI Tool] 보종By가입설계한도계산조회 요청 수신.");
|
||||
|
||||
try {
|
||||
// MciCfpaClient를 통한 호출
|
||||
CLCNNB00001_I mciRequest = onnba3011Converter.toMciRequest(req);
|
||||
Object response = mciCfpaClient.callCfpa0001(mciRequest);
|
||||
|
||||
log.info("[MCI Tool] Glow 기반 MCI 연동 성공.");
|
||||
|
||||
// 결과 반환
|
||||
return response != null ? response : "{\"status\":\"SUCCESS\", \"message\":\"GlowMciComponent 통신 완료\"}";
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] MCI 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
return "{\"status\":\"ERROR\", \"message\":\"MCI 통신 실패: " + e.getMessage() + "\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
public record DailyQuoteRequest(String category) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
public record DailyQuoteResponse(String quote, String author) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
public record ExchangeRateRequest(String currencyCode) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
public record ExchangeRateResponse(String baseCurrency, String targetCurrency, double rate) {}
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.smp.dto
|
||||
* @className TeamMemberRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class TeamMemberRequest {
|
||||
@McpParameter(description = "조회할 팀 이름 (예: AX, MCP, TOOL, 전체 등)", required = false)
|
||||
private String teamName;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.smp.dto
|
||||
* @className TeamMemberResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class TeamMemberResponse {
|
||||
private String result;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className WeatherRequest
|
||||
* @description 기상 조회 요청 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.07.14
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.14 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public record WeatherRequest(
|
||||
@JsonProperty(required = true, value = "city")
|
||||
@JsonPropertyDescription("날씨를 조회할 도시 이름 (예: 서울, 부산, 제주)")
|
||||
String city
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.dto
|
||||
* @className WeatherResponse
|
||||
* @description 기상 조회 응답 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.07.14
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.14 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public record WeatherResponse(
|
||||
String city,
|
||||
double temperature,
|
||||
double windSpeed,
|
||||
String reportTime,
|
||||
String summary
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
||||
|
||||
@McpTool(
|
||||
routingType = "DIRECT",
|
||||
categoryKey = "smp"
|
||||
)
|
||||
public interface DailyQuoteToolUseCase {
|
||||
@McpFunction(register = false, displayName = "랜덤 명언 툴", name = "oth.smp.quote.daily",
|
||||
description = "무작위로 영감을 주는 명언을 하나 가져옵니다.",
|
||||
prompt = "오늘의 명언 하나 알려줘, 동기부여 명언 등",
|
||||
mappingId = "QUOTE_001"
|
||||
)
|
||||
DailyQuoteResponse execute(DailyQuoteRequest req);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||
|
||||
@McpTool(
|
||||
routingType = "DIRECT",
|
||||
categoryKey = "smp"
|
||||
)
|
||||
public interface ExchangeRateToolUseCase {
|
||||
@McpFunction(register = false, displayName = "실시간 환율 조회 툴", name = "oth.smp.exchange-rate.inquiry",
|
||||
description = "원하는 통화의 실시간 환율을 조회합니다. (예: USD, EUR, JPY)",
|
||||
prompt = "현재 달러 환율 알려줘, 엔화 환율은?",
|
||||
mappingId = "EXCHANGE_001"
|
||||
)
|
||||
ExchangeRateResponse execute(ExchangeRateRequest req);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.TeamMemberRequest;
|
||||
|
||||
@McpTool(
|
||||
routingType = "DIRECT",
|
||||
categoryKey = "smp"
|
||||
)
|
||||
public interface TeamMemberUseCase {
|
||||
@McpFunction(
|
||||
displayName = "신한라이프 MCP, TOOL 파트 구성원 조회",
|
||||
name = "oth.smp.team.list",
|
||||
description = "신한라이프 MCP, TOOL 파트 구성원을 조회합니다.",
|
||||
prompt = "신한라이프 MCP, TOOL 파트 구성원을 조회해 줘. (주의: 응답 시 ** 등 마크다운 기호를 절대 사용하지 말고 평문으로만 출력해 줘)",
|
||||
mappingId = "DIRECT0001",
|
||||
register = false,
|
||||
requiresApproval = false,
|
||||
openWorldHint = true
|
||||
)
|
||||
Object execute(TeamMemberRequest req);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.*;
|
||||
|
||||
@McpTool(
|
||||
routingType = "DIRECT",
|
||||
categoryKey = "smp"
|
||||
)
|
||||
public interface WeatherToolUseCase {
|
||||
@McpFunction(register = false, displayName = "날씨 조회 툴", name = "oth.smp.weather.inquiry",
|
||||
description = "특정 도시의 현재 날씨, 온도, 풍속 정보를 조회합니다.",
|
||||
prompt = "서울 날씨 알려줘, 부산 기온 알려줘 등 실시간 기상 조회",
|
||||
mappingId = "WEATHER_001"
|
||||
)
|
||||
WeatherResponse execute(WeatherRequest req);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.DailyQuoteToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className DailyQuoteToolService
|
||||
* @description 랜덤 명언 제공 툴
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DailyQuoteToolUseCaseImpl extends AbstractMcpToolUseCase implements DailyQuoteToolUseCase {
|
||||
|
||||
private final List<DailyQuoteResponse> quotes = List.of(
|
||||
new DailyQuoteResponse("성공은 매일 반복한 작은 노력들의 합이다.", "로버트 콜리어"),
|
||||
new DailyQuoteResponse("시작이 반이다.", "아리스토텔레스"),
|
||||
new DailyQuoteResponse("포기하지 않는 한 실패는 없다.", "알베르트 아인슈타인"),
|
||||
new DailyQuoteResponse("가장 큰 위험은 위험 없는 삶이다.", "스티븐 코비")
|
||||
);
|
||||
|
||||
@Override
|
||||
public DailyQuoteResponse execute(DailyQuoteRequest req) {
|
||||
int index = new Random().nextInt(quotes.size());
|
||||
DailyQuoteResponse selected = quotes.get(index);
|
||||
|
||||
log.info("[DailyQuoteTool] 명언 제공 완료: {}", selected.author());
|
||||
return selected;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.ExchangeRateToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className ExchangeRateToolService
|
||||
* @description 실시간 환율 조회 툴
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ExchangeRateToolUseCaseImpl extends AbstractMcpToolUseCase implements ExchangeRateToolUseCase {
|
||||
|
||||
private final RestClient restClient;
|
||||
|
||||
public ExchangeRateToolUseCaseImpl() {
|
||||
this.restClient = RestClient.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExchangeRateResponse execute(ExchangeRateRequest req) {
|
||||
String targetCurrency = req.currencyCode() != null ? req.currencyCode().toUpperCase().trim() : "USD";
|
||||
|
||||
// 간단한 모의 데이터로 반환 (실제 구현 시 외부 연동)
|
||||
double dummyRate = 1350.50;
|
||||
if (targetCurrency.contains("JPY")) {
|
||||
dummyRate = 905.20;
|
||||
} else if (targetCurrency.contains("EUR")) {
|
||||
dummyRate = 1450.30;
|
||||
}
|
||||
|
||||
log.info("[ExchangeRateTool] 환율 조회 완료: {} -> {}", targetCurrency, dummyRate);
|
||||
return new ExchangeRateResponse("KRW", targetCurrency, dummyRate);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.TeamMemberRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.TeamMemberResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.TeamMemberUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import org.springframework.stereotype.Service;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.smp.usecase.impl
|
||||
* @className TeamMemberUseCaseImpl
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TeamMemberUseCaseImpl extends AbstractMcpToolUseCase implements TeamMemberUseCase {
|
||||
|
||||
@Override
|
||||
public Object execute(TeamMemberRequest req) {
|
||||
log.info("[A01] 신한라이프 MCP, TOOL 파트 구성원 조회 요청: {}", req);
|
||||
|
||||
String filter = req != null && req.getTeamName() != null ? req.getTeamName().toUpperCase() : "전체";
|
||||
|
||||
String resultString = "";
|
||||
if (filter.contains("AX")) {
|
||||
resultString += "ax 추진팀 박세진 프로\n";
|
||||
} else if (filter.contains("MCP") && !filter.contains("TOOL")) {
|
||||
resultString += "MCP 팀은 고석민 수석 , 장효원 책임\n";
|
||||
} else if (filter.contains("TOOL") && !filter.contains("MCP")) {
|
||||
resultString += "TOOL 팀은 김형식 수석 ,김영진 책임 , 김도겸 대리 , 이주희 선임 , 문주현 선임 , 이보람 대리 , 박수빈 대리\n";
|
||||
} else {
|
||||
resultString += "ax 추진팀 박세진 프로\n" +
|
||||
"MCP & TOOL 팀 담당자는 윤희준 이사\n" +
|
||||
"MCP 팀은 고석민 수석 , 장효원 책임\n" +
|
||||
"TOOL 팀은 김형식 수석 ,김영진 책임 , 김도겸 대리 , 이주희 선임 , 문주현 선임 , 이보람 대리 , 박수빈 대리";
|
||||
}
|
||||
|
||||
TeamMemberResponse res = new TeamMemberResponse();
|
||||
res.setResult(resultString.trim());
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.WeatherToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.WeatherRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.WeatherResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.service
|
||||
* @className WeatherToolService
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.07.14
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.14 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WeatherToolUseCaseImpl extends AbstractMcpToolUseCase implements WeatherToolUseCase {
|
||||
|
||||
private final RestClient restClient;
|
||||
|
||||
public WeatherToolUseCaseImpl() {
|
||||
this.restClient = RestClient.create();
|
||||
}
|
||||
public WeatherResponse execute(WeatherRequest req) {
|
||||
String city = req.city() != null ? req.city().trim() : "서울";
|
||||
|
||||
// 지역별 위경도 매핑 (간단한 예시)
|
||||
double lat = 37.566;
|
||||
double lon = 126.978;
|
||||
|
||||
if (city.contains("부산")) {
|
||||
lat = 35.179;
|
||||
lon = 129.075;
|
||||
} else if (city.contains("제주")) {
|
||||
lat = 33.499;
|
||||
lon = 126.531;
|
||||
} else if (city.contains("인천")) {
|
||||
lat = 37.456;
|
||||
lon = 126.705;
|
||||
}
|
||||
|
||||
try {
|
||||
String newRequestId = java.util.UUID.randomUUID().toString();
|
||||
String url = String.format("https://api.open-meteo.com/v1/forecast?latitude=%f&longitude=%f¤t_weather=true", lat, lon);
|
||||
|
||||
log.info("[WeatherTool] OUTBOUND HTTP IN - request-id: {}", newRequestId);
|
||||
log.info("[WeatherTool] 날씨 조회 요청 URL: {}", url);
|
||||
|
||||
String responseStr = restClient.get()
|
||||
.uri(url)
|
||||
.header("request-id", newRequestId)
|
||||
.retrieve()
|
||||
.body(String.class);
|
||||
|
||||
log.info("[WeatherTool] OUTBOUND HTTP OUT - request-id: {}", newRequestId);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode response = mapper.readTree(responseStr);
|
||||
|
||||
if (response != null && response.has("current_weather")) {
|
||||
JsonNode current = response.get("current_weather");
|
||||
double temp = current.path("temperature").asDouble();
|
||||
double windSpeed = current.path("windspeed").asDouble();
|
||||
String time = current.path("time").asText();
|
||||
|
||||
int weatherCode = current.path("weathercode").asInt();
|
||||
String summary = parseWeatherCode(weatherCode);
|
||||
|
||||
String formattedTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
|
||||
|
||||
return new WeatherResponse(city, temp, windSpeed, formattedTime, summary);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("[WeatherTool] 날씨 API 연동 실패: {}", e.getMessage());
|
||||
return new WeatherResponse(city, 0.0, 0.0, "", "날씨 정보를 불러오는데 실패했습니다.");
|
||||
}
|
||||
|
||||
return new WeatherResponse(city, 0.0, 0.0, "", "알 수 없는 응답입니다.");
|
||||
}
|
||||
|
||||
private String parseWeatherCode(int code) {
|
||||
if (code == 0) return "맑음 (Clear)";
|
||||
if (code >= 1 && code <= 3) return "구름조금/흐림 (Cloudy)";
|
||||
if (code >= 45 && code <= 48) return "안개 (Fog)";
|
||||
if (code >= 51 && code <= 67) return "비/이슬비 (Rain)";
|
||||
if (code >= 71 && code <= 77) return "눈 (Snow)";
|
||||
if (code >= 95) return "뇌우/천둥번개 (Thunderstorm)";
|
||||
return "알 수 없음 (Unknown)";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000002_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000002_O;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.converter
|
||||
* @className SolReqDetailConverter
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SolReqDetailConverter {
|
||||
|
||||
@Mapping(source = "srId", target = "srId")
|
||||
SOLG00000002_I toLegacyRequest(SolReqDetailRequest req);
|
||||
|
||||
SolReqDetailResponse toResponse(SOLG00000002_O mciRes);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.converter;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_O;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.converter
|
||||
* @className SolReqListConverter
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SolReqListConverter {
|
||||
@Mapping(source = "status", target = "reqStatus", defaultValue = "진행중")
|
||||
@Mapping(source = "period", target = "reqPeriod", defaultValue = "최근 3개월")
|
||||
@Mapping(source = "target", target = "reqTarget", defaultValue = "나의 업무")
|
||||
SOLG00000001_I toLegacyRequest(SolReqListRequest req);
|
||||
|
||||
SolReqListResponse toResponse(SOLG00000001_O mciRes);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.dto
|
||||
* @className SolReqDetailRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SolReqDetailRequest {
|
||||
|
||||
@McpParameter(description = "상세 조회할 SOL 의뢰서 ID", required = true)
|
||||
private String srId;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.dto
|
||||
* @className SolReqDetailResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SolReqDetailResponse {
|
||||
|
||||
private String srId;
|
||||
private String srName;
|
||||
private String process;
|
||||
private String devStage;
|
||||
private String appName;
|
||||
private String requester;
|
||||
private String requestDate;
|
||||
private String dueDate;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.dap.lib.annotation.McpParameter;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.dto
|
||||
* @className SolReqListRequest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SolReqListRequest {
|
||||
@McpParameter(description = "진행상태 (예: 진행중, 완료 등)", required = false)
|
||||
private String status;
|
||||
|
||||
@McpParameter(description = "조회기간 (예: 1개월, 3개월 등)", required = false)
|
||||
private String period;
|
||||
|
||||
@McpParameter(description = "조회대상 (예: 나의 업무, 전체 등)", required = false)
|
||||
private String target;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.dto
|
||||
* @className SolReqListResponse
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SolReqListResponse {
|
||||
private List<SolReqListItem> reqList;
|
||||
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public static class SolReqListItem {
|
||||
private String srId;
|
||||
private String srName;
|
||||
private String process;
|
||||
private String devStage;
|
||||
private String appName;
|
||||
private String requester;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailRequest;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.usecase
|
||||
* @className SolReqDetailUseCase
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@McpTool(
|
||||
routingType = "MCI",
|
||||
categoryKey = "sol"
|
||||
)
|
||||
public interface SolReqDetailUseCase {
|
||||
|
||||
@McpFunction(
|
||||
displayName = "SolReqDetail 툴",
|
||||
name = "oth.sol.request.detail",
|
||||
description = "SOL 의뢰서 상세 조회",
|
||||
prompt = "SOL 의뢰서 상세 조회해줘",
|
||||
mappingId = "SOLG00000002",
|
||||
register = false,
|
||||
requiresApproval = false,
|
||||
readOnlyHint = true,
|
||||
openWorldHint = true
|
||||
)
|
||||
Object execute(SolReqDetailRequest req);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListRequest;
|
||||
|
||||
@McpTool(
|
||||
routingType = "MCI",
|
||||
categoryKey = "sol"
|
||||
)
|
||||
public interface SolReqListUseCase {
|
||||
@McpFunction(
|
||||
displayName = "SolReqList 툴",
|
||||
name = "oth.sol.request.list",
|
||||
description = "SOL 의뢰서 목록 조회해줘",
|
||||
prompt = "SOL 의뢰서 목록 조회해줘",
|
||||
mappingId = "SOLG00000001",
|
||||
register = false,
|
||||
requiresApproval = false,
|
||||
openWorldHint = true
|
||||
)
|
||||
Object execute(SolReqListRequest req);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.converter.SolReqDetailConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.usecase.SolReqDetailUseCase;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.MciNclgClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000002_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000002_O;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.usecase.impl
|
||||
* @className SolReqDetailUseCaseImpl
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SolReqDetailUseCaseImpl implements SolReqDetailUseCase {
|
||||
|
||||
private final MciNclgClient mci;
|
||||
private final SolReqDetailConverter converter;
|
||||
|
||||
@Value("${sol.req-detail.mock-enabled:false}")
|
||||
private boolean mockEnabled;
|
||||
|
||||
@Override
|
||||
public Object execute(SolReqDetailRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "solReqDetail", req);
|
||||
if (req == null || req.getSrId() == null || req.getSrId().isBlank()) {
|
||||
return Map.of("status", "ERROR", "message", "srId는 필수입니다.");
|
||||
}
|
||||
|
||||
if (mockEnabled) {
|
||||
return createLocalSampleResponse(req.getSrId());
|
||||
}
|
||||
|
||||
try {
|
||||
SOLG00000002_I mciRequest = converter.toLegacyRequest(req);
|
||||
Transfer<SOLG00000002_O> mciResponse = mci.callTo(
|
||||
"SOLG00000002", "SOLG00000002", mciRequest, SOLG00000002_O.class);
|
||||
|
||||
if (mciResponse == null || mciResponse.getBody() == null) {
|
||||
return Map.of("status", "NOT_FOUND", "message", "의뢰서 상세 정보를 찾을 수 없습니다.");
|
||||
}
|
||||
return converter.toResponse(mciResponse.getBody());
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
return Map.of(
|
||||
"status", "ERROR",
|
||||
"message", e.getMessage() != null ? e.getMessage() : "Unknown error");
|
||||
}
|
||||
}
|
||||
|
||||
private Object createLocalSampleResponse(String srId) {
|
||||
SolReqDetailResponse response = new SolReqDetailResponse();
|
||||
if ("SR-2026-001".equalsIgnoreCase(srId)) {
|
||||
response.setSrId("SR-2026-001");
|
||||
response.setSrName("AX HUB 메인 화면 UI 개편");
|
||||
response.setProcess("진행중");
|
||||
response.setDevStage("개발(단위테스트)");
|
||||
response.setAppName("AX HUB");
|
||||
response.setRequester("신한준");
|
||||
response.setRequestDate("2026-07-01");
|
||||
response.setDueDate("2026-08-31");
|
||||
response.setDescription("AX HUB 메인 화면의 사용성과 접근성을 개선하는 UI 개편 의뢰입니다.");
|
||||
return response;
|
||||
}
|
||||
if ("SR-2026-002".equalsIgnoreCase(srId)) {
|
||||
response.setSrId("SR-2026-002");
|
||||
response.setSrName("SOL 연동 모듈 추가 개발");
|
||||
response.setProcess("진행중");
|
||||
response.setDevStage("분석/설계");
|
||||
response.setAppName("MCP Gateway");
|
||||
response.setRequester("고석민");
|
||||
response.setRequestDate("2026-07-15");
|
||||
response.setDueDate("2026-09-30");
|
||||
response.setDescription("SOL 의뢰서 조회 기능을 MCP 도구로 제공하기 위한 연동 모듈 개발 의뢰입니다.");
|
||||
return response;
|
||||
}
|
||||
return Map.of(
|
||||
"status", "NOT_FOUND",
|
||||
"message", "의뢰서를 찾을 수 없습니다.",
|
||||
"srId", srId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.usecase.SolReqListUseCase;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
import org.springframework.stereotype.Service;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.converter.SolReqListConverter;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_O;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.MciNclgClient;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListResponse.SolReqListItem;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.usecase.impl
|
||||
* @className SolReqListUseCaseImpl
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SolReqListUseCaseImpl implements SolReqListUseCase {
|
||||
|
||||
private final MciNclgClient mci;
|
||||
private final SolReqListConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(SolReqListRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "solReqList", req);
|
||||
try {
|
||||
SOLG00000001_I mciRequest = converter.toLegacyRequest(req);
|
||||
Transfer<SOLG00000001_O> mciResponse = mci.callTo(
|
||||
"SOLG00000001", "SOLG00000001", mciRequest, SOLG00000001_O.class);
|
||||
log.info("[MCI Tool] SOLG00000001 MCI call completed. Returning dummy response: {}",
|
||||
mciResponse != null);
|
||||
// 현업 테스트용으로 MCI 통신을 바이패스하고 하드코딩된 결과를 반환합니다.
|
||||
SolReqListResponse res = new SolReqListResponse();
|
||||
List<SolReqListItem> list = new ArrayList<>();
|
||||
|
||||
SolReqListItem item1 = new SolReqListItem();
|
||||
item1.setSrId("SR-2026-001");
|
||||
item1.setSrName("AX HUB 메인 화면 UI 개편");
|
||||
item1.setProcess("진행중");
|
||||
item1.setDevStage("개발(단위테스트)");
|
||||
item1.setAppName("AX HUB");
|
||||
item1.setRequester("윤희준");
|
||||
list.add(item1);
|
||||
|
||||
SolReqListItem item2 = new SolReqListItem();
|
||||
item2.setSrId("SR-2026-002");
|
||||
item2.setSrName("툴 연동 모듈 추가 개발");
|
||||
item2.setProcess("진행중");
|
||||
item2.setDevStage("분석/설계");
|
||||
item2.setAppName("MCP Gateway");
|
||||
item2.setRequester("고석민");
|
||||
list.add(item2);
|
||||
|
||||
res.setReqList(list);
|
||||
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
return Map.of("status", "ERROR", "message", e.getMessage() != null ? e.getMessage() : "Unknown error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a;
|
||||
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_O;
|
||||
import io.shinhanlife.dap.lib.integration.mci.component.AxhubMciComponent;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io
|
||||
* @className MciCfpaClient
|
||||
* @description 보장분석결과조회 MCI 호출 클라이언트
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class MciCfpaClient {
|
||||
|
||||
private final AxhubMciComponent mci;
|
||||
|
||||
// 인터페이스 코드 상수
|
||||
private static final String INTERFACE_CODE = "CLCNNB00001"; // CLCCFP00001 (Onnba용 코드 유지)
|
||||
|
||||
// 정상 응답 코드 상수
|
||||
private static final String SUCCESS_CODE_COM = "COM00139";
|
||||
private static final String SUCCESS_CODE_CFP = "CFP00000";
|
||||
private static final String NO_DATA_CODE = "COM00150";
|
||||
|
||||
// 예외 코드 상수
|
||||
private static final String ERROR_CODE_PROCESS = "CLC00007";
|
||||
private static final String ERROR_CODE_MESSAGE = "CLC00043";
|
||||
|
||||
/**
|
||||
* 보장분석결과조회
|
||||
*
|
||||
* @param inDto 입력 DTO
|
||||
* @return 출력 객체
|
||||
*/
|
||||
public Object callCfpa0001(CLCNNB00001_I mciReq) throws Exception {
|
||||
// 인터페이스 IO 객체 생성 및 매핑
|
||||
|
||||
// 인터페이스 호출
|
||||
Transfer<CLCNNB00001_O> resTransfer = mci.callTo(INTERFACE_CODE, mciReq, CLCNNB00001_O.class);
|
||||
|
||||
// 응답 검증
|
||||
validateResponse(resTransfer);
|
||||
|
||||
// 메시지 검증
|
||||
validateMessage(String.valueOf(resTransfer.getMessage()));
|
||||
|
||||
return resTransfer.getBody();
|
||||
}
|
||||
|
||||
private void validateResponse(Transfer<?> resTransfer) {
|
||||
log.info("응답 검증 로직 수행");
|
||||
}
|
||||
|
||||
private void validateMessage(String message) {
|
||||
log.info("메시지 검증 로직 수행: {}", message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io
|
||||
* @className CLCNNB00001_I
|
||||
* @description 보장분석결과조회 MCI 요청 전문
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
*/
|
||||
@Data
|
||||
public class CLCNNB00001_I {
|
||||
|
||||
@JsonProperty("unfcPrbuIrcoAddu")
|
||||
private UnfcPrbuIrcoAdduDto unfcPrbuIrcoAddu;
|
||||
|
||||
@JsonProperty("dalScCd")
|
||||
private String dalScCd;
|
||||
|
||||
@JsonProperty("cstSucoRltyCd")
|
||||
private String cstSucoRltyCd;
|
||||
|
||||
@JsonProperty("csNo")
|
||||
private String csNo;
|
||||
|
||||
@JsonProperty("rdreNo")
|
||||
private String rdreNo;
|
||||
|
||||
@JsonProperty("unfcPvsCalReqYn")
|
||||
private String unfcPvsCalReqYn;
|
||||
|
||||
@JsonProperty("kcisPymmTnnrRequest")
|
||||
private String kcisPymmTnnrRequest;
|
||||
|
||||
@JsonProperty("lmovYn")
|
||||
private String lmovYn;
|
||||
|
||||
@JsonProperty("genPsthApvTrgtYn")
|
||||
private String genPsthApvTrgtYn;
|
||||
|
||||
@JsonProperty("ircoLmovEcpbTrgtYn")
|
||||
private String ircoLmovEcpbTrgtYn;
|
||||
|
||||
@JsonProperty("digCalYn")
|
||||
private String digCalYn;
|
||||
|
||||
@JsonProperty("prbuIciDigCalYn")
|
||||
private String prbuIciDigCalYn;
|
||||
|
||||
@JsonProperty("sucoIspaBasDto")
|
||||
private SucoIspaBasDto sucoIspaBasDto;
|
||||
|
||||
@Data
|
||||
public static class UnfcPrbuIrcoAdduDto {
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SucoIspaBasDto {
|
||||
@JsonProperty("ccnDalTypCd")
|
||||
private String ccnDalTypCd;
|
||||
|
||||
@JsonProperty("nwcnptCursCd")
|
||||
private String nwcnptCursCd;
|
||||
|
||||
@JsonProperty("induAsctScCd")
|
||||
private String induAsctScCd;
|
||||
|
||||
@JsonProperty("cepeOgnzNo")
|
||||
private String cepeOgnzNo;
|
||||
|
||||
@JsonProperty("cepePrafNo")
|
||||
private String cepePrafNo;
|
||||
|
||||
@JsonProperty("clmoOgnzNo")
|
||||
private String clmoOgnzNo;
|
||||
|
||||
@JsonProperty("clmoPrafNo")
|
||||
private String clmoPrafNo;
|
||||
|
||||
@JsonProperty("sucoYmd")
|
||||
private String sucoYmd;
|
||||
|
||||
@JsonProperty("ispDt")
|
||||
private String ispDt;
|
||||
|
||||
@JsonProperty("contYmd")
|
||||
private String contYmd;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io
|
||||
* @className CLCNNB00001_O
|
||||
* @description 보장분석결과조회 MCI 응답 전문
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
*/
|
||||
@Data
|
||||
public class CLCNNB00001_O {
|
||||
// 응답 전문 필드 정의 (필요에 따라 추가)
|
||||
private Object resultData;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import io.shinhanlife.dap.lib.integration.mci.component.AxhubMciComponent;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g
|
||||
* @className MciNclgClient
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class MciNclgClient {
|
||||
private final AxhubMciComponent mci;
|
||||
|
||||
public <T> Transfer<T> callTo(String interfaceId, String dummy, Object mciReq, Class<T> resType) throws Exception {
|
||||
return mci.callTo(interfaceId, dummy, mciReq, resType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io
|
||||
* @className SOLG00000001_I
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
public class SOLG00000001_I {
|
||||
private String reqStatus;
|
||||
private String reqPeriod;
|
||||
private String reqTarget;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io
|
||||
* @className SOLG00000001_O
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author jade
|
||||
* @create 2026.07.29
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.07.29 jade 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
public class SOLG00000001_O {
|
||||
private List<SOLG00000001_O_Item> reqList;
|
||||
|
||||
@Data
|
||||
public static class SOLG00000001_O_Item {
|
||||
private String srId;
|
||||
private String srName;
|
||||
private String process;
|
||||
private String devStage;
|
||||
private String appName;
|
||||
private String requester;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io
|
||||
* @className SOLG00000002_I
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
public class SOLG00000002_I {
|
||||
|
||||
private String srId;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io
|
||||
* @className SOLG00000002_O
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Data
|
||||
public class SOLG00000002_O {
|
||||
|
||||
private String srId;
|
||||
private String srName;
|
||||
private String process;
|
||||
private String devStage;
|
||||
private String appName;
|
||||
private String requester;
|
||||
private String requestDate;
|
||||
private String dueDate;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package io.shinhanlife.dap.mcc.oth;
|
||||
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.oth
|
||||
* @className DapToolOthApplication
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.lib.adapter", "io.shinhanlife.dap.lib.mcp", "io.shinhanlife.dap.lib.config", "io.shinhanlife.dap.lib.integration"})
|
||||
@ConfigurationPropertiesScan(basePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.lib.adapter", "io.shinhanlife.dap.lib.mcp", "io.shinhanlife.dap.lib.config", "io.shinhanlife.dap.lib.integration"})
|
||||
@EnableCaching
|
||||
public class DapToolOthApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DapToolOthApplication.class, args);
|
||||
}
|
||||
}
|
||||
28
dap-was-oth/src/main/resources/application-dev.yml
Normal file
28
dap-was-oth/src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
# OCI ?대씪?곕뱶 ?섍꼍 ?꾩슜 ?ㅼ젙
|
||||
server:
|
||||
port: ${PORT:8084}
|
||||
|
||||
axhub:
|
||||
gateway:
|
||||
url: https://axhubmcp.devjun.net
|
||||
|
||||
eims:
|
||||
http:
|
||||
url: http://localhost:${server.port}/api/gateway
|
||||
tcp:
|
||||
host: 127.0.0.1
|
||||
port: 8090
|
||||
timeout: 5000
|
||||
jsp:
|
||||
form:
|
||||
url: http://localhost:${server.port}/mock/jsp-form
|
||||
json:
|
||||
url: http://localhost:${server.port}/mock/jsp-json
|
||||
mci:
|
||||
url: http://localhost:${server.port}/api/mock/esb/api
|
||||
mcistring:
|
||||
url: http://localhost:${server.port}/api/mock/esb/string
|
||||
|
||||
spring:
|
||||
config:
|
||||
import: optional:classpath:glow/application-glow.yml
|
||||
41
dap-was-oth/src/main/resources/application-local.yml
Normal file
41
dap-was-oth/src/main/resources/application-local.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
# Local ?섍꼍 ?꾩슜 ?ㅼ젙 (H2 硫붾え由?DB ??
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:p6spy:h2:mem:testdb;DB_CLOSE_DELAY=-1;
|
||||
driverClassName: com.p6spy.engine.spy.P6SpyDriver
|
||||
username: sa
|
||||
password: password
|
||||
h2:
|
||||
console:
|
||||
enabled: true
|
||||
|
||||
eims:
|
||||
http:
|
||||
url: http://localhost:${server.port}/api/gateway
|
||||
tcp:
|
||||
host: 127.0.0.1
|
||||
port: 8090
|
||||
timeout: 5000
|
||||
jsp:
|
||||
form:
|
||||
url: http://localhost:${server.port}/mock/jsp-form
|
||||
json:
|
||||
url: http://localhost:${server.port}/mock/jsp-json
|
||||
mci:
|
||||
url: http://localhost:${server.port}/api/mock/esb/api
|
||||
mcistring:
|
||||
url: http://localhost:${server.port}/api/mock/esb/string
|
||||
|
||||
mcp:
|
||||
security:
|
||||
tenant-domains:
|
||||
mcp-client-1: CUSTOMER,COMMON
|
||||
mcp-client-2: ALL
|
||||
|
||||
axhub:
|
||||
tool:
|
||||
url: ${AXHUB_TOOL_URL:http://localhost:${server.port}}
|
||||
|
||||
sol:
|
||||
req-detail:
|
||||
mock-enabled: true
|
||||
19
dap-was-oth/src/main/resources/application.yml
Normal file
19
dap-was-oth/src/main/resources/application.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
server:
|
||||
port: 8084
|
||||
spring:
|
||||
application:
|
||||
name: dap-was-oth
|
||||
profiles:
|
||||
active: local
|
||||
logging:
|
||||
level:
|
||||
org.apache.kafka: ERROR
|
||||
mcp:
|
||||
namespace: ""
|
||||
manifest:
|
||||
bundle-id: tool-oth
|
||||
# Set the AA-assigned prefix before MCP pull activation (for example: oth.).
|
||||
name-prefix: ""
|
||||
security:
|
||||
tenant-domains:
|
||||
TESTER-DEV: ALL
|
||||
39
dap-was-oth/src/main/resources/logback-spring.xml
Normal file
39
dap-was-oth/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<!-- 1. 로그 패턴 설정 (MDC traceId 포함) -->
|
||||
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] %-5level %logger{36} - %msg%n" />
|
||||
|
||||
<!-- 2. 콘솔(Console) 출력 설정 (로컬 개발용) -->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 3. 파일(File) 출력 설정 (서버 운영용) -->
|
||||
<!-- Logback에서 시스템 Hostname을 가져오기 위한 설정 -->
|
||||
<property name="HOSTNAME" value="${HOSTNAME}" />
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>/swlog/dap-tool-oth/A01/${HOSTNAME}_A01.log</file> <!-- 현재 로그가 쌓이는 파일 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 매일 자정에 날짜를 붙여서 지난 로그를 분리 저장 -->
|
||||
<fileNamePattern>/swlog/dap-tool-oth/A01/${HOSTNAME}_A01_%d{yyyyMMdd}.log</fileNamePattern>
|
||||
<!-- 최대 30일치 로그만 보관하고 오래된 것은 자동 삭제 -->
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 4. 기본 로깅 레벨 설정 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
|
||||
<!-- 5. 우리 프로젝트 패키지는 디버그 레벨까지 상세히 보기 -->
|
||||
<logger name="io.shinhanlife" level="DEBUG" />
|
||||
</configuration>
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"claimNo": {
|
||||
"type": "string",
|
||||
"description": "청구번호. CLM 다음 숫자 13자리 형식이다.",
|
||||
"pattern": "^CLM[0-9]{13}$",
|
||||
"examples": ["CLM2026070100123"]
|
||||
},
|
||||
"contractNo": {
|
||||
"type": "string",
|
||||
"description": "계약번호. 숫자 11자리 형식이다.",
|
||||
"pattern": "^[0-9]{11}$",
|
||||
"examples": ["10023456789"]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RECEIVED", "REVIEWING", "ADDITIONAL_DOC_REQUIRED",
|
||||
"APPROVED", "PAID", "REJECTED", "WITHDRAWN"
|
||||
]
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 50,
|
||||
"default": 20
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"additionalProperties": false,
|
||||
"anyOf": [
|
||||
{ "required": ["claimNo"] },
|
||||
{ "required": ["contractNo"] }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"description": "Claim search response. This schema intentionally excludes employee identifiers, customer names, contact details, account information, and other PII.",
|
||||
"properties": {
|
||||
"resultCode": {
|
||||
"type": "string",
|
||||
"enum": ["SUCCESS", "FAILURE"],
|
||||
"description": "Machine-readable execution result code."
|
||||
},
|
||||
"resultLabel": {
|
||||
"type": "string",
|
||||
"description": "User-readable label for resultCode."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["RECEIVED", "REVIEWING", "ADDITIONAL_DOC_REQUIRED", "APPROVED", "PAID", "REJECTED", "WITHDRAWN"],
|
||||
"description": "Current claim processing status code."
|
||||
},
|
||||
"statusLabel": {
|
||||
"type": "string",
|
||||
"description": "User-readable label for status."
|
||||
},
|
||||
"approvedAmount": {
|
||||
"anyOf": [
|
||||
{ "type": "number", "minimum": 0 },
|
||||
{ "type": "null" }
|
||||
],
|
||||
"description": "Approved amount. It is null before review and must not be interpreted as zero."
|
||||
},
|
||||
"rejectionReason": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 200,
|
||||
"description": "Has a value only when status is REJECTED. It is null for every other status."
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"description": "Claim summaries ordered by receivedDate descending. No personally identifiable information is included.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": { "type": "string", "description": "Claim status code." },
|
||||
"statusLabel": { "type": "string", "description": "User-readable label for status." },
|
||||
"receivedDate": { "type": "string", "format": "date", "description": "Claim received date." },
|
||||
"approvedAmount": {
|
||||
"anyOf": [
|
||||
{ "type": "number", "minimum": 0 },
|
||||
{ "type": "null" }
|
||||
],
|
||||
"description": "Null before review; do not interpret as zero."
|
||||
}
|
||||
},
|
||||
"required": ["status", "statusLabel", "receivedDate"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"hasMore": {
|
||||
"type": "boolean",
|
||||
"description": "True when additional results exist beyond this response."
|
||||
},
|
||||
"totalCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Total number of matched claims."
|
||||
}
|
||||
},
|
||||
"required": ["resultCode", "resultLabel", "status", "statusLabel", "items", "hasMore", "totalCount"],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": { "status": { "const": "REJECTED" } },
|
||||
"required": ["status"]
|
||||
},
|
||||
"then": {
|
||||
"properties": { "rejectionReason": { "type": "string", "minLength": 1 } },
|
||||
"required": ["rejectionReason"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.util.JsonSchemaGenerator;
|
||||
import io.shinhanlife.dap.lib.util.ToolSchemaResolver;
|
||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.impl.ClaimSearchSchemaSampleUseCaseImpl;
|
||||
import io.shinhanlife.dap.mcc.presentation.ToolArgumentSchemaValidator;import io.shinhanlife.dap.mcc.biz.cmm.usecase.ClaimSearchSchemaSampleUseCase;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ClaimSearchRequestSchemaTest {
|
||||
|
||||
@Test
|
||||
void generatesClaimOrContractSearchSchema() {
|
||||
Map<String, Object> schema = JsonSchemaGenerator.generateSchema(ClaimSearchRequest.class);
|
||||
Map<String, Map<String, Object>> properties = properties(schema);
|
||||
|
||||
assertEquals(false, schema.get("additionalProperties"));
|
||||
assertEquals("^CLM[0-9]{13}$", properties.get("claimNo").get("pattern"));
|
||||
assertEquals(50L, properties.get("size").get("maximum"));
|
||||
assertEquals(20L, properties.get("size").get("default"));
|
||||
assertEquals(List.of(
|
||||
Map.of("required", List.of("claimNo")),
|
||||
Map.of("required", List.of("contractNo"))), schema.get("anyOf"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void resolvesSchemaFromToolModuleResource() throws Exception {
|
||||
Method method = ClaimSearchSchemaSampleUseCase.class
|
||||
.getDeclaredMethod("search", ClaimSearchRequest.class);
|
||||
McpFunction function = method.getAnnotation(McpFunction.class);
|
||||
|
||||
Map<String, Object> schema = new ToolSchemaResolver(new ObjectMapper())
|
||||
.resolve(function, ClaimSearchRequest.class);
|
||||
|
||||
assertEquals("https://json-schema.org/draft/2020-12/schema", schema.get("$schema"));
|
||||
assertTrue(schema.containsKey("anyOf"));
|
||||
assertEquals(50, property(schema, "size").get("maximum"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void resolvesOutputSchemaFromToolModuleResource() throws Exception {
|
||||
Method method = ClaimSearchSchemaSampleUseCase.class
|
||||
.getDeclaredMethod("search", ClaimSearchRequest.class);
|
||||
McpFunction function = method.getAnnotation(McpFunction.class);
|
||||
Map<String, Object> schema = new ToolSchemaResolver(new ObjectMapper()).resolveOutput(function);
|
||||
assertEquals("https://json-schema.org/draft/2020-12/schema", schema.get("$schema"));
|
||||
assertTrue(properties(schema).containsKey("resultCode"));
|
||||
assertTrue(properties(schema).containsKey("statusLabel"));
|
||||
assertTrue(properties(schema).containsKey("hasMore"));
|
||||
assertTrue(schema.containsKey("allOf"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void sampleResponseConformsToOutputSchema() throws Exception {
|
||||
Method method = ClaimSearchSchemaSampleUseCase.class
|
||||
.getDeclaredMethod("search", ClaimSearchRequest.class);
|
||||
Map<String, Object> schema = new ToolSchemaResolver(new ObjectMapper())
|
||||
.resolveOutput(method.getAnnotation(McpFunction.class));
|
||||
|
||||
ClaimSearchResponse response = new ClaimSearchSchemaSampleUseCaseImpl().search(new ClaimSearchRequest());
|
||||
ToolArgumentSchemaValidator validator = new ToolArgumentSchemaValidator(new ObjectMapper());
|
||||
|
||||
assertTrue(validator.validateValue(schema, response).isEmpty());
|
||||
}
|
||||
@Test
|
||||
void sampleResponseConformsToAutomaticallyGeneratedOutputSchema() throws Exception {
|
||||
Map<String, Object> schema = JsonSchemaGenerator.generateSchema(ClaimSearchResponse.class);
|
||||
ClaimSearchResponse response = new ClaimSearchSchemaSampleUseCaseImpl().search(new ClaimSearchRequest());
|
||||
ToolArgumentSchemaValidator validator = new ToolArgumentSchemaValidator(new ObjectMapper());
|
||||
|
||||
assertTrue(validator.validateValue(schema, response).isEmpty());
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
private Map<String, Map<String, Object>> properties(Map<String, Object> schema) {
|
||||
return (Map<String, Map<String, Object>>) schema.get("properties");
|
||||
}
|
||||
|
||||
private Map<String, Object> property(Map<String, Object> schema, String name) {
|
||||
return properties(schema).get(name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.shinhanlife.dap.mcc.biz.oth.usecase.impl;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.oth.converter.Onnba3011Converter;
|
||||
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.oth.usecase.impl
|
||||
* @className OnnbaMciToolUseCaseImplTest
|
||||
* @description ONNBA MCI tool use case test
|
||||
* @author 0986406
|
||||
* @create 2026.07.27
|
||||
* <pre>
|
||||
* ---------- revision history ----------
|
||||
* date author description
|
||||
* ---------- --------- ---------------------------
|
||||
* 2026.07.27 0986406 initial creation
|
||||
* </pre>
|
||||
*/
|
||||
class Onnba3011UseCaseImplTest {
|
||||
|
||||
@Test
|
||||
void convertsToolRequestBeforeCallingMciClient() throws Exception {
|
||||
MciCfpaClient mciCfpaClient = Mockito.mock(MciCfpaClient.class);
|
||||
Onnba3011Converter converter = Mockito.mock(Onnba3011Converter.class);
|
||||
Onnba3011UseCaseImpl useCase = new Onnba3011UseCaseImpl(mciCfpaClient, converter);
|
||||
Onnba3011Request request = new Onnba3011Request();
|
||||
CLCNNB00001_I mciRequest = new CLCNNB00001_I();
|
||||
|
||||
when(converter.toMciRequest(request)).thenReturn(mciRequest);
|
||||
when(mciCfpaClient.callCfpa0001(mciRequest)).thenReturn("success");
|
||||
|
||||
Object result = useCase.callOnnba3011(request);
|
||||
|
||||
assertEquals("success", result);
|
||||
verify(converter).toMciRequest(request);
|
||||
verify(mciCfpaClient).callCfpa0001(mciRequest);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase.impl;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.converter.SolReqDetailConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqDetailResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.MciNclgClient;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.biz.sol.usecase.impl
|
||||
* @className SolReqDetailUseCaseImplTest
|
||||
* @description AX HUB 시스템 처리 클래스
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
class SolReqDetailUseCaseImplTest {
|
||||
|
||||
@Test
|
||||
void returnsLocalSampleDetailBySrId() {
|
||||
MciNclgClient mci = Mockito.mock(MciNclgClient.class);
|
||||
SolReqDetailConverter converter = Mockito.mock(SolReqDetailConverter.class);
|
||||
SolReqDetailUseCaseImpl useCase = new SolReqDetailUseCaseImpl(mci, converter);
|
||||
ReflectionTestUtils.setField(useCase, "mockEnabled", true);
|
||||
|
||||
SolReqDetailRequest request = new SolReqDetailRequest();
|
||||
request.setSrId("SR-2026-001");
|
||||
|
||||
SolReqDetailResponse response = (SolReqDetailResponse) useCase.execute(request);
|
||||
|
||||
assertThat(response.getSrId()).isEqualTo("SR-2026-001");
|
||||
assertThat(response.getSrName()).isEqualTo("AX HUB 메인 화면 UI 개편");
|
||||
Mockito.verifyNoInteractions(mci);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sol.usecase.impl;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sol.converter.SolReqListConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListResponse;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.MciNclgClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_I;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.ncl.g.io.SOLG00000001_O;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
class SolReqListUseCaseImplTest {
|
||||
|
||||
@Test
|
||||
void callsMciWithConvertedRequestAndReturnsDummyResponse() throws Exception {
|
||||
MciNclgClient mci = Mockito.mock(MciNclgClient.class);
|
||||
SolReqListConverter converter = Mockito.mock(SolReqListConverter.class);
|
||||
SolReqListUseCaseImpl useCase = new SolReqListUseCaseImpl(mci, converter);
|
||||
SolReqListRequest request = new SolReqListRequest();
|
||||
SOLG00000001_I mciRequest = new SOLG00000001_I();
|
||||
|
||||
when(converter.toLegacyRequest(request)).thenReturn(mciRequest);
|
||||
when(mci.callTo(eq("SOLG00000001"), eq("SOLG00000001"), eq(mciRequest), eq(SOLG00000001_O.class)))
|
||||
.thenReturn(new Transfer<>());
|
||||
|
||||
SolReqListResponse response = (SolReqListResponse) useCase.execute(request);
|
||||
|
||||
verify(converter).toLegacyRequest(request);
|
||||
verify(mci).callTo("SOLG00000001", "SOLG00000001", mciRequest, SOLG00000001_O.class);
|
||||
assertThat(response.getReqList()).extracting(SolReqListResponse.SolReqListItem::getSrId)
|
||||
.containsExactly("SR-2026-001", "SR-2026-002");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.converter;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.oth.converter.Onnba3011Converter;
|
||||
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.io.CLCNNB00001_I;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.converter
|
||||
* @className Onnba3011MciRequestConverterTest
|
||||
* @description ONNBA 3011 request converter test
|
||||
* @author 0986406
|
||||
* @create 2026.07.27
|
||||
* <pre>
|
||||
* ---------- revision history ----------
|
||||
* date author description
|
||||
* ---------- --------- ---------------------------
|
||||
* 2026.07.27 0986406 initial creation
|
||||
* </pre>
|
||||
*/
|
||||
class Onnba3011MciRequestConverterTest {
|
||||
|
||||
private final Onnba3011Converter converter = Mappers.getMapper(Onnba3011Converter.class);
|
||||
|
||||
@Test
|
||||
void mapsRootAndNestedRequestFieldsToMciPayload() {
|
||||
Onnba3011Request source = request();
|
||||
|
||||
CLCNNB00001_I result = converter.toMciRequest(source);
|
||||
|
||||
assertEquals("A", result.getDalScCd());
|
||||
assertEquals("123456", result.getCsNo());
|
||||
assertNotNull(result.getUnfcPrbuIrcoAddu());
|
||||
assertNotNull(result.getSucoIspaBasDto());
|
||||
assertEquals("01", result.getSucoIspaBasDto().getCcnDalTypCd());
|
||||
assertEquals("20260727", result.getSucoIspaBasDto().getSucoYmd());
|
||||
}
|
||||
|
||||
private Onnba3011Request request() {
|
||||
Onnba3011Request request = new Onnba3011Request();
|
||||
request.setDalScCd("A");
|
||||
request.setCsNo("123456");
|
||||
request.setUnfcPrbuIrcoAddu(new Onnba3011Request.UnfcPrbuIrcoAdduDto());
|
||||
|
||||
Onnba3011Request.SucoIspaBasDto suco = new Onnba3011Request.SucoIspaBasDto();
|
||||
suco.setCcnDalTypCd("01");
|
||||
suco.setSucoYmd("20260727");
|
||||
request.setSucoIspaBasDto(suco);
|
||||
return request;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user