瀏覽代碼

经济 运行首页代码优化

wangchangsheng 2 年之前
父節點
當前提交
d419fa37c1
共有 31 個文件被更改,包括 643 次插入423 次删除
  1. 8 4
      web/runeconomy-xk/pom.xml
  2. 10 13
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java
  3. 229 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/EconHomePagePointRateDTO.java
  4. 13 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/ProEconPointCodeDTO.java
  5. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay1.java
  6. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay2.java
  7. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay3.java
  8. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay4.java
  9. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay5.java
  10. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay6.java
  11. 2 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay7.java
  12. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicCompanyService.java
  13. 4 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicPowerstationPointService.java
  14. 1 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicPowerstationService.java
  15. 12 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPointCodeService.java
  16. 2 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay1Service.java
  17. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay2Service.java
  18. 4 12
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay4Service.java
  19. 2 2
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay5Service.java
  20. 1 1
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay6Service.java
  21. 6 5
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicCompanyServiceImpl.java
  22. 23 4
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicPowerstationPointServiceImpl.java
  23. 3 6
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicPowerstationServiceImpl.java
  24. 78 0
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPointCodeServiceImpl.java
  25. 6 58
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay1ServiceImpl.java
  26. 3 27
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay2ServiceImpl.java
  27. 5 54
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay4ServiceImpl.java
  28. 4 56
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay5ServiceImpl.java
  29. 2 29
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay6ServiceImpl.java
  30. 203 137
      web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java
  31. 8 9
      web/runeconomy-xk/src/main/resources/application-test.yml

+ 8 - 4
web/runeconomy-xk/pom.xml

@@ -107,10 +107,6 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>none</mainClass>     <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
-                    <classifier>execute</classifier>    <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
-                </configuration>
                 <executions>
                     <execution>
                         <goals>
@@ -119,6 +115,14 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.4.2</version>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>

+ 10 - 13
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java

@@ -1,10 +1,7 @@
 package com.gyee.runeconomy.controller.homepage;
 
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.runeconomy.dto.R;
-import com.gyee.runeconomy.dto.response.EconHomePagePointRateDTO;
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
 import com.gyee.runeconomy.service.homepage.EconomyPointHomePageService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Map;
+
 /**
  * <p>
  * 省公司表 前端控制器
@@ -35,9 +34,6 @@ public class EconomyHomePageController {
      *
      * @param regionId
      * @param companyId
-     * @param windpowerstationId
-     * @param projectId
-     * @param lineId
      * @param staType
      * @param dateType
      * @return
@@ -46,15 +42,16 @@ public class EconomyHomePageController {
     @ApiOperation(value = "经济运行-首页", notes = "经济运行-首页")
     public R getEconomyPointHomePageInfo(@RequestParam(value = "regionId", required = false) String regionId,
                                          @RequestParam(value = "companyId", required = false) String companyId,
-                                         @RequestParam(value = "windpowerstationId", required = false) String windpowerstationId,
-                                         @RequestParam(value = "projectId", required = false) String projectId,
-                                         @RequestParam(value = "lineId", required = false) String lineId,
+                                         @RequestParam(value = "foreignKeyId", required = false) String foreignKeyId,
                                          @RequestParam(value = "staType", required = true) String staType,
-                                         @RequestParam(value = "dateType", required = true) String dateType) throws Exception {
+                                         @RequestParam(value = "dateType", required = true) String dateType,
+                                         @RequestParam(value = "pointCode", required = false) String pointCode
+
+    ) throws Exception {
 
-        EconHomePagePointRateDTO dto = economyPointHomePageService.getEconomyPointHomePageInfo(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType);
-        if (null != dto) {
-            return R.ok().data(dto);
+        Map<String ,Object> map  = economyPointHomePageService.getEconomyPointHomePageInfo(foreignKeyId,regionId, companyId, staType, dateType,pointCode);
+        if (null != map) {
+            return R.ok().data(map);
         } else {
             return R.error().data("查询失败!");
         }

+ 229 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/EconHomePagePointRateDTO.java

@@ -92,5 +92,234 @@ public class EconHomePagePointRateDTO {
     private BigDecimal ringSbklyzzl;
     private BigDecimal withSbklyzzl;
 
+    public BigDecimal getCurrGzsll() {
+        if(null == currGzsll){
+            return new BigDecimal(0.00);
+        }
+        return currGzsll;
+    }
 
+    public BigDecimal getRingGzslzzl() {
+        if(null == ringGzslzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringGzslzzl;
+    }
+
+    public BigDecimal getWithGzslzzl() {
+        if(null == withGzslzzl){
+            return new BigDecimal(0.00);
+        }
+        return withGzslzzl;
+    }
+
+    public BigDecimal getCurrJxsll() {
+        if(null == currJxsll){
+            return new BigDecimal(0.00);
+        }
+        return currJxsll;
+    }
+
+    public BigDecimal getRingJxslzzl() {
+        if(null == ringJxslzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringJxslzzl;
+    }
+
+    public BigDecimal getWithJxslzzl() {
+        if(null == withJxslzzl){
+            return new BigDecimal(0.00);
+        }
+        return withJxslzzl;
+    }
+
+    public BigDecimal getCurrXdsll() {
+        if(null == currXdsll){
+            return new BigDecimal(0.00);
+        }
+        return currXdsll;
+    }
+
+    public BigDecimal getRingXdslzzl() {
+        if(null == ringXdslzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringXdslzzl;
+    }
+
+    public BigDecimal getWithXdslzzl() {
+        if(null == withXdslzzl){
+            return new BigDecimal(0.00);
+        }
+        return withXdslzzl;
+    }
+
+    public BigDecimal getCurrSlsll() {
+        if(null == currSlsll){
+            return new BigDecimal(0.00);
+        }
+        return currSlsll;
+    }
+
+    public BigDecimal getRingSlslzzl() {
+        if(null == ringSlslzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringSlslzzl;
+    }
+
+    public BigDecimal getWithSlslzzl() {
+        if(null == withSlslzzl){
+            return new BigDecimal(0.00);
+        }
+        return withSlslzzl;
+    }
+
+    public BigDecimal getCurrXNsll() {
+        if(null == currXNsll){
+            return new BigDecimal(0.00);
+        }
+        return currXNsll;
+    }
+
+    public BigDecimal getRingXnslzzl() {
+        if(null == ringXnslzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringXnslzzl;
+    }
+
+    public BigDecimal getWithXnslzzl() {
+        if(null == withXnslzzl){
+            return new BigDecimal(0.00);
+        }
+        return withXnslzzl;
+    }
+
+    public BigDecimal getCurrFwjsl() {
+        if(null == currFwjsl){
+            return new BigDecimal(0.00);
+        }
+        return currFwjsl;
+    }
+
+    public BigDecimal getRingFwjszzl() {
+        if(null == ringFwjszzl){
+            return new BigDecimal(0.00);
+        }
+        return ringFwjszzl;
+    }
+
+    public BigDecimal getWithFwjszzl() {
+        if(null == withFwjszzl){
+            return new BigDecimal(0.00);
+        }
+        return withFwjszzl;
+    }
+
+    public BigDecimal getCurrZtzhl() {
+        if(null == currZtzhl){
+            return new BigDecimal(0.00);
+        }
+        return currZtzhl;
+    }
+
+    public BigDecimal getRingZtzhzzl() {
+        if(null == ringZtzhzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringZtzhzzl;
+    }
+
+    public BigDecimal getWithZtzhzzl() {
+        if(null == withZtzhzzl){
+            return new BigDecimal(0.00);
+        }
+        return withZtzhzzl;
+    }
+
+    public BigDecimal getCurrXqjsl() {
+        if(null == currXqjsl){
+            return new BigDecimal(0.00);
+        }
+        return currXqjsl;
+    }
+
+    public BigDecimal getRingXqjszzl() {
+        if(null == ringXqjszzl){
+            return new BigDecimal(0.00);
+        }
+        return ringXqjszzl;
+    }
+
+    public BigDecimal getWithXqjszzl() {
+        if(null == withXqjszzl){
+            return new BigDecimal(0.00);
+        }
+        return withXqjszzl;
+    }
+
+    public BigDecimal getCurrZhcydl() {
+        if(null == currZhcydl){
+            return new BigDecimal(0.00);
+        }
+        return currZhcydl;
+    }
+
+    public BigDecimal getRingZhcydzzl() {
+        if(null == ringZhcydzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringZhcydzzl;
+    }
+
+    public BigDecimal getWithZhcydzzl() {
+        if(null == withZhcydzzl){
+            return new BigDecimal(0.00);
+        }
+        return withZhcydzzl;
+    }
+
+    public BigDecimal getCurrGlqxfhl() {
+        if(null == currGlqxfhl){
+            return new BigDecimal(0.00);
+        }
+        return currGlqxfhl;
+    }
+
+    public BigDecimal getRingGlqxfhzzl() {
+        if(null == ringGlqxfhzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringGlqxfhzzl;
+    }
+
+    public BigDecimal getWithGlqxfhzzl() {
+        if(null == withGlqxfhzzl){
+            return new BigDecimal(0.00);
+        }
+        return withGlqxfhzzl;
+    }
+
+    public BigDecimal getCurrSbklyl() {
+        if(null == currSbklyl){
+            return new BigDecimal(0.00);
+        }
+        return currSbklyl;
+    }
+
+    public BigDecimal getRingSbklyzzl() {
+        if(null == ringSbklyzzl){
+            return new BigDecimal(0.00);
+        }
+        return ringSbklyzzl;
+    }
+
+    public BigDecimal getWithSbklyzzl() {
+        if(null == withSbklyzzl){
+            return new BigDecimal(0.00);
+        }
+        return withSbklyzzl;
+    }
 }

+ 13 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/response/ProEconPointCodeDTO.java

@@ -0,0 +1,13 @@
+package com.gyee.runeconomy.dto.response;
+
+import lombok.Data;
+
+@Data
+public class ProEconPointCodeDTO {
+
+    private String stationname;
+    private String stationcode;
+    private String description;
+    private double value;
+
+}

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay1.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay1 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay2.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay2 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay3.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay3 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay4.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay4 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay5.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay5 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay6.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay6 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconPowerstationInfoDay7.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.model.auto;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -34,6 +35,7 @@ public class ProEconPowerstationInfoDay7 extends Model {
     /**
      * 日期
      */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date recordDate;
 
     /**

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicCompanyService.java

@@ -16,6 +16,6 @@ import java.util.List;
  */
 public interface IProBasicCompanyService extends IService<ProBasicCompany> {
 
-    BigDecimal getProBasicCompanyCapacity(String regionId, String  companyId);
+    Double getProBasicCompanyCapacity(String regionId, String  companyId);
 
 }

