Skip to content

Commit

Permalink
Merge pull request #49 from potenday-project/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
oU-Ua authored Dec 17, 2023
2 parents df9f995 + d3f0fbe commit c687cee
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ public List<Map<String, String>> 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);
Expand All @@ -264,6 +267,8 @@ public void insertCalender(Long projectId, List<Map<String, String>> 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);
}
Expand Down

0 comments on commit c687cee

Please sign in to comment.