Skip to content

Comments

[FEAT] mps 부품 id 조회 및 해당 부품 달 조회#38

Merged
CHOOSLA merged 1 commit intomainfrom
SPM-505
Nov 11, 2025
Merged

[FEAT] mps 부품 id 조회 및 해당 부품 달 조회#38
CHOOSLA merged 1 commit intomainfrom
SPM-505

Conversation

@taemin3
Copy link
Contributor

@taemin3 taemin3 commented Nov 11, 2025

📝 Summary

  • [FEAT] mps 부품 id 조회 및 해당 부품 달 조회

🙏 Question & PR point

📬 Reference

Summary by CodeRabbit

새로운 기능

  • API 엔드포인트 추가
    • 공장별 MPS 부품 목록 조회: 특정 공장의 모든 MPS 부품 ID 목록을 조회할 수 있는 새로운 API 엔드포인트가 추가되었습니다.
    • 부품별 예측월 조회: 특정 공장 및 부품에 대한 모든 예측월 정보를 조회할 수 있는 새로운 API 엔드포인트가 추가되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

개요

MpsController, MpsRepository, MpsService에 각각 두 개의 새로운 메서드를 추가하여 공장별 MPS 부품 목록과 특정 부품의 예측 월을 조회하는 기능을 구현했습니다.

변경 사항

계층 / 파일 변경 요약
API 엔드포인트
src/main/java/com/sampoom/factory/api/mps/controller/MpsController.java
GET /{factoryId}/mps/parts: 공장별 MPS 부품 ID 목록 조회
GET /{factoryId}/mps/parts/{partId}/forecast-months: 특정 부품의 예측 월(LocalDate) 목록 조회
데이터 접근 계층
src/main/java/com/sampoom/factory/api/mps/repository/MpsRepository.java
findDistinctPartIdsByFactoryId(): 공장별 고유 부품 ID 조회
findDistinctTargetDatesByFactoryIdAndPartId(): 공장 및 부품별 고유 대상 날짜 조회
비즈니스 로직 계층
src/main/java/com/sampoom/factory/api/mps/service/MpsService.java
getMpsPartListByFactory(): 공장별 부품 목록 서비스 메서드
getForecastMonthsByFactoryAndPart(): 공장 및 부품별 예측 월 서비스 메서드

예상 코드 리뷰 난이도

🎯 2 (Simple) | ⏱️ ~12분

  • 주의 깊게 검토할 영역:
    • 쿼리 메서드의 @Query 애노테이션 정의 및 DISTINCT 키워드 사용 검증
    • API 응답 상태 코드 및 ApiResponse 래핑의 일관성 확인
    • 로깅 메시지의 적절성 및 성능 영향 검토 (대량 데이터 반환 시)

관련 PR

  • PR #35: MpsController 및 MPS 서비스/저장소 계층을 처음 도입/확장한 메인 PR과 직접 관련

추천 검토자

  • Sangyoon98
  • Lee-Jong-Jin
  • CHOOSLA
  • yangjiseonn
  • vivivim

시 🐰

부품 목록과 월들을 담아,
쿼리는 공장별로 정렬하여,
서비스는 우아하게 흐르고,
새 엔드포인트는 빛나네요.
깔끔한 추가, 훌륭하오! ✨
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SPM-505

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8a74ff and 2b66ae6.

📒 Files selected for processing (3)
  • src/main/java/com/sampoom/factory/api/mps/controller/MpsController.java (1 hunks)
  • src/main/java/com/sampoom/factory/api/mps/repository/MpsRepository.java (1 hunks)
  • src/main/java/com/sampoom/factory/api/mps/service/MpsService.java (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@CHOOSLA CHOOSLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

승인!

@CHOOSLA CHOOSLA merged commit 2ef3fa5 into main Nov 11, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants