Commit 47d43262 by 丁伟峰

Merge branch 'feat-calender' into develop

2 parents 15e1d11b bd14a02d
...@@ -243,13 +243,13 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -243,13 +243,13 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
calendar.setDate(date); calendar.setDate(date);
int dayOfWeek = LocalDate.parse(date).getDayOfWeek().getValue(); int dayOfWeek = LocalDate.parse(date).getDayOfWeek().getValue();
calendar.setWeek(DateUtils.toWeekChinese(dayOfWeek)); calendar.setWeek(DateUtils.toWeekChinese(dayOfWeek));
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
List<String> workdays = Arrays.asList(e.getWorkdays().split(",")); List<String> workdays = Arrays.asList(e.getWorkdays().split(","));
if (!workdays.contains(String.valueOf(dayOfWeek))) { if (!workdays.contains(String.valueOf(dayOfWeek))) {
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
content.setType("REST"); content.setType("REST");
content.setTitle("休息"); content.setTitle("休息");
}
calendar.setContent(Collections.singletonList(content)); calendar.setContent(Collections.singletonList(content));
}
return calendar; return calendar;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!