Java8 λ表达式 stream group by max then Option then PlainObject
ConcurrentMap<Integer, Date> workOrderIdLastestEnterSeaTimeWorkOrderOperationLogDOMap =
workOrderOperationLogDOs.stream().collect(
Collectors.groupingByConcurrent(WorkOrderOperationLogDO::getWorkOrderId,
Collectors.collectingAndThen(
Collectors.collectingAndThen(
Collectors.maxBy(Comparator.comparing(WorkOrderOperationLogDO::getCreatedAt)), Optional::get
), WorkOrderOperationLogDO::getCreatedAt
)
)
);