|
@@ -202,9 +202,10 @@ public class NewPhotovoltaicController {
|
|
|
@RequestParam(value = "station", required = true) String station,
|
|
|
@RequestParam(value = "inverters", required = true) List<String> inverters,
|
|
|
@RequestParam(value = "startdate", required = true) long startdate,
|
|
|
- @RequestParam("interval") int interval,
|
|
|
+// @RequestParam("interval") int interval,
|
|
|
@RequestParam(value = "enddate", required = true) long enddate) {
|
|
|
|
|
|
+ int interval = 300;
|
|
|
Map<String, List<PhotovoltaicInfo>> datasInfos = curveFittingService.getDatas2File1(station, startdate, enddate, interval);
|
|
|
List<PhotovoltaicInfo> bzdList = curveFittingService.standardPointCalculate1(datasInfos);
|
|
|
|
|
@@ -234,7 +235,11 @@ public class NewPhotovoltaicController {
|
|
|
@RequestParam("inverters") List<String> inverters,
|
|
|
@RequestParam("startdate") long startdate,
|
|
|
@RequestParam("interval") int interval,
|
|
|
- @RequestParam("enddate") long enddate) {
|
|
|
+ @RequestParam("enddate") long enddate,
|
|
|
+ @RequestParam("maxs") int maxs,
|
|
|
+ @RequestParam("mins") int mins,
|
|
|
+ @RequestParam("maxpower") int maxpower,
|
|
|
+ @RequestParam("minpower") int minpower) {
|
|
|
|
|
|
Map<String, List<PhotovoltaicInfo>> datasInfos = curveFittingService.getDatas2File1(station, startdate, enddate, interval);
|
|
|
|
|
@@ -250,11 +255,21 @@ public class NewPhotovoltaicController {
|
|
|
} else {
|
|
|
return JsonResult.error(ResultCode.PARAM_NOT_COMPLETE);
|
|
|
}
|
|
|
- List<double[]> b = curveFittingService.oneFileFitting(infos);
|
|
|
- infos = infos.stream().filter(i -> i.getS() > 1).sorted(Comparator.comparing(PhotovoltaicInfo::getS)).collect(Collectors.toList());
|
|
|
|
|
|
- List<double[]> a = new ArrayList<>();
|
|
|
- for (PhotovoltaicInfo pi : infos) {
|
|
|
+ List<PhotovoltaicInfo> infosyy = infos.stream().filter(c -> c.getS() <= maxs && c.getS() >= mins &&
|
|
|
+ c.getActualP() <= maxpower && c.getActualP() >= minpower).collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<PhotovoltaicInfo> infoswy = infos.stream()
|
|
|
+ .filter(c -> !(c.getS() <= maxs && c.getS() >= mins && c.getActualP() <= maxpower && c.getActualP() >= minpower))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<double[]> yyd = curveFittingService.oneFileFitting(infosyy);
|
|
|
+ List<double[]> wyd = curveFittingService.oneFileFitting(infoswy);
|
|
|
+ infosyy = infosyy.stream().filter(i -> i.getS() > 1).sorted(Comparator.comparing(PhotovoltaicInfo::getS)).collect(Collectors.toList());
|
|
|
+ infoswy = infoswy.stream().filter(i -> i.getS() > 1).sorted(Comparator.comparing(PhotovoltaicInfo::getS)).collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<double[]> yy = new ArrayList<>();
|
|
|
+ for (PhotovoltaicInfo pi : infosyy) {
|
|
|
|
|
|
double[] scatter = new double[3];
|
|
|
|
|
@@ -262,12 +277,26 @@ public class NewPhotovoltaicController {
|
|
|
scatter[1] = pi.getActualP();
|
|
|
scatter[2] = pi.getT();
|
|
|
|
|
|
- a.add(scatter);
|
|
|
+ yy.add(scatter);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<double[]> wy = new ArrayList<>();
|
|
|
+ for (PhotovoltaicInfo pi : infoswy) {
|
|
|
+
|
|
|
+ double[] scatter = new double[3];
|
|
|
+
|
|
|
+ scatter[0] = pi.getS();
|
|
|
+ scatter[1] = pi.getActualP();
|
|
|
+ scatter[2] = pi.getT();
|
|
|
+
|
|
|
+ wy.add(scatter);
|
|
|
}
|
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
- map.put("scatter", a);
|
|
|
- map.put("curve", b);
|
|
|
+ map.put("scatteryy", yy);
|
|
|
+ map.put("curveyy", yyd);
|
|
|
+ map.put("scatterwy", wy);
|
|
|
+ map.put("curvewy", wyd);
|
|
|
|
|
|
return JsonResult.successData(ResultCode.SUCCESS, map);
|
|
|
}
|