| | |
| | | List<List<String>> collect = data.stream().filter(item -> item.get(0) != null).collect(Collectors.toList()); |
| | | Integer index = findIndex(collect, "/"); |
| | | |
| | | //对0点时间添加日期 |
| | | if (index>-1){ |
| | | collect.get(index).set(0,tomorrow + collect.get(index).get(0).substring(5)); |
| | | } |
| | |
| | | collect.get(i).set(0,today + " " + collect.get(i).get(0)); |
| | | } |
| | | } |
| | | List<List<String>> filterData = data.stream().filter(item -> item.get(0) != null).filter(item -> CommonUtil.strToDate(item.get(0)).after(DateUtil.now())).collect(Collectors.toList()); |
| | | |
| | | //筛选出未来时间 |
| | | List<List<String>> filterData = collect.stream().filter(item -> CommonUtil.strToDate(item.get(0)).after(DateUtil.now())).collect(Collectors.toList()); |
| | | |
| | | //截取掉时间部分 |
| | | filterData.forEach(e->{ |
| | | e.set(0,e.get(0).split(" ")[0]); |
| | | }); |
| | | |
| | | return filterData; |
| | | //去除重复数据 |
| | | List<List<String>> collect1 = filterData.stream().distinct().collect(Collectors.toList()); |
| | | |
| | | return collect1; |
| | | } |
| | | |
| | | public Integer findIndex(List<List<String>> list,String reg){ |