|
@@ -174,14 +174,14 @@ public class CacheContext implements CommandLineRunner {
|
|
|
logger.info("缓存开始------------------------------------------------------------");
|
|
|
proBasicOrganizeTrees = proBasicOrganizeTreeService.list();
|
|
|
proBasicOrganizeTrees = proBasicOrganizeTrees.stream().filter(pbot -> pbot.getIsAble() == 1).collect(Collectors.toList());
|
|
|
- List<String> pbotids = proBasicOrganizeTrees.stream().map(pbot -> pbot.getId()).collect(Collectors.toList());
|
|
|
- Map<String, Object> pbotidMap = redisService.batchGetKeys(pbotids);
|
|
|
+ //List<String> pbotids = proBasicOrganizeTrees.stream().map(pbot -> pbot.getId()).collect(Collectors.toList());
|
|
|
+ //Map<String, Object> pbotidMap = redisService.batchGetKeys(pbotids);
|
|
|
|
|
|
bnls = proBasicBranchService.list();
|
|
|
- List<String> bnlids = bnls.stream().map(bnl -> bnl.getId()).collect(Collectors.toList());
|
|
|
- Map<String, Object> objectMap = redisService.batchGetKeys(bnlids);
|
|
|
+ //List<String> bnlids = bnls.stream().map(bnl -> bnl.getId()).collect(Collectors.toList());
|
|
|
+ //Map<String, Object> objectMap = redisService.batchGetKeys(bnlids);
|
|
|
bnls.stream().forEach(bn -> {
|
|
|
- String bnString = (String) objectMap.get(bn.getId());
|
|
|
+ String bnString = redisService.get(bn.getId());
|
|
|
Map<String, ProBasicEquipmentPoint> stringWindturbinetestingpointnewMap = JSONObject.parseObject(bnString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
|
|
|
});
|
|
|
bnAimap.put(bn.getId(), stringWindturbinetestingpointnewMap);
|
|
@@ -379,7 +379,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
wtmap.put(wt.getId(), wt);
|
|
|
//标杆风机初始化
|
|
|
wtstandardmap.put(wt.getId(), wt.getId());
|
|
|
- String wtString = (String) pbotidMap.get(wt.getId());
|
|
|
+ String wtString = redisService.get(wt.getId());
|
|
|
Map<String, ProBasicEquipmentPoint> stringWindturbinetestingpointnewMap = JSONObject.parseObject(wtString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
|
|
|
});
|
|
|
wtpAimap.put(wt.getId(), stringWindturbinetestingpointnewMap);
|
|
@@ -487,7 +487,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
prolist.add(p);
|
|
|
wppromap.put(p.getOrgType().contains("STA"), prolist);
|
|
|
}
|
|
|
- String pjString = (String) pbotidMap.get(p.getId());
|
|
|
+ String pjString = redisService.get(p.getId());
|
|
|
Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(pjString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
});
|
|
|
propointmap.put(p.getId(), stringWindpowerstationpointnewMap);
|
|
@@ -499,7 +499,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
subwpls = proBasicOrganizeTreeService.list().stream().filter(i-> i.getIsAble()==1 && i.getOrgType().contains("SBS")).collect(Collectors.toList());
|
|
|
subwpls.stream().forEach(sub->{
|
|
|
|
|
|
- String subString = (String) pbotidMap.get(sub.getId());
|
|
|
+ String subString = redisService.get(sub.getId());
|
|
|
Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(subString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
});
|
|
|
subwppointmap.put(sub.getId(), stringWindpowerstationpointnewMap);
|
|
@@ -531,7 +531,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
lineList.add(l);
|
|
|
prolinemap.put(l.getOrgType().contains("EG"), lineList);
|
|
|
}
|
|
|
- String lnString = (String) pbotidMap.get(l.getId());
|
|
|
+ String lnString = redisService.get(l.getId());
|
|
|
Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(lnString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
});
|
|
|
linepointmap.put(l.getId(), stringWindpowerstationpointnewMap);
|
|
@@ -555,7 +555,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
wpls.stream().forEach(wp->{
|
|
|
|
|
|
wpmap.put(wp.getId(), wp);
|
|
|
- String wpString = (String) pbotidMap.get(wp.getId());
|
|
|
+ String wpString = redisService.get(wp.getId());
|
|
|
Map<String, ProBasicPowerstationPoint> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
});
|
|
|
wppointmap.put(wp.getId(), stringMapMap);
|