|
@@ -1,6 +1,5 @@
|
|
|
package com.gyee.power.fitting.service.impl;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.gyee.power.fitting.common.alg.CurrentVoltageCalc;
|
|
|
import com.gyee.power.fitting.common.alg.PolynomialCurveFitting;
|
|
|
import com.gyee.power.fitting.common.config.GyeeConfig;
|
|
@@ -14,8 +13,14 @@ import com.gyee.power.fitting.common.util.PowerFittingUtil;
|
|
|
import com.gyee.power.fitting.model.*;
|
|
|
import com.gyee.power.fitting.model.anno.AnnotationTool;
|
|
|
import com.gyee.power.fitting.model.anno.FixedVo;
|
|
|
-import com.gyee.power.fitting.model.custom.*;
|
|
|
-import com.gyee.power.fitting.service.*;
|
|
|
+import com.gyee.power.fitting.model.custom.FjjxbVo;
|
|
|
+import com.gyee.power.fitting.model.custom.PhotovoltaicInfo;
|
|
|
+import com.gyee.power.fitting.model.custom.TableTitle;
|
|
|
+import com.gyee.power.fitting.model.custom.TsDoubleData;
|
|
|
+import com.gyee.power.fitting.service.IWindpowerstationtestingpoint2Service;
|
|
|
+import com.gyee.power.fitting.service.ProBasicEquipmentPointService;
|
|
|
+import com.gyee.power.fitting.service.ProBasicPowerstationPointService;
|
|
|
+import com.gyee.power.fitting.service.Windturbinetestingpointai2Service;
|
|
|
import com.gyee.power.fitting.service.custom.curve.DataScangfService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.math3.fitting.WeightedObservedPoints;
|
|
@@ -63,32 +68,35 @@ public class NewIvPvCurveFittingService {
|
|
|
@Resource
|
|
|
private DataScangfService dataScangfService;
|
|
|
|
|
|
- public void getDatas2File(String stationid, long start, long end ,int interval) {
|
|
|
+ public void getDatas2File(String stationid, long start, long end, int interval) {
|
|
|
|
|
|
int daym = 24 * 60 * 60 * 1000;
|
|
|
|
|
|
//按天
|
|
|
for (long i = start; i < end; i += daym) {
|
|
|
|
|
|
- List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym,interval);
|
|
|
+ List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym, interval);
|
|
|
infos2File(datas);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
- public List<List<List<PhotovoltaicInfo>>> getDatas2File1(String stationid, long start, long end ,int interval) {
|
|
|
|
|
|
- int daym = 24 * 60 * 60 * 1000;
|
|
|
+ public Map<String, List<PhotovoltaicInfo>> getDatas2File1(String stationid, long start, long end, int interval) {
|
|
|
|
|
|
- List<List<List<PhotovoltaicInfo>>> wj = new ArrayList<>();
|
|
|
+ int daym = 24 * 60 * 60 * 1000;
|
|
|
+ Map<String, List<PhotovoltaicInfo>> wj = new HashMap<>();
|
|
|
//按天
|
|
|
for (long i = start; i < end; i += daym) {
|
|
|
|
|
|
- List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym,interval);
|
|
|
- wj.add(datas);
|
|
|
-// infos2File(datas);
|
|
|
-
|
|
|
+ List<List<PhotovoltaicInfo>> datas = getDatas(stationid, i, i + daym, interval);
|
|
|
+ for (List<PhotovoltaicInfo> data : datas) {
|
|
|
+ List<PhotovoltaicInfo> infos = wj.get(data.get(0).getInverter());
|
|
|
+ if (infos == null) {
|
|
|
+ wj.put(data.get(0).getInverter(), data);
|
|
|
+ } else {
|
|
|
+ infos.addAll(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
return wj;
|
|
|
}
|
|
|
|
|
@@ -101,7 +109,7 @@ public class NewIvPvCurveFittingService {
|
|
|
for (List<PhotovoltaicInfo> data : datas) {
|
|
|
PhotovoltaicInfo info = data.get(0);
|
|
|
String station = info.getStation();
|
|
|
- String fileName = config.getFilePathPrepare() + "gf" +File.separator+ "一秒" +File.separator + station + "-" + info.getInverter() + "-" + DateUtils.date2StringS(new Date(info.getTime())) + ".csv";
|
|
|
+ String fileName = config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator + station + "-" + info.getInverter() + "-" + DateUtils.date2StringS(new Date(info.getTime())) + ".csv";
|
|
|
File file = new File(fileName);
|
|
|
if (file.exists()) continue;
|
|
|
StringBuilder sb = new StringBuilder();
|
|
@@ -117,13 +125,13 @@ public class NewIvPvCurveFittingService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public List<String> getFileList(String station, List<String> nbq, long startdate,int interval, long enddate, boolean isOffline) {
|
|
|
+ public List<String> getFileList(String station, List<String> nbq, long startdate, int interval, long enddate, boolean isOffline) {
|
|
|
List<String> fileList = new ArrayList<>();
|
|
|
File file = null;
|
|
|
- //获取文件位置
|
|
|
+ //获取文件位置
|
|
|
if (interval == 1) {
|
|
|
file = new File(config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator);
|
|
|
- }else if (interval == 1){
|
|
|
+ } else if (interval == 1) {
|
|
|
file = new File(config.getFilePathPrepare() + "gf" + File.separator + "一秒" + File.separator);
|
|
|
}
|
|
|
//获取文件列表
|
|
@@ -152,7 +160,7 @@ public class NewIvPvCurveFittingService {
|
|
|
List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
List<TableTitle> collect = fixedVos.stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
|
|
|
Map<String, Object> tableMap = new HashMap<>();
|
|
|
- String fs = config.getFilePathPrepare() + "gf"+File.separator + s;
|
|
|
+ String fs = config.getFilePathPrepare() + "gf" + File.separator + s;
|
|
|
List<PhotovoltaicInfo> infos = file2Info(fs, false);
|
|
|
tableMap.put("data", infos);
|
|
|
tableMap.put("title", collect);
|
|
@@ -199,11 +207,11 @@ public class NewIvPvCurveFittingService {
|
|
|
*/
|
|
|
public Map<String, List<PhotovoltaicInfo>> calculatAnalysis(List<String> fileList) {
|
|
|
|
|
|
- String bzcldPath = config.getFilePathPrepare() + "bzd"+File.separator + "标准点.csv";
|
|
|
+ String bzcldPath = config.getFilePathPrepare() + "bzd" + File.separator + "标准点.csv";
|
|
|
List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
|
|
|
Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
|
|
|
- String fs = config.getFilePathPrepare() + "gf" +File.separator;
|
|
|
+ String fs = config.getFilePathPrepare() + "gf" + File.separator;
|
|
|
Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
|
|
|
for (String s : fileList) {
|
|
|
//读取一个文件
|
|
@@ -225,33 +233,58 @@ public class NewIvPvCurveFittingService {
|
|
|
return stringListMap;
|
|
|
}
|
|
|
|
|
|
-// public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<List<List<PhotovoltaicInfo>>> feill) {
|
|
|
-//
|
|
|
-// String bzcldPath = config.getFilePathPrepare() + "bzd"+File.separator + "标准点.csv";
|
|
|
-// List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
|
|
|
-// Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
-//
|
|
|
-// String fs = config.getFilePathPrepare() + "gf" +File.separator;
|
|
|
-// Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
|
|
|
-// for (String s : fileList) {
|
|
|
-// //读取一个文件
|
|
|
-// List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
|
|
|
-// List<PhotovoltaicInfo> theoryInfos;
|
|
|
-// if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
|
|
|
-// theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(infos, bzcldMap);
|
|
|
-// } else {
|
|
|
-// theoryInfos = CurrentVoltageCalc.CalcTheoryPower(infos, bzcldMap);
|
|
|
-// }
|
|
|
-// //按逆变器聚合数据
|
|
|
-// if (stringListMap.containsKey(theoryInfos.get(0).getInverter())) {
|
|
|
-// stringListMap.get(theoryInfos.get(0).getInverter()).addAll(theoryInfos);
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// stringListMap.put(theoryInfos.get(0).getInverter(), theoryInfos);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return stringListMap;
|
|
|
-// }
|
|
|
+ /**
|
|
|
+ * 计算理论功率加入原列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<PhotovoltaicInfo> bzdList, Map<String, List<PhotovoltaicInfo>> datasInfos) {
|
|
|
+
|
|
|
+ Map<String, PhotovoltaicInfo> bzcldMap = bzdList.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
+
|
|
|
+ Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
|
|
|
+
|
|
|
+ String s;
|
|
|
+ for (Map.Entry<String, List<PhotovoltaicInfo>> entry : datasInfos.entrySet()) {
|
|
|
+ s = entry.getKey();
|
|
|
+ List<PhotovoltaicInfo> theoryInfos;
|
|
|
+ if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
|
|
|
+ theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(entry.getValue(), bzcldMap);
|
|
|
+ } else {
|
|
|
+ theoryInfos = CurrentVoltageCalc.CalcTheoryPower(entry.getValue(), bzcldMap);
|
|
|
+ }
|
|
|
+ stringListMap.put(s, theoryInfos);
|
|
|
+ }
|
|
|
+ return stringListMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ // public Map<String, List<PhotovoltaicInfo>> calculatAnalysis1(List<List<List<PhotovoltaicInfo>>> feill) {
|
|
|
+ //
|
|
|
+ // String bzcldPath = config.getFilePathPrepare() + "bzd"+File.separator + "标准点.csv";
|
|
|
+ // List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
|
|
|
+ // Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
+ //
|
|
|
+ // String fs = config.getFilePathPrepare() + "gf" +File.separator;
|
|
|
+ // Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
|
|
|
+ // for (String s : fileList) {
|
|
|
+ // //读取一个文件
|
|
|
+ // List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
|
|
|
+ // List<PhotovoltaicInfo> theoryInfos;
|
|
|
+ // if (s.contains("HZJ_GDC") || s.contains("AK_GDC")) {
|
|
|
+ // theoryInfos = CurrentVoltageCalc.CalcTheoryPowerHZJ(infos, bzcldMap);
|
|
|
+ // } else {
|
|
|
+ // theoryInfos = CurrentVoltageCalc.CalcTheoryPower(infos, bzcldMap);
|
|
|
+ // }
|
|
|
+ // //按逆变器聚合数据
|
|
|
+ // if (stringListMap.containsKey(theoryInfos.get(0).getInverter())) {
|
|
|
+ // stringListMap.get(theoryInfos.get(0).getInverter()).addAll(theoryInfos);
|
|
|
+ //
|
|
|
+ // } else {
|
|
|
+ // stringListMap.put(theoryInfos.get(0).getInverter(), theoryInfos);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return stringListMap;
|
|
|
+ // }
|
|
|
|
|
|
/**
|
|
|
* 合并同逆变器文件
|
|
@@ -261,7 +294,7 @@ public class NewIvPvCurveFittingService {
|
|
|
*/
|
|
|
public Map<String, List<PhotovoltaicInfo>> mergeCalculat(List<String> fileList) {
|
|
|
|
|
|
- String fs = config.getFilePathPrepare() + "gf" +File.separator;
|
|
|
+ String fs = config.getFilePathPrepare() + "gf" + File.separator;
|
|
|
Map<String, List<PhotovoltaicInfo>> stringListMap = new HashMap<>();
|
|
|
for (String s : fileList) {
|
|
|
//读取一个文件
|
|
@@ -301,7 +334,7 @@ public class NewIvPvCurveFittingService {
|
|
|
|
|
|
public List<String> getAllFileList() {
|
|
|
//获取文件位置
|
|
|
- File file = new File(config.getFilePathPrepare() + "gf" + "一秒" );
|
|
|
+ File file = new File(config.getFilePathPrepare() + "gf" + "一秒");
|
|
|
//获取文件列表
|
|
|
File[] files = file.listFiles();
|
|
|
List<String> fileList = Arrays.stream(files).map(f -> f.getName()).collect(Collectors.toList());
|
|
@@ -338,13 +371,29 @@ public class NewIvPvCurveFittingService {
|
|
|
.append(",").append(ptInfo.getCI()).append(",").append(ptInfo.getCV())
|
|
|
.append("\n");
|
|
|
}
|
|
|
- String fileName = config.getFilePathPrepare() + "bzd"+File.separator +"标准点.csv";
|
|
|
+ String fileName = config.getFilePathPrepare() + "bzd" + File.separator + "标准点.csv";
|
|
|
File file = new File(fileName);
|
|
|
file.delete();
|
|
|
FileUtil.writeFile(fileName, sb.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 标准点计算
|
|
|
+ *
|
|
|
+ * @param stringListMap
|
|
|
+ */
|
|
|
+ public List<PhotovoltaicInfo> standardPointCalculate1(Map<String, List<PhotovoltaicInfo>> stringListMap) {
|
|
|
+
|
|
|
+ List<PhotovoltaicInfo> ptInfos = new ArrayList<>();
|
|
|
+ for (Map.Entry<String, List<PhotovoltaicInfo>> entry : stringListMap.entrySet()) {
|
|
|
+ List<PhotovoltaicInfo> value = entry.getValue();
|
|
|
+ Optional<PhotovoltaicInfo> first = value.stream().sorted(Comparator.comparing(PhotovoltaicInfo::getActualP).reversed()).findFirst();
|
|
|
+ ptInfos.add(first.get());
|
|
|
+ }
|
|
|
+ return ptInfos;
|
|
|
+ }
|
|
|
+
|
|
|
public List<TableTitle> getTheoryTitel() {
|
|
|
|
|
|
List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
@@ -368,7 +417,7 @@ public class NewIvPvCurveFittingService {
|
|
|
*/
|
|
|
public List<PhotovoltaicInfo> calculatFitting(List<String> fileList) {
|
|
|
|
|
|
- String fs = config.getFilePathPrepare() + "gf" +File.separator ;
|
|
|
+ String fs = config.getFilePathPrepare() + "gf" + File.separator;
|
|
|
List<PhotovoltaicInfo> infoList = new ArrayList<>();
|
|
|
for (String s : fileList) {
|
|
|
List<PhotovoltaicInfo> infos = file2Info(fs + s, true);
|
|
@@ -411,10 +460,10 @@ public class NewIvPvCurveFittingService {
|
|
|
* @param startdate
|
|
|
* @param enddate
|
|
|
*/
|
|
|
- public List<FjjxbVo> getPhotovoltaicPerformanceList(long startdate, long enddate,int interval) {
|
|
|
+ public List<FjjxbVo> getPhotovoltaicPerformanceList(long startdate, long enddate, int interval) {
|
|
|
int oneday = 24 * 60 * 60;
|
|
|
|
|
|
- String bzcldPath = config.getFilePathPrepare() + "bzd"+File.separator+"标准点.csv";
|
|
|
+ String bzcldPath = config.getFilePathPrepare() + "bzd" + File.separator + "标准点.csv";
|
|
|
List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
|
|
|
Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
|
|
@@ -442,7 +491,7 @@ public class NewIvPvCurveFittingService {
|
|
|
int i = 0;
|
|
|
double t = 5 / 60;
|
|
|
|
|
|
- List<List<PhotovoltaicInfo>> datas = getDatas(stationid, startdate, enddate,interval);
|
|
|
+ List<List<PhotovoltaicInfo>> datas = getDatas(stationid, startdate, enddate, interval);
|
|
|
//遍历逆变器
|
|
|
for (List<PhotovoltaicInfo> data : datas) {
|
|
|
|
|
@@ -471,9 +520,9 @@ public class NewIvPvCurveFittingService {
|
|
|
*
|
|
|
* @return 逆变器,列表
|
|
|
*/
|
|
|
- public List<List<PhotovoltaicInfo>> getDatas(String stationid, long start, long end ,int interval) {
|
|
|
+ public List<List<PhotovoltaicInfo>> getDatas(String stationid, long start, long end, int interval) {
|
|
|
//间隔
|
|
|
- interval = 5 * 60; //5分钟-300
|
|
|
+ interval = 5 * 60; //5分钟-300
|
|
|
|
|
|
//获得测点
|
|
|
Map<String, String> zglpoints = getPoints(stationid, "zgl");
|
|
@@ -488,18 +537,18 @@ public class NewIvPvCurveFittingService {
|
|
|
List<ProBasicWeatherStation> weatherStations = weatherStationService.getBaseMapper().selectList(null);
|
|
|
List<ProBasicWeatherStation> collect = weatherStations.stream().filter(c -> stationid.equals(c.getWindpowerstationId())).collect(Collectors.toList());
|
|
|
|
|
|
- String station= collect.get(0).getId();
|
|
|
+ String station = collect.get(0).getId();
|
|
|
|
|
|
ProBasicPowerstationPoint zfsPoint = InitialRunner.newzfsMap.get(stationid);
|
|
|
ProBasicPowerstationPoint zjwdPoint = InitialRunner.newzjwdMap.get(station);
|
|
|
|
|
|
//总辐射
|
|
|
-// List<TsDoubleData> zfsDatas = adpClient.getHistorySnap(zfsPoint.getNemCode(), start, end, interval);
|
|
|
+ // List<TsDoubleData> zfsDatas = adpClient.getHistorySnap(zfsPoint.getNemCode(), start, end, interval);
|
|
|
|
|
|
List<TsDoubleData> zfsDatas = remoteService.adapterfd().getHistorySnap(zfsPoint.getNemCode(), start, end, interval);
|
|
|
|
|
|
//组件温度
|
|
|
-// List<TsDoubleData> zjwdDatas = adpClient.getHistorySnap(zjwdPoint.getNemCode(), start, end, interval);
|
|
|
+ // List<TsDoubleData> zjwdDatas = adpClient.getHistorySnap(zjwdPoint.getNemCode(), start, end, interval);
|
|
|
|
|
|
List<TsDoubleData> zjwdDatas = remoteService.adaptergf().getHistorySnap(zjwdPoint.getNemCode(), start, end, interval);
|
|
|
|
|
@@ -508,15 +557,15 @@ public class NewIvPvCurveFittingService {
|
|
|
for (String wtid : zglpoints.keySet()) {
|
|
|
|
|
|
//总功率
|
|
|
-// List<TsDoubleData> zglDatas = adpClient.getHistorySnap(zglpoints.get(wtid), start, end, interval);
|
|
|
+ // List<TsDoubleData> zglDatas = adpClient.getHistorySnap(zglpoints.get(wtid), start, end, interval);
|
|
|
List<TsDoubleData> zglDatas = remoteService.adaptergf().getHistorySnap(zglpoints.get(wtid), start, end, interval);
|
|
|
List<TsDoubleData> llglDatas = remoteService.adapterfd().getHistorySnap(llglpoints.get(wtid), start, end, interval);
|
|
|
|
|
|
//电网A相电压
|
|
|
-// List<TsDoubleData> adyDatas = adpClient.getHistorySnap(adypoints.get(wtid), start, end, interval);
|
|
|
+ // List<TsDoubleData> adyDatas = adpClient.getHistorySnap(adypoints.get(wtid), start, end, interval);
|
|
|
List<TsDoubleData> adyDatas = remoteService.adaptergf().getHistorySnap(adypoints.get(wtid), start, end, interval);
|
|
|
//电网A相电流
|
|
|
-// List<TsDoubleData> adlDatas = adpClient.getHistorySnap(adlpoints.get(wtid), start, end, interval);
|
|
|
+ // List<TsDoubleData> adlDatas = adpClient.getHistorySnap(adlpoints.get(wtid), start, end, interval);
|
|
|
List<TsDoubleData> adlDatas = remoteService.adaptergf().getHistorySnap(adlpoints.get(wtid), start, end, interval);
|
|
|
|
|
|
List<PhotovoltaicInfo> infos = new ArrayList<>();
|
|
@@ -551,25 +600,25 @@ public class NewIvPvCurveFittingService {
|
|
|
info.setBV(double3Decimal(bdyDatas.get(j).getDoubleValue(), true));
|
|
|
info.setCV(double3Decimal(cdyDatas.get(j).getDoubleValue(), true));
|
|
|
} else {
|
|
|
- if (adlDatas.size()>=1) {
|
|
|
+ if (adlDatas.size() >= 1) {
|
|
|
info.setI(double3Decimal(adlDatas.get(j).getDoubleValue(), false));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
info.setI(0);
|
|
|
}
|
|
|
- if (adyDatas.size()>=1) {
|
|
|
+ if (adyDatas.size() >= 1) {
|
|
|
info.setV(double3Decimal(adyDatas.get(j).getDoubleValue(), true));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
info.setV(0);
|
|
|
}
|
|
|
}
|
|
|
- if (zglDatas.size()>=1) {
|
|
|
+ if (zglDatas.size() >= 1) {
|
|
|
info.setActualP(double3Decimal(zglDatas.get(j).getDoubleValue(), false));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
info.setActualP(0);
|
|
|
}
|
|
|
- if (llglDatas.size()>=1) {
|
|
|
+ if (llglDatas.size() >= 1) {
|
|
|
info.setIdeaP(double3Decimal(llglDatas.get(j).getDoubleValue(), false));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
info.setIdeaP(0);
|
|
|
}
|
|
|
infos.add(info);
|
|
@@ -602,10 +651,10 @@ public class NewIvPvCurveFittingService {
|
|
|
switch (key) {
|
|
|
case "zgl":
|
|
|
//总功率
|
|
|
- return InitialRunner.newzglMap.get(stationid).stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return InitialRunner.newzglMap.get(stationid).stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "llgl":
|
|
|
//总功率
|
|
|
- return InitialRunner.newllglMap.get(stationid).stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return InitialRunner.newllglMap.get(stationid).stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
|
|
|
case "ady":
|
|
|
List<ProBasicEquipmentPoint> adyPoints = null;
|
|
@@ -617,22 +666,22 @@ public class NewIvPvCurveFittingService {
|
|
|
adyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG005");
|
|
|
}
|
|
|
|
|
|
- return adyPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return adyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "bdy":
|
|
|
List<ProBasicEquipmentPoint> bdyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG008");
|
|
|
- return bdyPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return bdyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "cdy":
|
|
|
List<ProBasicEquipmentPoint> cdyPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG011");
|
|
|
- return cdyPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return cdyPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "adl":
|
|
|
List<ProBasicEquipmentPoint> adlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG004");
|
|
|
- return adlPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return adlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "bdl":
|
|
|
List<ProBasicEquipmentPoint> bdlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG007");
|
|
|
- return bdlPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return bdlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
case "cdl":
|
|
|
List<ProBasicEquipmentPoint> cdlPoints = proBasicEquipmentPointService.getPoints(stationid, null, "AIG010");
|
|
|
- return cdlPoints.stream().filter(c->!c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
+ return cdlPoints.stream().filter(c -> !c.getNemCode().equals("INTIAL")).collect(Collectors.toMap(ProBasicEquipmentPoint::getWindturbineId, ProBasicEquipmentPoint::getNemCode));
|
|
|
}
|
|
|
return new HashMap<>();
|
|
|
}
|
|
@@ -677,7 +726,6 @@ public class NewIvPvCurveFittingService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public List<ProBasicEquipment> wtByWplist(String wpids) {
|
|
|
List<ProBasicEquipment> equipmentList = InitialRunner.newgfwtList.stream()
|
|
|
.filter(oe -> wpids.contains(oe.getWindpowerstationId()))
|
|
@@ -689,6 +737,7 @@ public class NewIvPvCurveFittingService {
|
|
|
|
|
|
/**
|
|
|
* 通过大点的key获取小散点
|
|
|
+ *
|
|
|
* @param yk
|
|
|
* @param wk
|
|
|
* @return
|
|
@@ -696,15 +745,15 @@ public class NewIvPvCurveFittingService {
|
|
|
public List<PhotovoltaicInfo> dataOrigin(String yk, String wk) {
|
|
|
List<PhotovoltaicInfo> list = new ArrayList<>();
|
|
|
|
|
|
- if (!StringUtils.isEmpty(yk)){
|
|
|
+ if (!StringUtils.isEmpty(yk)) {
|
|
|
String[] key = yk.split(",");
|
|
|
- for (String k : key){
|
|
|
+ for (String k : key) {
|
|
|
list.addAll(dataScangfService.getMapYY().get(k));
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(wk)){
|
|
|
+ if (!StringUtils.isEmpty(wk)) {
|
|
|
String[] kew = wk.split(",");
|
|
|
- for (String k : kew){
|
|
|
+ for (String k : kew) {
|
|
|
list.addAll(dataScangfService.getMapWY().get(k));
|
|
|
}
|
|
|
}
|