// 根据流程实例ID查询已经撤销的流程 List<String> processInstanceIds = models.stream().map(ProcessForLineScreenResponse::getInstanceId).collect(Collectors.toList()); if (processInstanceIds.size() > 0) { List<String> ids = this.mapper.getStopedProcessInstanceByIds(processInstanceIds); // 过滤掉已撤销的流程 models = models.stream().filter(u -> !ids.contains(u.getInstanceId())).collect(Collectors.toList()); }