Explorar el Código

配置文件修改

wangchangsheng hace 2 años
padre
commit
3246ec108a

+ 7 - 15
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/init/CacheContext.java

@@ -62,9 +62,6 @@ public class CacheContext implements CommandLineRunner {
     @Resource
     private IProBasicModelPowerRdService proBasicModelPowerRdService;
 
-    @Value("${runWindpowerstation}")
-    private String runWindpowerstation;
-
     public static List<ProBasicEquipment> wtls = new ArrayList<>();
     public static List<ProBasicProject> pjls = new ArrayList<>();
     public static List<ProBasicLine>  lnls = new ArrayList<>();
@@ -129,11 +126,6 @@ public class CacheContext implements CommandLineRunner {
     public void run(String... args) throws Exception {
         logger.info("缓存开始------------------------------------------------------------");
 
-
-        List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
-        logger.info(runWpids.get(0)+"------------------"+runWpids.size());
-
-
         equipmentmodels = proEconEquipmentmodelService.list();
         equipmentmodels.stream().forEach(e->{
             modelMap.put(e.getId(),e);
@@ -157,7 +149,7 @@ public class CacheContext implements CommandLineRunner {
                 }
             }
         }
-        sqls=proBasicSquareService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        sqls=proBasicSquareService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
         if (!sqls.isEmpty())
         {
             for(ProBasicSquare sq:sqls)
@@ -252,7 +244,7 @@ public class CacheContext implements CommandLineRunner {
         }
 
 
-        wtls = proBasicEquipmentService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsable()==1).collect(Collectors.toList());
+        wtls = proBasicEquipmentService.list().stream().filter(i->i.getIsable()==1).collect(Collectors.toList());
         logger.info(wtls.size()+"");
         wtls.forEach(wt->{
             if(modelMap.containsKey(wt.getModelId()))
@@ -368,7 +360,7 @@ public class CacheContext implements CommandLineRunner {
 
 
 
-        pjls = proBasicProjectService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        pjls = proBasicProjectService.list().stream().filter(i-> i.getIsAble()==1).collect(Collectors.toList());
         pjls.stream().forEach(p->{
             pjmap.put(p.getId(),p);
             if (wppromap.containsKey(p.getWindpowerstationId())){
@@ -385,7 +377,7 @@ public class CacheContext implements CommandLineRunner {
 
         });
 
-        subwpls = proBasicSubStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        subwpls = proBasicSubStationService.list().stream().filter(i-> i.getIsAble()==1).collect(Collectors.toList());
         subwpls.stream().forEach(sub->{
 
             String subString = redisService.get(sub.getId());
@@ -399,7 +391,7 @@ public class CacheContext implements CommandLineRunner {
         });
 
 
-        lnls = proBasicLineService.list().stream().filter(i-> StringUtils.isNotNull(pjmap.get(i.getProjectId())) && runWpids.contains(pjmap.get(i.getProjectId()).getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        lnls = proBasicLineService.list().stream().filter(i-> StringUtils.isNotNull(pjmap.get(i.getProjectId())) && i.getIsAble()==1).collect(Collectors.toList());
         lnls.stream().forEach(l->{
             lnmap.put(l.getId(),l);
             if (prolinemap.containsKey(l.getProjectId())){
@@ -417,8 +409,8 @@ public class CacheContext implements CommandLineRunner {
 
 
         zwpls = proBasicWindpowerstationService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());;
-        wpls = proBasicWindpowerstationService.list().stream().filter(i->runWpids.contains(i.getId()) && i.getIsAble()==1).collect(Collectors.toList());;
-        meterpoints = proBasicMeterPointService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        wpls = proBasicWindpowerstationService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());;
+        meterpoints = proBasicMeterPointService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
         meterpoints.stream().forEach(meterpoint -> {
             meterpointMap.put(meterpoint.getId(),meterpoint);
         });

+ 2 - 14
web/runeconomy-xk/src/main/resources/application-sd.yml

@@ -38,26 +38,16 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 9
+    database: 10
   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://192.168.11.248:5432/IMS_NEM_SD2?rewriteBatchedStatements=true
     username: postgres
     password: postgres
-    #华为云测试地址
-    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test #IMS_NEM_SD
-    #    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
-    #    username: root
-    #    password: root
-    #    driver-class-name: com.mysql.jdbc.Driver
     druid:
       max-active: 20
       initial-size: 1
@@ -108,5 +98,3 @@ initialcode: INITIAL
 db:
   url: http://192.168.11.250:8011/ts
   #url: http://192.168.11.250: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
-

+ 0 - 1
web/runeconomy-xk/src/main/resources/application-test.yml

@@ -108,6 +108,5 @@ initialcode: INITIAL
 db:
   #url: http://127.0.0.1:8011/ts
   url: http://192.168.11.250:8011/ts
-runWindpowerstation: SD_GDDL_RZLX_FDC_STA
 
 

+ 0 - 2
web/runeconomy-xk/src/main/resources/application-xk.yml

@@ -108,5 +108,3 @@ initialcode: INITIAL
 db:
   url: http://192.168.11.250:8011/ts
   #url: http://192.168.11.250: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
-

+ 1 - 4
web/runeconomy-xk/src/main/resources/application-yun.yml

@@ -107,7 +107,4 @@ logging:
 initialcode: INITIAL
 db:
   url: http://124.70.75.91:8011/ts
-  #url: http://192.168.11.250: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: SD_GDDL_RZLX_FDC_STA
+  #url: http://192.168.11.250:8011/ts