Browse Source

监视模块产品化计算服务修改

shilin 3 years ago
parent
commit
cdd2ed1c77

+ 7 - 20
web/monitor-web-sxjn/src/main/java/com/gyee/SpringbootStart.java

@@ -33,25 +33,12 @@ public class SpringbootStart {
 //        InitialRedis initialRedis=new InitialRedis();
 //        System.out.println("初始化开始!");
 //        initialRedis.intialWindturbinepowercurvefitting();
-//        initialRedis.intialWpScatter();
-//        initialRedis.intialPjScatter();
-//        initialRedis.intialLnScatter();
-//        initialRedis.intialWtScatter();
-//        System.out.println("初始化完成!");
-
-//        System.out.println("开始导出风机测点。。。。。。");
-//        initialPointEdosService.initalFj();
-//        System.out.println("结束导出风机测点。。。。。。");
-//
-//        System.out.println("开始导出风场测点。。。。。。");
-//        initialPointEdosService.initalFc(false);
-//        System.out.println("结束导出风场测点。。。。。。");
-//
-//
-//        System.out.println("开始导出风功率测点。。。。。。");
-//        initialPointEdosService.initalFgl();
-//        System.out.println("结束导出风功率测点。。。。。。");
-
-        System.out.println("初始化结束!");
+////        initialRedis.intialWpScatter();
+////        initialRedis.intialPjScatter();
+////        initialRedis.intialLnScatter();
+////        initialRedis.intialWtScatter();
+        System.out.println("初始化完成!");
+
+
     }
 }

+ 19 - 18
web/monitor-web-sxjn/src/main/java/com/gyee/frame/common/conf/MybatisConfig.java

@@ -46,33 +46,34 @@ public class MybatisConfig {
         return DruidDataSourceBuilder.create().build();
     }
 
-    @Bean(name = "ticket")
-    @ConfigurationProperties("spring.datasource.druid.ticket")
-//    @ConditionalOnProperty(prefix = "spring.datasource.druid.ticket", name = "enabled", havingValue = "true")
-    public DataSource ticketDataSource()
-    {
-        return DruidDataSourceBuilder.create().build();
-    }
-    @Bean(name = "dynamicDataSource")
-    @Primary
-    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource)
-    {
-        Map<Object, Object> targetDataSources = new HashMap<>();
-        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
-    	targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
-        return new DynamicDataSource(masterDataSource(), targetDataSources);
-    }
+//    @Bean(name = "ticket")
+//    @ConfigurationProperties("spring.datasource.druid.ticket")
+////    @ConditionalOnProperty(prefix = "spring.datasource.druid.ticket", name = "enabled", havingValue = "true")
+//    public DataSource ticketDataSource()
+//    {
+//        return DruidDataSourceBuilder.create().build();
+//    }
+
 
     @Bean(name = "dynamicDataSource")
     @Primary
-    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource, @Qualifier("ticket")DataSource ticketDataSource)
+    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource)
     {
         Map<Object, Object> targetDataSources = new HashMap<>();
         targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
         targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
-        targetDataSources.put(DataSourceType.TICKET.name(),ticketDataSource);
         return new DynamicDataSource(masterDataSource(), targetDataSources);
     }
