|
@@ -6,12 +6,10 @@ import com.gyee.common.model.StringUtils;
|
|
|
import com.gyee.generation.init.CacheContext;
|
|
|
import com.gyee.generation.model.auto.*;
|
|
|
import com.gyee.generation.model.vo.Location;
|
|
|
-import com.gyee.generation.service.auto.*;
|
|
|
+import com.gyee.generation.service.auto.IProEconPowerstationInfoDay1Service;
|
|
|
import com.gyee.generation.util.DateUtils;
|
|
|
import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
import com.gyee.generation.util.statisticcs.Initial;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -23,7 +21,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class WindPowerInfo1Service {
|
|
|
|
|
|
- private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
|
|
|
+// private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
|
|
|
@Resource
|
|
|
private IEdosUtil edosUtil;
|
|
|
|
|
@@ -35,8 +33,6 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
/**
|
|
|
* 计算区域日信息
|
|
|
- * @param recordDate
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
public void calRegionInfoDay(Date recordDate) throws Exception {
|
|
|
|
|
@@ -56,9 +52,9 @@ public class WindPowerInfo1Service {
|
|
|
for(ProEconPowerstationInfoDay1 wpinfo:wpinfodayls)
|
|
|
{
|
|
|
|
|
|
- if(rgmap.containsKey(wpinfo.getCompanyId()))
|
|
|
+ if(rgmap.containsKey(wpinfo.getRegionId()))
|
|
|
{
|
|
|
- Map<String, List<ProEconPowerstationInfoDay1>> map=rgmap.get(wpinfo.getCompanyId());
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay1>> map=rgmap.get(wpinfo.getRegionId());
|
|
|
List<ProEconPowerstationInfoDay1> qbls=map.get("qb");
|
|
|
List<ProEconPowerstationInfoDay1> gfls=map.get("fd");
|
|
|
List<ProEconPowerstationInfoDay1> fdls=map.get("gf");
|
|
@@ -88,6 +84,7 @@ public class WindPowerInfo1Service {
|
|
|
map.put("qb",qbls);
|
|
|
map.put("fd",fdls);
|
|
|
map.put("gf",gfls);
|
|
|
+ rgmap.put(wpinfo.getRegionId(),map);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -99,7 +96,7 @@ public class WindPowerInfo1Service {
|
|
|
&& i.getLocation().equals(Location.rg.getValue())).map(ProEconPowerstationInfoDay1::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- if (idls != null && idls.size() > 0) {
|
|
|
+ if (idls.size() > 0) {
|
|
|
|
|
|
proEconPowerstationInfoDay1Service.removeByIds(idls);
|
|
|
|
|
@@ -160,17 +157,15 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
|
|
|
|
|
|
- };
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 计算公司日信息
|
|
|
- * @param recordDate
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
- public void calCompanyInfoDay(Date recordDate) throws Exception {
|
|
|
+ public void calCompanyInfoDay(Date recordDate) {
|
|
|
|
|
|
List<ProEconPowerstationInfoDay1> wpinfodayls = proEconPowerstationInfoDay1Service.list().stream()
|
|
|
.filter(i -> i.getRecordDate().compareTo(DateUtils.truncDay(recordDate))==0
|
|
@@ -219,6 +214,7 @@ public class WindPowerInfo1Service {
|
|
|
map.put("qb",qbls);
|
|
|
map.put("fd",fdls);
|
|
|
map.put("gf",gfls);
|
|
|
+ cpmap.put(wpinfo.getCompanyId(),map);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -229,7 +225,7 @@ public class WindPowerInfo1Service {
|
|
|
&& i.getLocation().equals(Location.cp.getValue())).map(ProEconPowerstationInfoDay1::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- if (idls != null && idls.size() > 0) {
|
|
|
+ if (idls.size() > 0) {
|
|
|
|
|
|
proEconPowerstationInfoDay1Service.removeByIds(idls);
|
|
|
|
|
@@ -292,52 +288,52 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
|
|
|
|
|
|
- };
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void calCp(ProEconPowerstationInfoDay1 pewp,List<ProEconPowerstationInfoDay1> ls) throws Exception {
|
|
|
+ private void calCp(ProEconPowerstationInfoDay1 pewp,List<ProEconPowerstationInfoDay1> ls) {
|
|
|
|
|
|
if(!ls.isEmpty())
|
|
|
{
|
|
|
-// DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getRzdfs()).summaryStatistics();
|
|
|
+// DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzdfs).summaryStatistics();
|
|
|
// //日最大风速
|
|
|
// pewp.setRzdfs(summaryStatistics.getMax());
|
|
|
// //日最小风速
|
|
|
-// summaryStatistics=ls.stream().mapToDouble(n -> n.getRzxfs()).summaryStatistics();
|
|
|
+// summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzxfs).summaryStatistics();
|
|
|
// pewp.setRzxfs(summaryStatistics.getMin());
|
|
|
// //日平均风速
|
|
|
-// summaryStatistics=ls.stream().mapToDouble(n -> n.getRpjfs()).summaryStatistics();
|
|
|
+// summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRpjfs).summaryStatistics();
|
|
|
// pewp.setRpjfs(summaryStatistics.getAverage());
|
|
|
//
|
|
|
-// summaryStatistics=ls.stream().mapToDouble(n -> n.getRzdgl()).summaryStatistics();
|
|
|
+// summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzdgl).summaryStatistics();
|
|
|
// //日最大功率
|
|
|
// pewp.setRzdgl(summaryStatistics.getMax());
|
|
|
// //日最小功率
|
|
|
-// summaryStatistics=ls.stream().mapToDouble(n -> n.getRzxgl()).summaryStatistics();
|
|
|
+// summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzxgl).summaryStatistics();
|
|
|
// pewp.setRzxgl(summaryStatistics.getMin());
|
|
|
// //日平均功率
|
|
|
-// summaryStatistics=ls.stream().mapToDouble(n -> n.getRpjgl()).summaryStatistics();
|
|
|
+// summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRpjgl).summaryStatistics();
|
|
|
// pewp.setRpjgl(summaryStatistics.getAverage());
|
|
|
|
|
|
|
|
|
//日发电量
|
|
|
- DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(n -> n.getRfdl()).summaryStatistics();
|
|
|
+ DoubleSummaryStatistics summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRfdl).summaryStatistics();
|
|
|
pewp.setRfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日可用电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRkydl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRkydl).summaryStatistics();
|
|
|
pewp.setRkydl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//日理论发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRllfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRllfdl).summaryStatistics();
|
|
|
pewp.setRllfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//日故障损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRgzssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRgzssdl).summaryStatistics();
|
|
|
pewp.setRgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
@@ -345,76 +341,76 @@ public class WindPowerInfo1Service {
|
|
|
pewp.setRcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRjxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRjxssdl).summaryStatistics();
|
|
|
pewp.setRjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日场内受累检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRcnsljxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcnsljxssdl).summaryStatistics();
|
|
|
pewp.setRcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//日待机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRdjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRdjssdl).summaryStatistics();
|
|
|
pewp.setRdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日缺陷降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRqxjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRqxjclssdl).summaryStatistics();
|
|
|
pewp.setRqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日手动停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRsdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRsdtjssdl).summaryStatistics();
|
|
|
pewp.setRsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日性能损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRxnssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxnssdl).summaryStatistics();
|
|
|
pewp.setRxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日限电停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRxdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxdtjssdl).summaryStatistics();
|
|
|
pewp.setRxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日限电降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRxdjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRxdjclssdl).summaryStatistics();
|
|
|
pewp.setRxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//日场外受累电网损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRcwsldwssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcwsldwssdl).summaryStatistics();
|
|
|
pewp.setRcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//日场外受累天气损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRcwsltqssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRcwsltqssdl).summaryStatistics();
|
|
|
pewp.setRcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日增发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRzfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzfdl).summaryStatistics();
|
|
|
pewp.setRzfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日欠发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRqfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRqfdl).summaryStatistics();
|
|
|
pewp.setRqfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//日自耗电
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getRzhd()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getRzhd).summaryStatistics();
|
|
|
pewp.setRzhd(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYfdl).summaryStatistics();
|
|
|
pewp.setYfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月可用电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYkydl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYkydl).summaryStatistics();
|
|
|
pewp.setYkydl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//月理论发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYllfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYllfdl).summaryStatistics();
|
|
|
pewp.setYllfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//月故障损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYgzssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYgzssdl).summaryStatistics();
|
|
|
pewp.setYgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
@@ -422,76 +418,76 @@ public class WindPowerInfo1Service {
|
|
|
pewp.setYcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYjxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYjxssdl).summaryStatistics();
|
|
|
pewp.setYjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月场内受累检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYcnsljxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcnsljxssdl).summaryStatistics();
|
|
|
pewp.setYcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//月待机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYdjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYdjssdl).summaryStatistics();
|
|
|
pewp.setYdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月缺陷降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYqxjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYqxjclssdl).summaryStatistics();
|
|
|
pewp.setYqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月手动停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYsdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYsdtjssdl).summaryStatistics();
|
|
|
pewp.setYsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月性能损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYxnssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxnssdl).summaryStatistics();
|
|
|
pewp.setYxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月限电停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYxdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxdtjssdl).summaryStatistics();
|
|
|
pewp.setYxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月限电降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYxdjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYxdjclssdl).summaryStatistics();
|
|
|
pewp.setYxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//月场外受累电网损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYcwsldwssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcwsldwssdl).summaryStatistics();
|
|
|
pewp.setYcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//月场外受累天气损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYcwsltqssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYcwsltqssdl).summaryStatistics();
|
|
|
pewp.setYcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月增发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYzfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYzfdl).summaryStatistics();
|
|
|
pewp.setYzfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月欠发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYqfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYqfdl).summaryStatistics();
|
|
|
pewp.setYqfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//月自耗电
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getYzhd()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getYzhd).summaryStatistics();
|
|
|
pewp.setYzhd(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNfdl).summaryStatistics();
|
|
|
pewp.setNfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年可用电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNkydl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNkydl).summaryStatistics();
|
|
|
pewp.setNkydl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//年理论发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNllfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNllfdl).summaryStatistics();
|
|
|
pewp.setNllfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//年故障损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNgzssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNgzssdl).summaryStatistics();
|
|
|
pewp.setNgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
@@ -499,66 +495,64 @@ public class WindPowerInfo1Service {
|
|
|
pewp.setNcnslgzssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNjxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNjxssdl).summaryStatistics();
|
|
|
pewp.setNjxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年场内受累检修损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNcnsljxssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcnsljxssdl).summaryStatistics();
|
|
|
pewp.setNcnsljxssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//年待机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNdjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNdjssdl).summaryStatistics();
|
|
|
pewp.setNdjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年缺陷降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNqxjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNqxjclssdl).summaryStatistics();
|
|
|
pewp.setNqxjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年手动停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNsdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNsdtjssdl).summaryStatistics();
|
|
|
pewp.setNsdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年性能损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNxnssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxnssdl).summaryStatistics();
|
|
|
pewp.setNxnssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年限电停机损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNxdtjssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxdtjssdl).summaryStatistics();
|
|
|
pewp.setNxdtjssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年限电降出力损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNxdjclssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNxdjclssdl).summaryStatistics();
|
|
|
pewp.setNxdjclssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//年场外受累电网损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNcwsldwssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcwsldwssdl).summaryStatistics();
|
|
|
pewp.setNcwsldwssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
|
|
|
//年场外受累天气损失电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNcwsltqssdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNcwsltqssdl).summaryStatistics();
|
|
|
pewp.setNcwsltqssdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年增发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNzfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNzfdl).summaryStatistics();
|
|
|
pewp.setNzfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年欠发电量
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNqfdl()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNqfdl).summaryStatistics();
|
|
|
pewp.setNqfdl(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
//年自耗电
|
|
|
- summaryStatistics=ls.stream().mapToDouble(n -> n.getNzhd()).summaryStatistics();
|
|
|
+ summaryStatistics=ls.stream().mapToDouble(ProEconPowerstationInfoDay1::getNzhd).summaryStatistics();
|
|
|
pewp.setNzhd(StringUtils.round(summaryStatistics.getSum(),2));
|
|
|
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 计算场站日信息
|
|
|
- * @param recordDate
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
public void calWindpowerInfoDay(Date recordDate) throws Exception {
|
|
|
Calendar c=Calendar.getInstance();
|
|
@@ -569,7 +563,7 @@ public class WindPowerInfo1Service {
|
|
|
Date begin= DateUtils.truncDay(c.getTime());
|
|
|
|
|
|
|
|
|
- List<ProEconPowerstationInfoDay1> wpinfodayls=new ArrayList<>();
|
|
|
+
|
|
|
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
@@ -579,7 +573,7 @@ public class WindPowerInfo1Service {
|
|
|
&& i.getLocation().equals(Location.wp.getValue())).map(ProEconPowerstationInfoDay1::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- if (idls != null && idls.size() > 0) {
|
|
|
+ if (idls.size() > 0) {
|
|
|
|
|
|
proEconPowerstationInfoDay1Service.removeByIds(idls);
|
|
|
|
|
@@ -615,8 +609,8 @@ public class WindPowerInfo1Service {
|
|
|
.collect(Collectors.toList());
|
|
|
}
|
|
|
extracted(recordDate, end, begin, pointmap, pewp,pepid1ls);
|
|
|
-/*******************************************年信息统计*********************************************************/
|
|
|
-// wpinfodayls.add(pewp);
|
|
|
+//*******************************************年信息统计*********************************************************/
|
|
|
+
|
|
|
proEconPowerstationInfoDay1Service.save(pewp);
|
|
|
|
|
|
}
|
|
@@ -628,8 +622,6 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
/**
|
|
|
* 计算项目日信息
|
|
|
- * @param recordDate
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
public void calProjectInfoDay(Date recordDate) throws Exception {
|
|
|
Calendar c=Calendar.getInstance();
|
|
@@ -646,7 +638,7 @@ public class WindPowerInfo1Service {
|
|
|
&& i.getLocation().equals(Location.pj.getValue())).map(ProEconPowerstationInfoDay1::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- if (idls != null && idls.size() > 0) {
|
|
|
+ if (idls.size() > 0) {
|
|
|
|
|
|
proEconPowerstationInfoDay1Service.removeByIds(idls);
|
|
|
|
|
@@ -693,8 +685,6 @@ public class WindPowerInfo1Service {
|
|
|
}
|
|
|
/**
|
|
|
* 计算线路日信息
|
|
|
- * @param recordDate
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
public void calLineInfoDay(Date recordDate) throws Exception {
|
|
|
Calendar c=Calendar.getInstance();
|
|
@@ -711,7 +701,7 @@ public class WindPowerInfo1Service {
|
|
|
&& i.getLocation().equals(Location.ln.getValue()) ).map(ProEconPowerstationInfoDay1::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- if (idls != null && idls.size() > 0) {
|
|
|
+ if (idls.size() > 0) {
|
|
|
|
|
|
proEconPowerstationInfoDay1Service.removeByIds(idls);
|
|
|
|
|
@@ -757,14 +747,14 @@ public class WindPowerInfo1Service {
|
|
|
}
|
|
|
|
|
|
private void extracted(Date recordDate, Date end, Date begin, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay1 pewp, List<ProEconPowerstationInfoDay1> pepid1ls) throws Exception {
|
|
|
- /*******************************************日信息统计*********************************************************/
|
|
|
+ //*******************************************日信息统计*********************************************************/
|
|
|
if(pointmap.containsKey(ContantXk.SSPJFS))
|
|
|
{
|
|
|
ProBasicPowerstationPoint point= pointmap.get(ContantXk.SSPJFS);
|
|
|
List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
|
|
|
if(!pointls.isEmpty())
|
|
|
{
|
|
|
- DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
|
|
|
+ DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
|
|
|
//日最大风速
|
|
|
pewp.setRzdfs(summaryStatistics.getMax());
|
|
|
//日最小风速
|
|
@@ -781,7 +771,7 @@ public class WindPowerInfo1Service {
|
|
|
List<PointData> pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000);
|
|
|
if(!pointls.isEmpty())
|
|
|
{
|
|
|
- DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(n -> n.getPointValueInDouble()).summaryStatistics();
|
|
|
+ DoubleSummaryStatistics summaryStatistics=pointls.stream().mapToDouble(PointData::getPointValueInDouble).summaryStatistics();
|
|
|
//日最大功率
|
|
|
pewp.setRzdgl(summaryStatistics.getMax());
|
|
|
//日最小功率
|
|
@@ -1005,63 +995,56 @@ public class WindPowerInfo1Service {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/*******************************************日信息统计*********************************************************/
|
|
|
+//*******************************************日信息统计*********************************************************/
|
|
|
|
|
|
-/*******************************************月信息统计*********************************************************/
|
|
|
+//*******************************************月信息统计*********************************************************/
|
|
|
|
|
|
if(pepid1ls.isEmpty())
|
|
|
{
|
|
|
- setPowerandSpeedMonth(end, begin, pointmap, pewp);
|
|
|
+ setPowerandSpeedMonth(pewp);
|
|
|
}else
|
|
|
{
|
|
|
|
|
|
- if(!pepid1ls.isEmpty())
|
|
|
- {
|
|
|
- ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
|
|
|
+ ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
|
|
|
|
|
|
- //如果昨日大于今日最大功率
|
|
|
- if(pepid.getYzdgl()> pewp.getRzdgl())
|
|
|
- {
|
|
|
- pewp.setYzdgl(pepid.getYzdgl());
|
|
|
- }else {
|
|
|
- pewp.setYzdgl(pewp.getRzdgl());
|
|
|
- }
|
|
|
- //如果昨日大于今日最大风速
|
|
|
- if(pepid.getYzdfs()> pewp.getRzdfs())
|
|
|
- {
|
|
|
- pewp.setYzdfs(pepid.getYzdfs());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setYzdfs(pewp.getRzdfs());
|
|
|
- }
|
|
|
-
|
|
|
- //如果昨日小于今日最小功率
|
|
|
- if(pepid.getYzxgl()< pewp.getRzxgl())
|
|
|
- {
|
|
|
- pewp.setYzxgl(pepid.getYzxgl());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setYzxgl(pewp.getRzxgl());
|
|
|
- }
|
|
|
- //如果昨日小于今日最小风速
|
|
|
- if(pepid.getYzxfs()< pewp.getRzxfs())
|
|
|
- {
|
|
|
- pewp.setYzxfs(pepid.getYzxfs());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setYzxfs(pewp.getRzxfs());
|
|
|
- }
|
|
|
- double pjfs = new BigDecimal(pewp.getYpjfs()+pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
-
|
|
|
- pewp.setYzxfs(pjfs);
|
|
|
-
|
|
|
- double pjgl = new BigDecimal(pewp.getYpjgl()+pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
- pewp.setYzxgl(pjgl);
|
|
|
+ //如果昨日大于今日最大功率
|
|
|
+ if(pepid.getYzdgl()> pewp.getRzdgl())
|
|
|
+ {
|
|
|
+ pewp.setYzdgl(pepid.getYzdgl());
|
|
|
+ }else {
|
|
|
+ pewp.setYzdgl(pewp.getRzdgl());
|
|
|
+ }
|
|
|
+ //如果昨日大于今日最大风速
|
|
|
+ if(pepid.getYzdfs()> pewp.getRzdfs())
|
|
|
+ {
|
|
|
+ pewp.setYzdfs(pepid.getYzdfs());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ pewp.setYzdfs(pewp.getRzdfs());
|
|
|
+ }
|
|
|
|
|
|
+ //如果昨日小于今日最小功率
|
|
|
+ if(pepid.getYzxgl()< pewp.getRzxgl())
|
|
|
+ {
|
|
|
+ pewp.setYzxgl(pepid.getYzxgl());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ pewp.setYzxgl(pewp.getRzxgl());
|
|
|
+ }
|
|
|
+ //如果昨日小于今日最小风速
|
|
|
+ if(pepid.getYzxfs()< pewp.getRzxfs())
|
|
|
+ {
|
|
|
+ pewp.setYzxfs(pepid.getYzxfs());
|
|
|
}else
|
|
|
{
|
|
|
- setPowerandSpeedMonth(end, begin, pointmap, pewp);
|
|
|
+ pewp.setYzxfs(pewp.getRzxfs());
|
|
|
}
|
|
|
+ double pjfs = BigDecimal.valueOf(pewp.getYpjfs() + pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
+
|
|
|
+ pewp.setYzxfs(pjfs);
|
|
|
+
|
|
|
+ double pjgl = BigDecimal.valueOf(pewp.getYpjgl() + pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
+ pewp.setYzxgl(pjgl);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1280,62 +1263,55 @@ public class WindPowerInfo1Service {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/*******************************************月信息统计*********************************************************/
|
|
|
+///*******************************************月信息统计*********************************************************/
|
|
|
|
|
|
-/*******************************************年信息统计*********************************************************/
|
|
|
+//*******************************************年信息统计*********************************************************/
|
|
|
if(pepid1ls.isEmpty())
|
|
|
{
|
|
|
- setPowerandSpeedYear(end, begin, pointmap, pewp);
|
|
|
+ setPowerandSpeedYear(pewp);
|
|
|
}else
|
|
|
{
|
|
|
|
|
|
- if(!pepid1ls.isEmpty())
|
|
|
- {
|
|
|
- ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
|
|
|
+ ProEconPowerstationInfoDay1 pepid=pepid1ls.get(0);
|
|
|
|
|
|
- //如果昨日大于今日最大功率
|
|
|
- if(pepid.getNzdgl()> pewp.getRzdgl())
|
|
|
- {
|
|
|
- pewp.setNzdgl(pepid.getNzdgl());
|
|
|
- }else {
|
|
|
- pewp.setNzdgl(pewp.getRzdgl());
|
|
|
- }
|
|
|
- //如果昨日大于今日最大风速
|
|
|
- if(pepid.getNzdfs()> pewp.getRzdfs())
|
|
|
- {
|
|
|
- pewp.setNzdfs(pepid.getNzdfs());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setNzdfs(pewp.getRzdfs());
|
|
|
- }
|
|
|
-
|
|
|
- //如果昨日小于今日最小功率
|
|
|
- if(pepid.getNzxgl()< pewp.getRzxgl())
|
|
|
- {
|
|
|
- pewp.setNzxgl(pepid.getNzxgl());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setNzxgl(pewp.getRzxgl());
|
|
|
- }
|
|
|
- //如果昨日小于今日最小风速
|
|
|
- if(pepid.getNzxfs()< pewp.getRzxfs())
|
|
|
- {
|
|
|
- pewp.setNzxfs(pepid.getNzxfs());
|
|
|
- }else
|
|
|
- {
|
|
|
- pewp.setNzxfs(pewp.getRzxfs());
|
|
|
- }
|
|
|
- double pjfs = new BigDecimal(pewp.getNpjfs()+pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
-
|
|
|
- pewp.setNzxfs(pjfs);
|
|
|
-
|
|
|
- double pjgl = new BigDecimal(pewp.getNpjgl()+pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
- pewp.setNzxgl(pjgl);
|
|
|
+ //如果昨日大于今日最大功率
|
|
|
+ if(pepid.getNzdgl()> pewp.getRzdgl())
|
|
|
+ {
|
|
|
+ pewp.setNzdgl(pepid.getNzdgl());
|
|
|
+ }else {
|
|
|
+ pewp.setNzdgl(pewp.getRzdgl());
|
|
|
+ }
|
|
|
+ //如果昨日大于今日最大风速
|
|
|
+ if(pepid.getNzdfs()> pewp.getRzdfs())
|
|
|
+ {
|
|
|
+ pewp.setNzdfs(pepid.getNzdfs());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ pewp.setNzdfs(pewp.getRzdfs());
|
|
|
+ }
|
|
|
|
|
|
+ //如果昨日小于今日最小功率
|
|
|
+ if(pepid.getNzxgl()< pewp.getRzxgl())
|
|
|
+ {
|
|
|
+ pewp.setNzxgl(pepid.getNzxgl());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ pewp.setNzxgl(pewp.getRzxgl());
|
|
|
+ }
|
|
|
+ //如果昨日小于今日最小风速
|
|
|
+ if(pepid.getNzxfs()< pewp.getRzxfs())
|
|
|
+ {
|
|
|
+ pewp.setNzxfs(pepid.getNzxfs());
|
|
|
}else
|
|
|
{
|
|
|
- setPowerandSpeedYear(end, begin, pointmap, pewp);
|
|
|
+ pewp.setNzxfs(pewp.getRzxfs());
|
|
|
}
|
|
|
+ double pjfs = BigDecimal.valueOf(pewp.getNpjfs() + pepid.getRpjfs()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
+
|
|
|
+ pewp.setNzxfs(pjfs);
|
|
|
+
|
|
|
+ double pjgl = BigDecimal.valueOf(pewp.getNpjgl() + pepid.getRpjgl()).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
+ pewp.setNzxgl(pjgl);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1553,7 +1529,7 @@ public class WindPowerInfo1Service {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void setPowerandSpeedYear(Date end, Date begin, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay1 pewp) throws Exception {
|
|
|
+ private void setPowerandSpeedYear( ProEconPowerstationInfoDay1 pewp) {
|
|
|
//年最大风速
|
|
|
pewp.setNzdfs(pewp.getRzdfs());
|
|
|
//年最小风速
|
|
@@ -1569,7 +1545,7 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void setPowerandSpeedMonth(Date end, Date begin, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay1 pewp) throws Exception {
|
|
|
+ private void setPowerandSpeedMonth( ProEconPowerstationInfoDay1 pewp) {
|
|
|
|
|
|
//月最大风速
|
|
|
pewp.setYzdfs(pewp.getRzdfs());
|