diff --git a/spring/notinote/src/main/java/com/answer/notinote/Notice/controller/NoticeController.java b/spring/notinote/src/main/java/com/answer/notinote/Notice/controller/NoticeController.java index c1dae16..64cdcb2 100644 --- a/spring/notinote/src/main/java/com/answer/notinote/Notice/controller/NoticeController.java +++ b/spring/notinote/src/main/java/com/answer/notinote/Notice/controller/NoticeController.java @@ -50,7 +50,7 @@ public NoticeOCRDto executeOCR (@RequestPart MultipartFile uploadfile, HttpServl List fullText = noticeService.extractSentenceFromEventRequestDto(trans_full, eventWords); List events = noticeService.extractEventList(fullText); Integer event_num = events.size(); - return new NoticeOCRDto(korean, trans_full, fullText, event_num, events); + return new NoticeOCRDto(title, korean, trans_full, fullText, event_num, events); } @RequestMapping(value = "/notice/save", method = RequestMethod.POST) diff --git a/spring/notinote/src/main/java/com/answer/notinote/Notice/dto/NoticeOCRDto.java b/spring/notinote/src/main/java/com/answer/notinote/Notice/dto/NoticeOCRDto.java index cc3b5df..3f347ec 100644 --- a/spring/notinote/src/main/java/com/answer/notinote/Notice/dto/NoticeOCRDto.java +++ b/spring/notinote/src/main/java/com/answer/notinote/Notice/dto/NoticeOCRDto.java @@ -1,6 +1,7 @@ package com.answer.notinote.Notice.dto; +import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -8,18 +9,12 @@ @Getter @NoArgsConstructor +@AllArgsConstructor public class NoticeOCRDto { + private String title; private String korean; private String trans_full; private List fullText; private Integer event_num; private List events; - - public NoticeOCRDto(String korean, String trans_full, List fullText, Integer event_num, List events){ - this.korean = korean; - this.trans_full = trans_full; - this.fullText = fullText; - this.event_num = event_num; - this.events = events; - } } diff --git a/spring/notinote/src/main/java/com/answer/notinote/Notice/service/NoticeService.java b/spring/notinote/src/main/java/com/answer/notinote/Notice/service/NoticeService.java index b1e5866..4b6f539 100644 --- a/spring/notinote/src/main/java/com/answer/notinote/Notice/service/NoticeService.java +++ b/spring/notinote/src/main/java/com/answer/notinote/Notice/service/NoticeService.java @@ -194,9 +194,8 @@ public NoticeTitleListDto saveNotice(MultipartFile uploadfile, NoticeRequestDto String en_full = englishText(noticeRequestDto.getKorean()); NoticeResponseBody responseBody = detectEvent(notice.getOrigin_full(), notice.getTrans_full(), user.getUlanguage(), en_full); - String title = responseBody.getTitle(); - List eventWords = responseBody.getEvents(); + List events = new ArrayList<>(); for (EventRequestDto dto : eventWords) events.add(eventService.create(dto, notice));