This commit is contained in:
parent
01e3d87026
commit
299285e25b
@ -4,9 +4,10 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Deploy on docker (not productive yet!)">
|
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Fix deleting tasks">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskService.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/taskSchedule/scheduleInfos/AdvancedScheduleFieldInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/models/timemanager/taskSchedule/scheduleInfos/AdvancedScheduleFieldInfo.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -558,14 +559,21 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1699803821051</updated>
|
<updated>1699803821051</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="43" />
|
<task id="LOCAL-00043" summary="Fix deleting tasks">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1699805283751</created>
|
||||||
|
<option name="number" value="00043" />
|
||||||
|
<option name="presentableId" value="LOCAL-00043" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1699805283751</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="44" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
<option name="version" value="3" />
|
<option name="version" value="3" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="Forget single schedule" />
|
|
||||||
<MESSAGE value="Fix marking finished task as overdue" />
|
<MESSAGE value="Fix marking finished task as overdue" />
|
||||||
<MESSAGE value="Write simple Testcase for ci/cd" />
|
<MESSAGE value="Write simple Testcase for ci/cd" />
|
||||||
<MESSAGE value="Deactivate Overall System test (temporarly)" />
|
<MESSAGE value="Deactivate Overall System test (temporarly)" />
|
||||||
@ -590,7 +598,8 @@
|
|||||||
<MESSAGE value="Adapt datetime-picker" />
|
<MESSAGE value="Adapt datetime-picker" />
|
||||||
<MESSAGE value="Fix wrong date" />
|
<MESSAGE value="Fix wrong date" />
|
||||||
<MESSAGE value="Deploy on docker (not productive yet!)" />
|
<MESSAGE value="Deploy on docker (not productive yet!)" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Deploy on docker (not productive yet!)" />
|
<MESSAGE value="Fix deleting tasks" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Fix deleting tasks" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
@ -612,7 +621,7 @@
|
|||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
<url>file://$PROJECT_DIR$/src/main/java/core/services/TaskService.java</url>
|
<url>file://$PROJECT_DIR$/src/main/java/core/services/TaskService.java</url>
|
||||||
<line>92</line>
|
<line>93</line>
|
||||||
<option name="timeStamp" value="35" />
|
<option name="timeStamp" value="35" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
|
@ -2,40 +2,44 @@ package core.api.models.timemanager.taskSchedule.scheduleInfos;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
|
||||||
public class AdvancedScheduleFieldInfo extends ScheduleFieldInfo {
|
public class AdvancedScheduleFieldInfo extends ScheduleFieldInfo {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private LocalDateTime scheduleStartTime;
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||||||
|
private ZonedDateTime scheduleStartTime;
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private LocalDateTime scheduleStopTime;
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||||||
|
private ZonedDateTime scheduleStopTime;
|
||||||
|
|
||||||
public AdvancedScheduleFieldInfo(LocalDateTime scheduleStartTime, LocalDateTime scheduleStopTime) {
|
public AdvancedScheduleFieldInfo(LocalDateTime scheduleStartTime, LocalDateTime scheduleStopTime) {
|
||||||
this.scheduleStartTime = scheduleStartTime;
|
this.scheduleStartTime = ZonedDateTime.from(scheduleStartTime);
|
||||||
this.scheduleStopTime = scheduleStopTime;
|
this.scheduleStopTime = ZonedDateTime.from(scheduleStopTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdvancedScheduleFieldInfo() {
|
public AdvancedScheduleFieldInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateTime getScheduleStartTime() {
|
public ZonedDateTime getScheduleStartTime() {
|
||||||
return scheduleStartTime;
|
return scheduleStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScheduleStartTime(LocalDateTime scheduleStartTime) {
|
public void setScheduleStartTime(ZonedDateTime scheduleStartTime) {
|
||||||
this.scheduleStartTime = scheduleStartTime;
|
this.scheduleStartTime = scheduleStartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateTime getScheduleStopTime() {
|
public ZonedDateTime getScheduleStopTime() {
|
||||||
return scheduleStopTime;
|
return scheduleStopTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScheduleStopTime(LocalDateTime scheduleStopTime) {
|
public void setScheduleStopTime(ZonedDateTime scheduleStopTime) {
|
||||||
this.scheduleStopTime = scheduleStopTime;
|
this.scheduleStopTime = scheduleStopTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class TaskScheduleService {
|
|||||||
return new ServiceResult<>(ServiceExitCode.INVALID_PARAMETER);
|
return new ServiceResult<>(ServiceExitCode.INVALID_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedTaskSchedule advancedTaskSchedule = new AdvancedTaskSchedule(task, scheduleFieldInfo.getScheduleStartTime(), scheduleFieldInfo.getScheduleStopTime());
|
AdvancedTaskSchedule advancedTaskSchedule = new AdvancedTaskSchedule(task, scheduleFieldInfo.getScheduleStartTime().toLocalDateTime(), scheduleFieldInfo.getScheduleStopTime().toLocalDateTime());
|
||||||
scheduleRepository.save(advancedTaskSchedule);
|
scheduleRepository.save(advancedTaskSchedule);
|
||||||
|
|
||||||
return new ServiceResult<>(advancedTaskSchedule);
|
return new ServiceResult<>(advancedTaskSchedule);
|
||||||
@ -89,8 +89,8 @@ public class TaskScheduleService {
|
|||||||
return new ServiceResult<>(ServiceExitCode.INVALID_PARAMETER);
|
return new ServiceResult<>(ServiceExitCode.INVALID_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
schedule.setScheduleStart(scheduleFieldInfo.getScheduleStartTime());
|
schedule.setScheduleStart(scheduleFieldInfo.getScheduleStartTime().toLocalDateTime());
|
||||||
schedule.setScheduleEnd(scheduleFieldInfo.getScheduleStopTime());
|
schedule.setScheduleEnd(scheduleFieldInfo.getScheduleStopTime().toLocalDateTime());
|
||||||
scheduleRepository.save(schedule);
|
scheduleRepository.save(schedule);
|
||||||
return new ServiceResult<>(schedule);
|
return new ServiceResult<>(schedule);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user