瀏覽代碼

调整计算

xieshengjie 2 年之前
父節點
當前提交
0ea5ebb3c0

+ 1 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java

@@ -19,7 +19,7 @@ import org.springframework.core.env.Environment;
 
 
 @Configuration
 @Configuration
 @PropertySource("classpath:xxl-job-executor.properties")
 @PropertySource("classpath:xxl-job-executor.properties")
-//@PropertySource("classpath:xxl-job-executorWPXNY.properties")
+//@PropertySource("classpath:xxl-job-executorWPLY.properties")
 //@PropertySource("classpath:xxl-job-executorRG.properties")
 //@PropertySource("classpath:xxl-job-executorRG.properties")
 public class XxlJobConfig implements EnvironmentAware {
 public class XxlJobConfig implements EnvironmentAware {
     private Environment env;
     private Environment env;

+ 5 - 5
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java

@@ -159,11 +159,11 @@ public class CycleCalculationService {
             ProBasicEquipmentPoint llfdl15Point = equipmentPointMap.get(ContantXk.LLFDL15);
             ProBasicEquipmentPoint llfdl15Point = equipmentPointMap.get(ContantXk.LLFDL15);
 
 
             try {
             try {
-                double ssfdl = edosUtil.getSectionData(rssfdlPoint, currentDate.getTime()).getPointValueInDouble();
-                double zerofdl = edosUtil.getSectionData(rssfdlPoint, samedayZero.getTime()).getPointValueInDouble();
-                double monthfirstfdl = edosUtil.getSectionData(rssfdlPoint, monthFirstZero.getTime()).getPointValueInDouble();
-                double yearfirstfdl = edosUtil.getSectionData(rssfdlPoint, yearFirstZero.getTime()).getPointValueInDouble();
-                double date15agofdl = edosUtil.getSectionData(rssfdlPoint, date15age.getTime()).getPointValueInDouble();
+                double ssfdl = edosUtil.getSectionData(rssfdlPoint, currentDate.getTime()).getPointValueInDouble()*rssfdlPoint.getCoefficient();
+                double zerofdl = edosUtil.getSectionData(rssfdlPoint, samedayZero.getTime()).getPointValueInDouble()*rssfdlPoint.getCoefficient();
+                double monthfirstfdl = edosUtil.getSectionData(rssfdlPoint, monthFirstZero.getTime()).getPointValueInDouble()*rssfdlPoint.getCoefficient();
+                double yearfirstfdl = edosUtil.getSectionData(rssfdlPoint, yearFirstZero.getTime()).getPointValueInDouble()*rssfdlPoint.getCoefficient();
+                double date15agofdl = edosUtil.getSectionData(rssfdlPoint, date15age.getTime()).getPointValueInDouble()*rssfdlPoint.getCoefficient();
 
 
                 double rfdl = ssfdl - zerofdl;
                 double rfdl = ssfdl - zerofdl;
                 wtResultList.add(PointUtil.createPointData(date,rfdl,rfdlPoint.getNemCode(),rfdlPoint.getName()));
                 wtResultList.add(PointUtil.createPointData(date,rfdl,rfdlPoint.getNemCode(),rfdlPoint.getName()));

+ 4 - 4
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java

@@ -282,9 +282,9 @@ public class RealtimeService {
                 Map<String, ProBasicPowerstationPoint> basicWppointMap = linepointmap.get(wp.getId());
                 Map<String, ProBasicPowerstationPoint> basicWppointMap = linepointmap.get(wp.getId());
                 ProBasicPowerstationPoint ssbfPoint = null;
                 ProBasicPowerstationPoint ssbfPoint = null;
                 if (wp.getSpare4().equals("1")){
                 if (wp.getSpare4().equals("1")){
-                    ssbfPoint = proBasicWppointMap.get(ContantXk.SSPJFS);
+                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJFS);
                 }else if (wp.getSpare4().equals("2")){
                 }else if (wp.getSpare4().equals("2")){
-                    ssbfPoint = proBasicWppointMap.get(ContantXk.SSPJGZD);
+                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJGZD);
                 }
                 }
 
 
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
@@ -398,9 +398,9 @@ public class RealtimeService {
 
 
                 ProBasicPowerstationPoint ssbfPoint = null;
                 ProBasicPowerstationPoint ssbfPoint = null;
                 if (wp.getSpare4().equals("1")){
                 if (wp.getSpare4().equals("1")){
-                    ssbfPoint = proBasicWppointMap.get(ContantXk.SSPJFS);
+                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJFS);
                 }else if (wp.getSpare4().equals("2")){
                 }else if (wp.getSpare4().equals("2")){
-                    ssbfPoint = proBasicWppointMap.get(ContantXk.SSPJGZD);
+                    ssbfPoint = basicWppointMap.get(ContantXk.SSPJGZD);
                 }
                 }
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
                 //理论功率测点
                 //理论功率测点

+ 6 - 7
realtime/generationXK-service/src/main/resources/application-rg.yml

@@ -10,7 +10,7 @@ spring:
   #redis集群
   #redis集群
   redis:
   redis:
     #host: 127.0.0.1
     #host: 127.0.0.1
-    host: 192.168.11.250
+    host: 10.152.8.190
     port: 6379
     port: 6379
     timeout: 100000
     timeout: 100000
     #    集群环境打开下面注释,单机不需要打开
     #    集群环境打开下面注释,单机不需要打开
@@ -19,7 +19,7 @@ spring:
     #      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
     #      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
     #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
     #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
     #      maxRedirects: 3
     #      maxRedirects: 3
-    password:
+    password: 123456
     application:
     application:
       name: test
       name: test
     jedis:
     jedis:
@@ -29,13 +29,13 @@ spring:
         max-idle: 8
         max-idle: 8
         max-wait: -1
         max-wait: -1
     #山东测试库用9
     #山东测试库用9
-    database: 10
+    database: 0
   autoconfigure:
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD2?rewriteBatchedStatements=true
+    url: jdbc:postgresql://10.152.8.190:5432/IMS_NEM_HNX?rewriteBatchedStatements=true
     username: postgres
     username: postgres
     password: postgres
     password: postgres
     #    url: jdbc:postgresql://124.70.75.91:5432/jn_test?rewriteBatchedStatements=true
     #    url: jdbc:postgresql://124.70.75.91:5432/jn_test?rewriteBatchedStatements=true
@@ -89,15 +89,14 @@ logging:
 #db url
 #db url
 db:
 db:
   #url: http://127.0.0.1:8011/ts
   #url: http://127.0.0.1:8011/ts
-  url: http://192.168.11.250:8011/ts
+  url: http://10.152.8.190:8011/ts
   #url: http://124.70.75.91:8011/ts
   #url: http://124.70.75.91:8011/ts
 #参与计算的场站
 #参与计算的场站
 #测试sd库
 #测试sd库
 #runWindpowerstation: SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_GHTZ_HZJ_GDC_STA
 #runWindpowerstation: SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_GHTZ_HZJ_GDC_STA
 #runWindpowerstation: SD_GDDL_RZLX_FDC_STA
 #runWindpowerstation: SD_GDDL_RZLX_FDC_STA
 #正式山东库
 #正式山东库
-runWindpowerstation: SDL_GDDL_QDJN_FDC_STA,SDL_GDDL_RZJX_FDC_STA,SDL_GDDL_WHWD_FDC_STA,SDL_GDDL_WHXQ_FDC_STA,SDL_GDDL_RZWL_FDC_STA,SDL_GDDL_WFZC_FDC_STA,SDL_GDDL_DZXJF_FDC_STA,SDL_GDDL_DZXJS_FDC_STA,SDL_GDDL_XTTA_FDC_STA,SDL_LYDL_BEIH_FDC_STA,SDL_LYDL_BINH_FDC_STA,SDL_LYDL_CG_FDC_STA,SDL_LYDL_FJ_FDC_STA,SDL_LYDL_YS_FDC_STA,SDL_SXNY_FXFC_FDC_STA,SDL_SXNY_JNSS_FDC_STA,SDL_SXNY_WFBH_FDC_STA,SDL_SXNY_PLHS_FDC_STA,SDL_SXNY_JNCQ_FDC_STA,SDL_SXNY_LQJS_FDC_STA,SDL_SXNY_ZYXD_FDC_STA,SDL_SXNY_ZYFS_FDC_STA,SDL_SXNY_LYJN_FDC_STA
-
+runWindpowerstation: HNX_SXNY_FL_FDC_STA
 
 
 #判断数据终端
 #判断数据终端
 second: 1800
 second: 1800

+ 3 - 3
realtime/generationXK-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -86,8 +86,8 @@ public class GenerationTest {
 //        statusService.statusReal();
 //        statusService.statusReal();
 //        statusService.calculateStatusNumber();
 //        statusService.calculateStatusNumber();
 
 
-//         realtimeService.savaRealtimeTarget();
-//        cycleCalculationService.saveCyle();
+//          realtimeService.savaRealtimeTarget();
+        cycleCalculationService.saveCyle();
 
 
 //        electricityMeteringService.saveGenerationDatas();
 //        electricityMeteringService.saveGenerationDatas();
 
 
@@ -99,6 +99,6 @@ public class GenerationTest {
 //        regionCalreService.companyCal();
 //        regionCalreService.companyCal();
 //        regionCalreService.RegionCal();
 //        regionCalreService.RegionCal();
 
 
-        safetyDayService.saveSafetyday();
+//        safetyDayService.saveSafetyday();
     }
     }
 }
 }