Browse Source

修改风机监视和逆变器监视界面动态配置接口

shilin 2 years atrás
parent
commit
abc4f16ef1

+ 8 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -88,6 +88,14 @@ public class MatrixPushByWpService {
         int slts = 0;
         int jrts = 0;
         Map<String, Object> fczbmap = new LinkedHashMap<>();
+
+
+        if(InitialRunner.wpmap.containsKey(wpId))
+        {
+            Windpowerstation wp= InitialRunner.wpmap.get(wpId);
+            map.put("name",wp.getName());
+        }
+
         if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
             List<InverterVo> vos = new ArrayList<>();
             if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {

+ 23 - 4
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -233,9 +233,20 @@ public class WtInfoPushService {
                 map.put("pjid", wt.getProjectid());
                 map.put("lnid", wt.getLineid());
                 map.put("code", wt.getCode());
-                Line ln= InitialRunner.lnmap.get(wt.getLineid());
-                map.put("lnname", ln.getName());
 
+                if( InitialRunner.lnmap.containsKey(wt.getLineid()))
+                {
+                    Line ln= InitialRunner.lnmap.get(wt.getLineid());
+                    map.put("lnname", ln.getName());
+
+                }
+
+                if( InitialRunner.wpmap.containsKey(wt.getWindpowerstationid()))
+                {
+                    Windpowerstation wp= InitialRunner.wpmap.get(wt.getWindpowerstationid());
+                    map.put("wpname", wp.getName());
+
+                }
 
                 if(StringUtils.notEmp(wt.getModelid()))
                 {
@@ -255,7 +266,7 @@ public class WtInfoPushService {
 
                                     if(StringUtils.notEmp(wtc.getUniformcode()))
                                     {
-                                        codels.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, wtc.getUniformcode()).getCode());
+                                        codels.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(id, wtc.getUniformcode()).getCode());
 
                                         WtTargetConfigVo vo=new WtTargetConfigVo();
                                         vo.setCode(wtc.getCode());
@@ -263,7 +274,15 @@ public class WtInfoPushService {
                                         vo.setName(wtc.getName());
                                         vo.setPointtype(wtc.getPointtype());
                                         vo.setTypes(wtc.getTypes());
-                                        vo.setUnit(wtc.getUnit());
+
+                                        String unit=wtc.getUnit().toLowerCase();
+                                        if(unit.equals("null"))
+                                        {
+                                            vo.setUnit(null);
+                                        }else
+                                        {
+                                            vo.setUnit(wtc.getUnit());
+                                        }
                                         vo.setRate(wtc.getRate());
                                         vos.add(vo);
                                     }