一:判断集合是否为空
if (CollectionUtils.isEmpty(equConnectTimeEverydays)) { }
二:判断字符串,对象是否为空
if (StringUtils.isEmpty(equConnectTimeDay)) { }
三:list分组
Map<String, List<EquConnectTimeEveryday>> collect = equConnectTimeEverydays.stream().collect(Collectors.groupingBy(EquConnectTimeEveryday::getEquId));
四:对list统计
long workingHours = equConnectTimeEverydays.stream().mapToLong(EquConnectTimeEveryday::getLongTotalRunDuration).sum();