This commit is contained in:
Alyona 2018-11-10 20:28:17 +04:00
parent e76e7ad864
commit 376c820b44
2 changed files with 20 additions and 0 deletions

View File

@ -70,6 +70,22 @@ public class Event extends BaseEntity {
this.title = title; this.title = title;
} }
public Event.EventStatus getStatus() {
return status;
}
public void setStatus(EventStatus status) {
this.status = status;
}
public PeriodEvent getPeriod() {return period;}
public void setPeriod(PeriodEvent period){this.period = period;}
public Date getBeginDate() {return beginDate;}
public void setBeginDate(Date beginDate) {this.beginDate = beginDate;}
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -7,6 +7,7 @@ import ru.ulstu.core.util.DateUtils;
import ru.ulstu.timeline.model.Event; import ru.ulstu.timeline.model.Event;
import ru.ulstu.timeline.model.EventDto; import ru.ulstu.timeline.model.EventDto;
import ru.ulstu.timeline.repository.EventRepository; import ru.ulstu.timeline.repository.EventRepository;
import ru.ulstu.user.model.UserDto;
import java.sql.Date; import java.sql.Date;
import java.time.LocalDate; import java.time.LocalDate;
@ -14,6 +15,7 @@ import java.time.Period;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List;
public class EventScheduler { public class EventScheduler {
@ -36,9 +38,11 @@ public class EventScheduler {
event.setBeginDate(DateUtils.addDays(event.getBeginDate(), event.getPeriod().getPeriod().getDays())); event.setBeginDate(DateUtils.addDays(event.getBeginDate(), event.getPeriod().getPeriod().getDays()));
event.setUpdateDate(null); event.setUpdateDate(null);
eventService.create(new EventDto( eventService.create(new EventDto(
event.getId(), event.getId(),
event.getTitle(), event.getTitle(),
event.getStatus(),
event.getPeriod(), event.getPeriod(),
event.getBeginDate(), event.getBeginDate(),
event.getExecuteDate(), event.getExecuteDate(),