+ 4 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicPowerstationPointService.java

@@ -3,6 +3,8 @@ package com.gyee.runeconomy.service.auto;
 import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 场站测点,期次测点,线路测点,三级公司测点,区域测点
@@ -17,4 +19,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicPowerstationPointService extends IService<ProBasicPowerstationPoint> {
 
+    List<ProBasicPowerstationPoint> getProBasicPowerstationPointList(String windpowerstationId,String uniformCode);
+
 }

+ 1 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicPowerstationService.java

@@ -19,10 +19,9 @@ public interface IProBasicPowerstationService extends IService<ProBasicPowerstat
      * 获取场站信息列表
      * @param regionId
      * @param companyId
-     * @param windpowerstationId
      * @return
      */
-    List<ProBasicPowerstation> getProBasicPowerstationlist (String regionId,String  companyId, String windpowerstationId,String staType);
+    List<ProBasicPowerstation> getProBasicPowerstationlist (String regionId,String  companyId,String staType);
 
 
 

+ 12 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPointCodeService.java

@@ -1,8 +1,13 @@
 package com.gyee.runeconomy.service.auto;
 
+import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
 import com.gyee.runeconomy.model.auto.ProEconPointCode;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 /**
  * <p>
  * 指标查询表 服务类
@@ -13,4 +18,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconPointCodeService extends IService<ProEconPointCode> {
 
+
+    List<ProEconPointCode> getEconPointCodeList(String equipmentType);
+
+    ProEconPointCode getProEconPointCode(String nemCode);
+
+    List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId, String pointCode);
+
 }

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay1Service.java

@@ -27,10 +27,10 @@ public interface IProEconPowerstationInfoDay1Service extends IService<ProEconPow
      *
      * @return
      */
