|
|
|
@ -120,12 +120,6 @@ public class RealTargetServiceImpl implements RealTargetService {
|
|
|
|
|
private final static String loadwater_level_key = "hzims:operation:loadwater:level:key"; |
|
|
|
|
private final static String load_photovoltaic_real_key = "hzims:operation:photovoltaic:real:key"; |
|
|
|
|
private final static String load_photovoltaic_target_key = "hzims:operation:photovoltaic:target:key"; |
|
|
|
|
@Getter |
|
|
|
|
private static final ThreadPoolExecutor fixedThreadExecutor; |
|
|
|
|
static { |
|
|
|
|
ThreadFactory threadFactory = Executors.defaultThreadFactory(); |
|
|
|
|
fixedThreadExecutor = new ThreadPoolExecutor(5, 5, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque(), threadFactory); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void loadEmInfo(String param) { |
|
|
|
@ -1254,7 +1248,6 @@ public class RealTargetServiceImpl implements RealTargetService {
|
|
|
|
|
Long time2=System.currentTimeMillis(); |
|
|
|
|
log.info("近年发电量接口,数据组装"+(time2-time)); |
|
|
|
|
stationList.forEach(station -> { |
|
|
|
|
fixedThreadExecutor.execute(()->{ |
|
|
|
|
// 站点设备集合
|
|
|
|
|
List<EminfoAndEmParamVo> stationDevices = devices.stream().filter(device -> device.getCreateDept().equals(station.getRefDept())).collect(Collectors.toList()); |
|
|
|
|
log.error("load_power_data station :" + station.getCode() + "==== device :" + stationDevices ); |
|
|
|
@ -1264,7 +1257,6 @@ public class RealTargetServiceImpl implements RealTargetService {
|
|
|
|
|
} |
|
|
|
|
powerMap.put(station.getId(),generateMap); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
redisTemplate.opsForValue().set(recent_year_power_data, powerMap); |
|
|
|
|
Long time3=System.currentTimeMillis(); |
|
|
|
|
log.info("近年发电量数据接口,总耗时:"+(time3-time)); |
|
|
|
|