+//    @Bean(name = "dynamicDataSource")
+//    @Primary
+//    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource, @Qualifier("ticket")DataSource ticketDataSource)
+//    {
+//        Map<Object, Object> targetDataSources = new HashMap<>();
+//        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+//        targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
+//        targetDataSources.put(DataSourceType.TICKET.name(),ticketDataSource);
+//        return new DynamicDataSource(masterDataSource(), targetDataSources);
+//    }
 
     @Bean
     public SqlSessionFactory sqlSessionFactory(DynamicDataSource dynamicDataSource) throws Exception {

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

@@ -63,6 +63,11 @@ public class InitialRunner implements CommandLineRunner {
     @Resource
     private WindturbinepartsService windturbinepartsService;
 
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
     public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合(包含光电电)
     public static List<Project> pjallls = new ArrayList<Project>(); //项目LIST集合(包含光电电)
     public static List<Line> lineallls = new ArrayList<Line>(); // 线路LIST集合(包含光电电)
@@ -96,6 +101,7 @@ public class InitialRunner implements CommandLineRunner {
     public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
     public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
 
+    public static Map<String, List<Windpowerstation>> re_wpmap = new HashMap<String, List<Windpowerstation>>();
     public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
     public static Map<String, List<Windturbine>> pj_wtmap = new HashMap<String, List<Windturbine>>();
     public static Map<String, List<Windturbine>> ln_wtmap = new HashMap<String, List<Windturbine>>();
@@ -209,7 +215,7 @@ public class InitialRunner implements CommandLineRunner {
 
         WindpowerstationExample windpowerstationExample = new WindpowerstationExample();
         windpowerstationExample.setOrderByClause("ordernum ASC");
-        windpowerstationExample.createCriteria().andIdNotLike("%SY_FDC%");
+//        windpowerstationExample.createCriteria().andIdNotLike("%SY_FDC%");
         wpallls = windpowerstationService.selectByExample(windpowerstationExample);
         if (!wpallls.isEmpty()) {
             for (Windpowerstation wp : wpallls) {
@@ -219,6 +225,52 @@ public class InitialRunner implements CommandLineRunner {
                 if (wp.getId().endsWith("GDC")) {
                 	spls.add(wp);
                 }
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+QS))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+QS);
+                    ls.add(wp);
+                    re_wpmap.put(wp.getCompanyid()+QS,ls);
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    ls.add(wp);
+                    re_wpmap.put(wp.getCompanyid()+QS,ls);
+                }
+
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+FD))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+FD);
+                    if(wp.getId().endsWith("FDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+FD,ls);
+                    }
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    if(wp.getId().endsWith("FDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+FD,ls);
+                    }
+                }
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+GF))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+GF);
+                    if(wp.getId().endsWith("GDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+GF,ls);
+                    }
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    if(wp.getId().endsWith("GDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+GF,ls);
+                    }
+                }
                 wpmap.put(wp.getId(), wp);
             }
         }
