|
@@ -60,6 +60,8 @@ public class CacheContext implements CommandLineRunner {
|
|
|
@Resource
|
|
|
private IProBasicRegionService proBasicRegionService;
|
|
|
@Resource
|
|
|
+ private IProBasicEnergyGroupService proBasicEnergyGroupService;
|
|
|
+ @Resource
|
|
|
private TheoreticalPowerService theoreticalPowerService;
|
|
|
|
|
|
@Resource
|
|
@@ -84,12 +86,14 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public static List<ProBasicCompany> cpls = new ArrayList<>();
|
|
|
public static List<ProBasicCompany> companyList = new ArrayList<>();
|
|
|
public static List<ProBasicRegion> rgls = new ArrayList<>();
|
|
|
+ public static List<ProBasicEnergyGroup> gpls = new ArrayList<>();
|
|
|
public static List<ProBasicPowerstationPoint> powerpointls = new ArrayList<>();
|
|
|
public static List<ProBasicEquipmentPoint> Equipmentpointls = new ArrayList<>();
|
|
|
public static Map<String,ProBasicProject> pjmap = new HashMap<>();
|
|
|
public static Map<String,ProBasicLine> lnmap = new HashMap<>();
|
|
|
public static Map<String,ProBasicRegion> rgmap = new HashMap<>();
|
|
|
public static Map<String,ProBasicCompany> cpmap = new HashMap<>();
|
|
|
+ public static Map<String,ProBasicEnergyGroup> gpmap = new HashMap<>();
|
|
|
|
|
|
public static Map<String,List<ProBasicPowerstation>> cpwpmap = new HashMap<>();
|
|
|
public static Map<String,List<ProBasicPowerstation>> wpmapls = new HashMap<>();
|
|
@@ -122,7 +126,7 @@ public class CacheContext implements CommandLineRunner {
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> weatherwppointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> companypointmap =new HashMap<>();
|
|
|
public static Map<String,Map<String, ProBasicPowerstationPoint>> regionpointmap =new HashMap<>();
|
|
|
-
|
|
|
+ public static Map<String,Map<String, ProBasicPowerstationPoint>> grouppointmap =new HashMap<>();
|
|
|
|
|
|
public static Map<String,Map<Double,Double>> zbzglMap = new HashMap<>();
|
|
|
public static Map<String,ProEconEquipmentmodel> modelMap = new HashMap<>();
|
|
@@ -245,6 +249,37 @@ public class CacheContext implements CommandLineRunner {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ List<ProBasicEnergyGroup> energyGroups = proBasicEnergyGroupService.list();
|
|
|
+ gpls = energyGroups.stream().filter(e->e.getIsAble()==1 && e.getId().endsWith("FGS")).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (!gpls.isEmpty())
|
|
|
+ {
|
|
|
+ for(ProBasicEnergyGroup gp:gpls)
|
|
|
+ {
|
|
|
+ gpmap.put(gp.getId(),gp);
|
|
|
+
|
|
|
+ if (redisService.hasKey(gp.getId()+"0")){
|
|
|
+ String cp0String = redisService.get(gp.getId()+"0");
|
|
|
+ Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(cp0String, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
+ });
|
|
|
+ grouppointmap.put(gp.getId()+"0",stringWindpowerstationpointnewMap);
|
|
|
+ }
|
|
|
+ if (redisService.hasKey(gp.getId()+"-1")){
|
|
|
+ String cp1String = redisService.get(gp.getId()+"-1");
|
|
|
+ Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(cp1String, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
+ });
|
|
|
+ grouppointmap.put(gp.getId()+"-1",stringWindpowerstationpointnewMap);
|
|
|
+ }
|
|
|
+ if (redisService.hasKey(gp.getId()+"-2")){
|
|
|
+ String cp2String = redisService.get(gp.getId()+"-2");
|
|
|
+ Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(cp2String, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
|
|
|
+ });
|
|
|
+ grouppointmap.put(gp.getId()+"-2",stringWindpowerstationpointnewMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
for(ProBasicCompany cp:cpls)
|
|
|
{
|