满足了开开的另一个愿望

master
白封羽 2022-07-08 14:57:18 +08:00
parent d6bf813e8b
commit 4c5ee5efb3
1 changed files with 4 additions and 2 deletions

View File

@ -235,10 +235,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
typeChangeValue = 2; typeChangeValue = 2;
} }
System.out.println(!task.checkModification(rawTask)); System.out.println(!task.checkModification(rawTask));
if (!task.checkModification(rawTask) || !task.checkInsert() || (typeChangeValue == 1 && !canBeDone(task.getTaskId()))) { if (!task.checkModification(rawTask) || !task.checkInsert() ) {
throw new BadRequestException(BadRequestException.WRONG_PARAMETERS); throw new BadRequestException(BadRequestException.WRONG_PARAMETERS);
} }
if(typeChangeValue == 1 && !canBeDone(task.getTaskId())){
throw new BadRequestException("还有子工作尚未完成");
}
try { try {
if (typeChangeValue != 0) { if (typeChangeValue != 0) {
task.setTaskClosedTime(LocalDateTime.now()); task.setTaskClosedTime(LocalDateTime.now());