ソースを参照

单机性能分析优化

wangb 1 日 前
コミット
0aa3477c6d

+ 284 - 15
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/WtAlysisDayService.java

@@ -15,6 +15,8 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.ZoneId;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
@@ -73,20 +75,58 @@ public class WtAlysisDayService {
 
             pageInfo.getRecords().forEach(rsl -> {
                 TurbineInfoDay day = dayMap.get(rsl.getRecordDate());
-                rsl.setRfdl(NumberUtil.round(day.getRfdl() / 1000,2).doubleValue());
-                double yfdl = calFdl(rsl.getWindturbineId(), "month", rsl.getRecordDate());
-                rsl.setYfdl(NumberUtil.round(yfdl / 1000,2).doubleValue());
-                double nfdl = calFdl(rsl.getWindturbineId(), "year", rsl.getRecordDate());
-                rsl.setNfdl(NumberUtil.round(nfdl / 1000,2).doubleValue());
-                rsl.setRpjfs(NumberUtil.round(day.getPjfs(),2).doubleValue());
+                Calendar calendar = Calendar.getInstance();
+                rsl.setRfdl(NumberUtil.round(day.getRfdl() / 1000, 2).doubleValue());
+                double yfdl = calFdl(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYfdl(NumberUtil.round(yfdl / 1000, 2).doubleValue());
+                double nfdl = calFdl(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNfdl(NumberUtil.round(nfdl / 1000, 2).doubleValue());
+                rsl.setRpjfs(NumberUtil.round(day.getPjfs(), 2).doubleValue());
+                double ypjfs = calPjfs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYpjfs(NumberUtil.round(ypjfs, 2).doubleValue());
+                double npjfs = calPjfs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNpjfs(NumberUtil.round(npjfs, 2).doubleValue());
                 double v = day.getGzss() + day.getJhjxss() + day.getXdss() + day.getXnss() + day.getSlss();
-                rsl.setRssdl(NumberUtil.round(v / 1000,2).doubleValue());
-                rsl.setRgzxs(NumberUtil.round(day.getGzMin() / 60,2).doubleValue());
-                rsl.setRjxxs(NumberUtil.round(day.getJxMin() / 60,2).doubleValue());
-                rsl.setRyxxs(NumberUtil.round(day.getYxMin() / 60,2).doubleValue());
-                rsl.setRyfdl(NumberUtil.round(rsl.getRyfdl() /1000,2).doubleValue());
-                rsl.setYyfdl(NumberUtil.round(rsl.getYyfdl() /1000,2).doubleValue());
-                rsl.setNyfdl(NumberUtil.round(rsl.getNyfdl() /1000,2).doubleValue());
+                rsl.setRssdl(NumberUtil.round(v / 1000, 2).doubleValue());
+                double yssdl = calSsdl(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYssdl(NumberUtil.round(yssdl / 1000, 2).doubleValue());
+                double nssdl = calSsdl(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNssdl(NumberUtil.round(nssdl / 1000, 2).doubleValue());
+                rsl.setRgzxs(NumberUtil.round(day.getGzMin() / 60, 2).doubleValue());
+                double ygzxs = calGzxs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYgzxs(NumberUtil.round(ygzxs / 60, 2).doubleValue());
+                double ngzxs = calGzxs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNgzxs(NumberUtil.round(ngzxs / 60, 2).doubleValue());
+                rsl.setRjxxs(NumberUtil.round(day.getJxMin() / 60, 2).doubleValue());
+                double yjxxs = calJxxs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYjxxs(NumberUtil.round(yjxxs / 60, 2).doubleValue());
+                double njxxs = calJxxs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNjxxs(NumberUtil.round(njxxs / 60, 2).doubleValue());
+                rsl.setRyxxs(NumberUtil.round(day.getYxMin() / 60, 2).doubleValue());
+                double yyxxs = calYxxs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYyxxs(NumberUtil.round(yyxxs / 60, 2).doubleValue());
+                double nyxxs = calYxxs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNyxxs(NumberUtil.round(nyxxs / 60, 2).doubleValue());
+                rsl.setRdjxs(NumberUtil.round(day.getDjMin() / 60, 2).doubleValue());
+                double ydjxs = calDjxs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYdjxs(NumberUtil.round(ydjxs / 60, 2).doubleValue());
+                double ndjxs = calDjxs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNdjxs(NumberUtil.round(ndjxs / 60, 2).doubleValue());
+                rsl.setRtjcs(NumberUtil.round(day.getTjcs(), 2).doubleValue());
+                double ytjcs = calTjcs(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYtjcs(NumberUtil.round(ytjcs, 2).doubleValue());
+                double ntjcs = calTjcs(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNtjcs(NumberUtil.round(ntjcs, 2).doubleValue());
+                rsl.setRsbklyl(NumberUtil.round(day.getKlyl(), 2).doubleValue());
+                double ysbklyl = calSbklyl(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYsbklyl(NumberUtil.round(ysbklyl, 2).doubleValue());
+                double nsbklyl = calSbklyl(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNsbklyl(NumberUtil.round(nsbklyl, 2).doubleValue());
+                rsl.setRpjwd(NumberUtil.round(day.getHjwd(), 2).doubleValue());
+                double ypjwd = calPjwd(rsl.getWindturbineId(), "month", rsl.getRecordDate(), calendar);
+                rsl.setYpjwd(NumberUtil.round(ypjwd, 2).doubleValue());
+                double npjwd = calPjwd(rsl.getWindturbineId(), "year", rsl.getRecordDate(), calendar);
+                rsl.setNpjwd(NumberUtil.round(npjwd, 2).doubleValue());
             });
 
         }
@@ -94,9 +134,93 @@ public class WtAlysisDayService {
         return pageInfo;
     }
 
+    public double calSsdl(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(gzss) AS gzss,SUM(jhjxss) AS jhjxss,SUM(xdss) AS xdss,SUM(xnss) AS xnss,SUM(slss) AS slss")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        TurbineInfoDay tur = monthData.get(0);
+        return tur.getGzss() + tur.getJhjxss() + tur.getXnss() + tur.getSlss() + tur.getXdss();
+    }
+
+
+    public double calPjwd(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        LocalDate localDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+        int d = 0;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfMonth();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfYear();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(hjwd) AS hjwd")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        if (d != 0) {
+            return monthData.get(0).getHjwd() / (d);
+        } else {
+            return monthData.get(0).getHjwd();
+        }
+    }
+
+
+    public double calSbklyl(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        LocalDate localDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+        int d = 0;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfMonth();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfYear();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(klyl) AS klyl")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        if (d != 0) {
+            return monthData.get(0).getKlyl() / (d);
+        } else {
+            return monthData.get(0).getKlyl();
+        }
+    }
 
-    public double calFdl(String windturbineId, String type, Date endDate) {
-        Calendar calendar = Calendar.getInstance();
+
+    public double calTjcs(String windturbineId, String type, Date endDate, Calendar calendar) {
         calendar.setTime(endDate);
         Date firstDay = null;
         if ("month".equals(type)) {
@@ -104,8 +228,153 @@ public class WtAlysisDayService {
             firstDay = calendar.getTime();
         } else if ("year".equals(type)) {
             calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(tjcs) AS tjcs")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        return monthData.get(0).getTjcs();
+    }
+
+
+    public double calDjxs(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
             calendar.set(Calendar.DAY_OF_MONTH, 1);
             firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(dj_min) AS dj_min")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        return monthData.get(0).getDjMin();
+    }
+
+
+    public double calYxxs(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(yx_min) AS yx_min")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        return monthData.get(0).getYxMin();
+    }
+
+
+    public double calJxxs(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(jx_min) AS jx_min")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        return monthData.get(0).getJxMin();
+    }
+
+    public double calGzxs(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(gz_min) AS gz_min")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        return monthData.get(0).getGzMin();
+    }
+
+    public double calPjfs(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        LocalDate localDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+        int d = 0;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfMonth();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
+            d = localDate.getDayOfYear();
+        }
+        QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
+        currentqw.select("station_id,MAX(record_date) AS record_date,SUM(pjfs) AS pjfs")
+                .ge("record_date", firstDay)
+                .le("record_date", endDate)
+                .eq("turbine_id", windturbineId)
+                .like("station_id", "_FDC_")
+                .groupBy("station_id");
+        List<TurbineInfoDay> monthData = turbineInfoDayService.list(currentqw);
+        if (d != 0) {
+            return monthData.get(0).getPjfs() / (d);
+        } else {
+            return monthData.get(0).getPjfs();
+        }
+
+    }
+
+
+    public double calFdl(String windturbineId, String type, Date endDate, Calendar calendar) {
+        calendar.setTime(endDate);
+        Date firstDay = null;
+        if ("month".equals(type)) {
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            firstDay = calendar.getTime();
+        } else if ("year".equals(type)) {
+            calendar.set(Calendar.MONTH, 0);
+            calendar.set(Calendar.DAY_OF_YEAR, 1);
+            firstDay = calendar.getTime();
         }
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,MAX(record_date) AS record_date,SUM(rfdl) AS rfdl")

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

@@ -1612,14 +1612,14 @@ public class SpecificService {
         QueryWrapper<StationInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(rfdl_fj) rfdl_fj");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
 
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<StationInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(rfdl_fj) rfdl_fj");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> sameperiodList = iStationInfoDayService.list(sameperiodqw);
@@ -1641,7 +1641,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() + 1)).findFirst();
 
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
@@ -1864,7 +1864,7 @@ public class SpecificService {
         QueryWrapper<StationInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(zhcydl) zhcydl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
         currentqw.clear();
@@ -1872,7 +1872,7 @@ public class SpecificService {
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<StationInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(zhcydl) zhcydl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> sameperiodList = iStationInfoDayService.list(sameperiodqw);
@@ -1895,7 +1895,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() + 1)).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getZhcydl().doubleValue() / 1000, 2));
@@ -2119,7 +2119,7 @@ public class SpecificService {
         QueryWrapper<StationInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(gwdl) gwdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
         currentqw.clear();
@@ -2127,7 +2127,7 @@ public class SpecificService {
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<StationInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(gwdl) gwdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> sameperiodList = iStationInfoDayService.list(sameperiodqw);
@@ -2150,7 +2150,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() + 1)).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getGwdl().doubleValue() / 1000, 2));
@@ -2375,7 +2375,7 @@ public class SpecificService {
         QueryWrapper<StationInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(swdl) swdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
         currentqw.clear();
@@ -2383,7 +2383,7 @@ public class SpecificService {
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<StationInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(swdl) swdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<StationInfoDay> sameperiodList = iStationInfoDayService.list(sameperiodqw);
@@ -2406,7 +2406,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() + 1)).findFirst();
             if (optional.isPresent()) {
                 StationInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getSwdl().doubleValue() / 1000, 2));
@@ -2452,7 +2452,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
                         vo1.setYear(Integer.parseInt(year));
                         vo1.setMonth(x);
                         tempList.add(vo1);
@@ -2648,22 +2648,14 @@ public class SpecificService {
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(lyxs) lyxs");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-        if (type.equals("-1")) {
-            currentqw.like("station_id", "_FDC_");
-        } else {
-            currentqw.like("station_id", "_GDC_");
-        }
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
 
         int subYear = Integer.parseInt(year);
         QueryWrapper<TurbineInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(lyxs) lyxs");
-        if (type.equals("-1")) {
-            currentqw.like("station_id", "_FDC_");
-        } else {
-            currentqw.like("station_id", "_GDC_");
-        }
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear - 1));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> sameperiodList = iTurbineInfoDayService.list(sameperiodqw);
@@ -2678,7 +2670,7 @@ public class SpecificService {
             vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
             vo.setYear(DateUtils.getYear(i.getRecordDate()));
             vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
-            vo.setCurrent(i.getLyxs() / 50);
+            vo.setCurrent(NumberUtil.round(i.getLyxs() / 50, 2).doubleValue());
             resultList.add(vo);
         });
         resultList.stream().forEach(i -> {
@@ -2689,7 +2681,7 @@ public class SpecificService {
 
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();
-                i.setSameperiod(tqinfoday.getLyxs() / 50);
+                i.setSameperiod(NumberUtil.round(tqinfoday.getLyxs() / 50, 2).doubleValue());
                 i.setCompare(i.getCurrent().compareTo(i.getSameperiod()));
             } else {
                 i.setSameperiod(0.0);
@@ -3077,7 +3069,7 @@ public class SpecificService {
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(gzss) gzss,sum(llfdl) llfdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
         currentqw.clear();
@@ -3085,7 +3077,7 @@ public class SpecificService {
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<TurbineInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(gzss) gzss,sum(llfdl) llfdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> sameperiodList = iTurbineInfoDayService.list(sameperiodqw);
@@ -3113,7 +3105,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<TurbineInfoDay> optional = sameperiodList.stream()
-                    .filter(j->i.getMonth().equals(j.getRecordDate().getMonth()+1))
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth() + 1))
                     .findFirst();
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();
@@ -3343,14 +3335,14 @@ public class SpecificService {
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(jhjxss) jhjxss,sum(fjhjxss) fjhjxss,sum(llfdl) llfdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
 
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<TurbineInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(jhjxss) jhjxss,sum(fjhjxss) fjhjxss,sum(llfdl) llfdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> sameperiodList = iTurbineInfoDayService.list(sameperiodqw);
@@ -3377,13 +3369,13 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<TurbineInfoDay> optional = sameperiodList.stream()
-                    .filter(j->i.getMonth().equals(j.getRecordDate().getMonth()+1))
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth() + 1))
                     .findFirst();
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();
 
                 double llfdl = tqinfoday.getLlfdl() != null ? tqinfoday.getLlfdl() : 0.0;
-                double rfdl = tqinfoday.getJhjxss() != null ? tqinfoday.getJhjxss() + tqinfoday.getFjhjxss().doubleValue() : 0.0;
+                double rfdl = tqinfoday.getJhjxss() != null ? tqinfoday.getJhjxss() + tqinfoday.getFjhjxss() : 0.0;
                 if (llfdl != 0) {
                     Double calculatedValue = DoubleUtils.keepPrecision(rfdl / llfdl * 100, 2);
                     i.setSameperiod(calculatedValue);
@@ -3607,14 +3599,14 @@ public class SpecificService {
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(xdss) xdss,sum(llfdl) llfdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
 
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<TurbineInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(xdss) xdss,sum(llfdl) llfdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> sameperiodList = iTurbineInfoDayService.list(sameperiodqw);
@@ -3642,7 +3634,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<TurbineInfoDay> optional = sameperiodList.stream()
-                    .filter(j->i.getMonth().equals(j.getRecordDate().getMonth()+1))
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth() + 1))
                     .findFirst();
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();
@@ -3908,7 +3900,7 @@ public class SpecificService {
 
         //添加同期数据
         resultList.stream().forEach(i -> {
-            Optional<TurbineInfoDay> optional = sameperiodList.stream().filter(j->i.getMonth().equals(j.getRecordDate().getMonth()+1)).findFirst();
+            Optional<TurbineInfoDay> optional = sameperiodList.stream().filter(j -> i.getMonth().equals(j.getRecordDate().getMonth() + 1)).findFirst();
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();
                 i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getLlfdl() != 0 ? (tqinfoday.getXnss()) / tqinfoday.getLlfdl() * 100 : 0, 2));
@@ -4139,7 +4131,7 @@ public class SpecificService {
         QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
         currentqw.select("station_id,max(record_date) record_date,sum(slss) slss,sum(llfdl) llfdl");
         currentqw.eq("to_char(record_date,'yyyy')", year);
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
         currentqw.clear();
@@ -4147,7 +4139,7 @@ public class SpecificService {
         int subYear = Integer.parseInt(year) - 1;
         QueryWrapper<TurbineInfoDay> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("station_id,max(record_date) record_date,sum(slss) slss,sum(llfdl) llfdl");
-            currentqw.like("station_id", "_FDC_");
+        currentqw.like("station_id", "_FDC_");
         sameperiodqw.eq("to_char(record_date,'yyyy')", String.valueOf(subYear));
         sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
         List<TurbineInfoDay> sameperiodList = iTurbineInfoDayService.list(sameperiodqw);
@@ -4176,7 +4168,7 @@ public class SpecificService {
         });
         resultList.stream().forEach(i -> {
             Optional<TurbineInfoDay> optional = sameperiodList.stream()
-                    .filter(j->i.getMonth().equals(j.getRecordDate().getMonth()+1))
+                    .filter(j -> i.getMonth().equals(j.getRecordDate().getMonth() + 1))
                     .findFirst();
             if (optional.isPresent()) {
                 TurbineInfoDay tqinfoday = optional.get();