|
@@ -21,6 +21,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class GenreSetPushService {
|
|
@@ -1725,16 +1726,16 @@ public class GenreSetPushService {
|
|
|
|
|
|
Map<String, Object> fcmap = new HashMap<>();
|
|
|
|
|
|
- if (id.endsWith(QS) || id.endsWith(FD) || id.endsWith(GF) || InitialRunner.re_wpmap.containsKey(id)) {
|
|
|
+ if (id.endsWith(QS) || id.endsWith(FD) || id.endsWith(GF) || InitialRunner.re_wpmap.containsKey(id) || InitialRunner.wpmapls.containsKey(id)) {
|
|
|
|
|
|
|
|
|
//初始化场站信息
|
|
|
|
|
|
List<Windpowerstation> wplist = new ArrayList<>();
|
|
|
-//
|
|
|
-// if (InitialRunner.wpmapls.containsKey(id)) {
|
|
|
-// wplist = InitialRunner.wpmapls.get(id);
|
|
|
-// }
|
|
|
+
|
|
|
+ if (InitialRunner.wpmapls.containsKey(id)) {
|
|
|
+ wplist = InitialRunner.wpmapls.get(id);
|
|
|
+ }
|
|
|
|
|
|
if (InitialRunner.re_wpmap.containsKey(id)) {
|
|
|
wplist = InitialRunner.re_wpmap.get(id);
|
|
@@ -1794,6 +1795,11 @@ public class GenreSetPushService {
|
|
|
double gf_y_jhfdl = 0;
|
|
|
double gf_n_jhfdl = 0;
|
|
|
|
|
|
+ double fd_y_sjfdl = 0;
|
|
|
+ double fd_n_sjfdl = 0;
|
|
|
+ double gf_y_sjfdl = 0;
|
|
|
+ double gf_n_sjfdl = 0;
|
|
|
+
|
|
|
double jr_fd_sjgl = 0;
|
|
|
double jr_gf_sjgl = 0;
|
|
|
double jr_fd_zygl = 0;
|
|
@@ -1907,45 +1913,62 @@ public class GenreSetPushService {
|
|
|
Map<String, Double> valuemap = planmap.get(wp.getId());
|
|
|
|
|
|
double yfdljh = 0.0;
|
|
|
+ double yfdlsj = 0.0;
|
|
|
double nfdljh = 0.0;
|
|
|
+ double nfdlsj = 0.0;
|
|
|
if (valuemap.containsKey("yfdljh")) {
|
|
|
yfdljh = valuemap.get("yfdljh");
|
|
|
}
|
|
|
+ if (valuemap.containsKey("yfdlsj")) {
|
|
|
+ yfdlsj = valuemap.get("yfdlsj");
|
|
|
+ }
|
|
|
if (valuemap.containsKey("nfdljh")) {
|
|
|
nfdljh = valuemap.get("nfdljh");
|
|
|
}
|
|
|
+ if (valuemap.containsKey("nfdlsj")) {
|
|
|
+ nfdlsj = valuemap.get("nfdlsj");
|
|
|
+ }
|
|
|
|
|
|
if (wp.getId().endsWith("FDC")) {
|
|
|
- fd_r_ycdl = fd_r_ycdl + (rfdl * RYCFDLXS);
|
|
|
+// fd_r_ycdl = fd_r_ycdl + (rfdl * RYCFDLXS);
|
|
|
+ fd_r_ycdl = fd_r_ycdl + (yfdljh / 30);
|
|
|
// fd_r_fdl =fd_r_fdl+rfdl;
|
|
|
|
|
|
- double yycfdl = yfdljh * YCFDLXS;
|
|
|
+// double yycfdl = yfdljh * YCFDLXS;
|
|
|
+ double yycfdl = yfdljh;
|
|
|
fd_y_ycdl = fd_y_ycdl + yycfdl;
|
|
|
// fd_y_fdl=fd_y_fdl+yfdl;
|
|
|
- double nycfdl = nfdljh * NYCFDLXS;
|
|
|
+// double nycfdl = nfdljh * NYCFDLXS;
|
|
|
+ double nycfdl = nfdljh;
|
|
|
fd_n_ycdl = fd_n_ycdl + nycfdl;
|
|
|
// fd_n_fdl=fd_n_fdl+nfdl;
|
|
|
|
|
|
fd_y_jhfdl = fd_y_jhfdl + yfdljh;
|
|
|
fd_n_jhfdl = fd_n_jhfdl + nfdljh;
|
|
|
|
|
|
-
|
|
|
+ fd_y_sjfdl = fd_y_sjfdl + yfdlsj;
|
|
|
+ fd_n_sjfdl = fd_n_sjfdl + nfdlsj;
|
|
|
// jr_fd_sjgl=jr_fd_sjgl+sjgl;
|
|
|
// jr_fd_zygl=jr_fd_zygl+zygl;
|
|
|
} else {
|
|
|
gf_r_ycdl = gf_r_ycdl + (rfdl * RYCFDLXS);
|
|
|
// gf_r_fdl =gf_r_fdl+rfdl ;
|
|
|
|
|
|
- double yycfdl = yfdljh * YCFDLXS;
|
|
|
+// double yycfdl = yfdljh * YCFDLXS;
|
|
|
+ double yycfdl = yfdljh;
|
|
|
+
|
|
|
gf_y_ycdl = gf_y_ycdl + yycfdl;
|
|
|
// gf_y_fdl=gf_y_fdl+yfdl;
|
|
|
- double nycfdl = nfdljh * NYCFDLXS;
|
|
|
+// double nycfdl = nfdljh * NYCFDLXS;
|
|
|
+ double nycfdl = nfdljh;
|
|
|
gf_n_ycdl = gf_n_ycdl + nycfdl;
|
|
|
// gf_n_fdl=gf_n_fdl+nfdl;
|
|
|
|
|
|
gf_y_jhfdl = fd_y_jhfdl + yfdljh;
|
|
|
gf_n_jhfdl = fd_n_jhfdl + nfdljh;
|
|
|
|
|
|
+ gf_y_sjfdl = fd_y_sjfdl + yfdlsj;
|
|
|
+ gf_n_sjfdl = fd_n_sjfdl + nfdlsj;
|
|
|
|
|
|
// jr_gf_sjgl=jr_gf_sjgl+sjgl;
|
|
|
// jr_gf_zygl=jr_gf_zygl+zygl;
|
|
@@ -2116,6 +2139,16 @@ public class GenreSetPushService {
|
|
|
newpointmap.put("gf_y_jhfdl", StringUtils.round(gf_y_jhfdl, 2));
|
|
|
//光伏年计划发电量
|
|
|
newpointmap.put("gf_n_jhfdl", StringUtils.round(gf_n_jhfdl, 2));
|
|
|
+
|
|
|
+ //风场月计划发电量
|
|
|
+ newpointmap.put("fd_y_sjfdl", StringUtils.round(fd_y_sjfdl, 2));
|
|
|
+ //风场年计划发电量
|
|
|
+ newpointmap.put("fd_n_sjfdl", StringUtils.round(fd_n_sjfdl, 2));
|
|
|
+ //光伏月计划发电量
|
|
|
+ newpointmap.put("gf_y_sjfdl", StringUtils.round(gf_y_sjfdl, 2));
|
|
|
+ //光伏年计划发电量
|
|
|
+ newpointmap.put("gf_n_sjfdl", StringUtils.round(gf_n_sjfdl, 2));
|
|
|
+
|
|
|
//光伏负荷率
|
|
|
newpointmap.put("gf_fhl", StringUtils.round(jr_gf_sjgl, 2));
|
|
|
|
|
@@ -2288,7 +2321,8 @@ public class GenreSetPushService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- } else if (InitialRunner.wpmap.containsKey(id)) {
|
|
|
+ }
|
|
|
+// else if (InitialRunner.wpmap.containsKey(id)) {
|
|
|
|
|
|
if (InitialRunner.pjsmap.containsKey(id)) {
|
|
|
List<Project> pjls = InitialRunner.pjsmap.get(id);
|
|
@@ -2352,7 +2386,8 @@ public class GenreSetPushService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- } else if (InitialRunner.pjmap.containsKey(id)) {
|
|
|
+// }
|
|
|
+ else if (InitialRunner.pjmap.containsKey(id)) {
|
|
|
Project pj = InitialRunner.pjmap.get(id);
|
|
|
if (InitialRunner.lnsmap.containsKey(id)) {
|
|
|
List<Line> lnls = InitialRunner.lnsmap.get(id);
|
|
@@ -4122,7 +4157,9 @@ public class GenreSetPushService {
|
|
|
private void setPlanInfoByType(Map<String, Map<String, Double>> gxkmap, List<ProjectPlan> planls, String id) {
|
|
|
|
|
|
double yfdljh = 0.0;
|
|
|
+ double yfdlsj = 0.0;
|
|
|
double nfdljh = 0.0;
|
|
|
+ double nfdlsj = 0.0;
|
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
cal.setTime(new Date());
|
|
@@ -4134,6 +4171,8 @@ public class GenreSetPushService {
|
|
|
|
|
|
double fdl = null != plan.getGeneratingcapacity() ? Double.valueOf(plan.getGeneratingcapacity()) : 0.0;
|
|
|
|
|
|
+ double sjfdl = null != plan.getOutagehours() ? Double.valueOf(plan.getOutagehours()) : 0.0;
|
|
|
+
|
|
|
|
|
|
if (gxkmap.containsKey(plan.getWindpower())) {
|
|
|
|
|
@@ -4143,13 +4182,22 @@ public class GenreSetPushService {
|
|
|
if (planmonth == month) {
|
|
|
|
|
|
yfdljh = map.get("yfdljh");
|
|
|
+ yfdlsj = map.get("yfdlsj");
|
|
|
+
|
|
|
yfdljh = yfdljh + fdl;
|
|
|
+ yfdlsj = yfdlsj + sjfdl;
|
|
|
+
|
|
|
map.put("yfdljh", yfdljh);
|
|
|
+ map.put("yfdlsj", yfdlsj);
|
|
|
}
|
|
|
|
|
|
nfdljh = map.get("nfdljh");
|
|
|
- nfdljh = nfdljh + fdl;
|
|
|
+ nfdlsj = map.get("nfdlsj");
|
|
|
+ nfdlsj = nfdlsj + sjfdl;
|
|
|
+ nfdljh = nfdljh + Double.parseDouble(plan.getGeneratingcapacity());
|
|
|
+// nfdlsj = nfdlsj + Double.parseDouble(plan.getOutagehours());
|
|
|
map.put("nfdljh", nfdljh);
|
|
|
+ map.put("nfdlsj", nfdlsj);
|
|
|
|
|
|
}
|
|
|
} else {
|
|
@@ -4160,10 +4208,14 @@ public class GenreSetPushService {
|
|
|
if (planmonth == month) {
|
|
|
|
|
|
map.put("yfdljh", fdl);
|
|
|
+ map.put("yfdlsj", sjfdl);
|
|
|
map.put("nfdljh", 0.00);
|
|
|
+ map.put("nfdlsj", 0.00);
|
|
|
} else {
|
|
|
map.put("nfdljh", fdl);
|
|
|
+ map.put("nfdlsj", sjfdl);
|
|
|
map.put("yfdljh", 0.00);
|
|
|
+ map.put("yfdlsj", 0.00);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -4494,7 +4546,55 @@ public class GenreSetPushService {
|
|
|
return vos;
|
|
|
}
|
|
|
|
|
|
+ public Map plan(String wpid) {
|
|
|
+
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.setTime(new Date());
|
|
|
+ int year = cal.get(Calendar.YEAR);
|
|
|
+ int month = cal.get(Calendar.MONTH) + 1;
|
|
|
+
|
|
|
+ List<ProjectPlan> pjls = projectPlanService.getProjectPlanList(String.valueOf(year));
|
|
|
+
|
|
|
+ // 获取计划发电量信息
|
|
|
+ Map<String, Map<String, Double>> planmap = new HashMap<>();
|
|
|
+ Map<String,Double> jhdljh = new HashMap<>();
|
|
|
+ setPlanInfoByType(planmap, pjls, wpid);
|
|
|
+
|
|
|
+ List<ProjectPlan> collect = pjls.stream().filter(plan -> plan.getWindpower().equals(wpid) && plan.getYear()
|
|
|
+ .endsWith(String.valueOf(year))).collect(Collectors.toList());
|
|
|
+ List<ProjectPlan> collect1 = pjls.stream().filter(plan -> plan.getWindpower().equals(wpid) && plan.getMonth()
|
|
|
+ .endsWith(String.valueOf(month))).collect(Collectors.toList());
|
|
|
+
|
|
|
+ double yjhdl = 0;
|
|
|
+ double njhdl = 0;
|
|
|
+ double ysjdl = 0;
|
|
|
+ double nsjdl = 0;
|
|
|
|
|
|
+ for (ProjectPlan plan:collect
|
|
|
+ ) {
|
|
|
+ njhdl+=Double.parseDouble(plan.getGeneratingcapacity());
|
|
|
+ }
|
|
|
+ for (ProjectPlan plan:collect1
|
|
|
+ ) {
|
|
|
+ yjhdl+=Double.parseDouble(plan.getGeneratingcapacity());
|
|
|
+ }
|
|
|
+ for (ProjectPlan plan:collect
|
|
|
+ ) {
|
|
|
+ nsjdl+=Double.parseDouble(plan.getOutagehours());
|
|
|
+ }
|
|
|
+ for (ProjectPlan plan:collect1
|
|
|
+ ) {
|
|
|
+ ysjdl+=Double.parseDouble(plan.getOutagehours());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ jhdljh.put("rjhdl",MathUtil.twoBit(yjhdl/30));
|
|
|
+ jhdljh.put("yjhdl",MathUtil.twoBit(yjhdl));
|
|
|
+ jhdljh.put("njhdl",MathUtil.twoBit(njhdl));
|
|
|
+ jhdljh.put("ysjdl",MathUtil.twoBit(ysjdl));
|
|
|
+ jhdljh.put("nsjdl",MathUtil.twoBit(nsjdl));
|
|
|
+ return jhdljh;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|