|
@@ -43,6 +43,9 @@ public class CacheContext implements CommandLineRunner {
|
|
|
private IProEconEquipmentmodelService proEconEquipmentmodelService;
|
|
|
|
|
|
@Resource
|
|
|
+ private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
private IProBasicWindturbinePowerService proBasicWindturbinePowerService;
|
|
|
@Resource
|
|
|
private RedisService redisService;
|
|
@@ -446,6 +449,19 @@ public class CacheContext implements CommandLineRunner {
|
|
|
statusMap = JSONObject.parseObject(sszzt, new TypeReference<Map<String,List<ProBasicStatusPoint>>>() {
|
|
|
});
|
|
|
|
|
|
+ List<ProEconWtPowerCurveFitting> econWtPowerCurveFittings = proEconWtPowerCurveFittingService.list();
|
|
|
+ if (StringUtils.isNotNull(econWtPowerCurveFittings)){
|
|
|
+ econWtPowerCurveFittings.stream().forEach(curveFitting->{
|
|
|
+ if (curveFittingPowerMap.containsKey(curveFitting.getWindturbineId())){
|
|
|
+ curveFittingPowerMap.get(curveFitting.getWindturbineId()).put(curveFitting.getSpeed(),curveFitting);
|
|
|
+ }else {
|
|
|
+ Map<Double,ProEconWtPowerCurveFitting> powerMap = new HashMap<>();
|
|
|
+ powerMap.put(curveFitting.getSpeed(),curveFitting);
|
|
|
+ curveFittingPowerMap.put(curveFitting.getWindturbineId(),powerMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
logger.info("缓存结束------------------------------------------------------------");
|