List<Long> cdIds=cdList.stream().map(JcCdxx::getId).collect(Collectors.toList()); //获取集合的所有id
list.stream().filter(xs-> xs.getXmbh().equals((Long)query.get("xmbh"))).collect(Collectors.toList());
xc_wwc=(int)xcList.stream().filter(xs-> xs.getJhzt() != 3).count();//巡查任务-未完成
String red_cd= temp.stream().filter(t ->t.getYjjb().equals("3")).map(XmJcyjtjView::getCdbh).collect(Collectors.joining(",")); //取符合条件的所有测点
Long red_cs=temp.stream().filter(t ->t.getYjjb().equals("3")).collect( Collectors.summingLong(XmJcyjtjView::getYjsl));//汇总某列的合计
List<JcCzCdView> list = mapper.getXmJcqk(map);
if(list != null && list.size() > 0) {
//截取出未预警的测点数据
List<JcCzCdView> noWarList=list.stream().filter(x->x.getYjjb().equals("0")).collect(Collectors.toList());
//删除未预警的数据
list.removeAll(noWarList);
//按照测点类别分组
Map<String,List<JcCzCdView>> tempList= noWarList.stream().collect(Collectors.groupingBy(JcCzCdView::getCdType));
tempList.forEach((k,v)->{
v.sort((o1, o2) -> Double.valueOf(o2.getBccz()) .compareTo(Double.valueOf(o1.getBccz())));
if(v.size()>3)
{
List<JcCzCdView> newList = v.subList(0,3);
list.addAll(newList);
}
else {
list.addAll(v);
}
});
list.sort((JcCzCdView o1, JcCzCdView o2) -> o2.getYjjb().compareTo(o1.getYjjb()));
try {
mergeCore.mergeResult(JcCzCdView.class, list);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException
| ExecutionException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}