Compare commits

24 Commits

Author SHA1 Message Date
b61bf7093d 261022_02_ENH: 공용 라이브러리 버전업 2026-10-22 09:58:02 +09:00
8d82399dc7 261022_01_ENH: Class에서 record로 변경가능한 Dto들 record로 변경 2026-10-22 09:48:37 +09:00
cb98f4ccd3 261012_01_ENH: 로그인시 분류가 안되는 userRole을 1001에서 5001로 변경 2026-10-12 15:12:05 +09:00
ce35a8e303 261006_02_ENH: 공용 라이브러리 버전업 2026-10-06 14:05:37 +09:00
6f5186a8a0 261006_01_ENH: AI Agent용 하네스 변경 적용 2026-10-06 14:01:05 +09:00
066c3cc88b 260806_02_ENH: AI Agent 하네스 적용 및 KriCommon 버전 정렬 2026-08-06 15:46:09 +09:00
01e3ae13c3 260805_01_ENH: swagger sort용 속성 yml에 추가 2026-08-05 10:45:53 +09:00
018d0f2e90 260723_01_ENH: p_child_sn 배열로 프로젝트 정보 조회 기능 추가 2026-07-23 11:59:12 +09:00
3867dbd4a4 260722_04_ENH: 공용 패키지 고정 버전으로 다시 수정(최신 패키지 적용이 잘 안됨) 2026-07-22 11:39:20 +09:00
0063943b5d 260722_03_ENH: 공용 패키지 항상 최신 버전 사용하도록 수정 2026-07-22 11:20:38 +09:00
5c23721b65 260722_02_ENH: 그룹 코드정보에 T900(TF) 추가 2026-07-22 11:00:56 +09:00
06d4fd9ed5 260722_01_ENH: 내부 사용자 소속회사 변경 2026-07-22 10:33:41 +09:00
a22eb833bc 260721_01_ENH: 그룹 정보 조회 api 추가 2026-07-21 15:39:38 +09:00
7ca0fe409f 260716_01_ENH: 가용번호 조회 API 추가 2026-07-16 10:57:55 +09:00
fb40dfb483 260626_01_ENH: admin용 api 보이고 사용 가능하게 수정 2026-06-26 16:01:53 +09:00
a46d6af4ef 260612_01_ENH: 단축 url 기능 제거 및 api 확인용 db 정보 이관 2026-06-12 11:50:13 +09:00
3baef8ec98 260609_04_ENH: 단축 url test 완료 기능 막아 놓음 2026-06-09 17:58:21 +09:00
3a198732cd 260609_03_ENH: 단축 url get메소드로 변경 2026-06-09 17:50:24 +09:00
de76bdbe75 260609_02_ENH: 단축 url 접근 권한 및 url 수정 2026-06-09 17:42:54 +09:00
b601c3fce8 260609_01_ENH: 단축 url 테스트 2026-06-09 17:36:14 +09:00
7881ac8433 260407_01_ENH: swagger 허용 ip 추가 2026-04-07 11:16:24 +09:00
1941669ac1 260327_04_ENH: 주입된 의존성 중 위험이 보고된 버전 수정 2026-03-27 14:22:29 +09:00
9527fb8052 260327_02_ENH: kri.common 라이브러리 JWT 버전 충돌 해결 적용 2026-03-27 12:14:30 +09:00
c57fb1fe12 260327_01_ENH: kri.common 라이브러리 리펙토링으로 인한 참조 경로 수정 2026-03-27 12:01:41 +09:00
43 changed files with 1017 additions and 64 deletions

View File

@@ -0,0 +1,14 @@
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Contract: kri-common
Source: .agent/consumer-references/crypto-contract.md
-->
# KriCommon Crypto Contract
- Crypto APIs are under `com.kri.common.feature.crypto.*` and do not use a central key database.
- AES uses PBKDF2-HMAC-SHA256 key derivation with salt and defaults to AES-256-GCM; callers may supply a master key, salt, IV, AAD, and detached or appended GCM tag representation for legacy interoperability.
- `kri.crypto.aes.keys` and per-call master keys are supported operational compromises. Never log them or commit real values.
- Per-call key material takes precedence over configured keys, and encrypted values retain key ID and KDF metadata for decryption compatibility.
- AES-GCM always requires its authentication tag. Use `AES_256_CBC_PKCS5` only for explicitly identified legacy data that has no tag, and do not treat CBC as authenticated encryption.
- `DigestService` supports SHA-256/SHA-512 plus legacy-only MD5/SHA-1. `AdaptiveHashService` uses BCrypt for short secrets; do not use MD5, SHA-1, or a fast digest for new password or secret storage.

View File

@@ -0,0 +1,28 @@
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Contract: kri-common
Source: .agent/consumer-references/platform-capabilities.md
-->
# KriCommon Platform Capabilities
## Dependency and Configuration Boundary
- Include the matching Spring starter for any optional Web, Security, JPA, Redis, AOP, or Swagger integration the service enables; KriCommon intentionally declares many integrations as compile-only.
- KriCommon configuration uses only `kri.*`. Established groups include `kri.auth.jwt`, `kri.auth.apikey`, `kri.crypto`, `kri.security`, `kri.swagger`, `kri.web`, `kri.web.mdc`, `kri.http.bypass`, `kri.redis`, `kri.scheduling`, and `kri.error.expose`.
- Read the version-matched README and configuration-property classes before setting a property; do not infer a property name or default from an older service.
- Supply production JWT secrets, API keys, credentials, allowlists, and service URLs through the consumer's approved secret and configuration system. Never rely on library example or default secrets in production.
- Preserve consumer override points. KriCommon's default security chain is created only when the consumer does not provide one, and overridable beans should remain explicit.
- Adding a path to API-key allowed paths scopes where API-key authentication is attempted; it does not make the path public or grant authorization.
## Optional Capabilities
- JWT and API-key authentication integrate with Spring Security. API-key JPA preload requires Spring Data JPA; a consumer-provided claims provider can be used without JPA.
- Common Web may register error handling, tracing/MDC, request-user resolution, enum conversion, and CORS behavior. Check for overlap before defining consumer-local equivalents.
- Swagger support requires springdoc and defines the shared Bearer/API-key schemes and grouped paths.
- Redis and scheduling are opt-in through their `kri.*.enabled` settings and matching runtime dependencies.
- HTTP bypass targets are server-configured. Never accept an arbitrary full target URL from a frontend; retain allowed-path checks and do not forward hop-by-hop headers.
- The external API client returns response bodies as documented, while bypass responses preserve raw bytes and target `Content-Type`.
- `ExternalApiClient` multipart requests generate their own boundary and ignore a caller-supplied `Content-Type`. Multipart headers and `formField` values use UTF-8, while file bodies preserve the supplied bytes.
- Multipart filenames, including non-ASCII names, are sent unchanged in the quoted `filename` parameter as raw UTF-8. No ASCII fallback or `filename*` parameter is added; CR/LF rejection and quote/backslash escaping still apply.
- `JsonUtil` requires the consumer's explicit `ObjectMapper`; shared date/time helpers define KST as `Asia/Seoul` and also expose UTC semantics.

