Commit 4ffba494 by 刘鑫

fix(工程师日历): 工作队休息时间不再展示

1 parent 28df53fb
......@@ -613,20 +613,11 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
private EngineerCalendarDTO.Calendar getEmptyCalendar(String teamId, String date) {
// 初始化一天的日历
OrgTeamEntity e = orgTeamDao.getByTeamId(teamId);
EngineerCalendarDTO.Calendar calendar = new EngineerCalendarDTO.Calendar();
calendar.setDate(date);
int dayOfWeek = LocalDate.parse(date).getDayOfWeek().getValue();
calendar.setWeek(DateUtils.toWeekChinese(dayOfWeek));
List<String> workdays = Arrays.asList(e.getWorkdays().split(","));
if (!workdays.contains(String.valueOf(dayOfWeek))) {
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
content.setType("REST");
content.setTitle("休息");
calendar.setContent(Collections.singletonList(content));
} else {
calendar.setContent(new ArrayList<>());
}
return calendar;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!