宁檬 1 年之前
父节点
当前提交
9b447e0648

+ 53 - 0
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/controller/goodness/StationAnalysisController.java

@@ -0,0 +1,53 @@
+package com.gyee.runeconomy.controller.goodness;
+
+import com.gyee.common.model.StringUtils;
+import com.gyee.runeconomy.dto.R;
+import com.gyee.runeconomy.dto.ResultMsg;
+import com.gyee.runeconomy.dto.response.StationAnalysis;
+import com.gyee.runeconomy.service.goodness.WindturbinegoodnessService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 单机性能分析列表
+ */
+@Controller
+@RequestMapping("/economicsOperation")
+@Api(value = "单机信息总览首页",tags =  "单机信息总览首页")
+public class StationAnalysisController {
+
+    @Resource
+    private WindturbinegoodnessService windturbinegoodnessService;
+
+
+    /**
+     * 场站性能分析
+     */
+    @GetMapping("/analyse/stationAnalyse")
+    @ResponseBody
+    @ApiOperation(value = "场站性能分析", notes = "场站性能分析")
+    public R cndb(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "type",required = true) String type,
+                  @RequestParam(value = "wpid",required = true) String wpid,
+                  @RequestParam(value = "beginDate",required = true) String beginDate,
+                  @RequestParam(value = "endDate",required = true) String endDate,
+                  @RequestParam(value = "target",required = false) String target,
+                  @RequestParam(value = "sort",required = false) String sort
+    ) throws Exception {
+
+        Map<String, List<StationAnalysis>> resultList = windturbinegoodnessService.stationAnalysis(companys, type, wpid, beginDate, endDate, target, sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+}

+ 2 - 3
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbinegoodnessController.java

@@ -2,7 +2,6 @@ package com.gyee.runeconomy.controller.goodness;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.common.model.StringUtils;
-import com.gyee.common.vo.benchmark.WxsslVo;
 import com.gyee.common.vo.threerate.PvVo;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
@@ -167,8 +166,8 @@ public class WindturbinegoodnessController {
                   @RequestParam(value = "wpid",required = true) String wpid,
                   @RequestParam(value = "beginDate",required = true) String beginDate,
                   @RequestParam(value = "endDate",required = true) String endDate,
-                  @RequestParam(value = "target",required = true) String target,
-                  @RequestParam(value = "sort",required = true) String sort
+                  @RequestParam(value = "target",required = false) String target,
+                  @RequestParam(value = "sort",required = false) String sort
     ) throws Exception {
 
 

+ 2 - 2
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -1045,9 +1045,9 @@ public class WindturbinegoodnessService {
 
         List<PointData> historyEmilDatas = gzpd.values().stream().peek(g -> g.setPointValueInDouble(g.getPointValueInDouble() / finalI)).collect(Collectors.toList());
         Map<Long, PointData> collect1 = historyEmilDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
-        List<PointData> historySszglDatas = edosUtil.getHistoryDatasSnap(sszgl, Long.valueOf(beginDate), Long.valueOf(endDate), null, 15000L);
+        List<PointData> historySszglDatas = edosUtil.getHistoryDatasSnap(sszgl, Long.valueOf(beginDate), Long.valueOf(endDate), null, 900L);
         Map<Long, PointData> collect2 = historySszglDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
-        List<PointData> historySsznhglzsDatas = edosUtil.getHistoryDatasSnap(ssznhglzs, Long.valueOf(beginDate), Long.valueOf(endDate), null, 15000L);
+        List<PointData> historySsznhglzsDatas = edosUtil.getHistoryDatasSnap(ssznhglzs, Long.valueOf(beginDate), Long.valueOf(endDate), null, 900L);
         Map<Long, PointData> collect3 = historySsznhglzsDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
 
         List<StationAnalysis> lpds = new ArrayList<>();