|
@@ -1,6 +1,7 @@
|
|
|
package com.gyee.runeconomy.service.monitor;
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.gyee.common.contant.ContantXk;
|
|
|
import com.gyee.common.model.PointData;
|
|
|
import com.gyee.common.util.DateUtils;
|
|
@@ -11,9 +12,7 @@ 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;
|
|
|
-import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
|
|
|
-import com.gyee.runeconomy.service.auto.IProBasicProjectPlanService;
|
|
|
+import com.gyee.runeconomy.service.auto.*;
|
|
|
import com.gyee.runeconomy.util.MathUtil;
|
|
|
import com.gyee.runeconomy.util.StringUtils;
|
|
|
import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
|
|
@@ -34,7 +33,10 @@ public class MonitorService {
|
|
|
private IProBasicPowerstationPointService proBasicPowerstationPointService;
|
|
|
@Resource
|
|
|
private IProBasicEquipmentPointService proBasicEquipmentPointService;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private IProBasicCompanyService proBasicCompanyService;
|
|
|
+ @Resource
|
|
|
+ private IProEconTargetdataService proEconTargetdataService;
|
|
|
private final String QS = "0";
|
|
|
private final String FD = "-1";
|
|
|
private final String GF = "-2";
|
|
@@ -498,6 +500,26 @@ public class MonitorService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ Date current = com.gyee.common.util.DateUtils.getCurrentDate();
|
|
|
+ List<ProEconTargetdata> qwt =null;
|
|
|
+
|
|
|
+ double gflr = 0.0;
|
|
|
+ double fdlr = 0.0;
|
|
|
+
|
|
|
+ QueryWrapper<ProEconTargetdata> qw1 = new QueryWrapper<>();
|
|
|
+ qw1.eq("record_date", current);
|
|
|
+ qwt = proEconTargetdataService.list(qw1);
|
|
|
+
|
|
|
+
|
|
|
+ gflr = qwt.stream()
|
|
|
+ .filter(gf -> gf.getWindpowerstationId().endsWith("GDC_STA"))
|
|
|
+ .mapToDouble(gf -> gf.getPower())
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ fdlr = qwt.stream()
|
|
|
+ .filter(gf -> gf.getWindpowerstationId().endsWith("FDC_STA"))
|
|
|
+ .mapToDouble(gf -> gf.getPower())
|
|
|
+ .sum();
|
|
|
|
|
|
|
|
|
zjrlmap.put("zjrl", zjrl);
|
|
@@ -510,7 +532,7 @@ public class MonitorService {
|
|
|
|
|
|
//实时功率
|
|
|
ProBasicPowerstationPoint sjglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
|
|
|
- sjgl = edosUtil.getRealData(sjglvalue).getPointValueInDouble();
|
|
|
+ sjgl = edosUtil.getRealData(sjglvalue).getPointValueInDouble() + (gflr * 1000) + (fdlr * 1000);
|
|
|
|
|
|
|
|
|
//实时风速
|
|
@@ -558,17 +580,17 @@ public class MonitorService {
|
|
|
String str = wpId;
|
|
|
//实时功率
|
|
|
ProBasicPowerstationPoint fdsjglvalue = proBasicPowerstationPointService.getPowerstationPoint(str.substring(0, str.indexOf("0")) + "-1", ContantXk.SSZGL);
|
|
|
- fdsjgl = edosUtil.getRealData(fdsjglvalue).getPointValueInDouble();
|
|
|
+ fdsjgl = edosUtil.getRealData(fdsjglvalue).getPointValueInDouble() + (fdlr * 1000);
|
|
|
ProBasicPowerstationPoint gfsjglvalue = proBasicPowerstationPointService.getPowerstationPoint(str.substring(0, str.indexOf("0")) + "-2", ContantXk.SSZGL);
|
|
|
- gfsjgl = edosUtil.getRealData(gfsjglvalue).getPointValueInDouble();
|
|
|
+ gfsjgl = edosUtil.getRealData(gfsjglvalue).getPointValueInDouble() + (gflr * 1000);
|
|
|
}
|
|
|
if (wpId.contains(FD)) {
|
|
|
ProBasicPowerstationPoint fdsjglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
|
|
|
- fdsjgl = edosUtil.getRealData(fdsjglvalue).getPointValueInDouble();
|
|
|
+ fdsjgl = edosUtil.getRealData(fdsjglvalue).getPointValueInDouble()+ (fdlr * 1000);
|
|
|
}
|
|
|
if (wpId.contains(GF)) {
|
|
|
ProBasicPowerstationPoint gfsjglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
|
|
|
- gfsjgl = edosUtil.getRealData(gfsjglvalue).getPointValueInDouble();
|
|
|
+ gfsjgl = edosUtil.getRealData(gfsjglvalue).getPointValueInDouble()+ (gflr * 1000);
|
|
|
}
|
|
|
|
|
|
for (ProBasicPowerstation wp : wplist) {
|
|
@@ -595,7 +617,7 @@ public class MonitorService {
|
|
|
|
|
|
//实时功率
|
|
|
ProBasicPowerstationPoint sjglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
|
|
|
- sjgl = edosUtil.getRealData(sjglvalue).getPointValueInDouble();
|
|
|
+ sjgl = edosUtil.getRealData(sjglvalue).getPointValueInDouble() + (gflr * 1000) + (fdlr * 1000);
|
|
|
|
|
|
//实时风速
|
|
|
ProBasicPowerstationPoint ssfsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
|
|
@@ -913,6 +935,11 @@ public class MonitorService {
|
|
|
|
|
|
|
|
|
List<ProBasicCompany> cplist = CacheContext.cpls1;
|
|
|
+// List<ProBasicCompany> cplist = null;
|
|
|
+
|
|
|
+// QueryWrapper<ProBasicCompany> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("spare2", "1");
|
|
|
+// cplist = proBasicCompanyService.list(qw);
|
|
|
|
|
|
Map<String, Double> cblpoint = new LinkedHashMap<>();
|
|
|
|
|
@@ -1746,6 +1773,52 @@ public class MonitorService {
|
|
|
|
|
|
String str = wpId;
|
|
|
|
|
|
+// Date current = com.gyee.common.util.DateUtils.getCurrentDate();
|
|
|
+// List<ProEconTargetdata> qwt =null;
|
|
|
+//
|
|
|
+// double gfrlr = 0.0;
|
|
|
+// double gfylr = 0.0;
|
|
|
+// double gfnlr = 0.0;
|
|
|
+//
|
|
|
+// double fdrlr = 0.0;
|
|
|
+// double fdylr = 0.0;
|
|
|
+// double fdnlr = 0.0;
|
|
|
+//
|
|
|
+// QueryWrapper<ProEconTargetdata> qw = new QueryWrapper<>();
|
|
|
+// qw.eq("record_date", current);
|
|
|
+// qwt = proEconTargetdataService.list(qw);
|
|
|
+
|
|
|
+//
|
|
|
+// gfrlr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("GDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationDay())
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// fdrlr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("FDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationDay())
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// gfylr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("GDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationMonth())
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// fdylr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("FDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationMonth())
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// gfnlr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("GDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationYear())
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// fdnlr = qwt.stream()
|
|
|
+// .filter(gf -> gf.getWindpowerstationId().endsWith("FDC_STA"))
|
|
|
+// .mapToDouble(gf -> gf.getGenerationYear())
|
|
|
+// .sum();
|
|
|
+
|
|
|
if (wpId.endsWith(QS)) {
|
|
|
fdstr = str.substring(0, str.indexOf("0")) + "-1";
|
|
|
gfstr = str.substring(0, str.indexOf("0")) + "-2";
|
|
@@ -1776,13 +1849,20 @@ public class MonitorService {
|
|
|
gf_n_sjdl = gf_n_sjdl + gfnfdlsj;
|
|
|
} else if (wpId.endsWith(FD) || wpId.endsWith(GF)) {
|
|
|
ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RFDL);
|
|
|
- rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
|
|
|
+
|
|
|
+ rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble() ;
|
|
|
+
|
|
|
//月发电量
|
|
|
ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
|
|
|
- yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
|
|
|
+
|
|
|
+ yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble() ;
|
|
|
+
|
|
|
+
|
|
|
//年发电量
|
|
|
ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.NFDL);
|
|
|
- nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
|
|
|
+
|
|
|
+ nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble() ;
|
|
|
+
|
|
|
|
|
|
fd_r_sjdl = fd_r_sjdl + rfdlsj;
|
|
|
fd_y_sjdl = fd_y_sjdl + yfdlsj;
|