Commit 1622ed65 by chamberone

Merge branch 'develop' of https://zhangguoping@gitlab.dituhui.com/bsh/project/pr…

…oject.git into develop
2 parents 785c5f34 2c2cbe00
......@@ -201,7 +201,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
content.setType("LEAVE");
content.setTitle(e.getType());
content.setValue(getCalendarDuration(e.getStartTime(), e.getEndTime()));
content.setPlanId(e.getId().toString());
content.setPlanId(e.getPlanId());
contents.add(content);
}
List<EngineerCalendarDTO.Content> mergedList = new ArrayList<>();
......@@ -243,13 +243,15 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
calendar.setDate(date);
int dayOfWeek = LocalDate.parse(date).getDayOfWeek().getValue();
calendar.setWeek(DateUtils.toWeekChinese(dayOfWeek));
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
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<>());
}
calendar.setContent(Collections.singletonList(content));
return calendar;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!