View File

@@ -0,0 +1,13 @@
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Contract: kri-common
Source: .agent/consumer-references/upgrade-and-verification.md
-->
# KriCommon Upgrade and Verification
- Review KriCommon release notes, README changes, configuration defaults, auto-configuration conditions, and affected public APIs before upgrading.
- Commit dependency-lock or resolved-version changes according to the consumer repository's policy.
- Run the consumer's focused compile and tests after an upgrade, including application-context startup tests when auto-configuration or security behavior is affected.
- Keep `.agent/project.md` near 2-3 KiB as a routing document. Do not delete material rules to meet the budget; move conditional schema, query, API, and migration details to routed `.agent/references/` documents.
- Do not modify KriCommon or another consumer repository unless it is explicitly included in the approved task scope.

25
.agent/profile.yml Normal file
View File

@@ -0,0 +1,25 @@
schema_version: 1
project:
id: intranet-extension
name: IntranetExtension
type: shared-service
layer: backend
legacy: false
stack:
- java-springboot
shared_contracts:
consumes:
- kri-common
databases:
- id: intranet-data
engine: mssql
role: primary
access: read-write
- id: api-key-data
engine: mysql
role: authentication
access: read-only

18
.agent/project.md Normal file
View File

@@ -0,0 +1,18 @@
# IntranetExtension Project Instruction Router
## Required Project References
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
| Task scope | Required reference |
|---|---|
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
## Harness Workflow
- `AGENTS.md` and `CLAUDE.md` are generated outputs. Never edit them directly.
- Edit `.agent/project.md` only when routing changes. Store durable project detail in `.agent/references/`.
- A reference-only content change does not require recomposition when its route is unchanged. Run harness verification to validate routing and UTF-8.
- Recompose and verify after changing `.agent/project.md`, `.agent/profile.yml`, or another composed instruction source.

View File

@@ -0,0 +1,28 @@
## IntranetExtension Repository Rules
### Repository Role and Boundaries
- This repository is a Java 17 Spring Boot shared service for intranet project, user, and telephone-number lookup APIs.
- Treat request and response DTOs, endpoint paths, query semantics, error responses, authentication behavior, and caller-facing defaults as contracts used by other projects.
- Preserve the established controller, service, mapper, configuration, DTO, and persistence boundaries. Keep controllers thin and place query orchestration and business rules in services.
- Consume KriCommon through `com.kri.common:starter:beta.1.6.3`. Do not change that approved version or duplicate a KriCommon feature without separate explicit approval.
### Persistence Safety
- The primary intranet data source is MSSQL and uses the repository's MyBatis conventions. The MySQL JPA data source is limited to KriCommon API-key authentication data.
- Do not mix the two data-source dialects, transactions, entities, repositories, or configuration paths.
- Preserve mapper parameter names, result mappings, stored-procedure or query result shapes, null behavior, and ordering relied on by consumers.
- Treat authentication data as read-only. Do not add writes to the API-key data source without separate explicit approval.
- Do not execute SQL, migrations, stored procedures, or data corrections as part of source-code validation.
### API and Security Safety
- Preserve authentication, authorization, validation, allowlists, response conventions, and sensitive-data masking when changing an endpoint.
- Minimize returned personal and organizational data. Never log credentials, API keys, user identifiers in bulk, telephone numbers, or complete request and response bodies containing sensitive data.
- Prefer backward-compatible endpoint and DTO evolution. Report affected consumers and rollback considerations for any externally visible change.
### Documentation and Verification
- `AGENTS.md` and `CLAUDE.md` are harness-generated outputs. Never edit either file directly; edit `.agent/project.md` or `.agent/profile.yml` and recompose instead.
- Use the repository Gradle Wrapper and run `.\gradlew.bat compileJava` on Windows for relevant changes, followed by focused tests when safe.
- Do not start the service, connect to real databases, or call intranet business endpoints during validation without separate explicit approval.

View File

@@ -0,0 +1,41 @@
---
name: attention-aware-communication
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/attention-aware-communication/SKILL.md
-->
# Attention-Aware Communication
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
## Default: Attention-kind
- Put the bottom line in the first sentence and use plain Korean.
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
## Progress and Completion: Rundown
Use Rundown formatting when a task has multiple steps or mixed states:
- Start with a one-line outcome that includes any blocker.
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
- Put each blocker or material risk on its own line.
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
- End with the next action or a small numbered choice only when the user must decide.
## Explicit-Only: Spartan
Use Spartan style only when the user explicitly asks for it:
- Lead with the complete answer in one sentence.
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
- If the user also asks for depth, provide the full detail in short, separated blocks.

View File

@@ -0,0 +1,37 @@
---
name: karpathy-guidelines
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/karpathy-guidelines/SKILL.md
-->
# Karpathy Guidelines
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
## Think Before Coding
- Inspect the relevant code and repository conventions before choosing a solution.
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
## Simplicity First
- Implement the smallest complete solution that satisfies the observable requirement.
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
- Prefer an existing repository pattern or standard-library capability over a new local framework.
## Surgical Changes
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
## Goal-Driven Execution
- Translate the request into observable success criteria before implementation.
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.

View File

@@ -0,0 +1,29 @@
---
name: project-reference-loader
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/project-reference-loader/SKILL.md
-->
# Project Reference Loader
Use the repository's generated `AGENTS.md` as the routing entrypoint.
## Workflow
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
## Change Handling
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
- Never edit generated `.agent-harness/references/` copies directly.
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.

View File

@@ -0,0 +1,38 @@
---
name: verification-before-completion
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/verification-before-completion/SKILL.md
-->
# Verification Before Completion
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
## Verification Gate
Before making a success claim:
1. State the exact claim internally and identify which observable check can prove or disprove it.
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
4. Compare the evidence with the claim and the approved acceptance criteria.
5. Report only the status supported by that evidence.
## Evidence Rules
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
## Reporting
- Cite the commands or inspections actually run and summarize their observed results.
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.

View File

@@ -0,0 +1,41 @@
---
name: attention-aware-communication
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/attention-aware-communication/SKILL.md
-->
# Attention-Aware Communication
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
## Default: Attention-kind
- Put the bottom line in the first sentence and use plain Korean.
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
## Progress and Completion: Rundown
Use Rundown formatting when a task has multiple steps or mixed states:
- Start with a one-line outcome that includes any blocker.
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
- Put each blocker or material risk on its own line.
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
- End with the next action or a small numbered choice only when the user must decide.
## Explicit-Only: Spartan
Use Spartan style only when the user explicitly asks for it:
- Lead with the complete answer in one sentence.
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
- If the user also asks for depth, provide the full detail in short, separated blocks.

