wangchangsheng il y a 2 ans
Parent
commit
f283f93965

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

@@ -64,7 +64,7 @@ public class ProEconEquipmentInfoDayTop extends Model {
      */
     @TableField(exist = false)
     @JsonInclude(JsonInclude.Include.NON_DEFAULT )
-    private String windturbineName;
+    private String nemCode;
 
     /**
      * 日期

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

@@ -66,6 +66,9 @@ public class ProEconEquipmentInfoDayTopServiceImpl extends ServiceImpl<ProEconEq
 
         qw.lambda().orderByAsc(ProEconEquipmentInfoDayTop::getWindturbineId);
         List<ProEconEquipmentInfoDayTop> list = baseMapper.selectList(qw);
+        list.stream().forEach(i->{
+            i.setNemCode(CacheContext.wtmap.get(i.getWindturbineId()).getAname());
+        });
         return list;
     }
 

+ 41 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 经济运行首页服务类
@@ -94,6 +95,8 @@ public class EconomyPointHomePageService {
 
     private Map<String, Object> fdinfomap = null;//发电(风能利用率、发电量、欠发电量)
 
+    private List<Map<String, Object>> stainfo = null;//场站性息
+
 
     /**
      * 装机容量
@@ -142,6 +145,7 @@ public class EconomyPointHomePageService {
         threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(foreignKeyId, staType, dateType, date);
 
         List<ProEconPointCodeDTO> pointCodeDTO = proEconPointCodeService.getEconPointRanking("", foreignKeyId, pointCode,date,dateType);
+        powerstationFnlyl(foreignKeyId,staType,date);//地图场站性息
         /**  场站信息 */
         List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist("", foreignKeyId, staType);
         wsdlfx = new HashMap<>();//五损电量分析
@@ -190,6 +194,7 @@ public class EconomyPointHomePageService {
         }
         allmap.put("zbl", dto);//页面第一行的
         allmap.put("stationinfo", powerstationList);//场站性息(装机容量)
+        allmap.put("stainfo", stainfo);//场站性息(装机容量)
         allmap.put("sldlfx", wsdlfx);//损失电量分析
         allmap.put("zhcydl", zhcydl);//综合场用电率
         allmap.put("dltjfx", dltjfxList);//电量统计分析
@@ -205,6 +210,42 @@ public class EconomyPointHomePageService {
     /**
      * (风能利用率、发电量、欠发电量)
      */
+    private void powerstationFnlyl(String foreignKeyId, String staType, Date date) {
+        stainfo = new ArrayList<>();
+        //电量统计分析
+        Map<String, ProEconPowerstationInfoDay1> stamap = new HashMap<>();//场站站五损电量
+        List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist("", foreignKeyId, staType);
+        List<String> prids = powerstationList.stream().map(ProBasicPowerstation::getId).collect(Collectors.toList());
+        List<ProEconPowerstationInfoDay1> stafnlyl = proEconPowerstationInfoDay1Service.getEconFiveLosslist(prids, date);
+        stafnlyl.stream().forEach(s -> {
+            stamap.put(s.getForeignKeyId(), s);
+        });
+
+        powerstationList.stream().forEach(p -> {
+            Map<String, Object> info = new HashMap<>();
+            ProEconPowerstationInfoDay1 day1 = stamap.get(p.getId());
+            info.put("aname", p.getAname());
+            info.put("name", p.getName());
+            info.put("nemCode", p.getNemCode());
+            info.put("capacity", (p.getWindCapacity() + p.getCapacity()) / 10000);
+            if (null != day1) {
+                info.put("fdl", day1.getRfdl().divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP));
+                info.put("fnlyl", compare0(day1.getRllfdl()) ? compare100(day1.getRfdl().divide(day1.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100"))) : new BigDecimal(0));
+
+            } else {
+                info.put("fdl", 0);
+                info.put("fnlyl", 0);
+            }
+            stainfo.add(info);
+        });
+
+
+    }
+
+
+    /**
+     * (风能利用率、发电量、欠发电量)
+     */
     private void currfdinfo() {
         ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
         if (null != fdinfo) {