Procházet zdrojové kódy

短期单点偏差去掉绝对值,首页盒须图增加预测类型判断(超短期无单点偏差)

fanxiaoyu před 3 měsíci
rodič
revize
06dbca3cb3

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/accuracy/impl/CalculateForecastPowerShortTermRegulationImpl.java

@@ -141,12 +141,12 @@ public class CalculateForecastPowerShortTermRegulationImpl implements CalculateI
                                     BigDecimal valueNoAbs = subtract.divide(electricField.getCapacity(), 4, BigDecimal.ROUND_DOWN);
                                     // 单点偏差
                                     ShortTermSinglePointDeviation shortTermSinglePointDeviation = new ShortTermSinglePointDeviation();
-                                    shortTermSinglePointDeviation.setDeviation(value.multiply(new BigDecimal(100)));
+                                    shortTermSinglePointDeviation.setDeviation(valueNoAbs.multiply(new BigDecimal(100)));
                                     shortTermSinglePointDeviation.setStationCode(stationCode);
                                     shortTermSinglePointDeviation.setTime(finalTime);
                                     shortTermSinglePointDeviation.setForecastHowLongAgo(ago);
                                     shortTermSinglePointDeviationList.add(shortTermSinglePointDeviation);
-                                    values.add(valueNoAbs);
+                                    values.add(value);
                                 }
                             }
 

+ 1 - 1
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerShortTermRegulationServiceImpl.java

@@ -39,7 +39,7 @@ public class ForecastPowerShortTermRegulationServiceImpl extends ServiceImpl<For
         if (startTime != null && endTime != null) {
             wrapper.between("time", startTime, endTime);
         }
-        wrapper.eq("forecast_how_long_ago", howLongAgo);
+//        wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
     }
 

+ 14 - 6
cpp-ui/src/views/statistics/stationAccuracy/index.vue

@@ -277,14 +277,22 @@ export default {
         "endTime": endTime,
         "ago": this.ago
       }
-      this.$axios.get('/shortTermSinglePointDeviation/getBoxNeed', {params: queryParams}).then(response => {
-        this.chartData.boxplotData = response.data.result
-        this.chartData.scatterData = response.data.abnormalList
-        this.chartData.xData = response.data.time
+      if (this.forecastType === 'dq') {
+        this.$axios.get('/shortTermSinglePointDeviation/getBoxNeed', {params: queryParams}).then(response => {
+          this.chartData.boxplotData = response.data.result
+          this.chartData.scatterData = response.data.abnormalList
+          this.chartData.xData = response.data.time
+          this.pcChart = echarts.init(document.getElementById('pcCharts'), 'dark')
+          this.setOptions(this.chartData)
+          this.loading = false
+        })
+      } else {
+        this.chartData.boxplotData = null
+        this.chartData.scatterData = null
+        this.chartData.xData = null
         this.pcChart = echarts.init(document.getElementById('pcCharts'), 'dark')
         this.setOptions(this.chartData)
-        this.loading = false
-      })
+      }
     },
     getStationCode() {
       this.$axios({url: '/electricfield/all', method: 'get'}).then(response => {