java List stream 按数字字符串排序
list = list.stream().sorted((one, two)->{
BigDecimal num1; BigDecimal num2;
if(null == one.getZhdfgl()){
num1 = new BigDecimal("0.0");
}else {
num1 = new BigDecimal(one.getYjdzhdf());
}
if(null == two.getZhdfgl()){
num2 = new BigDecimal("0.0");
}else {
num2 = new BigDecimal(two.getYjdzhdf());
}
return num2.compareTo(num1);
}).collect(Collectors.toList());