From c8b8da893d378d6d388b682ffe77baa9b63047bf Mon Sep 17 00:00:00 2001 From: jyj1289 Date: Fri, 18 Oct 2024 11:27:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=BC=EB=B0=98=EC=A0=84=ED=98=95?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=A0=84=ED=99=98=EB=90=9C=20=EC=82=AC?= =?UTF-8?q?=EB=9E=8C=EB=93=A4=EC=9D=98=20=EC=A0=90=EC=88=98=EA=B0=80=20?= =?UTF-8?q?=EB=B0=98=EC=98=AC=EB=A6=BC=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=8C=20-=20=EC=9D=BC=EB=B0=98=EC=A0=84=ED=98=95=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=84=ED=99=98=EB=90=9C=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=EC=9E=90=EB=93=A4=EC=9D=98=20=EC=84=B1=EC=A0=81=20=EC=A0=90?= =?UTF-8?q?=EC=88=98=EC=99=80=20=EC=B4=9D=20=EC=A0=90=EC=88=98=EA=B0=80=20?= =?UTF-8?q?=EB=B0=98=EC=98=AC=EB=A6=BC=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=95=84=20=EB=B3=80=EA=B2=BD=ED=96=88=EC=96=B4=EC=9A=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/form/ExportFirstRoundResultUseCase.java | 5 +++-- .../maru/application/form/ExportResultUseCase.java | 7 ++++--- .../application/form/ExportSecondRoundResultUseCase.java | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/bamdoliro/maru/application/form/ExportFirstRoundResultUseCase.java b/src/main/java/com/bamdoliro/maru/application/form/ExportFirstRoundResultUseCase.java index b38c3c21..30eef877 100644 --- a/src/main/java/com/bamdoliro/maru/application/form/ExportFirstRoundResultUseCase.java +++ b/src/main/java/com/bamdoliro/maru/application/form/ExportFirstRoundResultUseCase.java @@ -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; @@ -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); @@ -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); } diff --git a/src/main/java/com/bamdoliro/maru/application/form/ExportResultUseCase.java b/src/main/java/com/bamdoliro/maru/application/form/ExportResultUseCase.java index f75a2c7e..ef8d1bbc 100644 --- a/src/main/java/com/bamdoliro/maru/application/form/ExportResultUseCase.java +++ b/src/main/java/com/bamdoliro/maru/application/form/ExportResultUseCase.java @@ -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; @@ -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); @@ -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)); } } diff --git a/src/main/java/com/bamdoliro/maru/application/form/ExportSecondRoundResultUseCase.java b/src/main/java/com/bamdoliro/maru/application/form/ExportSecondRoundResultUseCase.java index b87e9858..380975a0 100644 --- a/src/main/java/com/bamdoliro/maru/application/form/ExportSecondRoundResultUseCase.java +++ b/src/main/java/com/bamdoliro/maru/application/form/ExportSecondRoundResultUseCase.java @@ -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; @@ -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); @@ -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); }