Skip to content

Commit

Permalink
fix: 일반전형으로 전환된 사람들의 점수가 반올림되지 않음
Browse files Browse the repository at this point in the history
- 일반전형으로 전환된 지원자들의 성적 점수와 총 점수가 반올림되지 않아 변경했어요.
  • Loading branch information
jyj1289 committed Oct 18, 2024
1 parent 2e5b43a commit c8b8da8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.bamdoliro.maru.infrastructure.xlsx.XlsxService;
import com.bamdoliro.maru.infrastructure.xlsx.constant.XlsxConstant;
import com.bamdoliro.maru.shared.annotation.UseCase;
import com.bamdoliro.maru.shared.util.MathUtil;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
Expand Down Expand Up @@ -89,7 +90,7 @@ public Resource execute() throws IOException {
schoolCodeCell.setCellStyle(defaultCellStyle);

Cell subjectGradeScoreCell = row.createCell(11);
subjectGradeScoreCell.setCellValue(form.getScore().getSubjectGradeScore());
subjectGradeScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getSubjectGradeScore(), 3));
subjectGradeScoreCell.setCellStyle(rightCellStyle);

Cell attendanceScoreCell = row.createCell(12);
Expand All @@ -105,7 +106,7 @@ public Resource execute() throws IOException {
bonusScoreCell.setCellStyle(rightCellStyle);

Cell totalScoreCell = row.createCell(15);
totalScoreCell.setCellValue(form.getScore().getFirstRoundScore());
totalScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getFirstRoundScore(), 3));
totalScoreCell.setCellStyle(rightCellStyle);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.bamdoliro.maru.infrastructure.xlsx.XlsxService;
import com.bamdoliro.maru.infrastructure.xlsx.constant.XlsxConstant;
import com.bamdoliro.maru.shared.annotation.UseCase;
import com.bamdoliro.maru.shared.util.MathUtil;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
Expand Down Expand Up @@ -108,7 +109,7 @@ public Resource execute() throws IOException {
subjectTotalScore31.setCellStyle(defaultCellStyle);

Cell subjectGradeScoreCell = row.createCell(17);
subjectGradeScoreCell.setCellValue(form.getScore().getSubjectGradeScore());
subjectGradeScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getSubjectGradeScore(), 3));
subjectGradeScoreCell.setCellStyle(rightCellStyle);

Cell attendanceScoreCell = row.createCell(18);
Expand Down Expand Up @@ -143,13 +144,13 @@ public Resource execute() throws IOException {
codingTestScoreCell.setCellStyle(emptyCellStyle);
}

totalScoreCell.setCellValue(form.getScore().getTotalScore());
totalScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getTotalScore(), 3));
} else {
depthInterviewScoreCell.setCellStyle(emptyCellStyle);
ncsScoreCell.setCellStyle(emptyCellStyle);
codingTestScoreCell.setCellStyle(emptyCellStyle);

totalScoreCell.setCellValue(form.getScore().getFirstRoundScore());
totalScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getFirstRoundScore(), 3));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.bamdoliro.maru.infrastructure.xlsx.XlsxService;
import com.bamdoliro.maru.infrastructure.xlsx.constant.XlsxConstant;
import com.bamdoliro.maru.shared.annotation.UseCase;
import com.bamdoliro.maru.shared.util.MathUtil;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
Expand Down Expand Up @@ -86,7 +87,7 @@ public Resource execute() throws IOException {
schoolCodeCell.setCellStyle(defaultCellStyle);

Cell subjectGradeScoreCell = row.createCell(10);
subjectGradeScoreCell.setCellValue(form.getScore().getSubjectGradeScore());
subjectGradeScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getSubjectGradeScore(), 3));
subjectGradeScoreCell.setCellStyle(rightCellStyle);

Cell attendanceScoreCell = row.createCell(11);
Expand Down Expand Up @@ -118,7 +119,7 @@ public Resource execute() throws IOException {
}

Cell totalScoreCell = row.createCell(17);
totalScoreCell.setCellValue(form.getScore().getTotalScore());
totalScoreCell.setCellValue(MathUtil.roundTo(form.getScore().getTotalScore(), 3));
totalScoreCell.setCellStyle(rightCellStyle);
}

Expand Down

0 comments on commit c8b8da8

Please sign in to comment.