View File

@@ -0,0 +1,37 @@
---
name: karpathy-guidelines
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/karpathy-guidelines/SKILL.md
-->
# Karpathy Guidelines
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
## Think Before Coding
- Inspect the relevant code and repository conventions before choosing a solution.
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
## Simplicity First
- Implement the smallest complete solution that satisfies the observable requirement.
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
- Prefer an existing repository pattern or standard-library capability over a new local framework.
## Surgical Changes
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
## Goal-Driven Execution
- Translate the request into observable success criteria before implementation.
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.

View File

@@ -0,0 +1,29 @@
---
name: project-reference-loader
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/project-reference-loader/SKILL.md
-->
# Project Reference Loader
Use the repository's generated `AGENTS.md` as the routing entrypoint.
## Workflow
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
## Change Handling
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
- Never edit generated `.agent-harness/references/` copies directly.
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.

View File

@@ -0,0 +1,38 @@
---
name: verification-before-completion
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
---
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Source: skills/verification-before-completion/SKILL.md
-->
# Verification Before Completion
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
## Verification Gate
Before making a success claim:
1. State the exact claim internally and identify which observable check can prove or disprove it.
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
4. Compare the evidence with the claim and the approved acceptance criteria.
5. Report only the status supported by that evidence.
## Evidence Rules
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
## Reporting
- Cite the commands or inspections actually run and summarize their observed results.
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.

4
.gitattributes vendored
View File

