通过lambda表达式根据对象中的时间排序
//根据时间排序 最小的时间排在第一个
List<HMDeduct> newHMDeduct =
hmDeducts.stream().sorted(Comparator.comparing(HMDeduct::getCpyDate)).collect(Collectors.toList());
//时间降序
hmDeducts.stream().sorted(Comparator.comparing(HMDeduct::getCpyDate).reversed()).collect(Collectors.toList());