wangb пре 3 дана
родитељ
комит
e3ad1c45f8

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

@@ -405,7 +405,7 @@ public class ComprehensiveelectricityService {
                 //添加各指标
                 ComprehensiveVo vo = new ComprehensiveVo();
 
-                if (i > currentMonth) {
+                if (i > currentMonth && currentyear == dqnf) {
                     vo.setHours(i);
                     vo.setSjdl(0.0);
                     vo.setSjdltb(0.0);

+ 6 - 6
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -1897,7 +1897,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<StationInfoDay> optional = sameperiodList.stream()
-                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue() + 1)).findFirst();
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue())).findFirst();
 
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
@@ -2145,7 +2145,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<StationInfoDay> optional = sameperiodList.stream()
-                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue() + 1)).findFirst();
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue())).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getZhcydl().doubleValue() / 1000, 2));
@@ -2394,7 +2394,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<StationInfoDay> optional = sameperiodList.stream()
-                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue() + 1)).findFirst();
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue())).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getGwdl().doubleValue() / 1000, 2));
@@ -2643,7 +2643,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<StationInfoDay> optional = sameperiodList.stream()
-                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue() + 1)).findFirst();
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth().getValue())).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getSwdl().doubleValue() / 1000, 2));
@@ -5275,14 +5275,14 @@ public class SpecificService {
                 .filter(item -> {
                     Date date = item.getRecordDate();
                     return date != null
-                            && DateUtil.year(date) == DateUtil.thisYear();
+                            && DateUtil.year(date) == Integer.parseInt(year);
                 })
                 .collect(Collectors.toList());
         List<StationInfoMonth> samePeriodList = list.stream()
                 .filter(item -> {
                     Date date = item.getRecordDate();
                     return date != null
-                            && DateUtil.year(date) == DateUtil.thisYear() - 1;
+                            && DateUtil.year(date) == Integer.parseInt(year) - 1;
                 })
                 .collect(Collectors.toList());
         currentList.forEach(i -> {