issue-25 #27
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user