String去除箱号里的符号排序
String regEx = "[\n`~!@#$%^&*()+=|{}':;',\\[\\]\\-.<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。, ·、?]";
String replace = "";
Pattern p = Pattern.compile(regEx);
for(ShelfEntity shelfEntity : shelfList){
Matcher now = p.matcher(shelfEntity.getShelf());
String nextString = now.replaceAll(replace).trim();
shelfEntity.setSort(Long.parseLong(nextString.length() > 10?nextString.substring(0, 10):nextString));
}
return shelfList.stream().sorted(Comparator.comparing(ShelfEntity::getSort)).collect(Collectors.toList());