From b7fecd4d28cea8c81f56b85c1f310edcacc608aa Mon Sep 17 00:00:00 2001 From: UU_jeong <80961726+oU-Ua@users.noreply.github.com> Date: Sun, 17 Dec 2023 13:38:59 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20project=20Recommend=20schdule=20res?= =?UTF-8?q?ponse=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promiseme/project/service/RecommendServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/mvc/promiseme/project/service/RecommendServiceImpl.java b/src/main/java/mvc/promiseme/project/service/RecommendServiceImpl.java index 08ea294..cbf3169 100644 --- a/src/main/java/mvc/promiseme/project/service/RecommendServiceImpl.java +++ b/src/main/java/mvc/promiseme/project/service/RecommendServiceImpl.java @@ -242,8 +242,11 @@ public List> recommendSchedule(RecommendScheduleRequestDTO r roleSchedule.put("start", startDate); roleSchedule.put("finish", endDate); } else { - System.out.println("No match found for line: " + line); - // 이 부분에서 예외 처리 또는 로깅을 수행할 수 있습니다. + String task = rolePair[i].split("\\(")[0].trim(); + String start = rolePair[i].split("\\(")[0].split("~")[0].trim(); + roleSchedule.put("role", role); + roleSchedule.put("task", task); + roleSchedule.put("start", start); } } roleScheduleList.add(roleSchedule); @@ -264,6 +267,8 @@ public void insertCalender(Long projectId, List> roleSchedul role = Role.builder().name(map.get("role")).build(); roleRepository.save(role); } + if(!map.containsKey("finish")) + map.put("finish",project.getDeadline().toString()); Calendar calendar = Calendar.builder().project(project).role(role).content(map.get("task")).finishDate(LocalDate.parse(map.get("finish"))).startDate(LocalDate.parse(map.get("start"))).build(); calendarRepository.save(calendar); }