Переглянути джерело

sis首页添加利用小时

malijun 1 рік тому
батько
коміт
3f79d415b2

+ 1 - 2
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/GetTypeController.java

@@ -10,6 +10,7 @@ import javax.annotation.Resource;
 import java.util.*;
 
 /**
+ * 获取前端下拉框选择类型
  * Author: malijun
  * Data  : 2023: 05: 24
  **/
@@ -19,8 +20,6 @@ import java.util.*;
 public class GetTypeController {
 
     @Resource
-    GetMeterInfo getMeterInfo;
-    @Resource
     GetPowerstation_Type_Class_Name getPowerstationTypeClassName;
 
 

+ 5 - 4
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/MeterController.java

@@ -34,6 +34,7 @@ public class MeterController {
     GetView getView;
 
 
+    //首页驾驶舱展示数据
     @GetMapping("")
     public Result<Object> getMeterInfoFDC(String id) {
 
@@ -41,10 +42,10 @@ public class MeterController {
         if ("0".equals(id)) {
             //所有光伏+风电
 
-            // 查询返回所有光伏当月每日的, 日发电量.上网电量.购网电量(暂无).风速(暂无),前端为日发电量图表
+            // 查询返回所有当月每日的, 日发电量.上网电量.购网电量(暂无).风速(暂无),前端为日发电量图表
             List<MeterVO> meterInfoFDC = getWindStationInfo.getMeterInfo_FDC_GDC_Day();
 
-            //查询返光伏, 日发电量,月发电量,年发电量,日上网电量,装机容量
+            //查询返所有, 日发电量,月发电量,月利用小时,年发电量,年利用小时,日上网电量,装机容量
             MeterVO meterInfoFDCFDLDayMonthYear = getWindStationInfo.getMeterInfo_FDC_GDC_FDLDayMonthYear();
 
             HashMap<Object, Object> map = new HashMap<>();
@@ -59,7 +60,7 @@ public class MeterController {
             // 查询返回所有光伏当月每日的, 日发电量.上网电量.购网电量(暂无).风速(暂无),前端为日发电量图表
             List<MeterVO> meterInfoFDC = getWindStationInfo.getMeterInfoGDC_Day();
 
-            //查询返光伏, 日发电量,月发电量,年发电量,日上网电量,装机容量
+            //查询返光伏, 日发电量,月发电量,月利用小时,年发电量,年利用小时,日上网电量,装机容量
             MeterVO meterInfoFDCFDLDayMonthYear = getWindStationInfo.getMeterInfoGDCFDL_DayMonthYear();
 
             HashMap<Object, Object> map = new HashMap<>();
@@ -74,7 +75,7 @@ public class MeterController {
             // 查询返回所有风场当月每日的, 日发电量.上网电量.购网电量.风速(暂无),前端为日发电量图表
             List<MeterVO> meterInfoFDC = getWindStationInfo.getMeterInfoFDC_Day();
 
-            //查询返所有风场总, 日发电量,月发电量,年发电量,日上网电量,装机容量
+            //查询返所有风场总, 日发电量,月发电量,月利用小时,年发电量,年利用小时,日上网电量,装机容量
             MeterVO meterInfoFDCFDLDayMonthYear = getWindStationInfo.getMeterInfoFDCFDL_DayMonthYear();
 
             HashMap<Object, Object> map = new HashMap<>();

+ 18 - 10
electricity/meter/src/main/java/com/gyee/gaia/meter/service/meter/GetLineInfoById.java

@@ -100,22 +100,36 @@ public class GetLineInfoById {
         MeterPoint oneMeterPointFDLMonth = meterPointService.getOne(new QueryWrapper<MeterPoint>().eq("line_id", nemCode).eq("property", "JSD_LINEFDL_MONTH"));
         MeterPoint oneMeterPointFDLYear = meterPointService.getOne(new QueryWrapper<MeterPoint>().eq("line_id", nemCode).eq("property", "JSD_LINEFDL_YEAR"));
 
-        //根据时间和code查询风场日发电量,日上网电量
+        //装机容量
+        List<Line> lineCapacity = lineService.list(new QueryWrapper<Line>().eq("nem_code", nemCode));
+        //遍历集合
+        BigDecimal zjrl = BigDecimal.valueOf(0);
+        if (null != lineCapacity) {
+            for (Line line1 : lineCapacity) {
+                zjrl = zjrl.add(line1.getCapacity());
+            }
+        }
 
+        //根据时间和code查询风场日发电量,日上网电量
         BigDecimal rfdl = BigDecimal.valueOf(0);
         BigDecimal yfdl = BigDecimal.valueOf(0);
         BigDecimal nfdl = BigDecimal.valueOf(0);
+        BigDecimal ylyxs = BigDecimal.valueOf(0);
+        BigDecimal nlyxs = BigDecimal.valueOf(0);
 
         if(null!=oneMeterPointFDL){
             MeterInfoBottomcode dayFDL = meterInfoBottomcodeService.getOne(new QueryWrapper<MeterInfoBottomcode>().eq("code", oneMeterPointFDL.getNemCode()).eq("start_time", beginOfDay));
             if (dayFDL != null) {
                 rfdl = dayFDL.getDayValue();
+                ylyxs=yfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
             }
         }
         if(null!=oneMeterPointFDL){
             MeterInfoCalculating monthFDL = meterInfoCalculatingService.getOne(new QueryWrapper<MeterInfoCalculating>().eq("code", oneMeterPointFDLMonth.getNemCode()).eq("date", beginOfMonth));
             if (monthFDL != null) {
                 yfdl = monthFDL.getValue();
+                nlyxs=yfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
+
             }
         }
         if(null!=oneMeterPointFDL){
@@ -125,15 +139,7 @@ public class GetLineInfoById {
             }
         }
 
-        //装机容量
-        List<Line> lineCapacity = lineService.list(new QueryWrapper<Line>().eq("nem_code", nemCode));
-        //遍历集合
-        BigDecimal zjrl = BigDecimal.valueOf(0);
-        if (null != lineCapacity) {
-            for (Line line1 : lineCapacity) {
-                zjrl = zjrl.add(line1.getCapacity());
-            }
-        }
+
 
 
         MeterVO meterVO = new MeterVO();
@@ -142,6 +148,8 @@ public class GetLineInfoById {
         meterVO.setNfdl(nfdl);
         meterVO.setSwdl(BigDecimal.valueOf(0));
         meterVO.setZjrl(zjrl.divide(BigDecimal.valueOf(10000),2, RoundingMode.HALF_EVEN));
+        meterVO.setYlyxs(ylyxs);
+        meterVO.setNlyxs(nlyxs);
         return meterVO;
 
     }

+ 6 - 0
electricity/meter/src/main/java/com/gyee/gaia/meter/service/meter/GetPowerStationInfoById.java

@@ -119,15 +119,19 @@ public class GetPowerStationInfoById {
         BigDecimal yfdl = BigDecimal.valueOf(0);
         BigDecimal nfdl = BigDecimal.valueOf(0);
         BigDecimal rswdl = BigDecimal.valueOf(0);
+        BigDecimal ylyxs = BigDecimal.valueOf(0);
+        BigDecimal nlyxs = BigDecimal.valueOf(0);
 
         if (dayFDL != null) {
             rfdl = dayFDL.getValue();
         }
         if (monthFDL != null) {
             yfdl = monthFDL.getValue();
+            ylyxs=yfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
         }
         if (yearFDL != null) {
             nfdl = yearFDL.getValue();
+            nlyxs=nfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
         }
         if (oneSWDL != null) {
             rswdl = oneSWDL.getValue();
@@ -140,6 +144,8 @@ public class GetPowerStationInfoById {
         meterVO.setNfdl(nfdl);
         meterVO.setSwdl(rswdl);
         meterVO.setZjrl(zjrl);
+        meterVO.setYlyxs(ylyxs);
+        meterVO.setNlyxs(nlyxs);
         return meterVO;
 
     }

+ 6 - 0
electricity/meter/src/main/java/com/gyee/gaia/meter/service/meter/GetProjectInfoById.java

@@ -141,15 +141,19 @@ public class GetProjectInfoById {
         BigDecimal yfdl = BigDecimal.valueOf(0);
         BigDecimal nfdl = BigDecimal.valueOf(0);
         BigDecimal rswdl = BigDecimal.valueOf(0);
+        BigDecimal ylyxs = BigDecimal.valueOf(0);
+        BigDecimal nlyxs = BigDecimal.valueOf(0);
 
         if (dayFDL != null) {
             rfdl = dayFDL.getValue();
         }
         if (monthFDL != null) {
             yfdl = monthFDL.getValue();
+            ylyxs=yfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
         }
         if (yearFDL != null) {
             nfdl = yearFDL.getValue();
+            nlyxs=nfdl.multiply(BigDecimal.valueOf(10)).divide(zjrl, 2,RoundingMode.HALF_EVEN);
         }
         if (oneSWDL != null) {
             rswdl = oneSWDL.getValue();
@@ -162,6 +166,8 @@ public class GetProjectInfoById {
         meterVO.setNfdl(nfdl);
         meterVO.setSwdl(rswdl);
         meterVO.setZjrl(zjrl.divide(BigDecimal.valueOf(10000), 2,RoundingMode.HALF_EVEN));
+        meterVO.setYlyxs(ylyxs);
+        meterVO.setNlyxs(nlyxs);
         return meterVO;
 
     }

+ 6 - 6
electricity/meter/src/main/java/com/gyee/gaia/meter/service/meter/GetWindStationInfo.java

@@ -127,11 +127,11 @@ public class GetWindStationInfo {
         }
         if (monthFDL != null) {
             yfdl = monthFDL.getValue();
-            ylyxs=yfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            ylyxs=yfdl.divide(BigDecimal.valueOf(66.4), 2, RoundingMode.HALF_EVEN);
         }
         if (yearFDL != null) {
             nfdl = yearFDL.getValue();
-            nlyxs=nfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            nlyxs=nfdl.divide(BigDecimal.valueOf(66.4), 2, RoundingMode.HALF_EVEN);
         }
         if (oneSWDL != null) {
             rswdl = oneSWDL.getValue();
@@ -247,11 +247,11 @@ public class GetWindStationInfo {
         }
         if (monthFDL != null) {
             yfdl = monthFDL.getValue();
-            ylyxs=yfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            ylyxs=yfdl.divide(BigDecimal.valueOf(12.256), 2, RoundingMode.HALF_EVEN);
         }
         if (yearFDL != null) {
             nfdl = yearFDL.getValue();
-            nlyxs=nfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            nlyxs=nfdl.divide(BigDecimal.valueOf(12.256), 2, RoundingMode.HALF_EVEN);
         }
         if (oneSWDL != null) {
             rswdl = oneSWDL.getValue();
@@ -380,11 +380,11 @@ public class GetWindStationInfo {
         }
         if (monthFDL != null && monthFDL_FDC != null) {
             yfdl = monthFDL.getValue().add(monthFDL_FDC.getValue());
-            ylyxs=yfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            ylyxs=yfdl.divide(BigDecimal.valueOf(78.656), 2, RoundingMode.HALF_EVEN);
         }
         if (yearFDL != null && yearFDL_FDC != null) {
             nfdl = yearFDL.getValue().add(yearFDL_FDC.getValue());
-            nlyxs=nfdl.divide(BigDecimal.valueOf(664), 1, RoundingMode.HALF_EVEN);
+            nlyxs=nfdl.divide(BigDecimal.valueOf(78.656), 2, RoundingMode.HALF_EVEN);
         }
         if (oneSWDL != null && oneSWDL_FDC != null) {
             rswdl = oneSWDL.getValue().add(oneSWDL_FDC.getValue());