|
@@ -4,7 +4,8 @@ package com.gyee.generation.service.initalcache;/*
|
|
|
*/
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.gyee.generation.model.auto.ProBasicStatusPoint;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.gyee.generation.model.auto.*;
|
|
|
import com.gyee.generation.service.auto.*;
|
|
|
import com.gyee.generation.util.redis.RedisService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -16,6 +17,7 @@ import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j
|
|
@@ -58,38 +60,97 @@ public class CacheService {
|
|
|
|
|
|
public void initRedisCache() {
|
|
|
redisService.select(9);
|
|
|
- // log.info("--------------------------redisWT");
|
|
|
- //// List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->(
|
|
|
- //// i.getWindpowerstationId().equals("SXJ_KGDL_XWT_FDC_STA")
|
|
|
- ////// ||
|
|
|
- ////// i.getWindpowerstationId().equals("SXJ_KGDL_GJY_FDC_STA") ||
|
|
|
- ////// i.getWindpowerstationId().equals("SXJ_KGDL_NJL_FDC_STA") ||
|
|
|
- ////// i.getWindpowerstationId().equals("SXJ_KGDL_PDL_FDC_STA") ||
|
|
|
- ////// i.getWindpowerstationId().equals("SXJ_KGDL_ZK_FDC_STA")
|
|
|
- //// ) && i.getIsable().equals(1)).collect(Collectors.toList());
|
|
|
- // List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i-> 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->{
|
|
|
+ log.info("--------------------------redisWT");
|
|
|
+ // List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i->(
|
|
|
+ // i.getWindpowerstationId().equals("SXJ_KGDL_XWT_FDC_STA")
|
|
|
+ //// ||
|
|
|
+ //// i.getWindpowerstationId().equals("SXJ_KGDL_GJY_FDC_STA") ||
|
|
|
+ //// i.getWindpowerstationId().equals("SXJ_KGDL_NJL_FDC_STA") ||
|
|
|
+ //// i.getWindpowerstationId().equals("SXJ_KGDL_PDL_FDC_STA") ||
|
|
|
+ //// i.getWindpowerstationId().equals("SXJ_KGDL_ZK_FDC_STA")
|
|
|
+ // ) && i.getIsable().equals(1)).collect(Collectors.toList());
|
|
|
+ List<ProBasicEquipment> windturbineList = windturbineService.list().stream().filter(i-> 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);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ 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");
|
|
|
+ // redisService.select(9);
|
|
|
+ // List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
+ // subStationList.stream().forEach(i->{
|
|
|
+ // Map<String, ProBasicSubStationTestpoint> codeaimap = new HashMap<>();
|
|
|
+ // QueryWrapper<ProBasicSubStationTestpoint> qw = new QueryWrapper<>();
|
|
|
+ // qw.eq("windpowerstation_id",i.getId());
|
|
|
+ // List<ProBasicSubStationTestpoint> windpowerstationtestingpoint2List = proBasicSubStationTestpointService.list(qw);
|
|
|
+ // windpowerstationtestingpoint2List.stream().forEach(x->{
|
|
|
// codeaimap.put(x.getUniformCode(),x);
|
|
|
// });
|
|
|
- // log.info("--------------------------codeaimap"+codeaimap.size());
|
|
|
// String s = JSONObject.toJSONString(codeaimap);
|
|
|
// 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->{
|
|
|
+ // 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());
|
|
@@ -101,158 +162,99 @@ public class CacheService {
|
|
|
// 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->{
|
|
|
+ // 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.getId());
|
|
|
+ // 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.getId(),s);
|
|
|
+ // redisService.set(i,s);
|
|
|
// });
|
|
|
//
|
|
|
- //
|
|
|
- //
|
|
|
- // log.info("--------------------------redisPJ");
|
|
|
- // List<ProBasicProject> projectList = projectService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- // projectList.stream().forEach(i->{
|
|
|
+ // 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.getId());
|
|
|
+ // 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.getId(),s);
|
|
|
+ // redisService.set(i,s);
|
|
|
// });
|
|
|
- //
|
|
|
- //// log.info("--------------------------redisSubWP");
|
|
|
- //// redisService.select(9);
|
|
|
- //// List<ProBasicSubStation> subStationList = subStationService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
- //// subStationList.stream().forEach(i->{
|
|
|
- //// Map<String, ProBasicSubStationTestpoint> codeaimap = new HashMap<>();
|
|
|
- //// QueryWrapper<ProBasicSubStationTestpoint> qw = new QueryWrapper<>();
|
|
|
- //// qw.eq("windpowerstation_id",i.getId());
|
|
|
- //// List<ProBasicSubStationTestpoint> windpowerstationtestingpoint2List = proBasicSubStationTestpointService.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->{
|
|
|
+ // 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.getId());
|
|
|
+ // 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.getId(),s);
|
|
|
+ // redisService.set(i,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);
|
|
|
- //// });
|
|
|
- //// redisService.select(9);
|
|
|
- //// 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));
|
|
|
+ // redisService.select(9);
|
|
|
+ // log.info("--------------------------redis理论保证功率");
|
|
|
+ // Map<String, Map<Double, ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
|
|
|
//
|
|
|
- // log.info("--------------------------redis十三种状态");
|
|
|
+ // 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 -> {
|
|
@@ -265,7 +267,7 @@ public class CacheService {
|
|
|
}
|
|
|
});
|
|
|
redisService.set("SSZZT", JSONObject.toJSONString(sszztMap));
|
|
|
- //
|
|
|
- // log.info("--------------------------完成");
|
|
|
+
|
|
|
+ log.info("--------------------------完成");
|
|
|
}
|
|
|
}
|