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 { ...@@ -201,7 +201,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
content.setType("LEAVE"); content.setType("LEAVE");
content.setTitle(e.getType()); content.setTitle(e.getType());
content.setValue(getCalendarDuration(e.getStartTime(), e.getEndTime())); content.setValue(getCalendarDuration(e.getStartTime(), e.getEndTime()));
content.setPlanId(e.getId().toString()); content.setPlanId(e.getPlanId());
contents.add(content); contents.add(content);
} }
List<EngineerCalendarDTO.Content> mergedList = new ArrayList<>(); List<EngineerCalendarDTO.Content> mergedList = new ArrayList<>();
...@@ -243,13 +243,15 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -243,13 +243,15 @@ 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));
} else {
calendar.setContent(new ArrayList<>());
} }
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!