Forráskód Böngészése

后台管理修改

shilin 2 éve
szülő
commit
dee42fc373

+ 4 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/SpringbootStart.java

@@ -57,6 +57,10 @@ public class SpringbootStart {
 //        initialPointGoldenService.initalHlx();
 //        System.out.println("结束导出汇流箱测点。。。。。。");
 
+//        System.out.println("开始导出支路测点。。。。。。");
+//        initialPointGoldenService.initalZl();
+//        System.out.println("结束导出支路测点。。。。。。");
+
 
 //        System.out.println("初始化结束!");
 //

+ 30 - 7
web/monitor-web-sxjn/src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -328,10 +328,10 @@ public static final String[] TPOINT_WP_AGC = { "AGC001", "AGC002",
 			"FCCFTFS50", "FCCFTFS60", "FCCFTFS70", "FCCFTFS80", "FCCFTFX10", "FCCFTFX30",
 			"FCCFTFX50", "FCCFTFX60", "FCCFTFX70", "FCCFTFX80", "FCCFTWD", "FCCFTSD",
 			"FCCFTYQ", "KQMD" };
-    public static final String[] TPOINT_WP_CFT_GJY = { "FCCFTFS10", "FCCFTFS30",
-            "FCCFTFS50", "FCCFTFS60", "FCCFTFS70", "FCCFTFS80", "FCCFTFX10", "FCCFTFX30",
-            "FCCFTFX50", "FCCFTFX60", "FCCFTFX70", "FCCFTFX80", "FCCFTWD", "FCCFTSD",
-            "FCCFTYQ" };
+    public static final String[] TPOINT_WP_GZHJ = { "AIG001", "AIG002",
+            "AIG003", "AIG004", "AIG005", "AIG006", "AIG007", "AIG008",
+            "AIG009"};//组件温度、环境风速、湿度、环境温度、气压、总辐照度、直接辐照度、散射辐照度、风向
+
     public static final String[] TPOINT_WP_CFT_GJYPOINT = { "FD-GJY1-TaiZhong1.140603F0111MDQ41PA001DB0121PA04AVG00",
             "FD-GJY1-TaiZhong1.140603F0111MDQ43PA001DB0121PA04AVG00",
             "FD-GJY1-TaiZhong1.140603F0111MDQ45PA001DB0121PA04AVG00",
@@ -645,9 +645,32 @@ public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
             "AIG067"};
 
     //逆变器矩阵测点
-    public static final String[] TPOINT_Inverter_Matrix = { "FJZT", "AIG013",
-            "AIG027"};
-
+    public static final String[] TPOINT_Inverter_Branch = { "AIG077",
+            "AIG078",
+            "AIG079",
+            "AIG080",
+            "AIG081",
+            "AIG082",
+            "AIG083",
+            "AIG084",
+            "AIG085",
+            "AIG086",
+            "AIG087",
+            "AIG088",
+            "AIG089",
+            "AIG090",
+            "AIG091",
+            "AIG092",
+            "AIG093",
+            "AIG094",
+            "AIG095",
+            "AIG096"
+    };
+
+    //逆变器支路测点
+    public static final String[] TPOINT_Inverter_Matrix = { "FJZT", "AIG013","AIG027","AIG026" };
+    //逆变器支路测点
+    public static final String[] TPOINT_Wt_Matrix = { "FJZT", "AI130","AI022","AI128" };
 
     //组件温度	AIG001
     public static final String TPOINT_GF_ZJWD = "AIG001";

+ 14 - 3
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/custom/InverterVo.java

@@ -2,10 +2,11 @@
 package com.gyee.frame.model.custom;
 
 
+import java.util.List;
 
 public class InverterVo {
 
-    private Integer zt;
+    private Double zt;
     private Double fdl;
 
     private Double gl;
@@ -16,6 +17,16 @@ public class InverterVo {
 
     private String sqname;
 
+    private List<Integer> zlls;
+
+    public List<Integer> getZlls() {
+        return zlls;
+    }
+
+    public void setZlls(List<Integer> zlls) {
+        this.zlls = zlls;
+    }
+
     public String getSqname() {
         return sqname;
     }
@@ -24,11 +35,11 @@ public class InverterVo {
         this.sqname = sqname;
     }
 
-    public Integer getZt() {
+    public Double getZt() {
         return zt;
     }
 
-    public void setZt(Integer zt) {
+    public void setZt(Double zt) {
         this.zt = zt;
     }
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 533 - 557
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/initialpoint/InitialPointGoldenService.java


+ 5 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/photovolatic/PhotoVolaticType.java

@@ -17,7 +17,11 @@ public enum PhotoVolaticType {
     /**
      * 汇流箱
      */
-    HLX("HLX");
+    HLX("HLX"),
+    /**
+     * 支路
+     */
+    ZL("ZL");
 
 
     private String name;

+ 21 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/photovolatic/PhotovoltaicTestingPointNewService.java

@@ -142,4 +142,25 @@ public class PhotovoltaicTestingPointNewService implements BaseService<Photovolt
         return list;
     }
 
+
+    public List<PhotovoltaicTestingPointNew> getPhotovoltaicTestingPointNewBranchList(String wtId)  {
+
+        List<PhotovoltaicTestingPointNew> list=new ArrayList<>();
+
+
+        if(StringUtils.notEmp(wtId))
+        {
+            PhotovoltaicTestingPointNewExample example=new PhotovoltaicTestingPointNewExample();
+            example.setOrderByClause("id ASC");
+            PhotovoltaicTestingPointNewExample.Criteria criteria =example.createCriteria();
+            criteria.andWindturbineidEqualTo(wtId);
+            criteria.andTypeidEqualTo(PhotoVolaticType.ZL.getName());
+            criteria.andCodeNotEqualTo("INITIAL");
+            list= photovoltaicTestingPointNewMapper.selectByExample(example);
+
+        }
+
+        return list;
+    }
+
 }

+ 48 - 38
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java

@@ -55,12 +55,57 @@ public class CftInfoPushService {
         if (StringUtils.notEmp(id)) {
 
 
+            if(id.endsWith("FDC"))
+            {
+                Map<String, Double> cftmap = new HashMap<>();
+                String[] cftstrs= Constant.TPOINT_WP_CFT;
+
+                for(int i=0;i<cftstrs.length;i++)
+                {
+                    Windpowerstationpointnew point2 =windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, cftstrs[i]);
+
+                    if(StringUtils.notEmp(point2.getCode()))
+                    {
+                        PointData value = realApiUtil.getRealData(point2);
+                        cftmap.put(cftstrs[i],StringUtils.round(value.getPointValueInDouble(),2));
+                    }
+                }
+                map.put("cftmap", cftmap);
+
+
+                List<DataVo> glvos =realPowerPushService.findRealPower(id);
+                map.put("glvos", glvos);
+
+
+                Calendar cal = Calendar.getInstance();
+
+
+                cal.set(Calendar.HOUR_OF_DAY, 0);
+                cal.set(Calendar.MINUTE, 0);
+                cal.set(Calendar.SECOND, 0);
+                cal.set(Calendar.MILLISECOND, 0);
+
+                cal.add(Calendar.HOUR_OF_DAY, -1);
+
+                Date date = cal.getTime();
+
+                Map<String, Object> rmgtmap = new HashMap<>();
+
+                rmgtmap=windpowerstationthewindinfoService.wprfxpl(id,DateUtils.format(date));
+
+                map.put("rmgtmap", rmgtmap);
 
 
-/*************************************************测风塔*************************************************************/
+                Map<String, Object> ymgtmap = new HashMap<>();
 
+                ymgtmap=windpowerstationthewindinfoService.wpyfxpl(id,DateUtils.format(date));
+
+                map.put("ymgtmap", ymgtmap);
+            }
+        }else  if(id.endsWith("GDC"))
+        {
             Map<String, Double> cftmap = new HashMap<>();
-            String[] cftstrs= Constant.TPOINT_WP_CFT;
+            String[] cftstrs= Constant.TPOINT_WP_GZHJ;
 
             for(int i=0;i<cftstrs.length;i++)
             {
@@ -72,50 +117,15 @@ public class CftInfoPushService {
                     cftmap.put(cftstrs[i],StringUtils.round(value.getPointValueInDouble(),2));
                 }
             }
-
-//            String[] cftstrs=Constant.TPOINT_WP_CFT_GJYPOINT;
-//            String[] cftcodestrs=Constant.TPOINT_WP_CFT_GJY;
-//            for(int i=0;i<cftstrs.length;i++)
-//            {
-//                PointData value = realApiUtil.getRealData(cftstrs[i]);
-//                cftmap.put(cftcodestrs[i],StringUtils.round(value.getPointValueInDouble(),2));
-//            }
-//            cftmap.put("KQMD",2.13);
-
             map.put("cftmap", cftmap);
-/*************************************************测风塔*************************************************************/
 
 
             List<DataVo> glvos =realPowerPushService.findRealPower(id);
             map.put("glvos", glvos);
 
-/*************************************************关系库指标**************************************************************/
-
-            Calendar cal = Calendar.getInstance();
-
-
-            cal.set(Calendar.HOUR_OF_DAY, 0);
-            cal.set(Calendar.MINUTE, 0);
-            cal.set(Calendar.SECOND, 0);
-            cal.set(Calendar.MILLISECOND, 0);
 
-            cal.add(Calendar.HOUR_OF_DAY, -1);
-
-            Date date = cal.getTime();
-
-            Map<String, Object> rmgtmap = new HashMap<>();
-
-            rmgtmap=windpowerstationthewindinfoService.wprfxpl(id,DateUtils.format(date));
-            
-            map.put("rmgtmap", rmgtmap);
-
-
-            Map<String, Object> ymgtmap = new HashMap<>();
-
-            ymgtmap=windpowerstationthewindinfoService.wpyfxpl(id,DateUtils.format(date));
-
-            map.put("ymgtmap", ymgtmap);
         }
+
 /*************************************************关系库指标**************************************************************/
 
         return map;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 711 - 828
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java


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

@@ -79,6 +79,9 @@ public class RealPowerPushService {
         return glvos;
     }
 
+
+
+
     public List<DataVo> findRealPowerChar(String id, Date currentDate) throws Exception {
 
         List<DataVo> vos = new ArrayList<DataVo>();

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

@@ -3,6 +3,7 @@ package com.gyee.frame.service.websocket;
 
 import cn.hutool.core.date.DateUtil;
 import com.google.common.collect.Maps;
+import com.gyee.frame.common.conf.V2Config;
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.agc.AgcVo;
@@ -18,6 +19,8 @@ import org.apache.commons.compress.utils.Lists;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 
 @Service
@@ -1341,77 +1344,120 @@ public class WtInfoPushService {
 
         List<InverterVo> vos=new ArrayList<>();
         if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
-            List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
-            for (Inverter wt : wtls) {
-                double gl=0.0;
-                double fdl=0.0;
-                int zt=0;
 
-                List<String> pointcodes=new ArrayList<>();
+            if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
+                List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
+                for (Inverter wt : wtls) {
+                    double gl=0.0;
+                    double fdl=0.0;
+                    double zt=0;
+                    double dl=0.0;
+                    List<String> pointcodes=new ArrayList<>();
 
-                String[] strs=Constant.TPOINT_Inverter_Matrix;
-                for(int i=0;i<strs.length;i++)
-                {
-                    PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
-                    if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                    String[] strs=Constant.TPOINT_Inverter_Matrix;
+                    for(int i=0;i<strs.length;i++)
                     {
-                        pointcodes.add(pt.getCode());
+                        PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                        if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                        {
+                            pointcodes.add(pt.getCode());
+                        }
                     }
-                }
 
-                List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
+                    List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
 
-                if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
-                {
-                    zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
-                    gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
-                    fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
-                }
-                if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
-                    Square square = InitialRunner.sqmap.get(wt.getSquareid());
+                    if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
+                    {
+                        zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
+                        gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
+                         dl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                        fdl=StringUtils.round(ptlist.get(3).getPointValueInDouble(),2);
+                    }
 
-                    if (square.getTypes().equals(ZC)) {
+                    String[] zlstrs=Constant.TPOINT_Inverter_Branch;
+                    List<String> zlpointcodes=new ArrayList<>();
+                    for(int i=0;i<zlstrs.length;i++)
+                    {
+                        PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                        if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()) && !pt.getCode().equals(V2Config.getInitialcode()))
+                        {
+                            zlpointcodes.add(pt.getCode());
+                        }
+                    }
 
-                        if(map.containsKey(square.getId()))
+                    List<PointData> zlptlist = realApiUtil.getRealData(zlpointcodes);
+                    List<Integer> zlls=new ArrayList<>();
+                    if(!zlptlist.isEmpty() && zlptlist.size()==zlpointcodes.size())
+                    {
+                        for(PointData po:zlptlist)
                         {
-                            List<InverterVo> ls=map.get(square.getId());;
-                            InverterVo vo=new InverterVo();
-                            vo.setId(wt.getId());
-                            vo.setName(wt.getName());
-                            vo.setFdl(fdl);
-                            vo.setGl(gl);
-                            vo.setZt(zt);
-                            vo.setSqname(square.getName());
-                            ls.add(vo);
-                            map.put(square.getId(),ls);
+                            int zlresult=0; //正常
+                            if(StringUtils.notEmp(po))
+                            {
+                                double dlresult=new BigDecimal(dl).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
+                                if(po.getPointValueInDouble()<dlresult)
+                                {
+                                    zlresult=1;//偏低
+                                }else
+                                {
+                                    zlresult=2;//零支路
+                                }
+                            }
+                            zlls.add(zlresult);
+                        }
+                    }
+
+                    if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
+                        Square square = InitialRunner.sqmap.get(wt.getSquareid());
+
+                        if (square.getTypes().equals(ZC)) {
+
+                            if(map.containsKey(square.getId()))
+                            {
+                                List<InverterVo> ls=map.get(square.getId());;
+                                InverterVo vo=new InverterVo();
+                                vo.setId(wt.getId());
+                                vo.setName(wt.getName());
+                                vo.setFdl(fdl);
+                                vo.setGl(gl);
+                                vo.setZlls(zlls);
+                                vo.setSqname(square.getName());
+                                vo.setZt(zt);
+                                ls.add(vo);
+                                map.put(square.getId(),ls);
+                            }else
+                            {
+                                List<InverterVo> ls=new ArrayList<>();
+                                InverterVo vo=new InverterVo();
+                                vo.setId(wt.getId());
+                                vo.setName(wt.getName());
+                                vo.setFdl(fdl);
+                                vo.setGl(gl);
+                                vo.setZt(zt);
+                                vo.setZlls(zlls);
+                                vo.setSqname(square.getName());
+                                ls.add(vo);
+                                map.put(square.getId(),ls);
+
+                            }
                         }else
                         {
-                            List<InverterVo> ls=new ArrayList<>();
                             InverterVo vo=new InverterVo();
                             vo.setId(wt.getId());
                             vo.setName(wt.getName());
+                            vo.setSqname(square.getName());
                             vo.setFdl(fdl);
                             vo.setGl(gl);
                             vo.setZt(zt);
-                            vo.setSqname(square.getName());
-                            ls.add(vo);
-                            map.put(square.getId(),ls);
-
+                            vo.setZlls(zlls);
+                            vos.add(vo);
                         }
-                    }else
-                    {
-                        InverterVo vo=new InverterVo();
-                        vo.setId(wt.getId());
-                        vo.setName(wt.getName());
-                        vo.setFdl(fdl);
-                        vo.setGl(gl);
-                        vo.setZt(zt);
-                        vo.setSqname(square.getName());
-                        vos.add(vo);
                     }
-                }
 
+                }
+                map.put(JZ,vos);
             }
+
         }
 
         map.put(JZ,vos);
@@ -1441,8 +1487,8 @@ public class WtInfoPushService {
                     for (Inverter wt : wtls) {
                         double gl=0.0;
                         double fdl=0.0;
-                        int zt=0;
-
+                        double zt=0;
+                        double dl=0.0;
                         List<String> pointcodes=new ArrayList<>();
 
                         String[] strs=Constant.TPOINT_Inverter_Matrix;
@@ -1462,7 +1508,42 @@ public class WtInfoPushService {
                             zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
                             gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
                             fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                            dl=StringUtils.round(ptlist.get(3).getPointValueInDouble(),2);
+                        }
+
+                        String[] zlstrs=Constant.TPOINT_Inverter_Branch;
+                        List<String> zlpointcodes=new ArrayList<>();
+                        for(int i=0;i<zlstrs.length;i++)
+                        {
+                            PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),zlstrs[i]);
+                            if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()) && !pt.getCode().equals(V2Config.getInitialcode()))
+                            {
+                                zlpointcodes.add(pt.getCode());
+                            }
                         }