@@ -226,7 +278,7 @@ public class InitialRunner implements CommandLineRunner {
 
         ProjectExample projectExample = new ProjectExample();
         projectExample.setOrderByClause("ordernum ASC");
-        projectExample.createCriteria().andWindpowerstationidNotLike("%SY_FDC%");
+//        projectExample.createCriteria().andWindpowerstationidNotLike("%SY_FDC%");
         pjallls = projectService.selectByExample(projectExample);
 
         if (!pjallls.isEmpty()) {

+ 154 - 85
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/initialpoint/InitialPointEdosService.java

@@ -57,6 +57,9 @@ public class InitialPointEdosService implements  IinitialPoint{
 
         List<Windpowerstationpointnew> allpoints=new ArrayList<>();
 
+
+
+
         if(!regions.isEmpty())
         {
 
@@ -70,8 +73,8 @@ public class InitialPointEdosService implements  IinitialPoint{
                     {
 //                        StringBuilder sba=new StringBuilder();
 //                        sba.append(re.getCode()).append("_").append(cs.getId()).append("_");
-///********************************************区域公司测点**************************************************/
-                        List<Windpowerstationpointnew> points=new ArrayList<>();
+/********************************************区域公司测点**************************************************/
+                        List<Windpowerstationpointnew>  points=new ArrayList<>();
                         for(int i=0;i<stpointls.size();i++)
                         {
 
@@ -96,15 +99,17 @@ public class InitialPointEdosService implements  IinitialPoint{
                             po.setName(String.valueOf(sb));
                             po.setModel(null);
                             po.setModelid(null);
-                            if(regions.size()==1)
+
+                            StringBuilder tempsb=new StringBuilder();
+
+                            if(StringUtils.notEmp(re.getCode()))
                             {
-                                po.setWindpowerstationid("0");
+                                tempsb.append(re.getCode()).append("0");
                             }else
                             {
-                                StringBuilder tempsb=new StringBuilder();
-                                tempsb.append(re.getId());
-                                po.setWindpowerstationid(String.valueOf(tempsb));
+                                tempsb.append("0");
                             }
+                            po.setWindpowerstationid(String.valueOf(tempsb));
                             po.setUniformcode(stp.getUniformcode());
 
 
@@ -112,12 +117,12 @@ public class InitialPointEdosService implements  IinitialPoint{
                             if(stp.getCode().equals(CI))
                             {
                                 sb =new StringBuilder();
-                                sb.append("GDHF.JSFW");
+                                sb.append("SXJN.JSFW");
                                 po.setRealtimeid(String.valueOf(sb));
                             }else
                             {
                                 sb =new StringBuilder();
-                                 sb.append("GDHF.JSFWDD");
+                                sb.append("SXJN.JSFWDD");
                                 po.setRealtimeid(String.valueOf(sb));
                             }
 
@@ -129,7 +134,68 @@ public class InitialPointEdosService implements  IinitialPoint{
                         allpoints.addAll(points);
                         // windPowerstationTestingPointService.insertBatch(points);
 
-                        /*******************************************风电测点生成*******************************************************/
+ /*******************************************风电测点生成*******************************************************/
+/********************************************风电场公司测点**************************************************/
+                        points=new ArrayList<>();
+                        for(int i=0;i<stpointls.size();i++)
+                        {
+
+
+                            Windpowerstationstandardpoint stp=stpointls.get(i);
+                            StringBuilder sb =new StringBuilder();
+//                            sb.append(String.valueOf(sba));
+//                            sb.append(re.getCode()).append("F_XX_XX_XX_XXX_");
+//                            sb.append(CI);
+//                            sb.append(stp.getOrdernum());
+////                            if(stp.getCode().equals(CI))
+////                            {
+////                                sbtable.append("JSFW.");
+////                                sbtable.append(sb);
+////                            }
+                            Windpowerstationpointnew po=new Windpowerstationpointnew();
+                            po.setId(StringUtils.getUUID());
+                            po.setCode(V2Config.getInitialcode());
+//                            po.setCode(String.valueOf(sb));
+                            sb =new StringBuilder();
+                            sb.append(re.getName()).append("风场").append(stp.getName());
+                            po.setName(String.valueOf(sb));
+                            po.setModel(null);
+                            po.setModelid(null);
+
+                            StringBuilder tempsb=new StringBuilder();
+                            if(StringUtils.notEmp(re.getCode()))
+                            {
+                                tempsb.append(re.getCode()).append("-1");
+                            }else
+                            {
+                                tempsb.append("-1");
+                            }
+                            po.setWindpowerstationid(String.valueOf(tempsb));
+                            po.setUniformcode(stp.getUniformcode());
+
+
+
+                            if(stp.getCode().equals(CI))
+                            {
+                                sb =new StringBuilder();
+                                sb.append("SXJN.JSFW");
+                                po.setRealtimeid(String.valueOf(sb));
+                            }else
+                            {
+                                sb =new StringBuilder();
+                                 sb.append("SXJN.JSFWDD");
+                                po.setRealtimeid(String.valueOf(sb));
+                            }
+
+
+
+                            points.add(po);
+                        }
+
+                        allpoints.addAll(points);
+                        // windPowerstationTestingPointService.insertBatch(points);
+
+ /*******************************************风电测点生成*******************************************************/
 
 //            points=new ArrayList<>();
 //            for(int i=0;i<stpointls.size();i++)
@@ -178,7 +244,7 @@ public class InitialPointEdosService implements  IinitialPoint{
 //                if(stp.getCode().equals(CI))
 //                {
 //                    sb =new StringBuilder();
-//                    sb.append("GDHF.JSFWFC");
+//                    sb.append("SXJN.JSFWFC");
 //                    po.setRealtimeid(String.valueOf(sb));
 //                }
 //                points.add(po);
@@ -187,69 +253,72 @@ public class InitialPointEdosService implements  IinitialPoint{
 //            allpoints.addAll(points);
 //            //windPowerstationTestingPointService.insertBatch(points);
 //
-//            if(isGf)
-//            {
-//                /*********************************************光伏测点生成*****************************************************/
-//
-//                points=new ArrayList<>();
-//                for(int i=0;i<stpointls.size();i++)
-//                {
-//
-//
-//                    Windpowerstationstandardpoint stp=stpointls.get(i);
-//                    StringBuilder sb =new StringBuilder();
-//                    sb.append(String.valueOf(sba));
-//                    sb.append("GDC_XX_XX_XX_XXX_");
-//                    sb.append(CI);
-//                    sb.append(stp.getOrdernum());
-////                                if(stp.getCode().equals(CI))
-////                                {
-////                                    sbtable.append("JSFW.");
-////                                    sbtable.append(sb);
-////                                }
-//                    Windpowerstationpointnew po=new Windpowerstationpointnew();
-//                    po.setCode(String.valueOf(sb));
-//                    sb =new StringBuilder();
-//                    sb.append(re.getName()).append(stp.getName());
-//                    po.setName(String.valueOf(sb));
-//                    po.setModel(null);
-//                    po.setModelid(null);
-//                    if(regions.size()==1)
-//                    {
-//                        po.setWindpowerstationid("-2");
-//                    }else
-//                    {
-//                        StringBuilder tempsb=new StringBuilder();
-//                        tempsb.append(re.getCode()).append(2);
-//                        po.setWindpowerstationid(String.valueOf(tempsb));
-//                    }
-//                    po.setUniformcode(stp.getUniformcode());
-//
-////                                if(stp.getCode().equals(CI))
-////                                {
-////                                    StringBuilder tempsb=new StringBuilder();
-////                                    tempsb.append(cs.getId()).append(re.getCode());
-////                                    tempsb.append(".JSFW");
-////                                    po.setRealtimeid(String.valueOf(tempsb));
-////                                }
-//                    if(stp.getCode().equals(CI))
-//                    {
-//                        sb =new StringBuilder();
-//                        sb.append("GDHF.JSFWGC");
-//                        po.setRealtimeid(String.valueOf(sb));
-//                    }
-//                    points.add(po);
-//                }
-//
-//                allpoints.addAll(points);
-//                // windPowerstationTestingPointService.insertBatch(points);
-//            }
+//                        if(isGf)
+//                        {
+/*********************************************光伏测点生成*****************************************************/
+            
+                            points=new ArrayList<>();
+                            for(int i=0;i<stpointls.size();i++)
+                            {
+            
+            
+                                Windpowerstationstandardpoint stp=stpointls.get(i);
+                                StringBuilder sb =new StringBuilder();
+//                                sb.append(String.valueOf(sba));
+//                                sb.append("GDC_XX_XX_XX_XXX_");
+//                                sb.append(CI);
+//                                sb.append(stp.getOrdernum());
+//            //                                if(stp.getCode().equals(CI))
+//            //                                {
+//            //                                    sbtable.append("JSFW.");
+//            //                                    sbtable.append(sb);
+//            //                                }
+                                Windpowerstationpointnew po=new Windpowerstationpointnew();
+                                po.setId(StringUtils.getUUID());
+                                po.setCode(V2Config.getInitialcode());
+                                sb =new StringBuilder();
+                                sb.append(re.getName()).append("光伏").append(stp.getName());
+                                po.setName(String.valueOf(sb));
+                                po.setModel(null);
+                                po.setModelid(null);
+                                StringBuilder tempsb=new StringBuilder();
+
+                                if(StringUtils.notEmp(re.getCode()))
+                                {
+                                    tempsb.append(re.getCode()).append("-2");
+                                }else
+                                {
+                                    tempsb.append("-2");
+                                }
+
+                                po.setWindpowerstationid(String.valueOf(tempsb));
+                                po.setUniformcode(stp.getUniformcode());
+            
+            //                                if(stp.getCode().equals(CI))
+            //                                {
+            //                                    StringBuilder tempsb=new StringBuilder();
+            //                                    tempsb.append(cs.getId()).append(re.getCode());
+            //                                    tempsb.append(".JSFW");
+            //                                    po.setRealtimeid(String.valueOf(tempsb));
+            //                                }
+                                if(stp.getCode().equals(CI))
+                                {
+                                    sb =new StringBuilder();
+                                    sb.append("SXJN.JSFWGC");
+                                    po.setRealtimeid(String.valueOf(sb));
+                                }
+                                points.add(po);
+                            }
+            
+                            allpoints.addAll(points);
+                            // windPowerstationTestingPointService.insertBatch(points);
+                        }
                     }
                 }
             }
 
 
-        }
+//        }
 
 
 
@@ -338,10 +407,10 @@ public class InitialPointEdosService implements  IinitialPoint{
 
                 if(wp.getId().endsWith("FDC"))
                 {
-                    sb.append("GDHF.JSFW").append(temp).append("FC");
+                    sb.append("SXJN.JSFW").append(temp).append("FC");
                 }else
                 {
-                    sb.append("GDHF.JSFW").append(temp).append("GC");
+                    sb.append("SXJN.JSFW").append(temp).append("GC");
                 }
 
                 po.setRealtimeid(String.valueOf(sb));
@@ -349,7 +418,7 @@ public class InitialPointEdosService implements  IinitialPoint{
             {
                 sb =new StringBuilder();
                 temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                sb.append("GDHF.JSFW").append(temp).append("DD");
+                sb.append("SXJN.JSFW").append(temp).append("DD");
                 po.setRealtimeid(String.valueOf(sb));
             }
             points.add(po);
@@ -414,10 +483,10 @@ public class InitialPointEdosService implements  IinitialPoint{
 
                         if(wp.getId().endsWith("FDC"))
                         {
-                            sb.append("GDHF.JSFW").append(temp).append("FC");
+                            sb.append("SXJN.JSFW").append(temp).append("FC");
                         }else
                         {
-                            sb.append("GDHF.JSFW").append(temp).append("GC");
+                            sb.append("SXJN.JSFW").append(temp).append("GC");
                         }
 
                         po.setRealtimeid(String.valueOf(sb));
@@ -425,7 +494,7 @@ public class InitialPointEdosService implements  IinitialPoint{
                     {
                         sb =new StringBuilder();
                         temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                        sb.append("GDHF.JSFW").append(temp).append("DD");
+                        sb.append("SXJN.JSFW").append(temp).append("DD");
                         po.setRealtimeid(String.valueOf(sb));
                     }
                     points.add(po);
@@ -489,10 +558,10 @@ public class InitialPointEdosService implements  IinitialPoint{
 
                             if(wp.getId().endsWith("FDC"))
                             {
-                                sb.append("GDHF.JSFW").append(temp).append("FC");
+                                sb.append("SXJN.JSFW").append(temp).append("FC");
                             }else
                             {
-                                sb.append("GDHF.JSFW").append(temp).append("GC");
+                                sb.append("SXJN.JSFW").append(temp).append("GC");
                             }
 
                             po.setRealtimeid(String.valueOf(sb));
@@ -500,7 +569,7 @@ public class InitialPointEdosService implements  IinitialPoint{
                         {
                             sb =new StringBuilder();
                             temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                            sb.append("GDHF.JSFW").append(temp).append("DD");
+                            sb.append("SXJN.JSFW").append(temp).append("DD");
                             po.setRealtimeid(String.valueOf(sb));
                         }
                         points.add(po);
@@ -617,7 +686,7 @@ public class InitialPointEdosService implements  IinitialPoint{
 
                             sb =new StringBuilder();
                             temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                            sb.append("GDHF.JSFW").append(temp).append("DD");
+                            sb.append("SXJN.JSFW").append(temp).append("DD");
                             po.setRealtimeid(String.valueOf(sb));
                         }
 
@@ -706,14 +775,14 @@ public class InitialPointEdosService implements  IinitialPoint{
 
                             sb =new StringBuilder();
                             temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                            sb.append("GDHF.").append(temp).append("FGL");
+                            sb.append("SXJN.").append(temp).append("FGL");
                             po.setRealtimeid(String.valueOf(sb));
                         }else  if(wp.getId().endsWith("GDC"))
                         {
 
                             sb =new StringBuilder();
                             temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                            sb.append("GDHF.").append(temp).append("GGL");
+                            sb.append("SXJN.").append(temp).append("GGL");
                             po.setRealtimeid(String.valueOf(sb));
                         }
 
@@ -829,13 +898,13 @@ public class InitialPointEdosService implements  IinitialPoint{
 //                                {
 //                                    sb =new StringBuilder();
 //                                    temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-//                                    sb.append("GDHF.JSFW").append(temp).append("FJ");
+//                                    sb.append("SXJN.JSFW").append(temp).append("FJ");
 //                                    po.setRealtimeid(String.valueOf(sb));
 //                                }else
 //                                {
 //                                    sb =new StringBuilder();
 //                                    temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-//                                    sb.append("GDHF.").append(temp).append("FJ");
+//                                    sb.append("SXJN.").append(temp).append("FJ");
 //                                    po.setRealtimeid(String.valueOf(sb));
 //                                }
 //                                points.add(po);
@@ -935,13 +1004,13 @@ public class InitialPointEdosService implements  IinitialPoint{
                             {
                                 sb =new StringBuilder();
                                 temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                                sb.append("GDHF.JSFW").append(temp).append("FJ");
+                                sb.append("SXJN.JSFW").append(temp).append("FJ");
                                 po.setRealtimeid(String.valueOf(sb));
                             }else
                             {
                                 sb =new StringBuilder();
                                 temp=wp.getId().substring(0,wp.getId().indexOf("_"));
-                                sb.append("GDHF.").append(temp).append("FJ");
+                                sb.append("SXJN.").append(temp).append("FJ");
                                 po.setRealtimeid(String.valueOf(sb));
                             }
                             points.add(po);

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

@@ -5,10 +5,7 @@ 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.auto.*;
-import com.gyee.frame.model.custom.DNAVal;
-import com.gyee.frame.model.custom.DataVo;
-import com.gyee.frame.model.custom.MatrixVo;
-import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
 import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
@@ -101,29 +98,73 @@ public class GenreSetPushService {
 /*************************************************风场指标*************************************************************/
 
             Map<String, Object> fcmap = new HashMap<>();
-
-            if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
+            if (id.equals(QS) || id.equals(FD) || id.equals(GF) || InitialRunner.re_wpmap.containsKey(id)) {
 
 
                 //初始化场站信息
 
                 List<Windpowerstation> wplist = new ArrayList<>();
+                List<Windpowerstation> templs=null;
 
-                for (Windpowerstation wp : InitialRunner.wpallls) {
-                    if (id.equals(FD)) {
+                if(InitialRunner.re_wpmap.containsKey(id))
+                {
+                    templs=InitialRunner.re_wpmap.get(id);
+                }else
+                {
+                    templs=InitialRunner.wpallls;
+                }
+                for (Windpowerstation wp : templs) {
+                    if (id.endsWith(FD)) {
                         if (wp.getId().endsWith("FDC")) {
                             wplist.add(wp);
                         }
-                    } else if (id.equals(GF)) {
+                    } else if (id.endsWith(GF)) {
                         if (wp.getId().endsWith("GDC")) {
                             wplist.add(wp);
                         }
-                    } else if (id.equals(QS)) {
+                    } else if (id.endsWith(QS)) {
                         wplist.add(wp);
                     }
 
                 }
 
+                Map<String,Double> sftjmap=new HashMap<>();//省份装机容量和台数统计
+                for (Windpowerstation wp : InitialRunner.wpallls) {
+
+                    if(StringUtils.notEmp(wp.getCompanyid()) && sftjmap.containsKey(wp.getCompanyid()+"_zjrl"))
+                    {
+
+                        double temp=sftjmap.get(wp.getCompanyid()+"_zjrl");
+                        temp=temp+wp.getCapacity();
+                        sftjmap.put(wp.getCompanyid()+"_zjrl",temp);
+                    }else
+                    {
+                        double temp=wp.getCapacity();
+                        sftjmap.put(wp.getCompanyid()+"_zjrl",temp);
+                    }
+                    if(StringUtils.notEmp(wp.getCompanyid()) && sftjmap.containsKey(wp.getCompanyid()+"_zjts"))
+                    {
+
+                        double temp=sftjmap.get(wp.getCompanyid()+"_zjts");
+                        temp=temp+wp.getQuantity();
+                        sftjmap.put(wp.getCompanyid()+"_zjts",temp);
+                    }else
+                    {
+                        double temp=wp.getQuantity();
+                        sftjmap.put(wp.getCompanyid()+"_zjts",temp);
+                    }
+                }
+
+
+                Set<Map.Entry<String, Double>> set = sftjmap.entrySet();
+                for (Iterator<Map.Entry<String,Double>> it = set.iterator(); it.hasNext();) {
+                    Map.Entry<String, Double> entry = (Map.Entry<String, Double>) it.next();
+
+                    // System.out.println(entry.getKey() + "--->" + entry.getValue());
+
+                    fcmap.put(entry.getKey(), entry.getValue());
+                }
+
 
                 for (Windpowerstation wp : wplist) {
 
@@ -492,22 +533,31 @@ public class GenreSetPushService {
 
             Map<String, Double> mxztmap = new HashMap<>();
 
-            if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
+            if (id.equals(QS) || id.equals(FD) || id.equals(GF) || InitialRunner.re_wpmap.containsKey(id)) {
+
 
                 //初始化场站信息
 
                 List<Windpowerstation> wplist = new ArrayList<>();
+                List<Windpowerstation> templs=null;
 
-                for (Windpowerstation wp : InitialRunner.wpallls) {
-                    if (id.equals(FD)) {
+                if(InitialRunner.re_wpmap.containsKey(id))
+                {
+                    templs=InitialRunner.re_wpmap.get(id);
+                }else
+                {
+                    templs=InitialRunner.wpallls;
+                }
+                for (Windpowerstation wp : templs) {
+                    if (id.endsWith(FD)) {
                         if (wp.getId().endsWith("FDC")) {
                             wplist.add(wp);
                         }
-                    } else if (id.equals(GF)) {
+                    } else if (id.endsWith(GF)) {
                         if (wp.getId().endsWith("GDC")) {
                             wplist.add(wp);
                         }
-                    } else if (id.equals(QS)) {
+                    } else if (id.endsWith(QS)) {
                         wplist.add(wp);
                     }
 
@@ -800,10 +850,20 @@ public class GenreSetPushService {
                         mxztmap.put("jrts", 0.0);
                     }
 
-                }else if (id.endsWith("GDC")){
+                }else if (id.endsWith("GDC") || InitialRunner.pjmap.containsKey(id) || InitialRunner.lnmap.containsKey(id)){
                     List<String> gfzbls = new ArrayList<>();
+                    List<Windturbine> wtls =null;
+                    if(id.endsWith("GDC"))
+                    {
+                        wtls =InitialRunner.wp_wtmap.get(id);
+                    }else  if(InitialRunner.pjmap.containsKey(id))
+                    {
+                        wtls =InitialRunner.pj_wtmap.get(id);
+                    }else  if(InitialRunner.lnmap.containsKey(id))
+                    {
+                        wtls =InitialRunner.ln_wtmap.get(id);
+                    }
 
-                    List<Windturbine> wtls = InitialRunner.wp_wtmap.get(id);
                     for(Windturbine wt:wtls) {
                         //状态
                         gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
@@ -1291,6 +1351,7 @@ public class GenreSetPushService {
                 }
 
                 int sjtjsl_hb=recommenmainService.getRecommenmainnum(id,DateUtils.truncate(begin),DateUtils.truncate(end));
+
                 gxkmap.put("sjtjsl_hb", Double.valueOf(sjtjsl-sjtjsl_hb));
                 List<Windpowerinfoday> hbwpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
                 if (!hbwpdls.isEmpty()) {
@@ -1897,7 +1958,16 @@ public class GenreSetPushService {
                 if (pl.getWindpower().endsWith("GDC")) {
                     planlist.add(pl);
                 }
-            } else if (InitialRunner.wpmap.containsKey(id)) {
+            }else if (InitialRunner.re_wpmap.containsKey(id)) {
+                List<Windpowerstation> templs=InitialRunner.re_wpmap.get(id);
+                for(Windpowerstation wp:templs)
+                {
+                    if (pl.getWindpower().equals(wp.getId())) {
+                        planlist.add(pl);
+                        break;
+                    }
+                }
+            }else if (InitialRunner.wpmap.containsKey(id)) {
                 if (pl.getWindpower().equals(id)) {
                     planlist.add(pl);
                 }

+ 6 - 6
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -352,12 +352,12 @@ public class MatrixDetialPushService {
 
                     double fdjzs = MathUtil.twoBit(fjzblist.get(i * step + 3).getPointValueInDouble());
                     Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
-                    if (model.getPowerproduction() == 2000) {
-                        vo.setFdjzs(fdjzs * 9.55);
-                    } else {
-                        vo.setFdjzs(fdjzs);
-                    }
-
+//                    if (model.getPowerproduction() == 2000) {
+//                        vo.setFdjzs(fdjzs * 9.55);
+//                    } else {
+//                        vo.setFdjzs(fdjzs);
+//                    }
+                    vo.setFdjzs(fdjzs);
 
                     vo.setWtCode(wt.getCode());
                     vo.setWpId(wt.getWindpowerstationid());

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/util/golden/EdosUtil.java

@@ -239,7 +239,7 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
             } else {
                 PointData data = new PointData();
                 data.setEdnaId(pointid);
-                data.setPointTime(sectionlist.get(0).getPointTime());
+                data.setPointTime(0l);
                 data.setPointValue("0");
                 data.setPointName("1");
                 data.setPointValueInDouble(0.0);

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

@@ -25,18 +25,18 @@ spring:
       #备数据源 #关闭
       slave:
         enabled: false
-        url: jdbc:mysql://localhost:3306/springbootv3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        url: jdbc:mysql://localhost:3306/nacos_config?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
         username: root
-        password: root
+        password: Gyee123
         #两票数据源
-      ticket:
-        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
-        #url: jdbc:sqlserver://10.83.68.98:1434;DatabaseName=fdeamnew
-        #url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
-        username: sa
-        password: ibs
-        #password: Gd!123456
-        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+#      ticket:
+#        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
+#        #url: jdbc:sqlserver://10.83.68.98:1434;DatabaseName=fdeamnew
+#        #url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
+#        username: sa
+#        password: ibs
+#        #password: Gd!123456
+#        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         #配置初始化连接数大小
       initial-size: 10
       # 最大连接数

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

@@ -28,7 +28,7 @@ gyee:
   #实时数据库Url
   #baseurl: http://10.0.118.73:8011/ts
   #baseurl: http://10.83.68.205:8011/ts
-  baseurl: http://192.168.2.205:8011/ts
+  baseurl: http://10.81.3.155:8011/ts
 
   #API访问ip
   #swaggerip: 49.4.50.80:8082
@@ -37,9 +37,9 @@ gyee:
   digit: 2
   realtimedataBase: golden #数据查询模式 golden、hwy
   #weatherurl: http://123.60.213.70:7011
-  weatherurl: http://192.168.2.216:7011
+  weatherurl: http://10.81.3.155:7011
   #weatherurl: http://10.83.68.97:7011
-  weatherqygs: nx_qygs
+  weatherqygs: jn_qygs
   hbmaps: {CL_FDC_KEY: 2003,KB_FDC_KEY: 1460,DX_FDC_KEY: 2186,SY_FDC_KEY: 1366}
   initialcode: INITIAL
 #tomcat config
@@ -68,7 +68,7 @@ spring :
       nacos:
         discovery:
           #server-addr: 192.168.56.1:8848
-          server-addr: 192.168.2.216:8848
+          server-addr: 10.81.3.155:8848
           #server-addr: 10.83.68.97:8848
           #指定yaml格式的配置
           file-extension: yaml
@@ -111,9 +111,9 @@ spring :
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss
   redis:
-    database: 19
-    host: 192.168.2.202
-    #host: 10.83.68.94
+    database: 0
+    #host: 192.168.2.202
+    host: 10.81.3.155
     #host: 10.0.118.73
     password:
     pool:

+ 1 - 1
web/monitor-web-sxjn/src/main/resources/mybatis/auto/WindpowerstationpointnewMapper.xml

@@ -461,7 +461,7 @@
 
 
     <select id="getWpPointTotal" resultType="com.gyee.frame.model.custom.SimpleVo" >
-        select count(*) value
+        select count(*) as value
         from view_tspoint  where
         <if test="wpId != null">
             ID LIKE '%${wpId}%' and