|
|
@@ -331,25 +331,40 @@ public class BpmReceivedProvider extends GenericProvider implements IBpmReceived
|
|
|
.map(p -> p.get("DGYY"))
|
|
|
.map(JsonNode::asText)
|
|
|
.orElse("");
|
|
|
- if(BeanUtils.isNotEmpty(dgyy)){
|
|
|
- if (list == null && list.isEmpty()) {
|
|
|
+ if (BeanUtils.isNotEmpty(dgyy)) {
|
|
|
+
|
|
|
+ if (list == null || list.isEmpty()) {
|
|
|
return new ArrayList<BpmTaskPo>();
|
|
|
}
|
|
|
- //有入参表示是我的代办页面调用改方法,不过滤
|
|
|
- if(request != null && BeanUtils.isNotEmpty(request.getParameters())){
|
|
|
+ // 有入参表示是我的代办页面调用该方法,不过滤
|
|
|
+ if (request != null && BeanUtils.isNotEmpty(request.getParameters())) {
|
|
|
return list;
|
|
|
}
|
|
|
- String sql = "select id_,can_shu_zhi_1_ from t_zlcsb where jian_zhi_ = 'sywddbcsgl'";//首页我的代办参数过滤
|
|
|
+ String sql = "select id_,can_shu_zhi_1_ from t_zlcsb where jian_zhi_ = 'sywddbcsgl'";
|
|
|
List<Map<String, Object>> zlcsbData = (List<Map<String, Object>>) commonDao.query(sql);
|
|
|
- String toString = "";
|
|
|
- if(list.size()>0 && BeanUtils.isNotEmpty(zlcsbData.get(0).get("can_shu_zhi_1_"))){
|
|
|
- toString = zlcsbData.get(0).get("can_shu_zhi_1_").toString();
|
|
|
+ List<String> filterValues = new ArrayList<>();
|
|
|
+ if (zlcsbData != null && !zlcsbData.isEmpty()
|
|
|
+ && BeanUtils.isNotEmpty(zlcsbData.get(0).get("can_shu_zhi_1_"))) {
|
|
|
+ String raw = zlcsbData.get(0).get("can_shu_zhi_1_").toString();
|
|
|
+ filterValues = Arrays.stream(raw.split(","))
|
|
|
+ .map(String::trim)
|
|
|
+ .filter(s -> !s.isEmpty())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> finalFilterValues = filterValues;
|
|
|
+
|
|
|
+ if (list instanceof PageList) {
|
|
|
+ // 原地过滤,保留 PageList 类型和 pageResult
|
|
|
+ list.removeIf(task -> task.getSubject() != null
|
|
|
+ && finalFilterValues.stream().anyMatch(v -> task.getSubject().contains(v)));
|
|
|
+ } else {
|
|
|
+ // 普通 List 走流式过滤
|
|
|
+ list = list.stream()
|
|
|
+ .filter(task -> task.getSubject() == null
|
|
|
+ || finalFilterValues.stream().noneMatch(v -> task.getSubject().contains(v)))
|
|
|
+ .collect(Collectors.toList());
|
|
|
}
|
|
|
- String finalToString = toString;
|
|
|
- //没有请求参数表示是首页代办事宜调用,根据参数过滤
|
|
|
- list = list.stream()
|
|
|
- .filter(task -> task.getSubject() == null || !task.getSubject().contains(finalToString))
|
|
|
- .collect(Collectors.toList());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.error("获取东莞中医院配置失败,请联系管理员", e);
|