+
+                        List<PointData> zlptlist = realApiUtil.getRealData(zlpointcodes);
+                        List<Integer> zlls=new ArrayList<>();
+                        if(!zlptlist.isEmpty() && zlptlist.size()==zlpointcodes.size())
+                        {
+                            for(PointData po:zlptlist)
+                            {
+                                int zlresult=0; //正常
+                                if(StringUtils.notEmp(po))
+                                {
+                                    double dlresult=new BigDecimal(dl).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
+                                    if(po.getPointValueInDouble()<dlresult)
+                                    {
+                                        zlresult=1;//偏低
+                                    }else
+                                    {
+                                        zlresult=2;//零支路
+                                    }
+                                }
+                                zlls.add(zlresult);
+                            }
+                        }
+
                         if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
                             Square square = InitialRunner.sqmap.get(wt.getSquareid());
 
@@ -1476,6 +1557,7 @@ public class WtInfoPushService {
                                     vo.setName(wt.getName());
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
+                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     vo.setZt(zt);
                                     ls.add(vo);
@@ -1489,6 +1571,7 @@ public class WtInfoPushService {
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
                                     vo.setZt(zt);
+                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     ls.add(vo);
                                     map.put(square.getId(),ls);
@@ -1503,6 +1586,7 @@ public class WtInfoPushService {
                                 vo.setFdl(fdl);
                                 vo.setGl(gl);
                                 vo.setZt(zt);
+                                vo.setZlls(zlls);
                                 vos.add(vo);
                             }
                         }

+ 10 - 10
web/monitor-web-sxjn/src/main/resources/application-jn.yml

@@ -57,16 +57,16 @@ server :
 #dev环境  mysql7.0
 spring :
   application:
-#    name: monitor-hb-provider
-#    cloud:
-#      nacos:
-#        discovery:
-#          server-addr: 10.81.3.155:8848
-#          #指定yaml格式的配置
-#          file-extension: yaml
-#          cluster-name: master
-#        username: nacos
-#        password: nacos
+    name: monitor-hb-provider
+    cloud:
+      nacos:
+        discovery:
+          server-addr: 10.81.3.155:8848
+          #指定yaml格式的配置
+          file-extension: yaml
+          cluster-name: master
+        username: nacos
+        password: nacos
     #引入其他配置文件,例如ftpHX 未配置文件application-ftpHX.yml
     #include: ftpHX,ftpCloud
   servlet: