wangb vor 4 Wochen
Ursprung
Commit
198a13a04b

+ 1 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineGoodnessDetailController.java

@@ -116,6 +116,7 @@ public class WindturbineGoodnessDetailController {
                 wtday.setYzdxs(NumberUtil.round(ytb.getLxMin() / 60, 2).doubleValue());
                 wtday.setYyxfs(NumberUtil.round(ytb.getYxfss(), 2).doubleValue());
                 wtday.setYtjcs(NumberUtil.round(ytb.getTjcs(), 2).doubleValue());
+                wtday.setYsbklyl(NumberUtil.round(ytb.getKlyl(), 2).doubleValue());
                 wtday.setNfdl(NumberUtil.round(ntb.getRfdl() / 1000, 2).doubleValue());
                 wtday.setNyfdl(NumberUtil.round(ntb.getLlfdl() / 1000, 2).doubleValue());
                 wtday.setNpjfs(NumberUtil.round(ntb.getPjfs(), 2).doubleValue());

+ 10 - 4
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/Comprehensive/ComprehensiveelectricityService.java

@@ -1,6 +1,7 @@
 package com.gyee.runeconomy.service.Comprehensive;
 
 
+import cn.hutool.core.util.NumberUtil;
 import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.DateUtils;
@@ -464,11 +465,14 @@ public class ComprehensiveelectricityService {
 
                         //综合场用电率计算 —— 综合场用电率=(发电量-上网电量+购网电量)/发电量
                         if (sjdl != 0) {
-                            zhcydll = (sjdl - swdl + gwdl) / sjdl;
+//                            zhcydll = (sjdl - swdl + gwdl) / sjdl;
+                            zhcydll = zhcydl / sjdl;
                         } else {
-                            zhcydll = (sjdl - swdl + gwdl) / 1;
+//                            zhcydll = (sjdl - swdl + gwdl) / 1;
+                            zhcydll = 0;
                         }
-                        zhcydllsum += zhcydll;
+//                        zhcydllsum += zhcydll;
+                        zhcydllsum = (zhcydll + zhcydllsum) / 2;
                     }
                     if (!tbzbls.isEmpty() && tbzbls != null) {
                         zhcydltb = tbzbls.get(0).getZhcydl().doubleValue();
@@ -561,7 +565,9 @@ public class ComprehensiveelectricityService {
                     }
 
                     //添加综合厂用电率数据
-                    vo.setZhcydll(StringUtils.round(zhcydll * 100, 0));
+                    zhcydll = zhcydll * 10000;
+                    vo.setZhcydll(NumberUtil.round(zhcydll / 100, 2).doubleValue());
+//                    vo.setZhcydll(StringUtils.round(zhcydll * 100, 0));
 
                     if (zhcydlltb != 0) {
                         //                    vo.setZhcydlltb(StringUtils.round((zhcydll - zhcydlltb) / zhcydlltb * 100, 0));

+ 23 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/agc/AgcDeviateService.java

@@ -3,6 +3,7 @@ package com.gyee.runeconomy.service.agc;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.lang.TypeReference;
+import cn.hutool.core.util.NumberUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -295,7 +296,7 @@ public class AgcDeviateService {
      * @param pageSize
      * @return
      */
-    public Page<PowerLossesDTO> getAgcxd(long startTs, long endTs,int pageNum, int pageSize) {
+    public Page<PowerLossesDTO> getAgcxd(long startTs, long endTs, int pageNum, int pageSize) {
 
         LocalDateTime startDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(startTs), ZoneId.systemDefault());
         LocalDateTime endDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(endTs), ZoneId.systemDefault());
@@ -384,6 +385,27 @@ public class AgcDeviateService {
         factory.afterPropertiesSet();
         factory.resetConnection();
 
+        for (String s : map.keySet()) {
+            List<SpeedPowerAnalysis> list = map.get(s);
+            List<Double> actuatedPower = list.get(0).getActuatedPower();
+            List<Double> theoreticalPower = list.get(0).getTheoreticalPower();
+            if (null == actuatedPower || null == theoreticalPower || 0 == actuatedPower.size() || 0 == theoreticalPower.size()) {
+                return map;
+            }
+            int length = actuatedPower.size();
+            if (actuatedPower.size() != theoreticalPower.size()) {
+                length = Math.min(actuatedPower.size(), theoreticalPower.size());
+            }
+            for (int i = 0; i < length; i++) {
+                if (theoreticalPower.get(i) < actuatedPower.get(i)) {
+                    double act = 0.0;
+                    if (actuatedPower.get(i) > 0) {
+                        act = actuatedPower.get(i) * 1.001;
+                    }
+                    theoreticalPower.set(i, NumberUtil.round(act, 2).doubleValue());
+                }
+            }
+        }
         return map;
     }
 

+ 7 - 7
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/singleanalysis/SingleAnalysisService.java

@@ -1124,7 +1124,7 @@ public class SingleAnalysisService {
             QueryWrapper<ProEconEquipmentInfoDay1> queryWrapper = new QueryWrapper<>();
             queryWrapper.eq("windturbine_id", wtId).ge("record_date", beginDate)
                     .le("record_date", endDate)
-                    .orderByAsc("record_date");;
+                    .orderByAsc("record_date");
             List<ProEconEquipmentInfoDay1> wtday1ls = proEconEquipmentInfoDay1Service.list(queryWrapper);
             if (!wtday1ls.isEmpty()) {
                 for (ProEconEquipmentInfoDay1 wtday1 : wtday1ls) {
@@ -1291,16 +1291,16 @@ public class SingleAnalysisService {
         List<SingleAnalysisVo> jd = map.get("jd").stream().collect(Collectors.toList());
         ff.forEach(f -> {
             TurbineInfoDay tb = col.get(f.getRecorddate());
-            f.setFdl(NumberUtil.round(tb.getRfdl() , 2).doubleValue());
+            f.setFdl(NumberUtil.round(tb.getRfdl() /1000 , 2).doubleValue());
             f.setFs(NumberUtil.round(tb.getPjfs(), 2).doubleValue());
         });
         ws.forEach(w -> {
             TurbineInfoDay tb = col.get(w.getRecorddate());
-            w.setSlss(NumberUtil.round(tb.getSlss(), 2).doubleValue());
-            w.setXnss(NumberUtil.round(tb.getXnss(), 2).doubleValue());
-            w.setXdss(NumberUtil.round(tb.getXdss(), 2).doubleValue());
-            w.setJxss(NumberUtil.round(tb.getJhjxss(), 2).doubleValue());
-            w.setGzss(NumberUtil.round(tb.getGzss(), 2).doubleValue());
+            w.setSlss(NumberUtil.round(tb.getSlss() /1000, 2).doubleValue());
+            w.setXnss(NumberUtil.round(tb.getXnss() /1000, 2).doubleValue());
+            w.setXdss(NumberUtil.round(tb.getXdss() /1000, 2).doubleValue());
+            w.setJxss(NumberUtil.round(tb.getJhjxss() /1000, 2).doubleValue());
+            w.setGzss(NumberUtil.round(tb.getGzss() /1000, 2).doubleValue());
         });
         jd.forEach(j -> {
             TurbineInfoDay tb = col.get(j.getRecorddate());