|
@@ -62,9 +62,6 @@ public class CacheContext implements CommandLineRunner {
|
|
|
@Resource
|
|
|
private IProBasicModelPowerRdService proBasicModelPowerRdService;
|
|
|
|
|
|
- @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<>();
|
|
@@ -129,11 +126,6 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public void run(String... args) throws Exception {
|
|
|
logger.info("缓存开始------------------------------------------------------------");
|
|
|
|
|
|
-
|
|
|
- List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
|
|
|
- logger.info(runWpids.get(0)+"------------------"+runWpids.size());
|
|
|
-
|
|
|
-
|
|
|
equipmentmodels = proEconEquipmentmodelService.list();
|
|
|
equipmentmodels.stream().forEach(e->{
|
|
|
modelMap.put(e.getId(),e);
|
|
@@ -157,7 +149,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- sqls=proBasicSquareService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
+ sqls=proBasicSquareService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
|
|
|
if (!sqls.isEmpty())
|
|
|
{
|
|
|
for(ProBasicSquare sq:sqls)
|
|
@@ -252,7 +244,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
}
|
|
|
|
|
|
|
|
|
- wtls = proBasicEquipmentService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsable()==1).collect(Collectors.toList());
|
|
|
+ wtls = proBasicEquipmentService.list().stream().filter(i->i.getIsable()==1).collect(Collectors.toList());
|
|
|
logger.info(wtls.size()+"");
|
|
|
wtls.forEach(wt->{
|
|
|
if(modelMap.containsKey(wt.getModelId()))
|
|
@@ -368,7 +360,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
|
|
|
|
|
|
- pjls = proBasicProjectService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
+ pjls = proBasicProjectService.list().stream().filter(i-> i.getIsAble()==1).collect(Collectors.toList());
|
|
|
pjls.stream().forEach(p->{
|
|
|
pjmap.put(p.getId(),p);
|
|
|
if (wppromap.containsKey(p.getWindpowerstationId())){
|
|
@@ -385,7 +377,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
});
|
|
|
|
|
|
- subwpls = proBasicSubStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
+ subwpls = proBasicSubStationService.list().stream().filter(i-> i.getIsAble()==1).collect(Collectors.toList());
|
|
|
subwpls.stream().forEach(sub->{
|
|
|
|
|
|
String subString = redisService.get(sub.getId());
|
|
@@ -399,7 +391,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
});
|
|
|
|
|
|
|
|
|
- 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 = proBasicLineService.list().stream().filter(i-> StringUtils.isNotNull(pjmap.get(i.getProjectId())) && i.getIsAble()==1).collect(Collectors.toList());
|
|
|
lnls.stream().forEach(l->{
|
|
|
lnmap.put(l.getId(),l);
|
|
|
if (prolinemap.containsKey(l.getProjectId())){
|
|
@@ -417,8 +409,8 @@ public class CacheContext implements CommandLineRunner {
|
|
|
|
|
|
|
|
|
zwpls = proBasicWindpowerstationService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());;
|
|
|
- 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());
|
|
|
+ wpls = proBasicWindpowerstationService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());;
|
|
|
+ meterpoints = proBasicMeterPointService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
|
|
|
meterpoints.stream().forEach(meterpoint -> {
|
|
|
meterpointMap.put(meterpoint.getId(),meterpoint);
|
|
|
});
|