Browse Source

修改:近三年发电量容器修改

zhongwei
ty 4 months ago
parent
commit
9951395564
  1. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -1274,7 +1274,7 @@ public class RealTargetServiceImpl implements RealTargetService {
calendar.add(Calendar.MONTH, -calendar.get(Calendar.MONTH)); calendar.add(Calendar.MONTH, -calendar.get(Calendar.MONTH));
String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE) + " 00:00:00"; String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE) + " 00:00:00";
// 存储数据map :<站点id,<月份,发电量>> // 存储数据map :<站点id,<月份,发电量>>
Map<Long, Map<String, Float>> powerMap = new CopyOnWriteMap<>(); Map<Long, Map<String, Float>> powerMap = new ConcurrentHashMap <>();
// 将站点切割 // 将站点切割
int limit = countStep(stations.size()); int limit = countStep(stations.size());
List<List<StationEntity>> limits = Stream.iterate(0, n -> n + 1).limit(limit).parallel().map(a -> stations.stream().skip((long) a * 3).limit(3).parallel().collect(Collectors.toList())).collect(Collectors.toList()); List<List<StationEntity>> limits = Stream.iterate(0, n -> n + 1).limit(limit).parallel().map(a -> stations.stream().skip((long) a * 3).limit(3).parallel().collect(Collectors.toList())).collect(Collectors.toList());

Loading…
Cancel
Save