Browse Source

关于光伏部分功能修改

wangb 2 năm trước cách đây
mục cha
commit
23151dab13

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

@@ -610,27 +610,23 @@ public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
             "AIG067"};
 
     //逆变器矩阵测点
-    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_Branch = { "AIG077", "AIG078", "AIG079", "AIG080", "AIG081",
+            "AIG082", "AIG083", "AIG084", "AIG085", "AIG086", "AIG087", "AIG088",
+			"AIG089", "AIG090", "AIG091", "AIG092", "AIG093", "AIG094", "AIG095",
+            "AIG096", "AIG097", "AIG098", "AIG099", "AIG100", "AIG101", "AIG102",
+            "AIG103", "AIG104", "AIG105", "AIG106", "AIG107", "AIG108", "AIG109",
+            "AIG110", "AIG111", "AIG112", "AIG113", "AIG114", "AIG115", "AIG116",
+            "AIG117", "AIG118", "AIG119", "AIG120", "AIG121", "AIG122", "AIG123",
+            "AIG124", "AIG125", "AIG126", "AIG127", "AIG128", "AIG129", "AIG130",
+            "AIG131", "AIG132", "AIG133", "AIG134", "AIG135", "AIG136", "AIG137",
+            "AIG138", "AIG139", "AIG140", "AIG141", "AIG142", "AIG143", "AIG144",
+            "AIG145", "AIG146", "AIG147", "AIG148", "AIG149", "AIG150", "AIG151",
+            "AIG152", "AIG153", "AIG154", "AIG155", "AIG156", "AIG157", "AIG158",
+            "AIG159", "AIG160", "AIG161", "AIG162", "AIG163", "AIG164", "AIG165",
+            "AIG166", "AIG167", "AIG168", "AIG169", "AIG170", "AIG171", "AIG172",
+            "AIG173", "AIG174", "AIG175", "AIG176", "AIG177", "AIG178", "AIG179",
+            "AIG180", "AIG181", "AIG182", "AIG183", "AIG184", "AIG185", "AIG186",
+            "AIG187", "AIG188"};
 
     //逆变器支路测点
     public static final String[] TPOINT_Inverter_Matrix = { "FJZT", "AIG013","AI064","AIG009" };

