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

feat: 수강생 명단 조회 API와 엑셀에 수료 여부 필드 추가 #807

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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