//根据时间排序 最小的时间排在第一个
List newHMDeduct =
hmDeducts.stream().sorted(Comparator.comparing(HMDeduct::getCpyDate)).collect(Collectors.toList());
//时间降序
hmDeducts.stream().sorted(Comparator.comparing(HMDeduct::getCpyDate).reversed()).collect(Collectors.toList());