|
@@ -7,6 +7,7 @@ import com.gyee.common.util.DateUtils;
|
|
|
import com.gyee.common.util.DoubleUtils;
|
|
|
import com.gyee.common.util.SortUtils;
|
|
|
import com.gyee.runeconomy.dto.PowercurveVo;
|
|
|
+import com.gyee.runeconomy.dto.ProjectplanVo;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
|
import com.gyee.runeconomy.model.auto.*;
|
|
|
import com.gyee.runeconomy.service.auto.IProBasicEquipmentPointService;
|
|
@@ -1448,21 +1449,6 @@ public class MonitorService {
|
|
|
zjrlmap.put("zjrl", zjrl);
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
Map<String, Map<String, ProBasicPowerstationPoint>> pointwpmap = CacheContext.pointwpmap;
|
|
|
Map<String, ProBasicPowerstationPoint> wtpointmap = pointwpmap.get(wpId);
|
|
|
|
|
@@ -1567,58 +1553,94 @@ public class MonitorService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- public List<PowercurveVo> planvalue(String wpId, String timetype) throws Exception {
|
|
|
+ public List<ProjectplanVo> planvalue(String wpId, String timetype) throws Exception {
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ List<ProjectplanVo> vos = new ArrayList<ProjectplanVo>();
|
|
|
+ if (wpId.endsWith(QS) || wpId.endsWith(FD) || wpId.endsWith(GF) || CacheContext.wpmapls.containsKey(wpId)) {
|
|
|
|
|
|
- return null;
|
|
|
+ List<ProBasicPowerstation> wplist = new ArrayList<>();
|
|
|
+ if (CacheContext.wpmapls.containsKey(wpId)) {
|
|
|
+ wplist = CacheContext.wpmapls.get(wpId);
|
|
|
+ }
|
|
|
+ for (ProBasicPowerstation wp : CacheContext.wpls) {
|
|
|
+ if (wpId.contains(FD)) {
|
|
|
+ if (wp.getId().endsWith("FDC_STA")) {
|
|
|
+ wplist.add(wp);
|
|
|
+ }
|
|
|
+ } else if (wpId.contains(GF)) {
|
|
|
+ if (wp.getId().endsWith("GDC_STA")) {
|
|
|
+ wplist.add(wp);
|
|
|
+ }
|
|
|
+ } else if (wpId.contains(QS)) {
|
|
|
+ wplist.add(wp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (timetype.contains("year")) {
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ int currentyear = cal.get(Calendar.YEAR);
|
|
|
+ int twoyear = cal.get(Calendar.YEAR) - 1;
|
|
|
+ int threeyear = cal.get(Calendar.YEAR) - 2;
|
|
|
+
|
|
|
+
|
|
|
+ for (int i = 0; i < 3; i++) {
|
|
|
+ ProjectplanVo vo = new ProjectplanVo();
|
|
|
+ vo.setJhdl(0.0);
|
|
|
+ vo.setSjdl(0.0);
|
|
|
+ vo.setHours(i);
|
|
|
+ vos.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ double bnjhdlsum = 0.0;
|
|
|
+ double bnsjdlsum = 0.0;
|
|
|
+
|
|
|
+ double twojhdlsum = 0.0;
|
|
|
+ double twosjdlsum = 0.0;
|
|
|
+
|
|
|
+ double threejhdlsum = 0.0;
|
|
|
+ double threesjdlsum = 0.0;
|
|
|
+
|
|
|
+ List<ProBasicProjectPlan> currentls = proBasicProjectPlanService.getList(String.valueOf(currentyear));
|
|
|
+ List<ProBasicProjectPlan> twols = proBasicProjectPlanService.getList(String.valueOf(twoyear));
|
|
|
+ List<ProBasicProjectPlan> threels = proBasicProjectPlanService.getList(String.valueOf(threeyear));
|
|
|
+
|
|
|
+ if (!wplist.isEmpty()) {
|
|
|
+ for (ProBasicPowerstation wpls : wplist) {
|
|
|
+
|
|
|
+
|
|
|
+ List<ProBasicProjectPlan> currentjh = currentls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<ProBasicProjectPlan> twojh = twols.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<ProBasicProjectPlan> threejh = threels.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ bnjhdlsum += currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
|
|
|
+ bnsjdlsum += currentjh.stream().mapToDouble(ProBasicProjectPlan::getOutageHours).sum();
|
|
|
+
|
|
|
+ twojhdlsum += twojh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
|
|
|
+ twosjdlsum += twojh.stream().mapToDouble(ProBasicProjectPlan::getOutageHours).sum();
|
|
|
+
|
|
|
+ threejhdlsum += threejh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
|
|
|
+ threesjdlsum += threejh.stream().mapToDouble(ProBasicProjectPlan::getOutageHours).sum();
|
|
|
+ }
|
|
|
+
|
|
|
+ vos.get(0).setJhdl(StringUtils.round(bnjhdlsum, 2));
|
|
|
+ vos.get(1).setJhdl(StringUtils.round(twojhdlsum, 2));
|
|
|
+ vos.get(2).setJhdl(StringUtils.round(threejhdlsum, 2));
|
|
|
+
|
|
|
+ vos.get(0).setSjdl(StringUtils.round(bnsjdlsum, 2));
|
|
|
+ vos.get(1).setSjdl(StringUtils.round(twosjdlsum, 2));
|
|
|
+ vos.get(2).setSjdl(StringUtils.round(threesjdlsum, 2));
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return vos;
|
|
|
|
|
|
}
|
|
|
|