|
@@ -1464,8 +1464,7 @@ public class MonitorService {
|
|
List<PointData> twols = edosUtil.getHistMatrix(year, twoDate.getTime() / 1000);
|
|
List<PointData> twols = edosUtil.getHistMatrix(year, twoDate.getTime() / 1000);
|
|
|
|
|
|
List<PointData> sj = new ArrayList<>();
|
|
List<PointData> sj = new ArrayList<>();
|
|
- if(!currentls.isEmpty() && !onels.isEmpty() && !twols.isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ if (!currentls.isEmpty() && !onels.isEmpty() && !twols.isEmpty()) {
|
|
sj.add(currentls.get(0));
|
|
sj.add(currentls.get(0));
|
|
sj.add(onels.get(0));
|
|
sj.add(onels.get(0));
|
|
sj.add(twols.get(0));
|
|
sj.add(twols.get(0));
|
|
@@ -1490,9 +1489,9 @@ public class MonitorService {
|
|
vo2.setHours(i); //时间戳
|
|
vo2.setHours(i); //时间戳
|
|
vo2.setName(wpId);
|
|
vo2.setName(wpId);
|
|
vos.add(vo2);
|
|
vos.add(vo2);
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- if (!sj.isEmpty() && sj.size()==3) {
|
|
|
|
|
|
+ if (!sj.isEmpty() && sj.size() == 3) {
|
|
temp0 = sj.get(0).getPointValueInDouble();
|
|
temp0 = sj.get(0).getPointValueInDouble();
|
|
temp1 = sj.get(1).getPointValueInDouble();
|
|
temp1 = sj.get(1).getPointValueInDouble();
|
|
temp2 = sj.get(2).getPointValueInDouble();
|
|
temp2 = sj.get(2).getPointValueInDouble();
|
|
@@ -1506,46 +1505,21 @@ public class MonitorService {
|
|
|
|
|
|
if (timetype.contains("month")) {
|
|
if (timetype.contains("month")) {
|
|
|
|
|
|
- int month1 = DateUtils.getMonth(new Date());///4
|
|
|
|
|
|
+ int month1 = DateUtils.getMonth(new Date());//4
|
|
DateUtils.getMonthLast(new Date());//4.30
|
|
DateUtils.getMonthLast(new Date());//4.30
|
|
Date date = DateUtils.getCurrentDate();
|
|
Date date = DateUtils.getCurrentDate();
|
|
|
|
|
|
- for(int i = month1;i > 0;i--){
|
|
|
|
|
|
+ for (int i = month1; i > 0; i--) {
|
|
|
|
|
|
PointData data = edosUtil.getSectionData(month, DateUtils.getEndOfDay(DateUtils.getMonthLast(date)).getTime());
|
|
PointData data = edosUtil.getSectionData(month, DateUtils.getEndOfDay(DateUtils.getMonthLast(date)).getTime());
|
|
PowercurveVo vo1 = new PowercurveVo();
|
|
PowercurveVo vo1 = new PowercurveVo();
|
|
- vo1.setYfdl(DoubleUtils.keepPrecision(data.getPointValueInDouble(),2));
|
|
|
|
|
|
+ vo1.setYfdl(DoubleUtils.keepPrecision(data.getPointValueInDouble(), 2));
|
|
vo1.setHours(i);
|
|
vo1.setHours(i);
|
|
vos.add(vo1);
|
|
vos.add(vo1);
|
|
- date = DateUtils.addMonths(date,-1);
|
|
|
|
|
|
+ date = DateUtils.addMonths(date, -1);
|
|
}
|
|
}
|
|
- SortUtils.sort(vos,"hours",SortUtils.ASC);
|
|
|
|
-
|
|
|
|
-// List<PointData> currentls = edosUtil.getHistMatrix(month, currentDatemonth.getTime() / 1000);
|
|
|
|
-// List<PointData> onels = edosUtil.getHistMatrix(month, oneDatemonth.getTime() / 1000);
|
|
|
|
-// List<PointData> twols = edosUtil.getHistMatrix(month, twoDatemonth.getTime() / 1000);
|
|
|
|
-
|
|
|
|
-// List<PointData> sj = new ArrayList<>();
|
|
|
|
-// if(!currentls.isEmpty() && !onels.isEmpty() && !twols.isEmpty())
|
|
|
|
-// {
|
|
|
|
-// sj.add(currentls.get(0));
|
|
|
|
-// sj.add(onels.get(0));
|
|
|
|
-// sj.add(twols.get(0));
|
|
|
|
-// }
|
|
|
|
|
|
+ SortUtils.sort(vos, "hours", SortUtils.ASC);
|
|
|
|
|
|
-//
|
|
|
|
-// double temp0 = 0;
|
|
|
|
-// double temp1 = 0;
|
|
|
|
-// double temp2 = 0;
|
|
|
|
-//
|
|
|
|
-// if (!sj.isEmpty() && sj.size()==3) {
|
|
|
|
-// temp0 = sj.get(0).getPointValueInDouble();
|
|
|
|
-// temp1 = sj.get(1).getPointValueInDouble();
|
|
|
|
-// temp2 = sj.get(2).getPointValueInDouble();
|
|
|
|
-// vos.get(0).setYfdl(StringUtils.round(temp0 / zjrl, 2));
|
|
|
|
-// vos.get(1).setYfdl(StringUtils.round(temp1 / zjrl, 2));
|
|
|
|
-// vos.get(2).setYfdl(StringUtils.round(temp2 / zjrl, 2));
|
|
|
|
-// }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1553,9 +1527,6 @@ public class MonitorService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//计划电量
|
|
//计划电量
|
|
public List<ProjectplanVo> planvalue(String wpId, String timetype) throws Exception {
|
|
public List<ProjectplanVo> planvalue(String wpId, String timetype) throws Exception {
|
|
|
|
|
|
@@ -1639,6 +1610,34 @@ public class MonitorService {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (timetype.contains("month")) {
|
|
|
|
+
|
|
|
|
+ if (!wplist.isEmpty()) {
|
|
|
|
+ int day = 0;
|
|
|
|
+ int month2 = DateUtils.getMonth(new Date());//4
|
|
|
|
+ for (int i = month2; i > 0; i--) {
|
|
|
|
+ double bnjhdlsum = 0.0;
|
|
|
|
+ double bnsjdlsum = 0.0;
|
|
|
|
+ day = i;
|
|
|
|
+ for (ProBasicPowerstation wpls : wplist) {
|
|
|
|
+ List<ProBasicProjectPlan> currentls = proBasicProjectPlanService.getmonthList(String.valueOf(day)); //本月所有集合
|
|
|
|
+ //本年所有集合
|
|
|
|
+ List<ProBasicProjectPlan> currentjh = currentls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
|
|
|
|
+ bnjhdlsum += currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum(); //本月计划电量合
|
|
|
|
+ bnsjdlsum += currentjh.stream().mapToDouble(ProBasicProjectPlan::getOutageHours).sum(); //本月实际电量合
|
|
|
|
+ }
|
|
|
|
+ ProjectplanVo vo = new ProjectplanVo();
|
|
|
|
+ vo.setJhdl(StringUtils.round(bnjhdlsum,2));
|
|
|
|
+ vo.setSjdl(StringUtils.round(bnsjdlsum,2));
|
|
|
|
+ vo.setHours(i);
|
|
|
|
+ vos.add(vo);
|
|
|
|
+ SortUtils.sort(vos, "hours", SortUtils.ASC);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return vos;
|
|
return vos;
|
|
|
|
|