Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV-49] 편입 졸업 계산 로직 작성 #294

Merged
merged 16 commits into from
Dec 22, 2024
Merged

[DEV-49] 편입 졸업 계산 로직 작성 #294

merged 16 commits into from
Dec 22, 2024

Conversation

tiemo0708
Copy link
Collaborator

@tiemo0708 tiemo0708 commented Dec 22, 2024

Issue

✅ 작업 내용

e.g. 편입생 인정학점 - 교양 0, 전공 0, 자유선택 0, 성경과인간이해 0

편입생 인정학점을 TransferCredit VO로 구현 및 User에 추가
DB 저장 시에는 "0/0/0/0"와 같은 문자열 형태로 저장

편입생의 졸업 요건은
전공, 교양(어느 교양이든 상관 X), 기독교 과목 1회, 채플 1회이다.
인정학점을 여기에 차감하여 졸업 요건을 계산한다.

편입생은 어떤 교양이든 상관없이 듣기에 모든 교양과목이 일반 교양으로 들어가도록 처리했다.
TRANSFER_CHRISTIAN: 편입 기독교(기독교 한과목)

예시:

[
    {
        "category": "PRIMARY_MANDATORY_MAJOR",
        "totalCredit": 12.0,
        "takenCredit": 12.0,
        "completed": true
    },
    {
        "category": "TRANSFER_CHRISTIAN",
        "totalCredit": 2.0,
        "takenCredit": 2.0,
        "completed": true
    },
    {
        "category": "PRIMARY_ELECTIVE_MAJOR",
        "totalCredit": 51.0,
        "takenCredit": 42.0,
        "completed": false
    },
    {
        "category": "CHAPEL",
        "totalCredit": 0.5,
        "takenCredit": 0.5,
        "completed": true
    },
    {
        "category": "NORMAL_CULTURE",
        "totalCredit": 51.0,
        "takenCredit": 51.0,
        "completed": true
    },
    {
        "category": "FREE_ELECTIVE",
        "totalCredit": 14.0,
        "takenCredit": 18.0,
        "completed": true
    }
]

🤔 고민 했던 부분

편입생의 졸업 요건이 일반 학생들과 다르기 때문에 어떻게 적용해야할지에 대한 고민을 많이 한것 같습니다

🔊 도움이 필요한 부분!!

편입생일때의 로직이 복잡하게 들어가서 중복되는 부분과 코드를 분리하지 못한 부분이 많은것 같습니다-나중에 분리가 필요합니다.
편입생 graduations/detail 추가가 추가로 필요할 것 같습니다.
한 가지 파싱텍스트로만 테스트하여 오류가 있을 수 있습니다.

Copy link

@tiemo0708 tiemo0708 added the ✨ feat 새로운 기능 개발 혹은 기존 기능 변경 label Dec 22, 2024
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

Attention: Patch coverage is 62.80193% with 77 lines in your changes missing coverage. Please review.

Project coverage is 80.88%. Comparing base (b6d1bae) to head (e678cbf).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...pplication/service/CalculateGraduationService.java 0.00% 23 Missing ⚠️
...domain/model/DefaultGraduationRequirementType.java 58.62% 11 Missing and 1 partial ⚠️
...jigraduatebe/user/domain/model/TransferCredit.java 50.00% 8 Missing and 1 partial ⚠️
...tebe/graduation/domain/model/GraduationResult.java 64.70% 2 Missing and 4 partials ⚠️
...ervice/GenerateOrModifyCompletedCreditService.java 63.63% 3 Missing and 1 partial ⚠️
...ture/BusinessBasicAcademicalGraduationManager.java 0.00% 2 Missing and 1 partial ⚠️
...lture/DefaultBasicAcademicalGraduationManager.java 25.00% 2 Missing and 1 partial ⚠️
...e/SocialScienceBasicAcademicGraduationManager.java 0.00% 2 Missing and 1 partial ⚠️
...monculture/CommonCultureDetailCategoryManager.java 0.00% 2 Missing and 1 partial ⚠️
.../coreculture/CoreCultureDetailCategoryManager.java 0.00% 2 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #294      +/-   ##
=============================================
- Coverage      82.48%   80.88%   -1.61%     
- Complexity       596      618      +22     
=============================================
  Files            158      160       +2     
  Lines           2507     2642     +135     
  Branches          87      101      +14     
=============================================
+ Hits            2068     2137      +69     
- Misses           393      445      +52     
- Partials          46       60      +14     
Files with missing lines Coverage Δ
...mpletedcredit/api/dto/CompletedCreditResponse.java 100.00% <ø> (ø)
.../completedcredit/domain/model/CompletedCredit.java 75.00% <100.00%> (+2.58%) ⬆️
...e/persistence/entity/CompletedCreditJpaEntity.java 100.00% <100.00%> (ø)
.../graduation/domain/model/DetailCategoryResult.java 85.18% <100.00%> (ø)
...ion/domain/model/FreeElectiveGraduationResult.java 96.29% <100.00%> (+0.46%) ⬆️
...be/graduation/domain/model/GraduationCategory.java 83.33% <100.00%> (+0.72%) ⬆️
...graduation/domain/model/GraduationRequirement.java 92.85% <100.00%> (+0.17%) ⬆️
...on/domain/model/NormalCultureGraduationResult.java 90.62% <100.00%> (ø)
...omain/model/TransferGraduationRequirementType.java 100.00% <100.00%> (ø)
...ion/domain/service/major/ElectiveMajorManager.java 100.00% <ø> (ø)
... and 22 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6d1bae...e678cbf. Read the comment docs.

@5uhwann
Copy link
Member

5uhwann commented Dec 22, 2024

고생하셨습니다!
편입생 기독교 카테고리가 새롭게 추가된거면
기존 공통교양의 DetailCatoryResult인 기독교 카테고리는 없어지는건가요?

Copy link
Member

@stophwan stophwan left a comment

Choose a reason for hiding this comment

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

소나큐브 21 이슈 중에 바로 수정가능한 것들은 수정하면 좋을 것 같아요!

@tiemo0708
Copy link
Collaborator Author

고생하셨습니다! 편입생 기독교 카테고리가 새롭게 추가된거면 기존 공통교양의 DetailCatoryResult인 기독교 카테고리는 없어지는건가요?

기존 카테고리는 놔두고 GraduationCategory단에서 새로만들어 사용했습니다

@tiemo0708
Copy link
Collaborator Author

소나큐브 21 이슈 중에 바로 수정가능한 것들은 수정하면 좋을 것 같아요!

넵 수정하겠습니다!

Copy link
Member

@5uhwann 5uhwann left a comment

Choose a reason for hiding this comment

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

페어프로그래밍으로 편입 로직 계산 개선 및 수정 완료했습니다.
as-is: 별도의 DetailGraduationResult(편입교양) 생성
to-be: 기존 DetailGraduationResult(공통교양) 통합

@5uhwann 5uhwann merged commit 7e19cda into develop Dec 22, 2024
4 of 6 checks passed
@5uhwann 5uhwann deleted the feature/DEV-49 branch December 22, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feat 새로운 기능 개발 혹은 기존 기능 변경 size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants