issue-18 #28

Merged
sebastian merged 55 commits from issue-18 into master 2023-10-28 19:36:14 +02:00
Showing only changes of commit bd90907bb8 - Show all commits

View File

@ -83,6 +83,7 @@ public class TaskScheduleService {
return new ServiceResult<>(ServiceExitCode.ENTITY_ALREADY_EXIST); return new ServiceResult<>(ServiceExitCode.ENTITY_ALREADY_EXIST);
} else { } else {
BasicTaskSchedule basicTaskSchedule = new BasicTaskSchedule(task, LocalDate.now()); BasicTaskSchedule basicTaskSchedule = new BasicTaskSchedule(task, LocalDate.now());
basicTaskSchedule.setStartTime(LocalDateTime.now());
task.getBasicTaskSchedules().add(basicTaskSchedule); task.getBasicTaskSchedules().add(basicTaskSchedule);
basicTaskScheduleRepository.save(basicTaskSchedule); basicTaskScheduleRepository.save(basicTaskSchedule);
taskRepository.save(task); taskRepository.save(task);
@ -126,6 +127,6 @@ public class TaskScheduleService {
taskSchedule.getTask().setWorkTime(workTime_i); taskSchedule.getTask().setWorkTime(workTime_i);
basicTaskScheduleRepository.save(taskSchedule); basicTaskScheduleRepository.save(taskSchedule);
taskRepository.save(taskSchedule.getTask()); taskRepository.save(taskSchedule.getTask());
return new ServiceResult<>(workTime_i); return new ServiceResult<>((int) activeTime);
} }
} }