瀏覽代碼

缓存修改

xieshengjie 2 年之前
父節點
當前提交
8fa8b5f9e4

+ 4 - 1
common/src/main/java/com/gyee/common/contant/ContantXk.java

@@ -177,13 +177,16 @@ public class ContantXk {
     public static final String TPOINT_WP_CXGL = "AGC001";// 出线
     public static final String TPOINT_WP_XDZT = "AGC009";// 限电状态
     public static final String TPOINT_WP_ZSGL = "AGC010";// 自算功率
-    public static final String TPOINT_WP_YCGL = "AGC011";// 预测功率
+    public static final String TPOINT_WP_YCGL = "FCFGCDQ0001";// 预测功率
 
 
     public static final String FCCFTFS70 = "FCCFTFS70";//测风塔70米风速
     public static final String FCCFTFX70 = "FCCFTFX70";//测风塔70米风向
     public static final String CJ_FX = "AI067";//风向
 
+
+    public static final String FCCFTWD = "FCCFTWD";//测风塔温度
+    public static final String QXZWD = "QXZWD";//气象站温度
     //判断数据中断(风速,功率,绕组温度,电流,电压)
     public static final String INTERRUPTION ="AI066,AI114,AI004,AI075,AI093";
     public static final String INTERRUPTIONGF ="AIG013,AIG017,AIG009,AIG006";

+ 13 - 13
common/src/main/java/com/gyee/common/vo/specific/SpecificTopVo.java

@@ -14,19 +14,19 @@ import java.io.Serializable;
 public class SpecificTopVo implements Serializable {
     private static final long serialVersionUID = 1407554909175314466L;
     private String type;
-    private Double yllfdl;
-    private Double ysjfdl;
-    private Double yfnlyl;
-    private Double ywhssdl;
-    private Double ywhssl;
-    private Double ygzssdl;
-    private Double ygzssl;
-    private Double yxdssdl;
-    private Double yxdssl;
-    private Double yxnssdl;
-    private Double yxnssl;
-    private Double yslssdl;
-    private Double yslssl;
+    private Double yllfdl;   //理论发电量
+    private Double ysjfdl;   //实际发电量
+    private Double yfnlyl;    //风能利用率
+    private Double ywhssdl;   //维护损失电量
+    private Double ywhssl;    //维护损失率
+    private Double ygzssdl;   //故障损失电量
+    private Double ygzssl;    //故障损失率
+    private Double yxdssdl;   //限电损失电量
+    private Double yxdssl;     //限电损失率
+    private Double yxnssdl;    //性能损失电量
+    private Double yxnssl;     //性能损失率
+    private Double yslssdl;   //受累损失电量
+    private Double yslssl;    //受累损失率
     private Double nllfdl;
     private Double nsjfdl;
     private Double nfnlyl;

+ 17 - 16
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -63,15 +63,15 @@ public class CacheContext implements CommandLineRunner {
     private IProBasicModelPowerRdService proBasicModelPowerRdService;
     @Resource
     private IProBasicWeatherStationService proBasicWeatherStationService;
+
     @Value("${runWindpowerstation}")
     private String runWindpowerstation;
 
     public static List<ProBasicEquipment> wtls = new ArrayList<>();
     public static List<ProBasicProject> pjls = new ArrayList<>();
     public static List<ProBasicLine>  lnls = new ArrayList<>();
-
-    public static List<ProBasicWeatherStation> wsls=new ArrayList<>();
     public static List<ProBasicSubStation>  subwpls = new ArrayList<>();
+    public static List<ProBasicWeatherStation>  wswpls = new ArrayList<>();
 
     public static List<ProBasicSquare> sqls = new ArrayList<>();
     public static List<ProBasicPowerstation>  wpls = new ArrayList<>();
@@ -100,10 +100,10 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String,List<ProBasicEquipment>> sqwtmap = new HashMap<>();
     public static Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = new HashMap<>();// 风电机测点AI表
     public static Map<String,Map<String, ProBasicPowerstationPoint>> linepointmap =new HashMap<>();
-    public static Map<String,Map<String, ProBasicPowerstationPoint>> wspointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicPowerstationPoint>> propointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicPowerstationPoint>> wppointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicPowerstationPoint>> subwppointmap =new HashMap<>();
+    public static Map<String,Map<String, ProBasicPowerstationPoint>> wswppointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicPowerstationPoint>> companypointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicPowerstationPoint>> regionpointmap =new HashMap<>();
 
@@ -128,17 +128,14 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String, Map<Double,ProEconWtPowerCurveFitting>> curveFittingPowerMap = new HashMap<>(); //自算,最优功率
     public static Map<String,List<ProBasicStatusPoint>> statusMap = new HashMap<>();
 
-
     @Override
     public void run(String... args) throws Exception {
         logger.info("缓存开始------------------------------------------------------------");
 
 
-
         List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
         logger.info(runWpids.get(0)+"------------------"+runWpids.size());
 
-       wsls= proBasicWeatherStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
         theoreticalPowerList= proBasicModelPowerRdService.list();
         equipmentmodels = proEconEquipmentmodelService.list();
         equipmentmodels.stream().forEach(e->{
@@ -352,15 +349,6 @@ public class CacheContext implements CommandLineRunner {
 
 
 
-        wsls.stream().forEach(p->{
-
-
-            String wsString = redisService.get(p.getId());
-            Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(wsString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
-            });
-            wspointmap.put(p.getId(),stringWindpowerstationpointnewMap);
-
-        });
         pjls = proBasicProjectService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
         pjls.stream().forEach(p->{
             pjmap.put(p.getId(),p);
@@ -391,6 +379,19 @@ public class CacheContext implements CommandLineRunner {
 
         });
 
+        wswpls = proBasicWeatherStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        wswpls.stream().forEach(ws->{
+
+            String subString = redisService.get(ws.getId());
+            Map<String, ProBasicPowerstationPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(subString, new TypeReference<Map<String, ProBasicPowerstationPoint>>() {
+            });
+            wswppointmap.put(ws.getId(),stringWindpowerstationpointnewMap);
+
+//            List<ProBasicEquipment> collect = wtls.stream().filter(wt -> wt.getSubstationId().equals(sub.getId())).collect(Collectors.toList());
+//            subWtsMap.put(sub.getId(),collect);
+
+        });
+
 
         lnls = proBasicLineService.list().stream().filter(i-> StringUtils.isNotNull(pjmap.get(i.getProjectId())) && runWpids.contains(pjmap.get(i.getProjectId()).getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
         lnls.stream().forEach(l->{
@@ -413,7 +414,7 @@ public class CacheContext implements CommandLineRunner {
         wpls = proBasicWindpowerstationService.list().stream().filter(i->runWpids.contains(i.getId()) && i.getIsAble()==1).collect(Collectors.toList());;
         meterpoints = proBasicMeterPointService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
         meterpoints.stream().forEach(meterpoint -> {
-            meterpointMap.put(meterpoint.getId(),meterpoint);
+            meterpointMap.put(meterpoint.getNemCode(),meterpoint);
         });