|
@@ -59,7 +59,7 @@ public class AverageAndGeneratingService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 保存平均风速,平均功率,scada发电量实时计算点
|
|
|
+ * 保存最优功率,平均风速,平均功率,scada发电量,节能减排实时计算点
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void saveAvespeedAndAvepowerAndScada() throws Exception {
|
|
@@ -69,6 +69,7 @@ public class AverageAndGeneratingService {
|
|
|
wpls.stream().forEach(wp->{
|
|
|
List<Project> projects = wppromap.get(wp.getId());
|
|
|
Map<String, Windpowerstationpointnew> wppointnewmap = wppointmap.get(wp.getId());
|
|
|
+ Windpowerstationpointnew wpzyglpointnew = wppointnewmap.get(Contant.ZZYGL);
|
|
|
Windpowerstationpointnew wppointnew = wppointnewmap.get(Contant.RPJFS);
|
|
|
Windpowerstationpointnew ywppointnew = wppointnewmap.get(Contant.YPJFS);
|
|
|
Windpowerstationpointnew nwppointnew = wppointnewmap.get(Contant.NPJFS);
|
|
@@ -87,6 +88,7 @@ public class AverageAndGeneratingService {
|
|
|
List<PointData> projectavespeedList = new ArrayList<>();
|
|
|
List<PointData> yprojectavespeedList = new ArrayList<>();
|
|
|
List<PointData> nprojectavespeedList = new ArrayList<>();
|
|
|
+ List<PointData> projectzyglList = new ArrayList<>();
|
|
|
List<PointData> projectavepowerList = new ArrayList<>();
|
|
|
List<PointData> yprojectavepowerList = new ArrayList<>();
|
|
|
List<PointData> nprojectavepowerList = new ArrayList<>();
|
|
@@ -96,6 +98,8 @@ public class AverageAndGeneratingService {
|
|
|
projects.stream().forEach(project -> {
|
|
|
List<Line> lines = prolinemap.get(project.getId());
|
|
|
Map<String, Windpowerstationpointnew> projectpointnewmap = propointmap.get(project.getId());
|
|
|
+
|
|
|
+ Windpowerstationpointnew projectzyglpointnew = projectpointnewmap.get(Contant.ZZYGL);
|
|
|
Windpowerstationpointnew projectpointnew = projectpointnewmap.get(Contant.RPJFS);
|
|
|
Windpowerstationpointnew yprojectpointnew = projectpointnewmap.get(Contant.YPJFS);
|
|
|
Windpowerstationpointnew nprojectpointnew = projectpointnewmap.get(Contant.NPJFS);
|
|
@@ -116,6 +120,7 @@ public class AverageAndGeneratingService {
|
|
|
List<PointData> ylineavespeedList = new ArrayList<>();
|
|
|
List<PointData> nlineavespeedList = new ArrayList<>();
|
|
|
List<PointData> lineavepowerList = new ArrayList<>();
|
|
|
+ List<PointData> linezyglpowerList = new ArrayList<>();
|
|
|
List<PointData> ylineavepowerList = new ArrayList<>();
|
|
|
List<PointData> nlineavepowerList = new ArrayList<>();
|
|
|
List<PointData> linefdlList = new ArrayList<>();
|
|
@@ -124,6 +129,7 @@ public class AverageAndGeneratingService {
|
|
|
lines.stream().forEach(line -> {
|
|
|
List<Windturbine> windturbines = linewtmap.get(line.getId());
|
|
|
Map<String, Windpowerstationpointnew> linepointnewmap = linepointmap.get(line.getId());
|
|
|
+ Windpowerstationpointnew linezyglpointnew = linepointnewmap.get(Contant.ZZYGL);
|
|
|
Windpowerstationpointnew linepointnew = linepointnewmap.get(Contant.RPJFS);
|
|
|
Windpowerstationpointnew ylinepointnew = linepointnewmap.get(Contant.YPJFS);
|
|
|
Windpowerstationpointnew nlinepointnew = linepointnewmap.get(Contant.NPJFS);
|
|
@@ -140,6 +146,7 @@ public class AverageAndGeneratingService {
|
|
|
Windpowerstationpointnew jybmpointnew = linepointnewmap.get(Contant.JYBM);
|
|
|
Windpowerstationpointnew jyspointnew = linepointnewmap.get(Contant.JYS);
|
|
|
|
|
|
+ List<PointData> wtzygldList = new ArrayList<>();
|
|
|
List<PointData> wtavespeedList = new ArrayList<>();
|
|
|
List<PointData> ywtavespeedList = new ArrayList<>();
|
|
|
List<PointData> nwtavespeedList = new ArrayList<>();
|
|
@@ -152,6 +159,7 @@ public class AverageAndGeneratingService {
|
|
|
|
|
|
windturbines.stream().forEach(wt->{
|
|
|
Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
|
+ Windturbinetestingpointnew zyglPoint = windturbinetestingpointnewMap.get(Contant.ZZYGL);
|
|
|
Windturbinetestingpointnew aveSpeedPoint = windturbinetestingpointnewMap.get(Contant.RPJFS);
|
|
|
Windturbinetestingpointnew monthAveSpeedPoint = windturbinetestingpointnewMap.get(Contant.YPJFS);
|
|
|
Windturbinetestingpointnew yearAveSpeedPoint = windturbinetestingpointnewMap.get(Contant.NPJFS);
|
|
@@ -199,6 +207,8 @@ public class AverageAndGeneratingService {
|
|
|
|
|
|
PointData nfdlpointData = createPointData(fjnfdl, nfdl);
|
|
|
yfdlList.add(nfdlpointData);
|
|
|
+
|
|
|
+
|
|
|
//算平均风速
|
|
|
List<PointData> ssfsList = edosUtil.getHistStat(fjssfs, samedayZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
|
|
|
Optional<PointData> ssfsFirst = ssfsList.stream().findFirst();
|
|
@@ -235,6 +245,15 @@ public class AverageAndGeneratingService {
|
|
|
createWtPointData(avePowerPoint, pointData, inDouble);
|
|
|
wtavepowerList.add(pointData);
|
|
|
}
|
|
|
+ //算最优功率
|
|
|
+ List<PointData> zyglList = edosUtil.getHistStat(fjssgl, samedayZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 0);
|
|
|
+ Optional<PointData> zyglFirst = zyglList.stream().findFirst();
|
|
|
+ if (zyglFirst.isPresent()){
|
|
|
+ PointData pointData = zyglFirst.get();
|
|
|
+ double inDouble = pointData.getPointValueInDouble();
|
|
|
+ createWtPointData(zyglPoint, pointData, inDouble);
|
|
|
+ wtzygldList.add(pointData);
|
|
|
+ }
|
|
|
//算月平均功率
|
|
|
List<PointData> yssglList = edosUtil.getHistStat(fjssgl, monthFirstZero.getTime() / 1000, currentDate.getTime() / 1000, 1l, null, 2);
|
|
|
Optional<PointData> yssglFirst = yssglList.stream().findFirst();
|
|
@@ -262,6 +281,7 @@ public class AverageAndGeneratingService {
|
|
|
resultList.addAll(ywtavespeedList);
|
|
|
resultList.addAll(nwtavespeedList);
|
|
|
resultList.addAll(wtavepowerList);
|
|
|
+ resultList.addAll(wtzygldList);
|
|
|
resultList.addAll(ywtavepowerList);
|
|
|
resultList.addAll(nwtavepowerList);
|
|
|
resultList.addAll(rfdlList);
|
|
@@ -329,6 +349,10 @@ public class AverageAndGeneratingService {
|
|
|
PointData powerpointData = createWpPointData(linepowerpointnew, poweraverage);
|
|
|
lineavepowerList.add(powerpointData);
|
|
|
|
|
|
+ Double zyglrage = wtavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
+ PointData zyglpointData = createWpPointData(linezyglpointnew, zyglrage);
|
|
|
+ linezyglpowerList.add(zyglpointData);
|
|
|
+
|
|
|
Double ypoweraverage = ywtavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
PointData ypowerpointData = createWpPointData(ylinepowerpointnew, ypoweraverage);
|
|
|
ylineavepowerList.add(ypowerpointData);
|
|
@@ -353,6 +377,7 @@ public class AverageAndGeneratingService {
|
|
|
resultList.addAll(linefdlList);
|
|
|
resultList.addAll(ylinefdlList);
|
|
|
resultList.addAll(nlinefdlList);
|
|
|
+ resultList.addAll(linezyglpowerList);
|
|
|
|
|
|
//算节能减排
|
|
|
double jpeyhl = proyfdl * 0.0059;
|
|
@@ -405,10 +430,13 @@ public class AverageAndGeneratingService {
|
|
|
PointData pointData = createWpPointData(nprojectpointnew, projectspeed);
|
|
|
nprojectavespeedList.add(pointData);
|
|
|
}
|
|
|
-
|
|
|
+ Double zyglaverage = linezyglpowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
Double poweraverage = lineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
Double ypoweraverage = ylineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
Double npoweraverage = nlineavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
+ PointData zyglpointData = createWpPointData(projectzyglpointnew, zyglaverage);
|
|
|
+ projectzyglList.add(zyglpointData);
|
|
|
+
|
|
|
PointData powerpointData = createWpPointData(powerprojectpointnew, poweraverage);
|
|
|
projectavepowerList.add(powerpointData);
|
|
|
PointData ypowerpointData = createWpPointData(ypowerprojectpointnew, ypoweraverage);
|
|
@@ -487,6 +515,11 @@ public class AverageAndGeneratingService {
|
|
|
PointData powerpointData = createWpPointData(powerwppointnew, poweraverage);
|
|
|
resultList.add(powerpointData);
|
|
|
|
|
|
+ Double zyglaverage = projectzyglList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
+ resultList.addAll(projectzyglList);
|
|
|
+ PointData zyglpointData = createWpPointData(wpzyglpointnew, zyglaverage);
|
|
|
+ resultList.add(zyglpointData);
|
|
|
+
|
|
|
Double ypoweraverage = yprojectavepowerList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
|
|
|
resultList.addAll(yprojectavepowerList);
|
|
|
PointData ypowerpointData = createWpPointData(ypowerwppointnew, ypoweraverage);
|