Commit 6ca2a3df by 丁伟峰

bugfix: 列表添加

1 parent 7d9487b1
......@@ -94,7 +94,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
EngineerCalendarDTO.Calendar calander = null;
calander = getEmptyCalendar(teamIds.get(0), sDate);
if (configs.containsKey(sDate)) {
List<EngineerCalendarDTO.Content> contents = calander.getContent();
List<EngineerCalendarDTO.Content> contents = new ArrayList<>();
// 有配置
for (CapacityEngineerCalendarEntity e : configs.get(sDate)) {
EngineerCalendarDTO.Content content = new EngineerCalendarDTO.Content();
......@@ -103,6 +103,10 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
content.setValue(getCalendarDuration(e.getStartTime(), e.getEndTime()));
contents.add(content);
}
List<EngineerCalendarDTO.Content> mergedList = new ArrayList<>();
mergedList.addAll(calander.getContent());
mergedList.addAll(contents);
calander.setContent(mergedList);
}
calendars.add(calander);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!