-
Notifications
You must be signed in to change notification settings - Fork 1
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: 영양사님 엑셀 다운로드 기능 구현 #947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 👍
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "201"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
실제로는 200이 반환되고 있는 것 아닌가요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 감삼다
@@ -90,4 +111,103 @@ public CoopLoginResponse coopLogin(CoopLoginRequest request) { | |||
|
|||
return CoopLoginResponse.of(accessToken, savedToken.getRefreshToken()); | |||
} | |||
|
|||
public ByteArrayInputStream generateCoopExcel(LocalDate startDate, LocalDate endDate, Boolean isCafeteria) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
coopExcel 말고 diningExcel은 어떻게 생각하세요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
저도 diningExcel 좋은 것 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 영양사님이 쓰시는거라서 coop으로 했는데 반환되는건 결국 식단이니까 dining 가 좋을것 같네요
@@ -44,6 +62,8 @@ public class CoopService { | |||
private final PasswordEncoder passwordEncoder; | |||
private final JwtProvider jwtProvider; | |||
|
|||
private final int CELL_NUM = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
이건 어디서 사용하는 상수인가요?? 용도를 파악하기 힘든 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cell 만들때 for문에 상수 들어가 있는게 보기 안좋아서 따로 뺐습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 👍
return ExcelResponseBuilder.buildExcelResponse(excelFile, startDate, endDate); | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
공백 들어가 있습니다
} | ||
|
||
|
||
try (Workbook workbook = new XSSFWorkbook()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
공백 한 줄 지워도 될 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
@@ -90,4 +111,103 @@ public CoopLoginResponse coopLogin(CoopLoginRequest request) { | |||
|
|||
return CoopLoginResponse.of(accessToken, savedToken.getRefreshToken()); | |||
} | |||
|
|||
public ByteArrayInputStream generateCoopExcel(LocalDate startDate, LocalDate endDate, Boolean isCafeteria) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
저도 diningExcel 좋은 것 같습니다
dinings.forEach(dining -> { | ||
Row row = sheet.createRow(rowIdx.getAndIncrement()); | ||
row.createCell(0).setCellValue(dining.getDate().toString()); | ||
row.createCell(1).setCellValue(dining.getType().toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
type을 enum으로 반환하기보다 이름(diningName)로 반환하는건 어떠신가요?
dining.getType()
→ "BREAKFAST"
dining.getType().getDiningName()
→ "아침"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 좋아요
이건 생각 못했네용 👍
🔥 연관 이슈
🚀 작업 내용
💬 리뷰 중점사항