要写一个静态方法 在静态方法中编写条件判断 符合返回true 否则false
public static List<BidListVo> checkOperationv1(List<BidListVo> list, BidProgressEnum progressEnum){
Integer progress = Integer.valueOf(progressEnum.getCode());
String nodeId = progressEnum.getNode();
List<BidListVo> collect = list.stream().filter(bidListVo -> filterProgress(bidListVo,progress) )
.collect(Collectors.toList());
return collect;
}
private static boolean filterProgress(BidListVo bidListVo, Integer progress) {
//副流程未开始 只判断主流程
if(StringUtils.isEmpty(bidListVo.getReviewProgress())){
return Integer.valueOf(bidListVo.getProgress()) >= progress ? true: false;
}else if(Integer.valueOf(bidListVo.getProgress()) >= progress ||
Integer.valueOf(bidListVo.getReviewProgress()) >= progress){
// 主流程 独立流程 任意一个大于当前筛选进度就好
return true;
}
return false;
}