|
@@ -36,15 +36,18 @@ import java.util.stream.Collectors;
|
|
|
public class IvPvCurveFittingService {
|
|
|
|
|
|
@Resource
|
|
|
- private IWindpowerstationtestingpoint2Service windpowerstationtestingpoint2Service;
|
|
|
+ private IWindpowerstationtestingpoint2Service stationPointService;
|
|
|
@Resource
|
|
|
- private Windturbinetestingpointai2Service windturbinetestingpointai2Service;
|
|
|
+ private Windturbinetestingpointai2Service windPointService;
|
|
|
@Resource
|
|
|
private IAdapterService adpClient;
|
|
|
@Resource
|
|
|
private GyeeConfig config;
|
|
|
@Resource
|
|
|
private PolynomialCurveFitting pncf;
|
|
|
+ @Resource
|
|
|
+ private AnnotationTool annotationTool;
|
|
|
+
|
|
|
|
|
|
public void getDatas2File(String stationid, long start, long end) {
|
|
|
|
|
@@ -63,7 +66,7 @@ public class IvPvCurveFittingService {
|
|
|
private void infos2File(List<List<PhotovoltaicInfo>> datas) {
|
|
|
|
|
|
//文件第一行
|
|
|
- List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
+ List<FixedVo> fixedVos = annotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
String columnName = fixedVos.stream().map(FixedVo::getDes).collect(Collectors.joining(","));
|
|
|
//遍历逆变器
|
|
|
for (List<PhotovoltaicInfo> data : datas) {
|
|
@@ -112,7 +115,7 @@ public class IvPvCurveFittingService {
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> getTable(String s) {
|
|
|
- List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
+ 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\\" + s;
|
|
@@ -162,7 +165,7 @@ public class IvPvCurveFittingService {
|
|
|
*/
|
|
|
public Map<String, List<PhotovoltaicInfo>> calculatAnalysis(List<String> fileList) {
|
|
|
|
|
|
- String bzcldPath = config.getFilePathPrepare() + "bzd\\标准点.csv";
|
|
|
+ String bzcldPath = config.getFilePathPrepare() + "bzd标准点.csv";
|
|
|
List<PhotovoltaicInfo> bzclds = file2Info(bzcldPath, true);
|
|
|
Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
|
|
@@ -257,7 +260,7 @@ public class IvPvCurveFittingService {
|
|
|
}
|
|
|
|
|
|
//文件第一行
|
|
|
- List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
+ List<FixedVo> fixedVos = annotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
String columnName = fixedVos.stream().map(FixedVo::getDes).collect(Collectors.joining(","));
|
|
|
sb.append(columnName).append("\n");
|
|
@@ -281,7 +284,7 @@ public class IvPvCurveFittingService {
|
|
|
|
|
|
public List<TableTitle> getTheoryTitel() {
|
|
|
|
|
|
- List<FixedVo> fixedVos = AnnotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
+ List<FixedVo> fixedVos = annotationTool.getFixedVoList(PhotovoltaicInfo.class);
|
|
|
String[] ss = {"station", "datetime", "T", "S", "actualP"};
|
|
|
List<String> strings = Arrays.asList(ss);
|
|
|
List<TableTitle> collect = fixedVos.stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
|
|
@@ -353,7 +356,7 @@ public class IvPvCurveFittingService {
|
|
|
Map<String, PhotovoltaicInfo> bzcldMap = bzclds.stream().collect(Collectors.toMap(PhotovoltaicInfo::getInverter, Function.identity()));
|
|
|
|
|
|
//获取实际发电量
|
|
|
- List<Windpowerstationtestingpoint2> rfdl = windpowerstationtestingpoint2Service.getPoints(null, "RFDL");
|
|
|
+ List<Windpowerstationtestingpoint2> rfdl = stationPointService.getPoints(null, "RFDL");
|
|
|
List<FjjxbVo> infos = new ArrayList<>();
|
|
|
//遍历逆变器
|
|
|
for (Windpowerstationtestingpoint2 wstp : rfdl) {
|
|
@@ -508,26 +511,26 @@ public class IvPvCurveFittingService {
|
|
|
List<Windturbinetestingpointai2> adyPoints = null;
|
|
|
if ("HZJ_GDC".equals(stationid)) {
|
|
|
//电网A相电压
|
|
|
- adyPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG063");
|
|
|
+ adyPoints = windPointService.getPoints(stationid, null, "AIG063");
|
|
|
} else {
|
|
|
//电网A相电压
|
|
|
- adyPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG061");
|
|
|
+ adyPoints = windPointService.getPoints(stationid, null, "AIG061");
|
|
|
}
|
|
|
return adyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
case "bdy":
|
|
|
- List<Windturbinetestingpointai2> bdyPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG061A");
|
|
|
+ List<Windturbinetestingpointai2> bdyPoints = windPointService.getPoints(stationid, null, "AIG061A");
|
|
|
return bdyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
case "cdy":
|
|
|
- List<Windturbinetestingpointai2> cdyPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG065");
|
|
|
+ List<Windturbinetestingpointai2> cdyPoints = windPointService.getPoints(stationid, null, "AIG065");
|
|
|
return cdyPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
case "adl":
|
|
|
- List<Windturbinetestingpointai2> adlPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG060");
|
|
|
+ List<Windturbinetestingpointai2> adlPoints = windPointService.getPoints(stationid, null, "AIG060");
|
|
|
return adlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
case "bdl":
|
|
|
- List<Windturbinetestingpointai2> bdlPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG062");
|
|
|
+ List<Windturbinetestingpointai2> bdlPoints = windPointService.getPoints(stationid, null, "AIG062");
|
|
|
return bdlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
case "cdl":
|
|
|
- List<Windturbinetestingpointai2> cdlPoints = windturbinetestingpointai2Service.getPoints(stationid, null, "AIG064");
|
|
|
+ List<Windturbinetestingpointai2> cdlPoints = windPointService.getPoints(stationid, null, "AIG064");
|
|
|
return cdlPoints.stream().collect(Collectors.toMap(Windturbinetestingpointai2::getWindturbineid, Windturbinetestingpointai2::getCode));
|
|
|
}
|
|
|
return new HashMap<>();
|