Skip to content

Commit

Permalink
feat: 수강생 명단 조회 API와 엑셀에 수료 여부 필드 추가 (#807)
Browse files Browse the repository at this point in the history
feat: 수료 상태 필드 추가
  • Loading branch information
Sangwook02 authored Oct 15, 2024
1 parent 53f6967 commit 79b8765
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.gdschongik.gdsc.domain.study.domain.AchievementType;
import com.gdschongik.gdsc.domain.study.domain.StudyAchievement;
import com.gdschongik.gdsc.domain.study.domain.StudyHistory;
import com.gdschongik.gdsc.domain.study.domain.StudyHistoryStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;

Expand All @@ -17,6 +18,7 @@ public record StudyStudentResponse(
@Schema(description = "디스코드 사용자명") String discordUsername,
@Schema(description = "디스코드 닉네임") String nickname,
@Schema(description = "깃허브 링크") String githubLink,
@Schema(description = "수료 상태") StudyHistoryStatus studyHistoryStatus,
@Schema(description = "1차 우수 스터디원") boolean isFirstRoundOutstandingStudent,
@Schema(description = "2차 우수 스터디원") boolean isSecondRoundOutstandingStudent,
@Schema(description = "과제 및 출석 이력") List<StudyTodoResponse> studyTodos,
Expand Down Expand Up @@ -45,6 +47,7 @@ public static StudyStudentResponse of(
studyHistory.getStudent().getDiscordUsername(),
studyHistory.getStudent().getNickname(),
studyHistory.getRepositoryLink(),
studyHistory.getStudyHistoryStatus(),
isOutstandingStudent(FIRST_ROUND_OUTSTANDING_STUDENT, studyAchievements),
isOutstandingStudent(SECOND_ROUND_OUTSTANDING_STUDENT, studyAchievements),
studyTodos,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WorkbookConstant {

// Study
public static final String[] STUDY_SHEET_HEADER = {
"이름", "학번", "디스코드 유저네임", "커뮤니티 닉네임", "깃허브 링크", "수료 여부", "1차 우수 스터디원 여부", "2차 우수 스터디원 여부", "출석률", "과제 수행률"
"이름", "학번", "디스코드 유저네임", "커뮤니티 닉네임", "깃허브 링크", "수료 상태", "1차 우수 스터디원 여부", "2차 우수 스터디원 여부", "출석률", "과제 수행률"
};
public static final String WEEKLY_ASSIGNMENT = "%d주차 과제";
public static final String WEEKLY_ATTENDANCE = "%d주차 출석";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/gdschongik/gdsc/global/util/ExcelUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ private void createStudySheet(Workbook workbook, Study study, List<StudyStudentR
studentRow.createCell(cellIndex.getAndIncrement()).setCellValue(student.discordUsername());
studentRow.createCell(cellIndex.getAndIncrement()).setCellValue(student.nickname());
studentRow.createCell(cellIndex.getAndIncrement()).setCellValue(student.githubLink());
// todo: 수료 여부 추가
studentRow.createCell(cellIndex.getAndIncrement()).setCellValue("X");
studentRow
.createCell(cellIndex.getAndIncrement())
.setCellValue(student.studyHistoryStatus().getValue());
studentRow
.createCell(cellIndex.getAndIncrement())
.setCellValue(student.isFirstRoundOutstandingStudent() ? "O" : "X");
Expand Down

0 comments on commit 79b8765

Please sign in to comment.