|
@@ -5,7 +5,8 @@ package com.gyee.generation.service.initalcache;/*
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.gyee.generation.model.auto.*;
|
|
|
+import com.gyee.generation.model.auto.ProBasicEquipment;
|
|
|
+import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
|
|
|
import com.gyee.generation.service.auto.*;
|
|
|
import com.gyee.generation.util.redis.RedisService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -13,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -58,16 +58,20 @@ public class CacheService {
|
|
|
|
|
|
|
|
|
public void initRedisCache(){
|
|
|
+ redisService.select(9);
|
|
|
log.info("--------------------------redisWT");
|
|
|
- List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->i.getIsable().equals(1)).collect(Collectors.toList());
|
|
|
+ List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->i.getWindpowerstationId().equals("SXJ_KGDL_YG_GDC_STA") && i.getIsable().equals(1)).collect(Collectors.toList());
|
|
|
+ log.info("--------------------------windturbineList"+windturbineList.size());
|
|
|
windturbineList.stream().forEach(i->{
|
|
|
Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
|
|
|
QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
|
|
|
qw.eq("windturbine_id",i.getId());
|
|
|
List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
|
|
|
+ log.info("--------------------------windturbinetestingpointai2List"+windturbinetestingpointai2List.size());
|
|
|
windturbinetestingpointai2List.stream().forEach(x->{
|
|
|
codeaimap.put(x.getUniformCode(),x);
|
|
|
});
|
|
|
+ log.info("--------------------------codeaimap"+codeaimap.size());
|
|
|
String s = JSONObject.toJSONString(codeaimap);
|
|
|
redisService.set(i.getId(),s);
|
|
|
});
|
|
@@ -87,182 +91,182 @@ public class CacheService {
|
|
|
// redisService.set(i.getId(),s);
|
|
|
// });
|
|
|
// }
|
|
|
-
|
|
|
- log.info("--------------------------redisSQ");
|
|
|
- List<ProBasicSquare> squareList = proBasicSquareService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- squareList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisLN");
|
|
|
- List<ProBasicLine> lineList = lineService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- lineList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- log.info("--------------------------redisPJ");
|
|
|
- List<ProBasicProject> projectList = projectService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- projectList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisSubWP");
|
|
|
- List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- subStationList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisWeatherWP");
|
|
|
- List<ProBasicWeatherStation> weatherStationList = proBasicWeatherStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- weatherStationList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisWP");
|
|
|
- List<ProBasicPowerstation> wpList = windpowerstationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
-
|
|
|
- wpList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i.getId());
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i.getId(),s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisCOMPANY");
|
|
|
- List<ProBasicCompany> coms = companyService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
-// List<String> comList = coms.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
- List<String> comList = new ArrayList<>();
|
|
|
- coms.stream().forEach(company -> {
|
|
|
- comList.add(company.getId()+"0");
|
|
|
- comList.add(company.getId()+"-1");
|
|
|
- comList.add(company.getId()+"-2");
|
|
|
- });
|
|
|
- comList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i);
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i,s);
|
|
|
- });
|
|
|
-
|
|
|
- log.info("--------------------------redisREGION");
|
|
|
- List<ProBasicRegion> regs = regionsService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- List<String> regList = new ArrayList<>();
|
|
|
-// List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
- regs.stream().forEach(region -> {
|
|
|
- regList.add(region.getId()+"0");
|
|
|
- regList.add(region.getId()+"-1");
|
|
|
- regList.add(region.getId()+"-2");
|
|
|
- });
|
|
|
- regList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i);
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i,s);
|
|
|
- });
|
|
|
- log.info("--------------------------redisGroup");
|
|
|
- List<ProBasicEnergyGroup> groups = energyGroupService.list().stream().filter(i->i.getIsAble().equals(1) && !i.getParentid().equals("0")).collect(Collectors.toList());
|
|
|
- List<String> groupList = new ArrayList<>();
|
|
|
-// List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
- groups.stream().forEach(group -> {
|
|
|
- groupList.add(group.getId()+"0");
|
|
|
- groupList.add(group.getId()+"-1");
|
|
|
- groupList.add(group.getId()+"-2");
|
|
|
- });
|
|
|
- groupList.stream().forEach(i->{
|
|
|
- Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
- QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
- qw.eq("windpowerstation_id",i);
|
|
|
- List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
- windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
- codeaimap.put(x.getUniformCode(),x);
|
|
|
- });
|
|
|
- String s = JSONObject.toJSONString(codeaimap);
|
|
|
- redisService.set(i,s);
|
|
|
- });
|
|
|
- log.info("--------------------------redis理论保证功率");
|
|
|
- Map<String, Map<Double,ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
|
|
|
-
|
|
|
- List<ProBasicModelPowerRd> proBasicModelPowerRds = proBasicModelPowerRdService.list();
|
|
|
- proBasicModelPowerRds.stream().forEach(powerrd->{
|
|
|
- if (powerrdMap.containsKey(powerrd.getModelId())){
|
|
|
- powerrdMap.get(powerrd.getModelId()).put(powerrd.getSpeed(),powerrd);
|
|
|
- }else {
|
|
|
- Map<Double,ProBasicModelPowerRd> powerMap = new HashMap<>();
|
|
|
- powerMap.put(powerrd.getSpeed(),powerrd);
|
|
|
- powerrdMap.put(powerrd.getModelId(),powerMap);
|
|
|
- }
|
|
|
- });
|
|
|
- redisService.set("ZLLGL", JSONObject.toJSONString(powerrdMap));
|
|
|
-
|
|
|
- log.info("--------------------------redis十三种状态");
|
|
|
- Map<String,List<ProBasicStatusPoint>> sszztMap = new HashMap<>();
|
|
|
- List<ProBasicStatusPoint> windturbinestatusdis = proBasicStatusPointService.list();
|
|
|
- windturbinestatusdis.stream().forEach(w->{
|
|
|
- if (sszztMap.containsKey(w.getWindturbineId())){
|
|
|
- sszztMap.get(w.getWindturbineId()).add(w);
|
|
|
- }else {
|
|
|
- List<ProBasicStatusPoint> wdisList = new ArrayList<>();
|
|
|
- wdisList.add(w);
|
|
|
- sszztMap.put(w.getWindturbineId(),wdisList);
|
|
|
- }
|
|
|
- });
|
|
|
- redisService.set("SSZZT",JSONObject.toJSONString(sszztMap));
|
|
|
+//
|
|
|
+// log.info("--------------------------redisSQ");
|
|
|
+// List<ProBasicSquare> squareList = proBasicSquareService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// squareList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisLN");
|
|
|
+// List<ProBasicLine> lineList = lineService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// lineList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// log.info("--------------------------redisPJ");
|
|
|
+// List<ProBasicProject> projectList = projectService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// projectList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisSubWP");
|
|
|
+// List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// subStationList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisWeatherWP");
|
|
|
+// List<ProBasicWeatherStation> weatherStationList = proBasicWeatherStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// weatherStationList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisWP");
|
|
|
+// List<ProBasicPowerstation> wpList = windpowerstationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+//
|
|
|
+// wpList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i.getId());
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i.getId(),s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisCOMPANY");
|
|
|
+// List<ProBasicCompany> coms = companyService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+//// List<String> comList = coms.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
+// List<String> comList = new ArrayList<>();
|
|
|
+// coms.stream().forEach(company -> {
|
|
|
+// comList.add(company.getId()+"0");
|
|
|
+// comList.add(company.getId()+"-1");
|
|
|
+// comList.add(company.getId()+"-2");
|
|
|
+// });
|
|
|
+// comList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i);
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i,s);
|
|
|
+// });
|
|
|
+//
|
|
|
+// log.info("--------------------------redisREGION");
|
|
|
+// List<ProBasicRegion> regs = regionsService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+// List<String> regList = new ArrayList<>();
|
|
|
+//// List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
+// regs.stream().forEach(region -> {
|
|
|
+// regList.add(region.getId()+"0");
|
|
|
+// regList.add(region.getId()+"-1");
|
|
|
+// regList.add(region.getId()+"-2");
|
|
|
+// });
|
|
|
+// regList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i);
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i,s);
|
|
|
+// });
|
|
|
+// log.info("--------------------------redisGroup");
|
|
|
+// List<ProBasicEnergyGroup> groups = energyGroupService.list().stream().filter(i->i.getIsAble().equals(1) && !i.getParentid().equals("0")).collect(Collectors.toList());
|
|
|
+// List<String> groupList = new ArrayList<>();
|
|
|
+//// List<String> regList = regs.stream().map(i->i.getId()).collect(Collectors.toList());
|
|
|
+// groups.stream().forEach(group -> {
|
|
|
+// groupList.add(group.getId()+"0");
|
|
|
+// groupList.add(group.getId()+"-1");
|
|
|
+// groupList.add(group.getId()+"-2");
|
|
|
+// });
|
|
|
+// groupList.stream().forEach(i->{
|
|
|
+// Map<String, ProBasicPowerstationPoint> codeaimap = new HashMap<>();
|
|
|
+// QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("windpowerstation_id",i);
|
|
|
+// List<ProBasicPowerstationPoint> windpowerstationtestingpoint2List = windpowerstationpointnewService.list(qw);
|
|
|
+// windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
+// codeaimap.put(x.getUniformCode(),x);
|
|
|
+// });
|
|
|
+// String s = JSONObject.toJSONString(codeaimap);
|
|
|
+// redisService.set(i,s);
|
|
|
+// });
|
|
|
+// log.info("--------------------------redis理论保证功率");
|
|
|
+// Map<String, Map<Double,ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
|
|
|
+//
|
|
|
+// List<ProBasicModelPowerRd> proBasicModelPowerRds = proBasicModelPowerRdService.list();
|
|
|
+// proBasicModelPowerRds.stream().forEach(powerrd->{
|
|
|
+// if (powerrdMap.containsKey(powerrd.getModelId())){
|
|
|
+// powerrdMap.get(powerrd.getModelId()).put(powerrd.getSpeed(),powerrd);
|
|
|
+// }else {
|
|
|
+// Map<Double,ProBasicModelPowerRd> powerMap = new HashMap<>();
|
|
|
+// powerMap.put(powerrd.getSpeed(),powerrd);
|
|
|
+// powerrdMap.put(powerrd.getModelId(),powerMap);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// redisService.set("ZLLGL", JSONObject.toJSONString(powerrdMap));
|
|
|
+//
|
|
|
+// log.info("--------------------------redis十三种状态");
|
|
|
+// Map<String,List<ProBasicStatusPoint>> sszztMap = new HashMap<>();
|
|
|
+// List<ProBasicStatusPoint> windturbinestatusdis = proBasicStatusPointService.list();
|
|
|
+// windturbinestatusdis.stream().forEach(w->{
|
|
|
+// if (sszztMap.containsKey(w.getWindturbineId())){
|
|
|
+// sszztMap.get(w.getWindturbineId()).add(w);
|
|
|
+// }else {
|
|
|
+// List<ProBasicStatusPoint> wdisList = new ArrayList<>();
|
|
|
+// wdisList.add(w);
|
|
|
+// sszztMap.put(w.getWindturbineId(),wdisList);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// redisService.set("SSZZT",JSONObject.toJSONString(sszztMap));
|
|
|
}
|
|
|
}
|