list整理成Map
Map<String, List<CodeDeviceMonitorDetailCommandEntity>> map =
codeDeviceMonitors.stream().collect(Collectors.toMap(CodeDeviceMonitorDetailCommandEntity::getAxisName,
p -> {
List<CodeDeviceMonitorDetailCommandEntity> getList = new ArrayList<>();
getList.add(p);
return getList;
},
(List<CodeDeviceMonitorDetailCommandEntity> value1,
List<CodeDeviceMonitorDetailCommandEntity> value2) -> {
value1.addAll(value2);
return value1;
}
));