Skip to content

Commit

Permalink
[FEATURE] 융합경영학과 균형교양 이수 면제 (#180)
Browse files Browse the repository at this point in the history
feat: 융합경영학과 균형교양 이수 면제 (#179)
  • Loading branch information
hyunmin0317 authored Jan 30, 2025
1 parent b8dfce7 commit 6982dcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ResultResponseDto<CultureResponseDto> readCultureCourses(Long memberId, D
.orElseThrow(() -> new GeneralException(ErrorCode.MEMBER_NOT_FOUND));
List<Curriculum> curriculums = curriculumRepository.findAllByYearAndDomain(member.getYear(), domain);
List<CultureResponseDto> responseDtoList = CultureResponseDto.of(curriculums, member);
int total = standardService.getCultureTotal(curriculums.size(), domain);
int total = standardService.getCultureTotal(member.getDepartment(), curriculums.size(), domain);
int completed = calculateCultureCompleted(responseDtoList);
return ResultResponseDto.of(total, completed, responseDtoList);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class StandardService {

private final StandardRepository standardRepository;

public int getCultureTotal(int size, Domain domain) {
public int getCultureTotal(Department department, int size, Domain domain) {
return switch (domain) {
case CORE -> 2;
case BALANCE -> 3;
case BALANCE -> department.isHasAdvanced() ? 3 : 0;
default -> size;
};
}
Expand Down

0 comments on commit 6982dcb

Please sign in to comment.