@@ -1,3 +1,7 @@
/gradlew text eol=lf /gradlew text eol=lf
*.bat text eol=crlf *.bat text eol=crlf
*.jar binary *.jar binary
/AGENTS.md text eol=lf
/CLAUDE.md text eol=lf
/.agent/*.md text eol=lf
/.agent/*.yml text eol=lf

287
AGENTS.md Normal file
View File

@@ -0,0 +1,287 @@
<!--
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
Project: intranet-extension
Schema version: 1
Edit the source fragments or repository .agent files, then recompose.
-->
# KRI Development Base Instructions
This document defines the shared working rules for KRI development repositories.
Keep project-specific facts and commands in the project profile and project rules.
## Instruction Resolution
Apply repository instructions in this order:
1. Base rules
2. Project-type rules
3. Technology-stack rules
4. Shared consumer contracts
5. Project-specific rules
6. The explicitly approved task scope
Later and more specific instructions may override earlier general instructions only within their stated scope.
- Apply a shared consumer contract only when `.agent/profile.yml` declares it.
- Do not silently resolve a material instruction conflict. Report the conflicting rules and request a decision before changing files.
- Rules involving destructive actions, credentials, external systems, production, deployment, databases, or Git publication require explicit authorization even when a later rule is less restrictive.
## Communication
- Respond to the user in Korean unless the user requests another language.
- Keep code identifiers, commands, paths, protocol names, and external API terms in their original form.
- Follow the repository's existing language conventions for code comments and user-facing messages.
- Lead with the result or decision, then provide only the detail needed to verify it.
- Do not create or retain a full session transcript.
### Attention-Aware Response Style
- Use `attention-aware-communication` for substantive answers, progress updates, and completion reports.
- Default to concise, bottom-line-first Korean without omitting a condition, risk, number, or uncertainty needed for a correct decision.
- Give full detail when the user requests depth. Use Spartan style only when explicitly requested.
- Presentation rules never reduce investigation, implementation, validation, or reporting obligations.
## Work Authorization
- The default workflow is discussion first and explicit execution approval second.
- During discussion, perform only read-only investigation needed to understand the task and propose a concrete plan, unless the user prohibits inspection.
- Read-only investigation may include file inspection, code search, encoding checks, `git status`, `git diff`, `git log`, and sanitized official-documentation lookup.
- Before execution approval, do not edit files, install dependencies, run builds or tests, start services, connect to databases, or change local or external state.
- Before requesting approval, describe the intended scope, affected areas, validation plan, and material risks.
- Treat approval as limited to the presented scope. Pause and discuss again if the work materially expands.
- If the user explicitly requests immediate execution without prior discussion, the discussion gate may be skipped for the stated scope.
- Fast-track authorization does not implicitly authorize protected operations such as destructive commands, production changes, deployments, database mutations, Git publication, or external messages.
## Local Development Environment
- Primary OS: Windows 11.
- Primary shell: PowerShell.
- Use Git Bash only when the repository already depends on Bash or POSIX shell behavior.
- Prefer repository-provided wrappers and scripts over globally installed commands.
- Do not assume that GNU utilities, WSL, Docker, or a Unix-compatible shell are available unless the project profile confirms them.
- Detect Java, Node.js, .NET, Python, package-manager, and database-tool versions from repository configuration.
- Do not install or modify global toolchains as part of a project task.
Preferred human-facing tools:
- Classic ASP: Visual Studio Code
- Java and Spring Boot: IntelliJ IDEA
- C# and .NET: JetBrains Rider
- JavaScript, TypeScript, and Next.js: JetBrains WebStorm
- Python: JetBrains PyCharm
- Microsoft SQL Server: SQL Server Management Studio
- Other databases: JetBrains DataGrip
- These preferences do not authorize launching or controlling a GUI application.
- Prefer IDE-independent commands that can also run in CI.
- Do not modify global IDE settings.
- Do not create or modify `.idea`, `.vscode`, workspace, or run-configuration files unless the approved task requires it.
- Preserve existing shared IDE configuration when it is already tracked.
## PowerShell and Path Safety
- Quote paths containing spaces, brackets, parentheses, Korean characters, or PowerShell metacharacters.
- Prefer `-LiteralPath` when operating on an exact filesystem path.
- Use project-relative paths in committed configuration and documentation. Do not commit machine-specific paths such as `D:\_____Dev\...`.
- Do not pass filesystem targets between PowerShell, `cmd.exe`, and Bash for destructive or recursive operations.
- Keep a filesystem operation within one shell from target resolution through execution.
- Before a recursive delete or move, resolve and verify every absolute target.
- Never use a drive root, workspace root, user profile, unresolved variable, wildcard, or broad glob as a recursive delete target.
- Prefer recoverable operations when practical.
## Change Discipline
- Preserve all existing user changes, including uncommitted and untracked work.
- Keep changes minimal but complete for the approved objective.
- Avoid unrelated cleanup, formatting, renaming, dependency upgrades, and architectural refactoring.
- Do not overwrite or revert unrelated changes.
- Stop and report when the requested change overlaps existing work in a way that cannot be handled safely.
- Prefer changing an authoritative source over editing generated output.
- Treat files marked as generated as read-only unless regeneration is part of the approved plan.
- Do not edit vendored dependencies, build outputs, caches, or generated clients unless explicitly required.
- Do not regenerate a broad set of files for a narrow change without first explaining the expected output scope.
## Text Encoding and Korean Content Safety
- Treat the existing file encoding, BOM state, and line-ending style as part of the file's contract.
- Preserve Korean comments, user-facing messages, error messages, identifiers, and documentation exactly unless the task explicitly requires changing them.
- Do not assume that garbled terminal output means the file itself is corrupted. Verify bytes and encoding before modifying suspicious text.
- Before editing an existing text file, determine its current encoding and BOM state when repository configuration does not already guarantee them.
- Do not convert encoding, add or remove a BOM, or normalize line endings as a side effect of an unrelated change.
- Avoid whole-file rewrites for small changes.
- Do not rewrite source files through `Get-Content | Set-Content`, `Out-File`, shell redirection, or another method whose encoding behavior is implicit.
- Do not use a patching or formatting tool on a non-UTF-8 file unless it is known to preserve that file's encoding.
- Treat a console display problem and an on-disk encoding problem as separate issues.
- After editing Korean text, inspect the diff for replacement characters (`<60>`), mojibake, unexpected escapes, BOM changes, and unrelated line-ending changes.
- Run `.agent/tools/check-encoding.ps1` when it is available and the change touches Korean text or a non-default encoding.
- If encoding cannot be identified confidently, stop before writing and report the affected file and evidence.
- For a new text file, follow repository configuration. If no rule exists, use UTF-8 without BOM.
## Git Safety
- Use `git status`, `git diff`, and `git log` for read-only investigation.
- Do not run `commit`, `push`, `pull`, `fetch`, `merge`, `rebase`, `reset`, `checkout`, `switch`, `stash`, `clean`, `tag`, or force operations unless that specific operation is explicitly approved.
- Source-edit approval does not include commit or push approval.
- Never amend an existing commit unless explicitly requested.
- Before an approved commit, show the intended files, validation results, and proposed commit message.
- Never push directly to a protected branch unless the user names the target branch and explicitly authorizes the push.
## Dependencies and External Actions
- Use the package manager, lockfile, and toolchain already selected by the repository.
- Do not install global packages.
- Do not add, remove, or upgrade a dependency unless it was included in the approved plan.
- Pause for approval if an unplanned dependency becomes necessary.
- Keep lockfiles synchronized with approved dependency changes.
- Do not deploy, publish packages, create releases, send messages or email, call business APIs, or modify external services unless explicitly requested.
- Never upload proprietary source code, internal documents, credentials, customer data, or database contents to an external service.
- Remove secrets and unnecessary internal identifiers from external search queries.
## Database Safety
- Treat writing or reviewing SQL as source code separately from executing SQL against a database.
- SQL files, migrations, schema proposals, and query drafts may be created within an approved source-change scope.
- Do not connect to a shared, staging, or production database without explicit authorization for that environment.
- Read-only queries against a non-local database also require authorization because results may contain sensitive data.
- Do not execute DDL, DML, stored procedures, migrations, administrative commands, or data-correction scripts against a non-disposable database without separate authorization for the exact target and operation.
- Source-change approval does not authorize migration execution.
- Use a disposable local or test database for approved validation only after verifying its identity and disposable nature.
- Never place credentials, connection strings, or sensitive query results in source files, logs, generated documents, or chat output.
## Secrets and Sensitive Data
- Never add credentials, tokens, passwords, private keys, connection strings, session identifiers, or production data to source control.
- Read sensitive files only when the approved task requires it and no safer source exists.
- Prefer inspecting configuration keys and schemas without displaying secret values.
- Never echo secrets into terminal output, chat responses, logs, diffs, generated documents, test fixtures, or screenshots.
- Redact sensitive values when reporting errors or command output.
- If a possible secret is discovered, do not repeat it. Report only its location, type, and recommended containment action.
- Do not rotate, revoke, copy, or otherwise modify credentials unless that exact action is explicitly authorized.
## Workflow Skills
- Use `project-reference-loader` before substantive repository analysis, planning, implementation, debugging, or review. Read only the current project and shared references routed for that task, and reread them for each related task even if they were loaded earlier in the session.
- Use `karpathy-guidelines` when implementing, refactoring, or reviewing code. It keeps assumptions visible, changes surgical, and success criteria verifiable.
- Use `verification-before-completion` before claiming that work is complete, fixed, passing, ready, or safe to commit or publish.
- A skill does not expand task scope or authorize Git publication, database execution, deployment, destructive actions, or external communication.
## Validation
- Discover supported build, test, lint, type-check, and formatting commands from repository files and project instructions. Do not invent commands.
- Include intended validation in the discussion-phase plan.
- After approved changes, run the narrowest relevant validation first, then broader checks when appropriate.
- Limit formatting to files within the approved scope.
- Do not run tests that require a shared database, production service, paid external API, or sensitive data unless separately authorized.
- Do not claim that a check passed unless it was executed successfully.
- If a check cannot be run, state the exact reason.
- Distinguish a current-change failure from a pre-existing failure or an undetermined failure.
- Do not fix unrelated failures without expanding the approved scope.
- Inspect the worktree after validation for unexpected generated files, formatting churn, encoding changes, or lockfile changes.
## Artifacts and Session Records
- Do not create full-session transcripts, automatic HTML copies, analysis reports, or extra documentation unless explicitly requested.
- Store durable information in the repository's existing documentation structure.
- Do not place generated reports or temporary analysis files in the repository root.
- Remove task-specific temporary files created by the current task after validation when removal is safe.
## Completion Report
When implementation is complete, report in Korean:
- what changed and why;
- the main affected files or components;
- validation commands actually executed and their results;
- checks not executed and the reason;
- remaining risks, assumptions, or follow-up work;
- database, deployment, dependency, encoding, and compatibility impact when applicable.
- Do not report completion while required validation is failing or known encoding corruption is unresolved.
- Keep the report concise and do not include a full session transcript.
## Shared Service Project Rules
- Treat APIs, message formats, callback behavior, identifiers, error responses, and operational defaults as contracts used by multiple consumers.
- Prefer backward-compatible API and schema evolution.
- Identify all externally visible side effects before changing a request flow.
- Design retryable operations to be idempotent where duplicate execution could send multiple notifications, create duplicate records, or generate inconsistent results.
- Define explicit timeout, retry, and failure behavior for external dependencies.
- Do not send real email, SMS, notifications, callbacks, or business requests during development or validation.
- Use mocks, fakes, test recipients, or disposable local integrations only when their safety is verified.
- Do not expose credentials, message contents, personal data, shortened target URLs, or authentication material in logs.
- Preserve authentication, authorization, rate limits, validation, and abuse controls when modifying endpoints.
- Review database and rollout compatibility before changing persisted data or shared service behavior.
- Include consumer impact and rollback considerations in the completion report.
## Java and Spring Boot
- Treat the configured JDK, Spring Boot, Gradle, plugin, dependency, and package versions as authoritative.
- Use the repository's Gradle Wrapper. Do not substitute a machine-global Gradle installation.
- Preserve the established package layout and controller, application/service, domain, and persistence boundaries.
- Keep controllers thin, place business rules in the established service/domain layer, and prefer constructor injection.
- Apply request and configuration validation at boundaries and preserve the project's exception and response conventions.
- Make transaction boundaries explicit and narrow; do not add broad transactions to hide lifecycle or query problems.
- Preserve authentication, authorization, auditing, logging, and secret-management conventions.
- Do not edit generated QueryDSL or other generated sources. Change their source definitions and regenerate only when the repository workflow requires it.
- Use the approved KriCommon contract when the project profile includes it; do not duplicate shared backend behavior locally.
- Run the narrowest relevant Gradle compile, test, static-analysis, and build tasks.
## Microsoft SQL Server
- Use T-SQL syntax and behavior only for data sources whose declared engine is `mssql`.
- Preserve the configured SQL Server version, database and schema names, collation, naming, migration, and access conventions.
- Parameterize values. Do not build SQL by concatenating untrusted input.
- Preserve Unicode behavior and use the repository's established `nvarchar`/`nchar` and parameter conventions where Korean or other Unicode text is possible.
- Treat stored-procedure parameters, result sets, return values, transaction behavior, and error behavior as public contracts.
- Consider indexes and actual execution characteristics for changed filters, joins, ordering, grouping, and pagination.
- Do not introduce MySQL or other dialect syntax into MSSQL paths.
- Keep read-only legacy integrations read-only. A source-code change approval authorizes SQL analysis and script drafting only; execution requires separate explicit approval and the declared data-source access level.
## MySQL
- Use MySQL syntax and behavior only for data sources whose declared engine is `mysql`.
- Preserve the configured version, schema, character set, collation, time zone, naming, migration, and access conventions.
- Parameterize values. Do not build SQL by concatenating untrusted input.
- Consider indexes and execution plans for changed filters, joins, ordering, grouping, and pagination without guessing from small data sets.
- Preserve transaction, locking, null, date/time, decimal, and generated-key semantics.
- Do not introduce MSSQL or other dialect syntax into MySQL paths.
- A source-code change approval authorizes SQL analysis and migration drafting only. Execute DDL, DML, procedures, or migrations only with separate explicit approval and the declared data-source access level.
## KriCommon Consumer Contract
- Consume KriCommon as `com.kri.common:starter:<approved-version>` through the repository's established Gradle version-management convention.
- Import service-facing APIs from `com.kri.common.feature.*`; treat `com.kri.common.runtime.*` as internal.
- Prefer a shared feature or approved extension point over duplicating authentication, HTTP, error, enum, Excel, Redis, JSON, date/time, JPA, crypto, or utility behavior locally.
- Do not modify KriCommon or another consumer repository unless it is explicitly included in the approved task scope.
### Required Shared References
Before each related task, read the current contents of every matching reference, even if it was read earlier in the session.
| Task scope | Required reference |
|---|---|
| Dependency, configuration, security, Web, Swagger, Redis, scheduling, HTTP, JSON, or date/time behavior | `.agent-harness/references/kri-common/platform-capabilities.md` |
| Encryption, hashing, key material, or legacy crypto interoperability | `.agent-harness/references/kri-common/crypto-contract.md` |
| KriCommon version upgrade or consumer verification | `.agent-harness/references/kri-common/upgrade-and-verification.md` |
If a task spans multiple scopes, read every matching reference. Generated files under `.agent-harness/references/` are read-only copies; edit KriCommon's `.agent/consumer.md` or `.agent/consumer-references/` and recompose instead.
# IntranetExtension Project Instruction Router
## Required Project References
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
| Task scope | Required reference |
|---|---|
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
## Harness Workflow
- `AGENTS.md` and `CLAUDE.md` are generated outputs. Never edit them directly.
- Edit `.agent/project.md` only when routing changes. Store durable project detail in `.agent/references/`.
- A reference-only content change does not require recomposition when its route is unchanged. Run harness verification to validate routing and UTF-8.
- Recompose and verify after changing `.agent/project.md`, `.agent/profile.yml`, or another composed instruction source.

1
CLAUDE.md Normal file
View File

@@ -0,0 +1 @@
@AGENTS.md

View File

@@ -37,7 +37,7 @@ repositories {
} }
dependencies { dependencies {
implementation "com.kri.common:starter:beta.1.0.66" implementation "com.kri.common:starter:beta.1.7.0"
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-security'
@@ -45,7 +45,7 @@ dependencies {
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.11" implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.11"
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.5' implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.5'
implementation 'com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11' // 버전은 환경 맞춰 조정 implementation 'com.microsoft.sqlserver:mssql-jdbc:13.2.1.jre11' // 버전은 환경 맞춰 조정
//API key 조회를 위한 mysql 컨넥터와 jpa //API key 조회를 위한 mysql 컨넥터와 jpa
implementation "org.springframework.boot:spring-boot-starter-data-jpa" implementation "org.springframework.boot:spring-boot-starter-data-jpa"

View File

@@ -39,4 +39,15 @@ public class ProjectController {
) { ) {
return projectService.getProjectTop10(getProjectTop10RequestDto); return projectService.getProjectTop10(getProjectTop10RequestDto);
} }
@Operation(
summary = "프로젝트 조회",
description = "p_child_sn 조건으로 프로젝트를 조회합니다."
)
@PostMapping("search/all/with-p-child-sn")
public List<GetProjectTop10ResponseDto> getProjectWithPChildSn(
@RequestBody List<String> pChildSnList
) {
return projectService.getProjectWithPChildSn(pChildSnList);
}
} }

View File

@@ -0,0 +1,24 @@
package com.kri.intranet.extension.controller;
import com.kri.intranet.extension.dto.telnum.response.GetCallerTelNumResponseDto;
import com.kri.intranet.extension.service.TelNumService;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/v1/telnum")
@RequiredArgsConstructor
@Tag(name = "TelNum", description = "전화번호 조회 API")
public class TelNumController {
private final TelNumService telNumService;
@GetMapping("/caller")
public List<GetCallerTelNumResponseDto> getCallerTelNum() {
return telNumService.getCallerTelNum();
}
}

View File

@@ -1,5 +1,6 @@
package com.kri.intranet.extension.controller; package com.kri.intranet.extension.controller;
import com.kri.intranet.extension.dto.user.GroupCodeInfoDto;
import com.kri.intranet.extension.dto.user.request.GetUserWithIdPwRequestDto; import com.kri.intranet.extension.dto.user.request.GetUserWithIdPwRequestDto;
import com.kri.intranet.extension.dto.user.UserBasicInfoDto; import com.kri.intranet.extension.dto.user.UserBasicInfoDto;
import com.kri.intranet.extension.service.UserService; import com.kri.intranet.extension.service.UserService;
@@ -53,4 +54,13 @@ public class UserController {
public List<String> getUserIdArray() { public List<String> getUserIdArray() {
return userService.getUserIdArray(); return userService.getUserIdArray();
} }
@Operation(
summary = "그룹 코드 목록 조회",
description = "그룹 코드 목록 조회"
)
@GetMapping("group-code-list")
public List<GroupCodeInfoDto> getGroupCodeList() {
return userService.getGroupCodeList();
}
} }

View File

@@ -1,16 +1,14 @@
package com.kri.intranet.extension.dto.jwt; package com.kri.intranet.extension.dto.jwt;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.Builder;
@Builder @Builder
@Getter public record InternalJwtDto(
@Setter
@AllArgsConstructor
public class InternalJwtDto {
@Schema(description = "서비스 ID ex) INTRANET_EXTENSION") @Schema(description = "서비스 ID ex) INTRANET_EXTENSION")
private String serviceId; String serviceId,
@Schema(description = "서비스명 ex) Intranet Extension Service") @Schema(description = "서비스명 ex) Intranet Extension Service")
private String serviceName; String serviceName
) {
} }

View File

@@ -1,17 +1,13 @@
package com.kri.intranet.extension.dto.project.request; package com.kri.intranet.extension.dto.project.request;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "프로젝트 검색 조건 DTO") @Schema(description = "프로젝트 검색 조건 DTO")
public class GetProjectTop10RequestDto { public record GetProjectTop10RequestDto(
@Schema(description = "프로젝트 자식 일련번호 (p_child_sn LIKE 검색)") @Schema(description = "프로젝트 자식 일련번호 (p_child_sn LIKE 검색)")
private String childSn; // p_child_sn용 파라미터 String childSn, // p_child_sn용 파라미터
@Schema(description = "제목/의도 통합 키워드 (p_subject / p_intention 공용)") @Schema(description = "제목/의도 통합 키워드 (p_subject / p_intention 공용)")
private String keyword; // p_subject + p_intention 공용 파라미터 String keyword // p_subject + p_intention 공용 파라미터
) {
} }

View File

@@ -3,24 +3,22 @@ package com.kri.intranet.extension.dto.project.response;
import com.kri.intranet.extension.entity.project.ProjectBasicInfoEntity; import com.kri.intranet.extension.entity.project.ProjectBasicInfoEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder; import lombok.Builder;
import lombok.Getter;
@Getter
@Builder @Builder
@Schema(description = "프로젝트 조회 결과 DTO") @Schema(description = "프로젝트 조회 결과 DTO")
public class GetProjectTop10ResponseDto { public record GetProjectTop10ResponseDto(
@Schema(description = "프로젝트 자코드 (p_child_sn)") @Schema(description = "프로젝트 자코드 (p_child_sn)")
private final String childSn; String childSn,
@Schema(description = "프로젝트 제목 (p_subject 또는 p_subject <p_intention>)") @Schema(description = "프로젝트 제목 (p_subject 또는 p_subject <p_intention>)")
private final String title; String title,
@Schema(description = "연구팀 코드 (p_rsch_team)") @Schema(description = "연구팀 코드 (p_rsch_team)")
private final String researchTeam; String researchTeam,
@Schema(description = "연구팀 명 (p_rsch_team_name)") @Schema(description = "연구팀 명 (p_rsch_team_name)")
private final String researchTeamName; String researchTeamName
) {
public static GetProjectTop10ResponseDto from(ProjectBasicInfoEntity e) { public static GetProjectTop10ResponseDto from(ProjectBasicInfoEntity e) {
return GetProjectTop10ResponseDto.builder() return GetProjectTop10ResponseDto.builder()

View File

@@ -0,0 +1,24 @@
package com.kri.intranet.extension.dto.telnum.response;
import com.kri.intranet.extension.entity.telnum.ExternalNumberEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import lombok.Builder;
@Builder
@Schema(description = "가용 발신번호 조회 결과 DTO")
public record GetCallerTelNumResponseDto(
String telNum,
LocalDateTime regDt,
String userCode
) {
public static GetCallerTelNumResponseDto of(ExternalNumberEntity entity) {
return GetCallerTelNumResponseDto.builder()
.telNum(entity.getNum())
.regDt(entity.getInputDate())
.userCode(entity.getUserCode())
.build();
}
}

View File

@@ -0,0 +1,23 @@
package com.kri.intranet.extension.dto.user;
import com.kri.intranet.extension.entity.user.GroupCodeInfoEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
@Builder
@Schema(description = "그룹 코드 정보 Dto")
public record GroupCodeInfoDto(
@Schema(description = "그룹 코드")
String groupCode,
@Schema(description = "그룹 코드 레이블")
String groupCodeLabel
) {
public static GroupCodeInfoDto from(GroupCodeInfoEntity groupCodeInfo) {
return GroupCodeInfoDto.builder()
.groupCode(groupCodeInfo.getGroupCode())
.groupCodeLabel(groupCodeInfo.getGroupCodeLabel())
.build();
}
}

View File

@@ -3,28 +3,25 @@ package com.kri.intranet.extension.dto.user;
import com.kri.intranet.extension.entity.user.UserBasicInfoEntity; import com.kri.intranet.extension.entity.user.UserBasicInfoEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder; import lombok.Builder;
import lombok.Getter;
@Getter
@Builder @Builder
@Schema(description = "사용자 ID/PW 검색 응답 DTO") @Schema(description = "사용자 ID/PW 검색 응답 DTO")
public class UserBasicInfoDto { public record UserBasicInfoDto(
@Schema(description = "사용자 ID") @Schema(description = "사용자 ID")
private final String userId; String userId,
@Builder.Default
@Schema(description = "사용자 소속 회사") @Schema(description = "사용자 소속 회사")
private final String userCmpn = "KRI"; String userCmpn,
@Schema(description = "사용자 이름 (p_name)") @Schema(description = "사용자 이름 (p_name)")
private final String userNm; String userNm,
@Schema(description = "사용자 팀 (p_depart_now + p_team_now)") @Schema(description = "사용자 팀 (p_depart_now + p_team_now)")
private final String userTeam; String userTeam,
@Schema(description = "사용자 역할") @Schema(description = "사용자 역할")
private final int userRole; int userRole
) {
public static UserBasicInfoDto from(UserBasicInfoEntity e) { public static UserBasicInfoDto from(UserBasicInfoEntity e) {
return UserBasicInfoDto.builder() return UserBasicInfoDto.builder()
@@ -34,4 +31,8 @@ public class UserBasicInfoDto {
.userRole(e.getUserRole()) .userRole(e.getUserRole())
.build(); .build();
} }
public static class UserBasicInfoDtoBuilder {
private String userCmpn = "KRic";
}
} }

View File

@@ -1,17 +1,17 @@
package com.kri.intranet.extension.dto.user.request; package com.kri.intranet.extension.dto.user.request;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "사용자 ID/PW 검색 요청 DTO") @Schema(description = "사용자 ID/PW 검색 요청 DTO")
public class GetUserWithIdPwRequestDto { public record GetUserWithIdPwRequestDto(
@Schema(description = "사용자 ID") @Schema(description = "사용자 ID")
private String userId; String userId,
@Schema(description = "사용자 PW") @Schema(description = "사용자 PW")
private String userPw; String userPw
) {
@Override
public String toString() {
return "GetUserWithIdPwRequestDto[redacted]";
}
} }

View File

@@ -0,0 +1,15 @@
package com.kri.intranet.extension.entity.telnum;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ExternalNumberEntity {
private Integer id;
private String num;
private String useFlag;
private LocalDateTime inputDate;
private String userCode;
}

View File

@@ -0,0 +1,11 @@
package com.kri.intranet.extension.entity.user;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class GroupCodeInfoEntity {
private String groupCode;
private String groupCodeLabel;
}

View File

@@ -17,4 +17,8 @@ public interface ProjectMapper {
List<ProjectBasicInfoEntity> selectProjectTop10OnlyKeyword( List<ProjectBasicInfoEntity> selectProjectTop10OnlyKeyword(
@Param("keyword") String keyword @Param("keyword") String keyword
); );
List<ProjectBasicInfoEntity> selectProjectWithPChildSn(
@Param("pChildSn") List<String> pChildSn
);
} }

View File

@@ -0,0 +1,12 @@
package com.kri.intranet.extension.mapper;
import com.kri.intranet.extension.entity.telnum.ExternalNumberEntity;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TelNumMapper {
List<ExternalNumberEntity> getCallerTelNum();
}

View File

@@ -1,5 +1,6 @@
package com.kri.intranet.extension.mapper; package com.kri.intranet.extension.mapper;
import com.kri.intranet.extension.entity.user.GroupCodeInfoEntity;
import com.kri.intranet.extension.entity.user.UserBasicInfoEntity; import com.kri.intranet.extension.entity.user.UserBasicInfoEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -19,4 +20,6 @@ public interface UserMapper {
boolean selectExistUser(@Param("userId") String userId); boolean selectExistUser(@Param("userId") String userId);
List<String> selectUserIdList(); List<String> selectUserIdList();
List<GroupCodeInfoEntity> selectGroupCodeInfo();
} }

View File

@@ -16,8 +16,8 @@ public class ProjectService {
private final ProjectMapper projectMapper; private final ProjectMapper projectMapper;
public List<GetProjectTop10ResponseDto> getProjectTop10(GetProjectTop10RequestDto getProjectTop10RequestDto) { public List<GetProjectTop10ResponseDto> getProjectTop10(GetProjectTop10RequestDto getProjectTop10RequestDto) {
String childSn = getProjectTop10RequestDto.getChildSn(); String childSn = getProjectTop10RequestDto.childSn();
String keyword = getProjectTop10RequestDto.getKeyword(); String keyword = getProjectTop10RequestDto.keyword();
List<ProjectBasicInfoEntity> entityList = projectMapper.selectProjectTop10(childSn,keyword); List<ProjectBasicInfoEntity> entityList = projectMapper.selectProjectTop10(childSn,keyword);
@@ -33,4 +33,12 @@ public class ProjectService {
.map(GetProjectTop10ResponseDto::from) .map(GetProjectTop10ResponseDto::from)
.toList(); .toList();
} }
public List<GetProjectTop10ResponseDto> getProjectWithPChildSn(List<String> pChildSnList) {
List<ProjectBasicInfoEntity> entityList = projectMapper.selectProjectWithPChildSn(pChildSnList);
return entityList.stream()
.map(GetProjectTop10ResponseDto::from)
.toList();
}
} }

View File

@@ -0,0 +1,20 @@
package com.kri.intranet.extension.service;
import com.kri.intranet.extension.dto.telnum.response.GetCallerTelNumResponseDto;
import com.kri.intranet.extension.mapper.TelNumMapper;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class TelNumService {
private final TelNumMapper telNumMapper;
public List<GetCallerTelNumResponseDto> getCallerTelNum() {
return telNumMapper.getCallerTelNum().stream()
.map(GetCallerTelNumResponseDto::of)
.toList();
}
}

View File

@@ -1,6 +1,7 @@
package com.kri.intranet.extension.service; package com.kri.intranet.extension.service;
import com.kri.common.web.BusinessException; import com.kri.common.feature.web.BusinessException;
import com.kri.intranet.extension.dto.user.GroupCodeInfoDto;
import com.kri.intranet.extension.dto.user.request.GetUserWithIdPwRequestDto; import com.kri.intranet.extension.dto.user.request.GetUserWithIdPwRequestDto;
import com.kri.intranet.extension.dto.user.UserBasicInfoDto; import com.kri.intranet.extension.dto.user.UserBasicInfoDto;
import com.kri.intranet.extension.entity.user.UserBasicInfoEntity; import com.kri.intranet.extension.entity.user.UserBasicInfoEntity;
@@ -16,8 +17,8 @@ public class UserService {
private final UserMapper userMapper; private final UserMapper userMapper;
public UserBasicInfoDto getUserWithIdPw(GetUserWithIdPwRequestDto getUserWithIdPwRequestDto) { public UserBasicInfoDto getUserWithIdPw(GetUserWithIdPwRequestDto getUserWithIdPwRequestDto) {
String userId = getUserWithIdPwRequestDto.getUserId(); String userId = getUserWithIdPwRequestDto.userId();
String userPw = getUserWithIdPwRequestDto.getUserPw(); String userPw = getUserWithIdPwRequestDto.userPw();
List<UserBasicInfoEntity> userBasicInfoEntityList = userMapper.selectUserWithIdPw(userId,userPw); List<UserBasicInfoEntity> userBasicInfoEntityList = userMapper.selectUserWithIdPw(userId,userPw);
@@ -45,4 +46,11 @@ public class UserService {
public List<String> getUserIdArray() { public List<String> getUserIdArray() {
return userMapper.selectUserIdList(); return userMapper.selectUserIdList();
} }
public List<GroupCodeInfoDto> getGroupCodeList() {
return userMapper.selectGroupCodeInfo().stream()
.map(GroupCodeInfoDto::from)
.distinct()
.toList();
}
} }

View File

@@ -1,6 +1,16 @@
spring: spring:
datasource: datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://10.10.11.6:1433;databaseName=project2;encrypt=false url: jdbc:sqlserver://1.235.195.34:1433;databaseName=project2;encrypt=false
username: sa username: sa
password: krco#51304 password: krco#51304
# apikey 보관 DB(MySQL)
kri:
auth:
apikey:
db:
url: jdbc:mysql://db-md87m.vpc-cdb.ntruss.com:3306/kri_common?characterEncoding=UTF-8
username: kriit
password: it#51304
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@@ -8,4 +8,14 @@ spring:
mybatis: mybatis:
configuration: configuration:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# apikey 보관 DB(MySQL)
kri:
auth:
apikey:
db:
url: jdbc:mysql://db-md87m-kr.vpc-pub-cdb.ntruss.com:3306/kri_common?characterEncoding=UTF-8
username: kriit
password: it#51304
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@@ -3,4 +3,14 @@ spring:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://1.235.195.34:1433;databaseName=project2;encrypt=false url: jdbc:sqlserver://1.235.195.34:1433;databaseName=project2;encrypt=false
username: sa username: sa
password: krco#51304 password: krco#51304
# apikey 보관 DB(MySQL)
kri:
auth:
apikey:
db:
url: jdbc:mysql://db-md87m.vpc-cdb.ntruss.com:3306/kri_common?characterEncoding=UTF-8
username: kriit
password: it#51304
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@@ -14,6 +14,12 @@ logging:
file: file:
path: ./logs path: ./logs
springdoc:
writer-with-order-by-keys: true
swagger-ui:
tags-sorter: alpha
operations-sorter: method
mybatis: mybatis:
mapper-locations: classpath:/mybatis/mapper/**/*.xml mapper-locations: classpath:/mybatis/mapper/**/*.xml
type-aliases-package: com.kri.intranet.extension.entity type-aliases-package: com.kri.intranet.extension.entity
@@ -30,15 +36,7 @@ kri:
# 내부 운영용(원하면) # 내부 운영용(원하면)
admin-api-enabled: true admin-api-enabled: true
admin-allow-ips: admin-allow-ips:
- 127.0.0.1/32
- 0:0:0:0:0:0:0:1
- 211.254.145.130/32 - 211.254.145.130/32
# apikey 보관 DB(MySQL)
db:
url: jdbc:mysql://db-md87m-kr.vpc-pub-cdb.ntruss.com:3306/kri_common?characterEncoding=UTF-8
username: kriit
password: it#51304
driver-class-name: com.mysql.cj.jdbc.Driver
security: security:
enabled: true enabled: true
@@ -51,16 +49,15 @@ kri:
swagger: swagger:
enabled: true enabled: true
allowed-ips:
- 211.254.145.130
title: "IntranetExtension API" title: "IntranetExtension API"
description: "인트라넷 확장 서비스 API" description: "인트라넷 확장 서비스 API"
version: "v1.0.0" version: "v1.0.0"
base-package: "com.kri.intranet.extension" base-package: "com.kri.intranet.extension"
common:
web: web:
enabled: true # 공통 Web 구성 사용 여부 (기본 true) enabled: true # 공통 Web 구성 사용 여부 (기본 true)
webmvc:
enabled: true # 공통 Webmvc 구성 사용 여부 (기본 true)
redis: redis:
enabled: false # RedisQueueHelper 사용 시 true enabled: false # RedisQueueHelper 사용 시 true
scheduling: scheduling:

View File

@@ -55,4 +55,27 @@
ORDER BY p_input_dt DESC ORDER BY p_input_dt DESC
</select> </select>
<select id="selectProjectWithPChildSn" resultType="com.kri.intranet.extension.entity.project.ProjectBasicInfoEntity">
SELECT
p_child_sn AS pChildSn
, CASE WHEN p_intention IS NOT NULL
THEN p_subject + ' <![CDATA[<' + p_intention + '>]]>'
ELSE p_subject
END AS pTitle
, ISNULL(d.Code,'') AS pRschTeam
, ISNULL(d.T_Name,'') AS pRschTeamName
FROM project2.dbo.V_PROJECT_METHOD pm WITH (NOLOCK)
LEFT JOIN project2.dbo.v_Department d
ON pm.p_rsch_dept = d.before_t_cd1
OR pm.p_rsch_dept = d.T_CODE
WHERE 1 = 1
<if test="pChildSn != null and pChildSn.size() > 0">
AND p_child_sn IN
<foreach collection="pChildSn" item="sn" open="(" separator="," close=")">
#{sn}
</foreach>
</if>
ORDER BY p_child_sn DESC
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.kri.intranet.extension.mapper.TelNumMapper">
<select id="getCallerTelNum" resultType="com.kri.intranet.extension.entity.telnum.ExternalNumberEntity">
select
id, num, useFlag, convert(datetime,input_date) as inputDate, user_code as userCode
from new_cati.dbo.T_external_number
where useFlag='0'
order by num
</select>
</mapper>

View File

@@ -12,7 +12,7 @@
WHEN 'R' THEN 2001 WHEN 'R' THEN 2001
WHEN 'S' THEN WHEN 'S' THEN
CASE WHEN p_team_now <![CDATA[<]]> 300 THEN 3001 ELSE 1001 END CASE WHEN p_team_now <![CDATA[<]]> 300 THEN 3001 ELSE 1001 END
ELSE 1001 END AS [user_role] ELSE 5001 END AS [user_role]
FROM project2.dbo.person FROM project2.dbo.person
WHERE krc_in_date IS NOT NULL WHERE krc_in_date IS NOT NULL
AND krc_out_date = '' AND krc_out_date = ''
@@ -60,4 +60,21 @@
WHERE krc_in_date IS NOT NULL WHERE krc_in_date IS NOT NULL
AND krc_out_date = '' AND krc_out_date = ''
</select> </select>
<select id="selectGroupCodeInfo" resultType="com.kri.intranet.extension.entity.user.GroupCodeInfoEntity">
SELECT group_code, group_code_label
FROM(
SELECT
SORTORDER
,[GROUPCODE] as group_code
,[NAME] as group_code_label
FROM project2.dbo.VGroup
WHERE GROUPLEVEL = '0003'
UNION ALL
SELECT 999 as SORTORDER, 'T900' as group_code, 'TF' as group_code_label
) a
ORDER BY SORTORDER
</select>
</mapper> </mapper>