|
@@ -63,15 +63,15 @@ public class CacheContext implements CommandLineRunner {
|
|
|
private IProBasicModelPowerRdService proBasicModelPowerRdService;
|
|
|
@Resource
|
|
|
private IProBasicWeatherStationService proBasicWeatherStationService;
|
|
|
+
|
|
|
@Value("${runWindpowerstation}")
|
|
|
private String runWindpowerstation;
|
|
|
|
|
|
public static List<ProBasicEquipment> wtls = new ArrayList<>();
|
|
|
public static List<ProBasicProject> pjls = new ArrayList<>();
|
|
|
public static List<ProBasicLine> lnls = new ArrayList<>();
|
|
|
-
|
|
|
- public static List<ProBasicWeatherStation> wsls=new ArrayList<>();
|
|
|
public static List<ProBasicSubStation> subwpls = new ArrayList<>();
|
|
|
+ public static List<ProBasicWeatherStation> wswpls = new ArrayList<>();
|
|
|
|
|
|
public static List<ProBasicSquare> sqls = new ArrayList<>();
|
|
|
public static List<ProBasicPowerstation> wpls = new ArrayList<>();
|
|
@@ -100,10 +100,10 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public static Map<String,List<ProBasicEquipment>> sqwtmap = new HashMap<>();
|
|
|
public static Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = new HashMap<>();// 风电机测点AI表
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> linepointmap =new HashMap<>();
|
|
|
- public static Map<String,Map<String, ProBasicPowerstationPoint>> wspointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> propointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> wppointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> subwppointmap =new HashMap<>();
|
|
|
+ public static Map<String,Map<String, ProBasicPowerstationPoint>> wswppointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> companypointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> regionpointmap =new HashMap<>();
|
|
|
|
|
@@ -128,17 +128,14 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public static Map<String, Map<Double,ProEconWtPowerCurveFitting>> curveFittingPowerMap = new HashMap<>(); //自算,最优功率
|
|
|
public static Map<String,List<ProBasicStatusPoint>> statusMap = new HashMap<>();
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public void run(String... args) throws Exception {
|
|
|
logger.info("缓存开始------------------------------------------------------------");
|
|
|
|
|
|
|
|
|
-
|
|
|
List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
|
|
|
logger.info(runWpids.get(0)+"------------------"+runWpids.size());
|
|
|
|
|
|
- wsls= proBasicWeatherStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
theoreticalPowerList= proBasicModelPowerRdService.list();
|
|
|
equipmentmodels = proEconEquipmentmodelService.list();
|
|
|
equipmentmodels.stream().forEach(e->{
|
|
@@ -352,15 +349,6 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
|
|
|
|
|
|
- wsls.stream().forEach(p->{
|
|
|
-
|
|
|
-
|
|
|
- String wsString = redisService.get(p.getId());
|
|
|
- Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(wsString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
- });
|
|
|
- wspointmap.put(p.getId(),stringWindpowerstationpointnewMap);
|
|
|
-
|
|
|
- });
|
|
|
pjls = proBasicProjectService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
pjls.stream().forEach(p->{
|
|
|
pjmap.put(p.getId(),p);
|
|
@@ -391,6 +379,19 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
});
|
|
|
|
|
|
+ wswpls = proBasicWeatherStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
+ wswpls.stream().forEach(ws->{
|
|
|
+
|
|
|
+ String subString = redisService.get(ws.getId());
|
|
|
+ Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(subString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
+ });
|
|
|
+ wswppointmap.put(ws.getId(),stringWindpowerstationpointnewMap);
|
|
|
+
|
|
|
+// List<ProBasicEquipment> collect = wtls.stream().filter(wt -> wt.getSubstationId().equals(sub.getId())).collect(Collectors.toList());
|
|
|
+// subWtsMap.put(sub.getId(),collect);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
lnls = proBasicLineService.list().stream().filter(i-> StringUtils.isNotNull(pjmap.get(i.getProjectId())) && runWpids.contains(pjmap.get(i.getProjectId()).getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
lnls.stream().forEach(l->{
|
|
@@ -413,7 +414,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
wpls = proBasicWindpowerstationService.list().stream().filter(i->runWpids.contains(i.getId()) && i.getIsAble()==1).collect(Collectors.toList());;
|
|
|
meterpoints = proBasicMeterPointService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
meterpoints.stream().forEach(meterpoint -> {
|
|
|
- meterpointMap.put(meterpoint.getId(),meterpoint);
|
|
|
+ meterpointMap.put(meterpoint.getNemCode(),meterpoint);
|
|
|
});
|
|
|
|
|
|
|