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