-    Map<String, ProEconPowerstationInfoDay1> getEconFiveLoss(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+    Map<String, ProEconPowerstationInfoDay1> getEconFiveLoss(String foreignKeyId, String staType, String dateType, Date date);
 
     /** 场站电量统计 */
-    List<ProEconPowerstationInfoDay1> getEconFiveLosslist(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+    List<ProEconPowerstationInfoDay1> getEconFiveLosslist(String foreignKeyId, String staType, String dateType, Date date);
 
 
 }

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay2Service.java

@@ -17,7 +17,7 @@ import java.util.Map;
  */
 public interface IProEconPowerstationInfoDay2Service extends IService<ProEconPowerstationInfoDay2> {
 
-    Map<String, ProEconPowerstationInfoDay2> getEconFiveLossTime(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+    Map<String, ProEconPowerstationInfoDay2> getEconFiveLossTime(String foreignKeyId, String staType, String dateType, Date date);
 
 
 

+ 4 - 12
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay4Service.java

@@ -20,32 +20,24 @@ public interface IProEconPowerstationInfoDay4Service extends IService<ProEconPow
 
     /**
      * 获取三率
-     * @param regionId
-     * @param companyId
-     * @param windpowerstationId
-     * @param projectId
-     * @param lineId
+     * @param foreignKeyId
      * @param staType
      * @param dateType
      * @param date
      * @return
      */
-   Map<String, ProEconPowerstationInfoDay4> getEconThreeRate(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date  date);
+   Map<String, ProEconPowerstationInfoDay4> getEconThreeRate(String foreignKeyId, String staType, String dateType, Date  date);
 
 
     /**
      * 三率曲线
-     * @param regionId
-     * @param companyId
-     * @param windpowerstationId
-     * @param projectId
-     * @param lineId
+     * @param foreignKeyId
      * @param staType
      * @param dateType
      * @param date
      * @return
      */
 
-   List<ProEconPowerstationInfoDay4> getEconThreeRateCurve(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date  date);
+   List<ProEconPowerstationInfoDay4> getEconThreeRateCurve(String foreignKeyId, String staType, String dateType, Date  date);
 
 }

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay5Service.java

@@ -19,9 +19,9 @@ import java.util.Map;
 public interface IProEconPowerstationInfoDay5Service extends IService<ProEconPowerstationInfoDay5> {
 
 
-   Map<String ,ProEconPowerstationInfoDay5> getEconElectricQuantity(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+   Map<String ,ProEconPowerstationInfoDay5> getEconElectricQuantity( String foreignKeyId,String staType, String dateType, Date date);
 
 
 
-   List<ProEconPowerstationInfoDay5> getEconZhcydldb(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+   List<ProEconPowerstationInfoDay5> getEconZhcydldb(String foreignKeyId, String staType, String dateType, Date date);
 }

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProEconPowerstationInfoDay6Service.java

@@ -16,6 +16,6 @@ import java.util.Map;
  */
 public interface IProEconPowerstationInfoDay6Service extends IService<ProEconPowerstationInfoDay6> {
 
-    Map<String, ProEconPowerstationInfoDay6> getEconPowerOfField(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date);
+    Map<String, ProEconPowerstationInfoDay6> getEconPowerOfField(String foreignKeyId, String staType, String dateType, Date date);
 
 }

+ 6 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicCompanyServiceImpl.java

@@ -23,7 +23,7 @@ import java.util.List;
 public class ProBasicCompanyServiceImpl extends ServiceImpl<ProBasicCompanyMapper, ProBasicCompany> implements IProBasicCompanyService {
 
     @Override
-    public  BigDecimal  getProBasicCompanyCapacity(String regionId, String companyId) {
+    public  Double  getProBasicCompanyCapacity(String regionId, String companyId) {
 
 
         QueryWrapper<ProBasicCompany> qw = new QueryWrapper<>();
@@ -35,12 +35,13 @@ public class ProBasicCompanyServiceImpl extends ServiceImpl<ProBasicCompanyMappe
         }
 
 
-        BigDecimal sumall = new BigDecimal("0.0000");
+//        BigDecimal sumall = new BigDecimal("0.0000");
 
+        Double sumall = new Double(0.00);
         List<ProBasicCompany>  list = getBaseMapper().selectList(qw);
-        list.stream().forEach(i->{
-             sumall.add(new BigDecimal(i.getWindCapacity()+i.getCapacity()));
-        });
+       for (ProBasicCompany i : list){
+            sumall = sumall + i.getWindCapacity()+i.getCapacity();
+        }
 
         return sumall;
     }

+ 23 - 4
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicPowerstationPointServiceImpl.java

@@ -1,18 +1,22 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.model.StringUtils;
 import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
 import com.gyee.runeconomy.mapper.auto.ProBasicPowerstationPointMapper;
 import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 场站测点,期次测点,线路测点,三级公司测点,区域测点
-
-
-
-+方阵测点 服务实现类
+ * <p>
+ * <p>
+ * <p>
+ * +方阵测点 服务实现类
  * </p>
  *
  * @author shilin
@@ -21,4 +25,19 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProBasicPowerstationPointServiceImpl extends ServiceImpl<ProBasicPowerstationPointMapper, ProBasicPowerstationPoint> implements IProBasicPowerstationPointService {
 
+    @Override
+    public List<ProBasicPowerstationPoint> getProBasicPowerstationPointList(String windpowerstationId, String uniformCode) {
+
+        QueryWrapper<ProBasicPowerstationPoint> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(windpowerstationId)) {
+            qw.lambda().eq(ProBasicPowerstationPoint::getWindpowerstationId, windpowerstationId);
+        }
+        if (StringUtils.isNotEmpty(uniformCode)) {
+            qw.lambda().eq(ProBasicPowerstationPoint::getUniformCode, uniformCode);
+        }
+        List<ProBasicPowerstationPoint> list = baseMapper.selectList(qw);
+
+        return list;
+    }
 }

+ 3 - 6
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicPowerstationServiceImpl.java

@@ -24,7 +24,7 @@ import java.util.stream.Collectors;
 public class ProBasicPowerstationServiceImpl extends ServiceImpl<ProBasicPowerstationMapper, ProBasicPowerstation> implements IProBasicPowerstationService {
 
     @Override
-    public List<ProBasicPowerstation> getProBasicPowerstationlist(String regionId, String companyId, String windpowerstationId, String staType) {
+    public List<ProBasicPowerstation> getProBasicPowerstationlist(String regionId, String companyId, String staType) {
 
         QueryWrapper<ProBasicPowerstation> qw = new QueryWrapper<>();
 
@@ -34,19 +34,16 @@ public class ProBasicPowerstationServiceImpl extends ServiceImpl<ProBasicPowerst
         if (StringUtils.isNotEmpty(companyId)) {
             qw.lambda().eq(ProBasicPowerstation::getCompanyId, companyId);
         }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProBasicPowerstation::getId, windpowerstationId);
-        }
 
         List<ProBasicPowerstation> list = baseMapper.selectList(qw);
 
         if (StringUtils.isNotEmpty(staType) && staType.equals("-1")) {
 
-            List<ProBasicPowerstation> gcs = list.stream().filter(i -> i.getId().indexOf("FDC") >= 0).collect(Collectors.toList());
+            list = list.stream().filter(i -> i.getId().indexOf("FDC") >= 0).collect(Collectors.toList());
         }
         if (StringUtils.isNotEmpty(staType) && staType.equals("-2")) {
 
-            List<ProBasicPowerstation> gcs = list.stream().filter(i -> i.getId().indexOf("GDC") >= 0).collect(Collectors.toList());
+            list = list.stream().filter(i -> i.getId().indexOf("GDC") >= 0).collect(Collectors.toList());
         }
         return list;
     }

+ 78 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPointCodeServiceImpl.java

@@ -1,11 +1,23 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
 import com.gyee.runeconomy.model.auto.ProEconPointCode;
 import com.gyee.runeconomy.mapper.auto.ProEconPointCodeMapper;
+import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
 import com.gyee.runeconomy.service.auto.IProEconPointCodeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.runeconomy.util.realtimesource.EdosUtil;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.*;
+import java.util.stream.Collectors;
+
 /**
  * <p>
  * 指标查询表 服务实现类
@@ -17,4 +29,70 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconPointCodeServiceImpl extends ServiceImpl<ProEconPointCodeMapper, ProEconPointCode> implements IProEconPointCodeService {
 
+
+    @Autowired
+    private ProBasicPowerstationServiceImpl proBasicPowerstationService;
+
+    @Autowired
+    private IProBasicPowerstationPointService proBasicPowerstationPointService;
+
+    @Autowired
+    private EdosUtil edosUtil;
+
+
+    @Override
+    public List<ProEconPointCode> getEconPointCodeList(String equipmentType) {
+        QueryWrapper<ProEconPointCode> qw = new QueryWrapper<>();
+        List<ProEconPointCode> list = baseMapper.selectList(qw);
+        if (StringUtils.isNotEmpty(equipmentType) && equipmentType.equals("-1")) {
+
+          list = list.stream().filter(i ->i.getEquipmentType().equals("fj")).collect(Collectors.toList());
+        }
+        if (StringUtils.isNotEmpty(equipmentType) && equipmentType.equals("-2")) {
+
+            list = list.stream().filter(i -> i.getId().indexOf("gf") >= 0).collect(Collectors.toList());
+        }
+
+        return list;
+    }
+
+    @Override
+    public ProEconPointCode getProEconPointCode(String nemCode) {
+        QueryWrapper<ProEconPointCode> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(nemCode) ) {
+            qw.lambda().eq(ProEconPointCode::getNemCode,nemCode);
+        }
+        ProEconPointCode one  = baseMapper.selectOne(qw);
+        return one;
+    }
+
+    @Override
+    public List<ProEconPointCodeDTO>  getEconPointRanking(String regionId, String companyId,  String pointCode) {
+        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,"");
+        ProEconPointCode pointCode1 =  getProEconPointCode(pointCode);
+        List<ProEconPointCodeDTO> dtos = new ArrayList<>();
+        powerstationList.stream().forEach(i->{
+            ProEconPointCodeDTO dto = new ProEconPointCodeDTO();
+
+            dto.setDescription(pointCode1.getDescription()+"("+pointCode1.getUnit()+")");
+            dto.setStationcode(i.getNemCode());
+            dto.setStationname(i.getName());
+
+            List<ProBasicPowerstationPoint>  oripoint = proBasicPowerstationPointService.getProBasicPowerstationPointList(i.getId(),pointCode);
+            if (null != oripoint && oripoint.size()>0){
+                try {
+                    PointData p = edosUtil.getRealData(oripoint.get(0));
+                    dto.setValue(p.getPointValueInDouble());
+                } catch (Exception e) {
+
+                }
+            }
+            dtos.add(dto);
+        });
+//        SortUtils.sort(dtos,"value",SortUtils.DESC);
+        List<ProEconPointCodeDTO> dtoss = dtos.stream().sorted(Comparator.comparing(ProEconPointCodeDTO::getValue)).limit(10).collect(Collectors.toList());
+
+        return dtoss;
+    }
 }

+ 6 - 58
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay1ServiceImpl.java

@@ -38,39 +38,13 @@ public class ProEconPowerstationInfoDay1ServiceImpl extends ServiceImpl<ProEconP
     }
 
     @Override
-    public Map<String, ProEconPowerstationInfoDay1> getEconFiveLoss(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public Map<String, ProEconPowerstationInfoDay1> getEconFiveLoss(String foreignKeyId, String staType, String dateType, Date date) {
         Map<String, ProEconPowerstationInfoDay1> resultmap = new HashMap<>();
 
         QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
-        String location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getRegionId, regionId);
-            location = "rg";
 
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getLineId, lineId);
-            location = "ln";
-        }
-        if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getForeignKeyId, staType);
-        }
-
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getLocation, location);
+        if (StringUtils.isNotEmpty(foreignKeyId)) {
+            qw.lambda().eq(ProEconPowerstationInfoDay1::getForeignKeyId, foreignKeyId+staType);
         }
 
         //当前数据
@@ -105,37 +79,11 @@ public class ProEconPowerstationInfoDay1ServiceImpl extends ServiceImpl<ProEconP
     }
 
     @Override
-    public List<ProEconPowerstationInfoDay1> getEconFiveLosslist(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public List<ProEconPowerstationInfoDay1> getEconFiveLosslist( String foreignKeyId, String staType, String dateType, Date date) {
         QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
-        String location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getRegionId, regionId);
-            location = "rg";
-
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getLineId, lineId);
-            location = "ln";
-        }
-        if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getForeignKeyId, staType);
-        }
 
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay1::getLocation, location);
+        if (StringUtils.isNotEmpty(foreignKeyId)) {
+            qw.lambda().eq(ProEconPowerstationInfoDay1::getForeignKeyId, foreignKeyId+staType);
         }
 
         if (null !=date) {

+ 3 - 27
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay2ServiceImpl.java

@@ -24,40 +24,16 @@ import java.util.*;
 public class ProEconPowerstationInfoDay2ServiceImpl extends ServiceImpl<ProEconPowerstationInfoDay2Mapper, ProEconPowerstationInfoDay2> implements IProEconPowerstationInfoDay2Service {
 
     @Override
-    public Map<String, ProEconPowerstationInfoDay2> getEconFiveLossTime(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public Map<String, ProEconPowerstationInfoDay2> getEconFiveLossTime(String foreignKeyId, String staType, String dateType, Date date) {
         Map<String, ProEconPowerstationInfoDay2> resultmap = new HashMap<>();
 
         QueryWrapper<ProEconPowerstationInfoDay2> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getRegionId, regionId);
-            location = "rg";
 
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getForeignKeyId, staType);
-        }
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay2::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay2::getForeignKeyId, foreignKeyId+staType);
         }
+
         //当前数据
         List<ProEconPowerstationInfoDay2> currlist = new ArrayList<>();
         if (null != date) {

+ 5 - 54
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay4ServiceImpl.java

@@ -25,42 +25,18 @@ import java.util.*;
 public class ProEconPowerstationInfoDay4ServiceImpl extends ServiceImpl<ProEconPowerstationInfoDay4Mapper, ProEconPowerstationInfoDay4> implements IProEconPowerstationInfoDay4Service {
 
     @Override
-    public Map<String, ProEconPowerstationInfoDay4> getEconThreeRate(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public Map<String, ProEconPowerstationInfoDay4> getEconThreeRate(String foreignKeyId, String staType, String dateType, Date date) {
 
         Map<String, ProEconPowerstationInfoDay4> resultmap = new HashMap<>();
 
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getRegionId, regionId);
-            location = "rg";
 
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getForeignKeyId, staType);
-        }
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay4::getForeignKeyId, foreignKeyId+staType);
         }
 
+
         //当前数据
         List<ProEconPowerstationInfoDay4> currlist = new ArrayList<>();
         if (null !=date) {
@@ -92,37 +68,12 @@ public class ProEconPowerstationInfoDay4ServiceImpl extends ServiceImpl<ProEconP
     }
 
     @Override
-    public List<ProEconPowerstationInfoDay4> getEconThreeRateCurve(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public List<ProEconPowerstationInfoDay4> getEconThreeRateCurve( String foreignKeyId, String staType, String dateType, Date date) {
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getRegionId, regionId);
-            location = "rg";
 
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getForeignKeyId, staType);
-        }
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay4::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay4::getForeignKeyId, foreignKeyId+staType);
         }
 
         //当前数据

+ 4 - 56
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay5ServiceImpl.java

@@ -26,41 +26,14 @@ import java.util.*;
 public class ProEconPowerstationInfoDay5ServiceImpl extends ServiceImpl<ProEconPowerstationInfoDay5Mapper, ProEconPowerstationInfoDay5> implements IProEconPowerstationInfoDay5Service {
 
     @Override
-    public Map<String, ProEconPowerstationInfoDay5> getEconElectricQuantity(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public Map<String, ProEconPowerstationInfoDay5> getEconElectricQuantity( String foreignKeyId, String staType, String dateType, Date date) {
         Map<String, ProEconPowerstationInfoDay5> resultmap = new HashMap<>();
 
         QueryWrapper<ProEconPowerstationInfoDay5> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getRegionId, regionId);
-            location = "rg";
-
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, staType);
-        }
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, foreignKeyId+staType);
         }
-
         //当前数据
         List<ProEconPowerstationInfoDay5> currlist = new ArrayList<>();
         if (null !=date) {
@@ -92,38 +65,13 @@ public class ProEconPowerstationInfoDay5ServiceImpl extends ServiceImpl<ProEconP
     }
 
     @Override
-    public List<ProEconPowerstationInfoDay5> getEconZhcydldb(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public List<ProEconPowerstationInfoDay5> getEconZhcydldb(String foreignKeyId, String staType, String dateType, Date date) {
 
         QueryWrapper<ProEconPowerstationInfoDay5> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getRegionId, regionId);
-            location = "rg";
-
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
 
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, staType);
-        }
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay5::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, foreignKeyId+staType);
         }
 
         if (null !=date) {

+ 2 - 29
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay6ServiceImpl.java

@@ -24,40 +24,13 @@ import java.util.*;
 public class ProEconPowerstationInfoDay6ServiceImpl extends ServiceImpl<ProEconPowerstationInfoDay6Mapper, ProEconPowerstationInfoDay6> implements IProEconPowerstationInfoDay6Service {
 
     @Override
-    public Map<String, ProEconPowerstationInfoDay6> getEconPowerOfField(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType, Date date) {
+    public Map<String, ProEconPowerstationInfoDay6> getEconPowerOfField(String foreignKeyId, String staType, String dateType, Date date) {
         Map<String, ProEconPowerstationInfoDay6> resultmap = new HashMap<>();
 
         QueryWrapper<ProEconPowerstationInfoDay6> qw = new QueryWrapper<>();
 
-        String  location = "";
-        if (StringUtils.isNotEmpty(regionId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getRegionId, regionId);
-            location = "rg";
-
-        }
-        if (StringUtils.isNotEmpty(companyId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getCompanyId, companyId);
-            location = "cp";
-        }
-        if (StringUtils.isNotEmpty(windpowerstationId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getWindpowerstationId, windpowerstationId);
-            location = "wp";
-        }
-        if (StringUtils.isNotEmpty(projectId)) {
-
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getProjectId, projectId);
-            location = "pj";
-        }
-        if (StringUtils.isNotEmpty(lineId)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getLineId, lineId);
-            location = "ln";
-        }
         if (StringUtils.isNotEmpty(staType)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getForeignKeyId, staType);
-        }
-
-        if (StringUtils.isNotEmpty(location)) {
-            qw.lambda().eq(ProEconPowerstationInfoDay6::getLocation, location);
+            qw.lambda().eq(ProEconPowerstationInfoDay6::getForeignKeyId, foreignKeyId+staType);
         }
 
         //当前数据

+ 203 - 137
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -3,6 +3,7 @@ package com.gyee.runeconomy.service.homepage;
 
 import com.gyee.common.util.DateUtils;
 import com.gyee.runeconomy.dto.response.EconHomePagePointRateDTO;
+import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
 import com.gyee.runeconomy.model.auto.*;
 import com.gyee.runeconomy.service.auto.*;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,8 +38,12 @@ public class EconomyPointHomePageService {
     @Autowired
     private IProBasicCompanyService proBasicCompanyService;
 
+    @Autowired
     private IProBasicPowerstationService proBasicPowerstationService;
 
+    @Autowired
+    private IProEconPointCodeService proEconPointCodeService;
+
     /**
      * 指标率相应类
      */
@@ -77,7 +82,7 @@ public class EconomyPointHomePageService {
 
     private Map<String,BigDecimal> wsdlfx = null;//五损电量分析
 
-    private Map<String,BigDecimal> zhcydl = null;//综合场用电率
+    private List<Map<String,BigDecimal>> zhcydl = null;//综合场用电率
 
     private List<Map<String,Object>> dltjfxList = null;//电量统计分析
 
@@ -97,53 +102,55 @@ public class EconomyPointHomePageService {
     /**
      * 经济运行首页聚合方法
      *
-     * @param regionId
-     * @param companyId
-     * @param windpowerstationId
-     * @param projectId
-     * @param lineId
+     * @param foreignKeyId
      * @param staType
      * @param dateType
      * @return
      */
-    public EconHomePagePointRateDTO getEconomyPointHomePageInfo(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType) throws ParseException {
+    public Map<String,Object> getEconomyPointHomePageInfo(String foreignKeyId, String regionId, String companyId,String staType, String dateType,String pointCode) throws ParseException {
+
+        Map<String,Object> allmap = new HashMap<>();
         //获取当前时间
         String strdate = DateUtils.toDate1(new Date());
-        Date date = DateUtils.parseDate(strdate);
+        Date date = DateUtils.parseDate("2022-11-22");
 
 
 
         /** 五损 */
-        wsmap = proEconPowerstationInfoDay1Service.getEconFiveLoss(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        wsmap = proEconPowerstationInfoDay1Service.getEconFiveLoss(foreignKeyId, staType, dateType, date);
 
         /** 三率 */
-        slmap = proEconPowerstationInfoDay4Service.getEconThreeRate(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        slmap = proEconPowerstationInfoDay4Service.getEconThreeRate(foreignKeyId, staType, dateType, date);
 
         /** 综合场用电量 */
-        dlmap = proEconPowerstationInfoDay5Service.getEconElectricQuantity(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        dlmap = proEconPowerstationInfoDay5Service.getEconElectricQuantity(foreignKeyId, staType, dateType, date);
 
         /** 场功率 */
-        glmap = proEconPowerstationInfoDay6Service.getEconPowerOfField(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        glmap = proEconPowerstationInfoDay6Service.getEconPowerOfField(foreignKeyId, staType, dateType, date);
 
         /**  五损时间 */
-        wstimemap = proEconPowerstationInfoDay2Service.getEconFiveLossTime(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        wstimemap = proEconPowerstationInfoDay2Service.getEconFiveLossTime(foreignKeyId, staType, dateType, date);
 
         /** 装机容量 */
-        capacity = proBasicCompanyService.getProBasicCompanyCapacity(regionId, companyId);
+        capacity = new BigDecimal(proBasicCompanyService.getProBasicCompanyCapacity(regionId, companyId));
         //综合场用电量
-        zhcydllist =  proEconPowerstationInfoDay5Service.getEconZhcydldb(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        zhcydllist =  proEconPowerstationInfoDay5Service.getEconZhcydldb(foreignKeyId, staType, dateType, date);
 
         //电量统计分析
-        dltjfxlist = proEconPowerstationInfoDay1Service.getEconFiveLosslist(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        dltjfxlist = proEconPowerstationInfoDay1Service.getEconFiveLosslist(foreignKeyId, staType, dateType, date);
 
         //三率曲线
-        threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
+        threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(foreignKeyId, staType, dateType, date);
+
+        List<ProEconPointCodeDTO> pointCodeDTO =  proEconPointCodeService.getEconPointRanking(regionId, companyId, pointCode);
                 /**  场站信息 */
-        List<ProBasicPowerstation> powerstationList =  proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,windpowerstationId,staType);
+        List<ProBasicPowerstation> powerstationList =  proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,staType);
         wsdlfx = new HashMap<>();//五损电量分析
-        zhcydl= new HashMap<>();//综合场用电率
+        zhcydl= new ArrayList<>();//综合场用电率
         dltjfxList = new ArrayList<>();//电量统计分析
         fdinfomap =  new HashMap<>();//(风能利用率、发电量、欠发电量)
+        slqxList =  new ArrayList<>();//三率曲线
+
 
 
         switch (dateType) {
@@ -156,6 +163,7 @@ public class EconomyPointHomePageService {
                 currZhcydl();
                 currDltjfx();
                 currThreeRateCurve();
+                currfdinfo();
 
 
                 break;
@@ -167,6 +175,7 @@ public class EconomyPointHomePageService {
                 monthZhcydl();
                 monthDltjfx();
                 monthThreeRateCurve();
+                monthfdinfo();
 
 
                 break;
@@ -178,10 +187,21 @@ public class EconomyPointHomePageService {
                 yearZhcydl();
                 yearDltjfx();
                 yearThreeRateCurve();
+                yearfdinfo();
                 break;
         }
+        allmap.put("zbl",dto);//页面第一行的
+        allmap.put("stationinfo",powerstationList);//场站性息(装机容量)
+        allmap.put("sldlfx",wsdlfx);//损失电量分析
+        allmap.put("zhcydl",zhcydl);//综合场用电率
+        allmap.put("dltjfx",dltjfxList);//电量统计分析
+        allmap.put("fdlinfo",fdinfomap);//发电量 欠发电量  风能利用率
+        allmap.put("slqx",slqxList);//三率曲线
+        allmap.put("zbphl",pointCodeDTO);//排行榜
+
+
 
-        return dto;
+        return allmap;
     }
 
 
@@ -192,7 +212,12 @@ public class EconomyPointHomePageService {
         if(null != fdinfo){
             fdinfomap.put("fdl",fdinfo.getRfdl());
             fdinfomap.put("qfdl",fdinfo.getRqfdl());
-            fdinfomap.put("fnlyl",fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            if(compare0(fdinfo.getRllfdl())){
+                fdinfomap.put("fnlyl", compare100(fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+            }else {
+                fdinfomap.put("fnlyl",0);
+            }
+
 
         }
 
@@ -202,7 +227,7 @@ public class EconomyPointHomePageService {
         if(null != fdinfo){
             fdinfomap.put("fdl",fdinfo.getYfdl());
             fdinfomap.put("qfdl",fdinfo.getYqfdl());
-            fdinfomap.put("fnlyl",fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            fdinfomap.put("fnlyl", compare100(fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
 
         }
@@ -212,7 +237,7 @@ public class EconomyPointHomePageService {
         if(null != fdinfo){
             fdinfomap.put("fdl",fdinfo.getNfdl());
             fdinfomap.put("qfdl",fdinfo.getNqfdl());
-            fdinfomap.put("fnlyl",fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            fdinfomap.put("fnlyl", compare100(fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
         }
     }
@@ -228,8 +253,8 @@ public class EconomyPointHomePageService {
             m.put("fejsl",i.getRfwjsl());
             m.put("ztzhjsl",i.getRztzhjsl());
             m.put("gzxqjsl",i.getRgzxqjsl());
-            m.put("date",i.getRecordDate());
-            slqxList.add(null);
+            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            slqxList.add(m);
         });
 
     }
@@ -239,8 +264,8 @@ public class EconomyPointHomePageService {
             m.put("fejsl",i.getYfwjsl());
             m.put("ztzhjsl",i.getYztzhjsl());
             m.put("gzxqjsl",i.getYgzxqjsl());
-            m.put("date",i.getRecordDate());
-            slqxList.add(null);
+            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            slqxList.add(m);
         });
     }
 
@@ -250,8 +275,8 @@ public class EconomyPointHomePageService {
             m.put("fejsl",i.getNfwjsl());
             m.put("ztzhjsl",i.getNztzhjsl());
             m.put("gzxqjsl",i.getNgzxqjsl());
-            m.put("date",i.getRecordDate());
-            slqxList.add(null);
+            m.put("date",DateUtils.toDate1(i.getRecordDate()));
+            slqxList.add(m);
         });
     }
 
@@ -311,19 +336,39 @@ public class EconomyPointHomePageService {
     /**综合厂用电率 */
     private void currZhcydl(){
         zhcydllist.stream().forEach(i->{
-            zhcydl.put(DateUtils.toDate1(i.getRecordDate()),i.getRzhcydldb().divide(i.getRfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            Map<String,BigDecimal> m = new HashMap<>();
+            if(compare0(i.getRfdldb())){
+                m.put(DateUtils.toDate1(i.getRecordDate()), compare100(i.getRzhcydldb().divide(i.getRfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+            }else {
+                m.put(DateUtils.toDate1(i.getRecordDate()),new BigDecimal(0));
+            }
+            zhcydl.add(m);
         });
     }
 
     private void monthZhcydl(){
         zhcydllist.stream().forEach(i->{
-            zhcydl.put(DateUtils.toDate1(i.getRecordDate()),i.getYzhcydldb().divide(i.getYfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            Map<String,BigDecimal> m = new HashMap<>();
+
+            if(compare0(i.getRfdldb())){
+                m.put(DateUtils.toDate1(i.getRecordDate()), compare100(i.getYzhcydldb().divide(i.getYfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+
+            }else {
+                m.put(DateUtils.toDate1(i.getRecordDate()),new BigDecimal(0));
+            }
+            zhcydl.add(m);
         });
     }
 
     private void yearZhcydl(){
         zhcydllist.stream().forEach(i->{
-            zhcydl.put(DateUtils.toDate1(i.getRecordDate()),i.getNzhcydldb().divide(i.getNfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            Map<String,BigDecimal> m = new HashMap<>();
+            if(compare0(i.getRfdldb())){
+                m.put(DateUtils.toDate1(i.getRecordDate()), compare100(i.getNzhcydldb().divide(i.getNfdldb(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+            }else {
+                m.put(DateUtils.toDate1(i.getRecordDate()),new BigDecimal(0));
+            }
+            zhcydl.add(m);
         });
     }
 
@@ -333,50 +378,50 @@ public class EconomyPointHomePageService {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
 
         //发电量
-        wsdlfx.put("fdl", fiveInfo.getRfdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fdl", compare100(fiveInfo.getRfdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //受累
-        wsdlfx.put("sldl", (fiveInfo.getRcwsldwssdl().add(fiveInfo.getRcwsltqssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("sldl", compare100((fiveInfo.getRcwsldwssdl().add(fiveInfo.getRcwsltqssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //检修
-        wsdlfx.put("jxdl", fiveInfo.getRjxssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("jxdl", compare100(fiveInfo.getRjxssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //限电
-        wsdlfx.put("xddl", (fiveInfo.getRxdtjssdl().add(fiveInfo.getRxdjclssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xddl", compare100((fiveInfo.getRxdtjssdl().add(fiveInfo.getRxdjclssdl())).divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //故障
-        wsdlfx.put("fgzdl", fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fgzdl", compare100(fiveInfo.getRgzssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //性能
-        wsdlfx.put("xndl", fiveInfo.getRxnssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xndl", compare100(fiveInfo.getRxnssdl().divide(fiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
     }
     private void monthFiveDlFx() {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
         //发电量
-        wsdlfx.put("fdl", fiveInfo.getYfdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fdl", compare100(fiveInfo.getYfdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //受累
-        wsdlfx.put("sldl", (fiveInfo.getYcwsldwssdl().add(fiveInfo.getYcwsltqssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("sldl", compare100((fiveInfo.getYcwsldwssdl().add(fiveInfo.getYcwsltqssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //检修
-        wsdlfx.put("jxdl", fiveInfo.getYjxssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("jxdl", compare100(fiveInfo.getYjxssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //限电
-        wsdlfx.put("xddl", (fiveInfo.getYxdtjssdl().add(fiveInfo.getYxdjclssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xddl", compare100((fiveInfo.getYxdtjssdl().add(fiveInfo.getYxdjclssdl())).divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //故障
-        wsdlfx.put("fgzdl", fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fgzdl", compare100(fiveInfo.getYgzssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //性能
-        wsdlfx.put("xndl", fiveInfo.getYxnssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xndl", compare100(fiveInfo.getYxnssdl().divide(fiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
     }
 
     private void yearFiveDlFx() {
         ProEconPowerstationInfoDay1 fiveInfo = wsmap.get("currFiveInfo");
         //发电量
-        wsdlfx.put("fdl", fiveInfo.getNfdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fdl", compare100(fiveInfo.getNfdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //受累
-        wsdlfx.put("sldl", (fiveInfo.getNcwsldwssdl().add(fiveInfo.getNcwsltqssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("sldl", compare100((fiveInfo.getNcwsldwssdl().add(fiveInfo.getNcwsltqssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //检修
-        wsdlfx.put("jxdl", fiveInfo.getNjxssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("jxdl", compare100(fiveInfo.getNjxssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //限电
-        wsdlfx.put("xddl", (fiveInfo.getNxdtjssdl().add(fiveInfo.getNxdjclssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xddl", compare100((fiveInfo.getNxdtjssdl().add(fiveInfo.getNxdjclssdl())).divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //故障
-        wsdlfx.put("fgzdl", fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("fgzdl", compare100(fiveInfo.getNgzssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
         //性能
-        wsdlfx.put("xndl", fiveInfo.getNxnssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+        wsdlfx.put("xndl", compare100(fiveInfo.getNxnssdl().divide(fiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
     }
 
 
@@ -391,11 +436,11 @@ public class EconomyPointHomePageService {
         ProEconPowerstationInfoDay1 withFiveInfo = wsmap.get("withFiveInfo");
 
         if (null != currFiveInfo) {
-            BigDecimal currgzsll = currFiveInfo.getRgzssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currjxsll = currFiveInfo.getRjxssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxdsll = (currFiveInfo.getRxdtjssdl().add(currFiveInfo.getRxdjclssdl())).divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currslsll = (currFiveInfo.getRcnslgzssdl().add(currFiveInfo.getRcnsljxssdl())).divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxnsll = currFiveInfo.getRxnssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+            BigDecimal currgzsll = compare100(currFiveInfo.getRgzssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currjxsll = compare100(currFiveInfo.getRjxssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxdsll = compare100((currFiveInfo.getRxdtjssdl().add(currFiveInfo.getRxdjclssdl())).divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currslsll = compare100((currFiveInfo.getRcnslgzssdl().add(currFiveInfo.getRcnsljxssdl())).divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxnsll = compare100(currFiveInfo.getRxnssdl().divide(currFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
             dto.setCurrGzsll(currgzsll);
             dto.setCurrGzsll(currjxsll);
@@ -405,11 +450,11 @@ public class EconomyPointHomePageService {
 
 
             if (null != ringFiveInfo) {
-                BigDecimal ringgzsll = ringFiveInfo.getRgzssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringjxsll = ringFiveInfo.getRjxssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxdsll = (ringFiveInfo.getRxdtjssdl().add(ringFiveInfo.getRxdjclssdl())).divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringslsll = (ringFiveInfo.getRcnslgzssdl().add(ringFiveInfo.getRcnsljxssdl())).divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxnsll = ringFiveInfo.getRxnssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal ringgzsll = compare100(ringFiveInfo.getRgzssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringjxsll = compare100(ringFiveInfo.getRjxssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxdsll = compare100((ringFiveInfo.getRxdtjssdl().add(ringFiveInfo.getRxdjclssdl())).divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringslsll = compare100((ringFiveInfo.getRcnslgzssdl().add(ringFiveInfo.getRcnsljxssdl())).divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxnsll = compare100(ringFiveInfo.getRxnssdl().divide(ringFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 BigDecimal ringGzslzzl = currgzsll.subtract(ringgzsll).divide(ringgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
                 BigDecimal ringjxslzzl = currjxsll.subtract(ringjxsll).divide(ringjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
@@ -426,17 +471,17 @@ public class EconomyPointHomePageService {
             }
 
             if (null != withFiveInfo) {
-                BigDecimal withgzsll = withFiveInfo.getRgzssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxsll = withFiveInfo.getRjxssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdsll = (withFiveInfo.getRxdtjssdl().add(withFiveInfo.getRxdjclssdl())).divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslsll = (withFiveInfo.getRcnslgzssdl().add(withFiveInfo.getRcnsljxssdl())).divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnsll = withFiveInfo.getRxnssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-
-                BigDecimal withGzslzzl = currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxslzzl = currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdslzzl = currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslslzzl = currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnslzzl = currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal withgzsll = compare100(withFiveInfo.getRgzssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxsll = compare100(withFiveInfo.getRjxssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdsll = compare100((withFiveInfo.getRxdtjssdl().add(withFiveInfo.getRxdjclssdl())).divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslsll = compare100((withFiveInfo.getRcnslgzssdl().add(withFiveInfo.getRcnsljxssdl())).divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnsll = compare100(withFiveInfo.getRxnssdl().divide(withFiveInfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+
+                BigDecimal withGzslzzl = compare100(currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxslzzl = compare100(currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdslzzl = compare100(currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslslzzl = compare100(currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnslzzl = compare100(currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 dto.setWithGzslzzl(withGzslzzl);
                 dto.setWithGzslzzl(withjxslzzl);
@@ -455,11 +500,11 @@ public class EconomyPointHomePageService {
         ProEconPowerstationInfoDay1 withFiveInfo = wsmap.get("withFiveInfo");
 
         if (null != currFiveInfo) {
-            BigDecimal currgzsll = currFiveInfo.getYgzssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currjxsll = currFiveInfo.getYjxssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxdsll = (currFiveInfo.getYxdtjssdl().add(currFiveInfo.getYxdjclssdl())).divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currslsll = (currFiveInfo.getYcnslgzssdl().add(currFiveInfo.getYcnsljxssdl())).divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxnsll = currFiveInfo.getYxnssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+            BigDecimal currgzsll = compare100(currFiveInfo.getYgzssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currjxsll = compare100(currFiveInfo.getYjxssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxdsll = compare100((currFiveInfo.getYxdtjssdl().add(currFiveInfo.getYxdjclssdl())).divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currslsll = compare100((currFiveInfo.getYcnslgzssdl().add(currFiveInfo.getYcnsljxssdl())).divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxnsll = compare100(currFiveInfo.getYxnssdl().divide(currFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
             dto.setCurrGzsll(currgzsll);
             dto.setCurrGzsll(currjxsll);
@@ -469,17 +514,17 @@ public class EconomyPointHomePageService {
 
 
             if (null != ringFiveInfo) {
-                BigDecimal ringgzsll = ringFiveInfo.getYgzssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringjxsll = ringFiveInfo.getYjxssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxdsll = (ringFiveInfo.getYxdtjssdl().add(ringFiveInfo.getYxdjclssdl())).divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringslsll = (ringFiveInfo.getYcnslgzssdl().add(ringFiveInfo.getYcnsljxssdl())).divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxnsll = ringFiveInfo.getYxnssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-
-                BigDecimal ringGzslzzl = currgzsll.subtract(ringgzsll).divide(ringgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringjxslzzl = currjxsll.subtract(ringjxsll).divide(ringjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxdslzzl = currxdsll.subtract(ringxdsll).divide(ringxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringslslzzl = currslsll.subtract(ringslsll).divide(ringslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxnslzzl = currxnsll.subtract(ringxnsll).divide(ringxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal ringgzsll = compare100(ringFiveInfo.getYgzssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringjxsll = compare100(ringFiveInfo.getYjxssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxdsll = compare100((ringFiveInfo.getYxdtjssdl().add(ringFiveInfo.getYxdjclssdl())).divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringslsll = compare100((ringFiveInfo.getYcnslgzssdl().add(ringFiveInfo.getYcnsljxssdl())).divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxnsll = compare100(ringFiveInfo.getYxnssdl().divide(ringFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+
+                BigDecimal ringGzslzzl = compare100(currgzsll.subtract(ringgzsll).divide(ringgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringjxslzzl = compare100(currjxsll.subtract(ringjxsll).divide(ringjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxdslzzl = compare100(currxdsll.subtract(ringxdsll).divide(ringxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringslslzzl = compare100(currslsll.subtract(ringslsll).divide(ringslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxnslzzl = compare100(currxnsll.subtract(ringxnsll).divide(ringxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 dto.setRingGzslzzl(ringGzslzzl);
                 dto.setRingGzslzzl(ringjxslzzl);
@@ -490,17 +535,17 @@ public class EconomyPointHomePageService {
             }
 
             if (null != withFiveInfo) {
-                BigDecimal withgzsll = withFiveInfo.getYgzssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxsll = withFiveInfo.getYjxssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdsll = (withFiveInfo.getYxdtjssdl().add(withFiveInfo.getYxdjclssdl())).divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslsll = (withFiveInfo.getYcnslgzssdl().add(withFiveInfo.getYcnsljxssdl())).divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnsll = withFiveInfo.getYxnssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-
-                BigDecimal withGzslzzl = currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxslzzl = currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdslzzl = currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslslzzl = currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnslzzl = currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal withgzsll = compare100(withFiveInfo.getYgzssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxsll = compare100(withFiveInfo.getYjxssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdsll = compare100((withFiveInfo.getYxdtjssdl().add(withFiveInfo.getYxdjclssdl())).divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslsll = compare100((withFiveInfo.getYcnslgzssdl().add(withFiveInfo.getYcnsljxssdl())).divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnsll = compare100(withFiveInfo.getYxnssdl().divide(withFiveInfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+
+                BigDecimal withGzslzzl = compare100(currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxslzzl = compare100(currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdslzzl = compare100(currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslslzzl = compare100(currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnslzzl = compare100(currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 dto.setWithGzslzzl(withGzslzzl);
                 dto.setWithGzslzzl(withjxslzzl);
@@ -520,11 +565,11 @@ public class EconomyPointHomePageService {
         ProEconPowerstationInfoDay1 withFiveInfo = wsmap.get("withFiveInfo");
 
         if (null != currFiveInfo) {
-            BigDecimal currgzsll = currFiveInfo.getNgzssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currjxsll = currFiveInfo.getNjxssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxdsll = (currFiveInfo.getNxdtjssdl().add(currFiveInfo.getNxdjclssdl())).divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currslsll = (currFiveInfo.getNcnslgzssdl().add(currFiveInfo.getNcnsljxssdl())).divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-            BigDecimal currxnsll = currFiveInfo.getNxnssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+            BigDecimal currgzsll = compare100(currFiveInfo.getNgzssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currjxsll = compare100(currFiveInfo.getNjxssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxdsll = compare100((currFiveInfo.getNxdtjssdl().add(currFiveInfo.getNxdjclssdl())).divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currslsll = compare100((currFiveInfo.getNcnslgzssdl().add(currFiveInfo.getNcnsljxssdl())).divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+            BigDecimal currxnsll = compare100(currFiveInfo.getNxnssdl().divide(currFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
             dto.setCurrGzsll(currgzsll);
             dto.setCurrGzsll(currjxsll);
@@ -534,17 +579,17 @@ public class EconomyPointHomePageService {
 
 
             if (null != ringFiveInfo) {
-                BigDecimal ringgzsll = ringFiveInfo.getNgzssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringjxsll = ringFiveInfo.getNjxssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxdsll = (ringFiveInfo.getNxdtjssdl().add(ringFiveInfo.getNxdjclssdl())).divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringslsll = (ringFiveInfo.getNcnslgzssdl().add(ringFiveInfo.getNcnsljxssdl())).divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxnsll = ringFiveInfo.getNxnssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-
-                BigDecimal ringGzslzzl = currgzsll.subtract(ringgzsll).divide(ringgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringjxslzzl = currjxsll.subtract(ringjxsll).divide(ringjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxdslzzl = currxdsll.subtract(ringxdsll).divide(ringxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringslslzzl = currslsll.subtract(ringslsll).divide(ringslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal ringxnslzzl = currxnsll.subtract(ringxnsll).divide(ringxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal ringgzsll = compare100(ringFiveInfo.getNgzssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringjxsll = compare100(ringFiveInfo.getNjxssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxdsll = compare100((ringFiveInfo.getNxdtjssdl().add(ringFiveInfo.getNxdjclssdl())).divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringslsll = compare100((ringFiveInfo.getNcnslgzssdl().add(ringFiveInfo.getNcnsljxssdl())).divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxnsll = compare100(ringFiveInfo.getNxnssdl().divide(ringFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+
+                BigDecimal ringGzslzzl = compare100(currgzsll.subtract(ringgzsll).divide(ringgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringjxslzzl = compare100(currjxsll.subtract(ringjxsll).divide(ringjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxdslzzl = compare100(currxdsll.subtract(ringxdsll).divide(ringxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringslslzzl = compare100(currslsll.subtract(ringslsll).divide(ringslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal ringxnslzzl = compare100(currxnsll.subtract(ringxnsll).divide(ringxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 dto.setRingGzslzzl(ringGzslzzl);
                 dto.setRingGzslzzl(ringjxslzzl);
@@ -555,17 +600,17 @@ public class EconomyPointHomePageService {
             }
 
             if (null != withFiveInfo) {
-                BigDecimal withgzsll = withFiveInfo.getNgzssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxsll = withFiveInfo.getNjxssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdsll = (withFiveInfo.getNxdtjssdl().add(withFiveInfo.getNxdjclssdl())).divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslsll = (withFiveInfo.getNcnslgzssdl().add(withFiveInfo.getNcnsljxssdl())).divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnsll = withFiveInfo.getNxnssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-
-                BigDecimal withGzslzzl = currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withjxslzzl = currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxdslzzl = currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withslslzzl = currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
-                BigDecimal withxnslzzl = currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"));
+                BigDecimal withgzsll = compare100(withFiveInfo.getNgzssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxsll = compare100(withFiveInfo.getNjxssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdsll = compare100((withFiveInfo.getNxdtjssdl().add(withFiveInfo.getNxdjclssdl())).divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslsll = compare100((withFiveInfo.getNcnslgzssdl().add(withFiveInfo.getNcnsljxssdl())).divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnsll = compare100(withFiveInfo.getNxnssdl().divide(withFiveInfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+
+                BigDecimal withGzslzzl = compare100(currgzsll.subtract(withgzsll).divide(withgzsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withjxslzzl = compare100(currjxsll.subtract(withjxsll).divide(withjxsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxdslzzl = compare100(currxdsll.subtract(withxdsll).divide(withxdsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withslslzzl = compare100(currslsll.subtract(withslsll).divide(withslsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                BigDecimal withxnslzzl = compare100(currxnsll.subtract(withxnsll).divide(withxnsll, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
 
                 dto.setWithGzslzzl(withGzslzzl);
                 dto.setWithGzslzzl(withjxslzzl);
@@ -596,17 +641,17 @@ public class EconomyPointHomePageService {
 
             if (null != ringThreeInfo) {
 
-                dto.setRingFwjszzl((currThreeInfo.getRfwjsl().subtract(ringThreeInfo.getRfwjsl())).divide(ringThreeInfo.getRfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setRingZtzhzzl((currThreeInfo.getRztzhjsl().subtract(ringThreeInfo.getRztzhjsl())).divide(ringThreeInfo.getRztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setRingXqjszzl((currThreeInfo.getRgzxqjsl().subtract(ringThreeInfo.getRgzxqjsl())).divide(ringThreeInfo.getRgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                dto.setRingFwjszzl(compare100((currThreeInfo.getRfwjsl().subtract(ringThreeInfo.getRfwjsl())).divide(ringThreeInfo.getRfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setRingZtzhzzl(compare100((currThreeInfo.getRztzhjsl().subtract(ringThreeInfo.getRztzhjsl())).divide(ringThreeInfo.getRztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setRingXqjszzl(compare100((currThreeInfo.getRgzxqjsl().subtract(ringThreeInfo.getRgzxqjsl())).divide(ringThreeInfo.getRgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
             }
 
             if (null != withThreeInfo) {
 
-                dto.setWithFwjszzl((currThreeInfo.getRfwjsl().subtract(withThreeInfo.getRfwjsl())).divide(withThreeInfo.getRfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setWithZtzhzzl((currThreeInfo.getRztzhjsl().subtract(withThreeInfo.getRztzhjsl())).divide(withThreeInfo.getRztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setWithXqjszzl((currThreeInfo.getRgzxqjsl().subtract(withThreeInfo.getRgzxqjsl())).divide(withThreeInfo.getRgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                dto.setWithFwjszzl(compare100((currThreeInfo.getRfwjsl().subtract(withThreeInfo.getRfwjsl())).divide(withThreeInfo.getRfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setWithZtzhzzl(compare100((currThreeInfo.getRztzhjsl().subtract(withThreeInfo.getRztzhjsl())).divide(withThreeInfo.getRztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setWithXqjszzl(compare100((currThreeInfo.getRgzxqjsl().subtract(withThreeInfo.getRgzxqjsl())).divide(withThreeInfo.getRgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
             }
 
@@ -629,17 +674,17 @@ public class EconomyPointHomePageService {
 
             if (null != ringThreeInfo) {
 
-                dto.setRingFwjszzl((currThreeInfo.getYfwjsl().subtract(ringThreeInfo.getYfwjsl())).divide(ringThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setRingZtzhzzl((currThreeInfo.getYztzhjsl().subtract(ringThreeInfo.getYztzhjsl())).divide(ringThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setRingXqjszzl((currThreeInfo.getYgzxqjsl().subtract(ringThreeInfo.getYgzxqjsl())).divide(ringThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                dto.setRingFwjszzl(compare100((currThreeInfo.getYfwjsl().subtract(ringThreeInfo.getYfwjsl())).divide(ringThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setRingZtzhzzl(compare100((currThreeInfo.getYztzhjsl().subtract(ringThreeInfo.getYztzhjsl())).divide(ringThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setRingXqjszzl(compare100((currThreeInfo.getYgzxqjsl().subtract(ringThreeInfo.getYgzxqjsl())).divide(ringThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
             }
 
             if (null != withThreeInfo) {
 
-                dto.setWithFwjszzl((currThreeInfo.getYfwjsl().subtract(withThreeInfo.getYfwjsl())).divide(withThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setWithZtzhzzl((currThreeInfo.getYztzhjsl().subtract(withThreeInfo.getYztzhjsl())).divide(withThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
-                dto.setWithXqjszzl((currThreeInfo.getYgzxqjsl().subtract(withThreeInfo.getYgzxqjsl())).divide(withThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
+                dto.setWithFwjszzl(compare100((currThreeInfo.getYfwjsl().subtract(withThreeInfo.getYfwjsl())).divide(withThreeInfo.getYfwjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setWithZtzhzzl(compare100((currThreeInfo.getYztzhjsl().subtract(withThreeInfo.getYztzhjsl())).divide(withThreeInfo.getYztzhjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
+                dto.setWithXqjszzl(compare100((currThreeInfo.getYgzxqjsl().subtract(withThreeInfo.getYgzxqjsl())).divide(withThreeInfo.getYgzxqjsl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))));
 
             }
 
@@ -907,4 +952,25 @@ public class EconomyPointHomePageService {
     }
 
 
+    private BigDecimal compare100(BigDecimal a){
+        BigDecimal b = new BigDecimal (100);
+        if(b.compareTo(a) == -1){
+            a = new BigDecimal (100);;
+        }
+        return a;
+
+    }
+
+    private boolean compare0(BigDecimal a){
+        BigDecimal b = new BigDecimal (0.00);
+        BigDecimal c = new BigDecimal (0);
+        if(b.compareTo(a) == 0 || b.compareTo(c) == 0){
+           return false;
+        }
+        return true;
+
+    }
+
+
+
 }

+ 8 - 9
web/runeconomy-xk/src/main/resources/application-test.yml

@@ -20,16 +20,15 @@ spring:
   #redis集群
   redis:
     #host: 127.0.0.1
-    host: 192.168.11.250
+    host: 124.70.18.168
     port: 6379
-    timeout: 100000
+    password: gdnxfd123
     #    集群环境打开下面注释,单机不需要打开
     #    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:
@@ -44,13 +43,13 @@ spring:
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD #IMS_NEM_SD
-    username: postgres
-    password: postgres
+#    url: jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD #IMS_NEM_SD
+#    username: postgres
+#    password: postgres
     #华为云测试地址
-    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test #IMS_NEM_SD
-    #    username: postgres
-    #    password: gd123
+    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