Commit 4e8537f3 by 刘鑫

CI: 查询技术员日历返回值结构与飞书文档对齐

1 parent 927d130d
...@@ -24,7 +24,16 @@ public class EngineerCalendar { ...@@ -24,7 +24,16 @@ public class EngineerCalendar {
/** /**
* 事件类型 * 事件类型
*/ */
private String type; private String eventType;
/**
* 事件
*/
private String event;
/**
* 事件名称
*/
private String content;
/** /**
* 开始时间 * 开始时间
*/ */
......
...@@ -362,7 +362,10 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -362,7 +362,10 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
List<EngineerCalendar> engineerCalendars = capacityEngineerCalendars.stream().map(entity -> { List<EngineerCalendar> engineerCalendars = capacityEngineerCalendars.stream().map(entity -> {
EngineerCalendar engineerCalendar = new EngineerCalendar(); EngineerCalendar engineerCalendar = new EngineerCalendar();
engineerCalendar.setDate(Date.from(instant)); engineerCalendar.setDate(Date.from(instant));
engineerCalendar.setType(entity.getType()); engineerCalendar.setEventType(entity.getType());
engineerCalendar.setEvent(entity.getReason());
engineerCalendar.setContent(entity.getReason());
engineerCalendar.setContent(entity.getReason());
Instant startInstant = entity.getStartTime().atZone(ZoneId.of("+8")).toInstant(); Instant startInstant = entity.getStartTime().atZone(ZoneId.of("+8")).toInstant();
engineerCalendar.setBeginTime(Date.from(startInstant)); engineerCalendar.setBeginTime(Date.from(startInstant));
Instant endInstant = entity.getEndTime().atZone(ZoneId.of("+8")).toInstant(); Instant endInstant = entity.getEndTime().atZone(ZoneId.of("+8")).toInstant();
...@@ -380,7 +383,9 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -380,7 +383,9 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
engineerCalendar.setEndTime(Date.from(endInstant)); engineerCalendar.setEndTime(Date.from(endInstant));
engineerCalendar.setDate(Date.from(instant)); engineerCalendar.setDate(Date.from(instant));
if (!workDayList.contains(String.valueOf(dayOfWeek))) { if (!workDayList.contains(String.valueOf(dayOfWeek))) {
engineerCalendar.setType("REST"); engineerCalendar.setEventType("REST");
engineerCalendar.setEvent("休息");
engineerCalendar.setContent("休息");
} }
calendars.add(engineerCalendar); calendars.add(engineerCalendar);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!