//循环两个列表通过ENDTIME与TIME相等将profitOfferRespList列表的Value放入profitRespList的CountPrice。以profitRespList为主表最后返回的事profitRespList
for (AggregatorDeviceDateProfitResp pro : profitRespList){
profitOfferRespList.stream().filter(s->s.getTime().equals(pro.getEndTime())).forEach(s->pro.setCountPrice(s.getValue()));
}
//如果对性能要求高可以将 副List转换成Map的形式这样可以减少副List的循环
Map<String, List> map = profitOfferRespList.stream().collect(groupingBy(DataResp::getTime));
for (AggregatorDeviceDateProfitResp pro : profitRespList){
List dataResps = map.get(pro.getEndTime());
if(CollectionUtils.isNotEmpty(dataResps)){
pro.setCountPrice(dataResps.get(0).getValue());
}
}