+ 33 - 5
web/monitor-web-sxjn/src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -480,7 +480,17 @@ public class InitialRunner implements CommandLineRunner {
 
         WindpowerstationExample windpowerstationExample = new WindpowerstationExample();
         windpowerstationExample.setOrderByClause("ordernum ASC");
-//        windpowerstationExample.createCriteria().andIdNotLike("%SY_FDC%");
+
+
+        WindpowerstationExample.Criteria cr=windpowerstationExample.createCriteria();
+        cr.andIdNotLike("%HR_GDC%");
+        cr.andIdNotLike("%PL_GDC%");
+        cr.andIdNotLike("%TL_GDC%");
+        cr.andIdNotLike("%TZ_GDC%");
+        cr.andIdNotLike("%YG_GDC%");
+        cr.andIdNotLike("%YX_GDC%");
+        cr.andIdNotLike("%YY_GDC%");
+
         wpallls = windpowerstationService.selectByExample(windpowerstationExample);
         if (!wpallls.isEmpty()) {
             for (Windpowerstation wp : wpallls) {
@@ -564,9 +574,18 @@ public class InitialRunner implements CommandLineRunner {
         }
 
 
+        List<String> pjidls=new ArrayList<>();
         ProjectExample projectExample = new ProjectExample();
         projectExample.setOrderByClause("ordernum ASC");
 //        projectExample.createCriteria().andWindpowerstationidNotLike("%SY_FDC%");
+        ProjectExample.Criteria pjcr=projectExample.createCriteria();
+        pjcr.andWindpowerstationidNotLike("%HR_GDC%");
+        pjcr.andWindpowerstationidNotLike("%PL_GDC%");
+        pjcr.andWindpowerstationidNotLike("%TL_GDC%");
+        pjcr.andWindpowerstationidNotLike("%TZ_GDC%");
+        pjcr.andWindpowerstationidNotLike("%YG_GDC%");
+        pjcr.andWindpowerstationidNotLike("%YX_GDC%");
+        pjcr.andWindpowerstationidNotLike("%YY_GDC%");
         pjallls = projectService.selectByExample(projectExample);
 
         if (!pjallls.isEmpty()) {
@@ -584,12 +603,14 @@ public class InitialRunner implements CommandLineRunner {
                     pjls.add(pj);
                     pjsmap.put(pj.getWindpowerstationid(), pjls);
                 }
+
+                pjidls.add(pj.getId());
             }
         }
 
         LineExample lineExample = new LineExample();
         lineExample.setOrderByClause("ordernum ASC");
-        lineExample.createCriteria().getAllCriteria();
+        lineExample.createCriteria().andProjectidIn(pjidls);
         lineallls = lineService.selectByExample(lineExample);
 
         if (!lineallls.isEmpty()) {
@@ -615,7 +636,7 @@ public class InitialRunner implements CommandLineRunner {
 
         WindturbineExample windturbineExample = new WindturbineExample();
         windturbineExample.setOrderByClause("ID ASC");
-
+      //  windturbineExample.createCriteria().andProjectidIn(pjidls);
         wtallls = windturbineService.selectByExample(windturbineExample);
 
         if (!wtallls.isEmpty()) {
@@ -796,11 +817,18 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        WindturbinetestingpointnewExample windTurbineTestingPointAiExample=new WindturbinetestingpointnewExample();
 
-        List<Windturbinetestingpointnew> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
 
+        List<Windturbinetestingpointnew> wtAilist= new ArrayList<>();
 
+        for (Windpowerstation wp : wpallls) {
+            if (wp.getId().endsWith("FDC")) {
+                WindturbinetestingpointnewExample windTurbineTestingPointAiExample=new WindturbinetestingpointnewExample();
+                windTurbineTestingPointAiExample.createCriteria().andWindpowerstationidEqualTo(wp.getId());
+                List<Windturbinetestingpointnew> ailist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
+                wtAilist.addAll(ailist);
+            }
+        }
 
         if(wtAilist != null && !wtAilist.isEmpty()){
             for(Windturbinetestingpointnew mp : wtAilist){

+ 18 - 4
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/RecommenmainService.java

@@ -6,6 +6,7 @@ import com.gyee.frame.common.base.BaseService;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.RecommenmainMapper;
+import com.gyee.frame.model.auto.Inverter;
 import com.gyee.frame.model.auto.Recommenmain;
 import com.gyee.frame.model.auto.RecommenmainExample;
 import com.gyee.frame.model.auto.Windturbine;
@@ -242,10 +243,23 @@ public class RecommenmainService implements BaseService<Recommenmain, Recommenma
 
 
 			List<String> wtidls=new ArrayList<>();
-			if (id.equals(GF))
-			{
-				return 0;
-			}else if (InitialRunner.wpmap.containsKey(id)) {
+			 if (InitialRunner.gp_nbqmap.containsKey(id)) {
+				for(Inverter wt:InitialRunner.gp_nbqmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			} else if (InitialRunner.pj_nbqmap.containsKey(id)) {
+				for(Inverter wt:InitialRunner.pj_nbqmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			} else if (InitialRunner.ln_nbqmap.containsKey(id)) {
+				for(Inverter wt:InitialRunner.ln_nbqmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			}
+			else if (InitialRunner.wpmap.containsKey(id)) {
 				for(Windturbine wt:InitialRunner.wp_wtmap.get(id))
 				{
 					wtidls.add(wt.getId());

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

@@ -5,6 +5,7 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.BoxChangeMapper;
 import com.gyee.frame.model.auto.BoxChange;
 import com.gyee.frame.model.auto.BoxChangeExample;
+import com.gyee.frame.model.auto.SquareExample;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import org.springframework.stereotype.Service;
 
@@ -93,6 +94,14 @@ public class BoxChangeService implements BaseService<BoxChange, BoxChangeExample
 
     public List<BoxChange> selectAll() {
         BoxChangeExample example=new BoxChangeExample();
+		BoxChangeExample.Criteria cr=example.createCriteria();
+		cr.andWindpowerstationidNotLike("%HR_GDC%");
+		cr.andWindpowerstationidNotLike("%PL_GDC%");
+		cr.andWindpowerstationidNotLike("%TL_GDC%");
+		cr.andWindpowerstationidNotLike("%TZ_GDC%");
+		cr.andWindpowerstationidNotLike("%YG_GDC%");
+		cr.andWindpowerstationidNotLike("%YX_GDC%");
+		cr.andWindpowerstationidNotLike("%YY_GDC%");
         return boxChangeMapper.selectByExample(example);
 
     }

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

@@ -3,6 +3,7 @@ package com.gyee.frame.service.photovolatic;
 import com.gyee.frame.common.base.BaseService;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.InverterMapper;
+import com.gyee.frame.model.auto.BoxChangeExample;
 import com.gyee.frame.model.auto.Inverter;
 import com.gyee.frame.model.auto.InverterExample;
 import com.gyee.frame.util.SnowflakeIdWorker;
@@ -93,6 +94,14 @@ public class InverterService implements BaseService<Inverter, InverterExample> {
 
     public List<Inverter> selectAll() {
         InverterExample example=new InverterExample();
+		InverterExample.Criteria cr=example.createCriteria();
+		cr.andWindpowerstationidNotLike("%HR_GDC%");
+		cr.andWindpowerstationidNotLike("%PL_GDC%");
+		cr.andWindpowerstationidNotLike("%TL_GDC%");
+		cr.andWindpowerstationidNotLike("%TZ_GDC%");
+		cr.andWindpowerstationidNotLike("%YG_GDC%");
+		cr.andWindpowerstationidNotLike("%YX_GDC%");
+		cr.andWindpowerstationidNotLike("%YY_GDC%");
         return inverterMapper.selectByExample(example);
 
     }

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

@@ -3,6 +3,7 @@ package com.gyee.frame.service.photovolatic;
 import com.gyee.frame.common.base.BaseService;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.JunctionboxMapper;
+import com.gyee.frame.model.auto.InverterExample;
 import com.gyee.frame.model.auto.Junctionbox;
 import com.gyee.frame.model.auto.JunctionboxExample;
 import com.gyee.frame.util.SnowflakeIdWorker;
@@ -93,6 +94,14 @@ public class JunctionboxService implements BaseService<Junctionbox, JunctionboxE
 
     public List<Junctionbox> selectAll() {
         JunctionboxExample example=new JunctionboxExample();
+		JunctionboxExample.Criteria cr=example.createCriteria();
+		cr.andWindpowerstationidNotLike("%HR_GDC%");
+		cr.andWindpowerstationidNotLike("%PL_GDC%");
+		cr.andWindpowerstationidNotLike("%TL_GDC%");
+		cr.andWindpowerstationidNotLike("%TZ_GDC%");
+		cr.andWindpowerstationidNotLike("%YG_GDC%");
+		cr.andWindpowerstationidNotLike("%YX_GDC%");
+		cr.andWindpowerstationidNotLike("%YY_GDC%");
         return junctionboxMapper.selectByExample(example);
 
     }

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

@@ -97,6 +97,14 @@ public class PhotovoltaicTestingPointNewService implements BaseService<Photovolt
 
     public List<PhotovoltaicTestingPointNew> selectAll() {
         PhotovoltaicTestingPointNewExample example=new PhotovoltaicTestingPointNewExample();
+        PhotovoltaicTestingPointNewExample.Criteria cr=example.createCriteria();
+        cr.andWindpowerstationidNotLike("%HR_GDC%");
+        cr.andWindpowerstationidNotLike("%PL_GDC%");
+        cr.andWindpowerstationidNotLike("%TL_GDC%");
+        cr.andWindpowerstationidNotLike("%TZ_GDC%");
+        cr.andWindpowerstationidNotLike("%YG_GDC%");
+        cr.andWindpowerstationidNotLike("%YX_GDC%");
+        cr.andWindpowerstationidNotLike("%YY_GDC%");
         return photovoltaicTestingPointNewMapper.selectByExample(example);
 
     }

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

@@ -3,6 +3,7 @@ package com.gyee.frame.service.photovolatic;
 import com.gyee.frame.common.base.BaseService;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.SquareMapper;
+import com.gyee.frame.model.auto.PhotovoltaicTestingPointNewExample;
 import com.gyee.frame.model.auto.Square;
 import com.gyee.frame.model.auto.SquareExample;
 import com.gyee.frame.util.SnowflakeIdWorker;
@@ -93,6 +94,14 @@ public class SquareService implements BaseService<Square, SquareExample> {
 
     public List<Square> selectAll() {
         SquareExample example=new SquareExample();
+		SquareExample.Criteria cr=example.createCriteria();
+		cr.andWindpowerstationidNotLike("%HR_GDC%");
+		cr.andWindpowerstationidNotLike("%PL_GDC%");
+		cr.andWindpowerstationidNotLike("%TL_GDC%");
+		cr.andWindpowerstationidNotLike("%TZ_GDC%");
+		cr.andWindpowerstationidNotLike("%YG_GDC%");
+		cr.andWindpowerstationidNotLike("%YX_GDC%");
+		cr.andWindpowerstationidNotLike("%YY_GDC%");
         return squareMapper.selectByExample(example);
 
     }

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -2352,7 +2352,7 @@ public class GenreSetPushService {
 
                                     double zc = 0.0;
                                     double jz = 0.0;
-                                    List<Square> sqls = InitialRunner.gp_sqmap.get(ln.getId());
+                                    List<Square> sqls = InitialRunner.ln_sqmap.get(ln.getId());
                                     for (Square sq : sqls) {
                                         if (sq.getTypes().equals(ZC)) {
 

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

@@ -214,7 +214,7 @@ public class MatrixPushByWpService {
                         } else if (zt == 6) {
                             slts++;
                         }
-                        List<Integer> zlls = new ArrayList<>();
+//                        List<Integer> zlls = new ArrayList<>();
 
                         if (!zlptlist.isEmpty() && zlptlist.size() == zlpointcodes.size()) {
                             int zlresult = 0; //正常
@@ -230,7 +230,7 @@ public class MatrixPushByWpService {
                                         zlresult = 2;//零支路
                                     }
                                 zlnumber++;
-                                zlls.add(zlresult);
+//                                zlls.add(zlresult);
                             }
 
 
@@ -260,7 +260,7 @@ public class MatrixPushByWpService {
                                     vo.setName(wt.getName());
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
-                                    vo.setZlls(zlls);
+//                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     vo.setZt(zt);
                                     ls.add(vo);
@@ -273,7 +273,7 @@ public class MatrixPushByWpService {
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
                                     vo.setZt(zt);
-                                    vo.setZlls(zlls);
+//                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     ls.add(vo);
                                     zcmap.put(square.getId(), ls);
@@ -287,7 +287,7 @@ public class MatrixPushByWpService {
                                 vo.setFdl(fdl);
                                 vo.setGl(gl);
                                 vo.setZt(zt);
-                                vo.setZlls(zlls);
+//                                vo.setZlls(zlls);
                                 vos.add(vo);
                             }
                         }

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

@@ -42,9 +42,9 @@ public class MatrixQfPushService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
     @Resource
     private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
-    private final String QS = "0";
-    private final String FD = "-1";
-    private final String GF = "-2";
+    private final String QS = "QY0";
+    private final String FD = "QY-1";
+    private final String GF = "QY-2";
 
 
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();

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

@@ -897,31 +897,31 @@ public class WtInfoPushService {
                             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);
-                            }
-                        }
+//                        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());
@@ -936,7 +936,7 @@ public class WtInfoPushService {
                                     vo.setName(wt.getName());
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
-                                    vo.setZlls(zlls);
+//                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     vo.setZt(zt);
                                     ls.add(vo);
@@ -949,7 +949,7 @@ public class WtInfoPushService {
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
                                     vo.setZt(zt);
-                                    vo.setZlls(zlls);
+//                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     ls.add(vo);
                                     map.put(square.getId(), ls);
@@ -963,7 +963,7 @@ public class WtInfoPushService {
                                 vo.setFdl(fdl);
                                 vo.setGl(gl);
                                 vo.setZt(zt);
-                                vo.setZlls(zlls);
+//                                vo.setZlls(zlls);
                                 vos.add(vo);
                             }
                         }

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

@@ -28,7 +28,7 @@ gyee:
   #实时数据库Url
   baseurl: http://10.81.3.155:8011/ts
   #实时数据库新Url
-  basenewurl: http://10.81.3.170:8099/ts
+  basenewurl: http://10.81.3.152:8099/ts
   #API访问ip
   #swaggerip: 49.4.50.80:8082
   swaggerip: 10.81.3.155:8082
@@ -53,8 +53,8 @@ server :
     min-spare-threads : 5
     uri-encoding : UTF-8
     #shiro 报错修改的地方
-    max-connections: 200000
-    max-http-form-post-size: 9000000
+  max-connections: 200000
+  max-http-form-post-size: 9000000
 #dev环境  mysql7.0
 spring :
   application: