wangb 1 year atrás
parent
commit
962930e7c8

+ 20 - 23
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/controller/goodness/StationAnalysisController.java

@@ -47,14 +47,13 @@ public class StationAnalysisController {
                             @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());
+        try {
+            Map<String, List<StationAnalysis>> resultList = windturbinegoodnessService.stationAnalysis(companys, type, wpid, beginDate, endDate, target, sort);
+            if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
+        } catch (Exception e) {
+            e.printStackTrace();
         }
+        return R.error(ResultMsg.error());
     }
 
     @GetMapping("/analysis")
@@ -65,15 +64,14 @@ public class StationAnalysisController {
                             @RequestParam(value = "month", required = true) String month,
                             @RequestParam(value = "target", required = false) String target,
                             @RequestParam(value = "sort", required = false) String sort
-    ) throws Exception {
-
-        Map<String, List<String>> resultList = economyAnalysisService.getReport(wpid, year, month, target, sort);
-
-        if (StringUtils.isNotNull(resultList)) {
-            return R.data(ResultMsg.ok(resultList));
-        } else {
-            return R.error(ResultMsg.error());
+    ) {
+        try {
+            Map<String, List<String>> resultList = economyAnalysisService.getReport(wpid, year, month, target, sort);
+            if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
+        } catch (Exception e) {
+            e.printStackTrace();
         }
+        return R.error(ResultMsg.error());
     }
 
     /**
@@ -90,15 +88,14 @@ public class StationAnalysisController {
                               @RequestParam(value = "target", required = false) String target,
                               @RequestParam(value = "sort", required = false) String sort
 
-    ) throws Exception {
-
-        Page<InverterAnalysis> resultList = windturbinegoodnessService.inverterAnalysis(companys, type, wpid, pageSize, pageNum, target, sort);
-
-        if (com.gyee.common.model.StringUtils.isNotNull(resultList)) {
-            return R.data(ResultMsg.ok(resultList));
-        } else {
-            return R.error(ResultMsg.error());
+    ) {
+        try {
+            Page<InverterAnalysis> resultList = windturbinegoodnessService.inverterAnalysis(companys, type, wpid, pageSize, pageNum, target, sort);
+            if (StringUtils.isNotNull(resultList)) return R.data(ResultMsg.ok(resultList));
+        } catch (Exception e) {
+            e.printStackTrace();
         }
+        return R.error(ResultMsg.error());
     }
 
 

+ 1 - 1
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconEquipmentInfoDayTopServiceImpl.java

@@ -68,7 +68,7 @@ public class ProEconEquipmentInfoDayTopServiceImpl extends ServiceImpl<ProEconEq
         List<ProEconEquipmentInfoDayTop> list = baseMapper.selectList(qw);
         list.forEach(i->{
             if (CacheContext.wtmap != null && CacheContext.wtmap.containsKey(i.getWindturbineId())) {
-                i.setNemCode(CacheContext.wtmap.get(i.getWindturbineId()).getNemName());
+                i.setNemCode(CacheContext.wtmap.get(i.getWindturbineId()).getAname());
             }
         });
 

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

@@ -946,15 +946,15 @@ public class WindturbinegoodnessService {
             SortUtils.sort(resultList, target, SortUtils.DESC);
         }
 
-        List<PvVo> collect = resultList.stream().filter(wv -> {
+        /*List<PvVo> collect = resultList.stream().filter(wv -> {
             boolean b = false;
             if (com.gyee.common.model.StringUtils.isNotEmpty(wv.getWtname())) {
                 b = wv.getWtname().contains("逆变器") || wv.getWtname().contains("风机");
             }
             return b;
-        }).collect(Collectors.toList());
+        }).collect(Collectors.toList());*/
 
-        pvVoPage.setRecords(collect);
+        pvVoPage.setRecords(resultList);
         pvVoPage.setTotal(equipmentInfoDay6s.getTotal());
         pvVoPage.setPages(equipmentInfoDay6s.getPages());
         pvVoPage.setCurrent(equipmentInfoDay6s.getCurrent());