瀏覽代碼

单机信息总览,月度单机分析接口

shilin 2 年之前
父節點
當前提交
50b3f2c564

+ 16 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/OutputSpeedController.java

@@ -4,6 +4,8 @@ package com.gyee.runeconomy.controller;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.gyee.runeconomy.model.auto.ProEconInOrOutSpeedTotal;
 import com.gyee.runeconomy.service.outputspeed.OutputSpeedService;
 import io.swagger.annotations.Api;
@@ -41,7 +43,20 @@ public class OutputSpeedController {
     public R outputSpeedlist( Integer pageNum, Integer pageSize,String cmId,String type, String wpId, String recorddate) {
 
         Page<ProEconInOrOutSpeedTotal> pageInfo=outputSpeedService.outputSpeedlist(pageNum,pageSize,cmId,type,wpId,recorddate);
-
+        if(pageInfo!=null && !pageInfo.getRecords().isEmpty())
+        {
+
+            for(ProEconInOrOutSpeedTotal pwg:pageInfo.getRecords())
+            {
+                if(CacheContext.wtmap.containsKey(pwg.getWindturbineId()))
+                {
+                    ProBasicEquipment wt= CacheContext.wtmap.get(pwg.getWindturbineId());
+                    pwg.setWtcode(wt.getAname());
+                    pwg.setModelId(wt.getModelId());
+                }
+
+            }
+        }
         return R.data(ResultMsg.ok(pageInfo));
 
     }

+ 16 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbinegoodnessController.java

@@ -3,6 +3,8 @@ package com.gyee.runeconomy.controller.goodness;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.gyee.runeconomy.model.auto.ProEconWindturbineGoodness;
 import com.gyee.runeconomy.model.auto.ProEconWtAlysisDay;
 import com.gyee.runeconomy.service.WtAlysisDayService;
@@ -49,6 +51,20 @@ public class WindturbinegoodnessController {
     public R windturbinegoodness( Integer pageNum, Integer pageSize,String cmId,String type,  String wpId, String recorddate) {
 
         Page<ProEconWindturbineGoodness> resultList = windturbinegoodnessService.windturbinegoodnessList(pageNum,pageSize, cmId,type,wpId, recorddate);
+
+        if(resultList!=null && !resultList.getRecords().isEmpty())
+        {
+
+            for(ProEconWindturbineGoodness pwg:resultList.getRecords())
+            {
+                if(CacheContext.wtmap.containsKey(pwg.getWindturbineId()))
+                {
+                    ProBasicEquipment wt= CacheContext.wtmap.get(pwg.getWindturbineId());
+                    pwg.setWtcode(wt.getAname());
+                }
+
+            }
+        }
         return R.data(ResultMsg.ok(resultList));
     }
 

+ 5 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconInOrOutSpeedTotal.java

@@ -2,6 +2,7 @@ package com.gyee.runeconomy.model.auto;
 
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
@@ -375,5 +376,8 @@ public class ProEconInOrOutSpeedTotal extends Model {
     private String lineId;
     private String companyId;
     private String types;
-
+    @TableField(exist = false)
+    private String wtcode;
+    @TableField(exist = false)
+    private String modelId;
 }

+ 4 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconWindturbineGoodness.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
@@ -98,4 +99,7 @@ public class ProEconWindturbineGoodness extends Model {
     private Double daySpeed;
     private Double monthSpeed;
     private Double yearSpeed;
+    @TableField(exist = false)
+    private String wtcode;
+
 }

文件差異過大導致無法顯示
+ 2415 - 6
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconWpwindDayInfo.java


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

@@ -0,0 +1,112 @@
+server:
+  port: 6060
+  servlet:
+    context-path: /
+
+spring:
+  application:
+    name: run-economy
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #  cloud:
+  #    nacos:
+  #      discovery:
+  #        server-addr: 10.81.3.155:8848
+  #        #指定yaml格式的配置
+  #        file-extension: yaml
+  #        cluster-name: master
+  #      username: nacos
+  #      password: nacos
+  #redis集群
+  redis:
+    #host: 127.0.0.1
+    host: 192.168.11.250
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      #集群信息
+    #      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:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 9
+  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
+    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
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    default-enum-type-handler: org.apache.ibatis.type.EnumOrdinalTypeHandler
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      #id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+      #table-prefix: t_
+      id-type: assign_uuid
+  #配置类型别名对应的包
+  type-aliases-package: com.gyee.runeconomy.model.auto
+  #用于扫描通用枚举包
+  type-enums-package: com.gyee.runeconomy.config
+logging:
+  level:
+    root: info
+    com.example: debug
+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 - 0
web/runeconomy-xk/src/main/resources/application.yml

@@ -2,3 +2,4 @@ spring:
   profiles:
 #    active: jn
     active: yun
+#    active: xk