فهرست منبع

开发和风REdis数据缓存

shilin 2 سال پیش
والد
کامیت
0bd793c0b9

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -175,8 +175,8 @@ public class GenerationMain {
 //            System.out.println(DateUtils.toDate1(date)+"完成");
 //
 //        }
-
-
+//
+//
 
 //        Calendar c=Calendar.getInstance();
 //        c.set(Calendar.MONTH,7);

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

@@ -53,7 +53,7 @@ public class WindturbineGoodnessService {
 
         List<ProEconWindturbineGoodness> vos=new ArrayList<>();
 
-        System.out.println("拟合优度风机数量"+CacheContext.wtls);
+        System.out.println("拟合优度风机数量"+CacheContext.wtls.size());
         for(ProBasicEquipment wt: CacheContext.wtls)
         {
             Map<String, Map<String, Double>> coefficientMap=new HashMap<>();
@@ -212,9 +212,9 @@ public class WindturbineGoodnessService {
             ProEconWindturbineGoodness vo=vos.get(i);
             vo.setYearTop(i+1);
         }
-
-        proEconWindturbineGoodnessService.saveBatch(vos);
-
+        System.out.println("拟合优度风机存储数量"+vos.size());
+        proEconWindturbineGoodnessService.saveOrUpdateBatch(vos);
+        System.out.println("拟合优度风机存储结束");
     }
 
 }

+ 12 - 12
realtime/generationXK-service/src/main/resources/application-dev.yml

@@ -1,5 +1,5 @@
 server:
-  port: 7011
+  port: 7031
   servlet:
     context-path: /
 
@@ -9,8 +9,8 @@ spring:
     allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
   #redis集群
   redis:
-#    host: 124.70.18.168
-    host: 192.168.11.250
+    #    host: 124.70.18.168
+    host: 10.152.8.190
     port: 6379
     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
     #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
     #      maxRedirects: 3
-    password:
+    password: 123456
     application:
       name: test
     jedis:
@@ -28,18 +28,18 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 9
+    database: 0
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD?rewriteBatchedStatements=true
+    url: jdbc:postgresql://10.152.8.190:5432/IMS_NEM_HNX?rewriteBatchedStatements=true
     username: postgres
     password: postgres
-#    url: jdbc:postgresql://124.70.75.91:5432/jn_test
-#    username: postgres
-#    password: gd123
+    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test
+    #    username: postgres
+    #    password: gd123
     oracle-schema=:
     #    type: com.alibaba.druid.pool.DruidDataSource
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
@@ -87,10 +87,10 @@ logging:
     com.example: debug
 #db url
 db:
-#  url: http://127.0.0.1:8011/ts
-  url: http://192.168.11.250:8011/ts
+  #  url: http://127.0.0.1:8011/ts
+  url: http://10.152.8.190:8011/ts
 #参与计算的场站
-runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_GHTZ_HZJ_GDC_STA
+runWindpowerstation: HNX_LYDL_TEC_FDC_STA,HNX_GDDL_XL_FDC_STA,HNX_LYDL_XNX_FDC_STA,HNX_LYDL_XMS_FDC_STA,HNX_LYDL_JM_FDC_STA,HNX_SXNY_BT_GDC_STA,HNX_SXNY_FRS_FDC_STA,HNX_SXNY_HJL_FDC_STA,HNX_GDDL_FYD_FDC_STA,HNX_SXNY_FL_FDC_STA
 #计算状态用ai或者di
 clauStatus:
   ai: GJY03_GC,YLZ01_GC,PTZ02_GC   #配置期次

+ 1 - 1
realtime/generationXK-service/src/main/resources/application-hf.yml

@@ -1,5 +1,5 @@
 server:
-  port: 7011
+  port: 7031
   servlet:
     context-path: /
 

+ 1 - 1
realtime/generationXK-service/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: hf
+    active: dev
 #    active: yun
 
 #    active: td