| | |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.service.impl.ConfigServiceImpl; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | .in(Task::getTaskStatus, longs)); |
| | | |
| | | for (Task task : tasks) { |
| | | if (StringUtils.isNotBlank(task.getParentId() + "")) { |
| | | Task task1 = taskService.getById(task.getParentId()); |
| | | if (!Objects.isNull(task1)) { |
| | | throw new CoolException("父任务:" + task1.getTaskCode() + "未执行完成!"); |
| | | } |
| | | } |
| | | task.setTaskStatus(task.getTaskType() < 100 ? TaskStsType.COMPLETE_IN.id : TaskStsType.COMPLETE_OUT.id); |
| | | } |
| | | |
| | | if (!taskService.updateBatchById(tasks)) { |
| | | return R.error("完成任务失败"); |
| | | } |