|
@@ -7,8 +7,6 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.gyee.generation.model.auto.ProBasicEquipment;
|
|
|
import com.gyee.generation.model.auto.ProBasicEquipmentPoint;
|
|
|
-import com.gyee.generation.model.auto.ProBasicPowerstationPoint;
|
|
|
-import com.gyee.generation.model.auto.ProBasicSubStation;
|
|
|
import com.gyee.generation.service.auto.*;
|
|
|
import com.gyee.generation.util.redis.RedisService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -62,7 +60,7 @@ 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_YG_GDC_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<>();
|
|
@@ -77,8 +75,8 @@ public class CacheService {
|
|
|
String s = JSONObject.toJSONString(codeaimap);
|
|
|
redisService.set(i.getId(),s);
|
|
|
});
|
|
|
-
|
|
|
- log.info("--------------------------redisZL");
|
|
|
+//
|
|
|
+// log.info("--------------------------redisZL");
|
|
|
// List<ProBasicBranch> branchList = proBasicBranchService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
|
|
|
// if (StringUtils.isNotEmpty(branchList)){
|
|
|
// branchList.stream().forEach(i->{
|
|
@@ -139,18 +137,18 @@ public class CacheService {
|
|
|
// });
|
|
|
//
|
|
|
// 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);
|
|
|
- });
|
|
|
+// 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());
|
|
@@ -242,8 +240,9 @@ public class CacheService {
|
|
|
// String s = JSONObject.toJSONString(codeaimap);
|
|
|
// redisService.set(i,s);
|
|
|
// });
|
|
|
+// redisService.select(9);
|
|
|
// log.info("--------------------------redis理论保证功率");
|
|
|
-// Map<String, Map<Double,ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
|
|
|
+// Map<String, Map<Double, ProBasicModelPowerRd>> powerrdMap = new HashMap<>();
|
|
|
//
|
|
|
// List<ProBasicModelPowerRd> proBasicModelPowerRds = proBasicModelPowerRdService.list();
|
|
|
// proBasicModelPowerRds.stream().forEach(powerrd->{
|