| | |
| | | */ |
| | | package me.zhengjie.modules.task.service.impl; |
| | | |
| | | import me.zhengjie.exception.BadRequestException; |
| | | import me.zhengjie.modules.constant.Constant; |
| | | import me.zhengjie.modules.project.domain.Project; |
| | | import me.zhengjie.modules.project.repository.ProjectRepository; |
| | | import me.zhengjie.modules.system.repository.DictDetailRepository; |
| | | import me.zhengjie.modules.task.domain.Task; |
| | | import me.zhengjie.modules.task.domain.TaskDaliy; |
| | | import me.zhengjie.modules.task.domain.TaskUser; |
| | | import me.zhengjie.modules.task.repository.TaskDaliyRepository; |
| | | import me.zhengjie.modules.task.repository.TaskUserRepository; |
| | | import me.zhengjie.utils.*; |
| | |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.Pageable; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.function.Function; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public void deleteAll(Long[] ids) { |
| | | // 根据多任务ID查询任务分配列表 |
| | | List<TaskUser> taskUserList = taskUserRepository.findByTaskIdIn(Arrays.asList(ids)); |
| | | // 判断任务分配列表长度 |
| | | if (taskUserList.size() > 0) { |
| | | throw new BadRequestException("已分配的任务无法删除!"); |
| | | } |
| | | for (Long id : ids) { |
| | | taskRepository.deleteById(id); |
| | | } |