|
@@ -0,0 +1,885 @@
|
|
|
+package com.gyee.generation.service;
|
|
|
+
|
|
|
+import com.gyee.common.contant.Contant;
|
|
|
+import com.gyee.common.model.PointData;
|
|
|
+import com.gyee.common.util.DateUtils;
|
|
|
+import com.gyee.generation.init.CacheContext;
|
|
|
+import com.gyee.generation.model.auto.*;
|
|
|
+import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicReference;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FiveLossesService
|
|
|
+ * @Author : xieshengjie
|
|
|
+ * @Date: 2022/5/2 16:13
|
|
|
+ * @Description : 五项损失,欠发状态,欠发发电量
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class FiveLossesService {
|
|
|
+ @Resource
|
|
|
+ private IEdosUtil edosUtil;
|
|
|
+ private List<Inverter> wtls;
|
|
|
+ private Map<String, Map<String, Photovoltaictestingpointnew>> wtpAimap;
|
|
|
+ private Date samedayZero;
|
|
|
+ private Date currentDate;
|
|
|
+ private Date tomorrow;
|
|
|
+ private List<Windpowerstation> wpls;
|
|
|
+ private Map<String, List<Project>> wppromap;
|
|
|
+ private Map<String, List<Line>> prolinemap;
|
|
|
+ private Map<String, List<Inverter>> linewtmap;
|
|
|
+ private Map<String, Map<String, Windpowerstationpointnew>> wppointmap;
|
|
|
+ private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
|
|
|
+ private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
|
|
|
+
|
|
|
+ private void init(){
|
|
|
+ wpls = CacheContext.wpls;
|
|
|
+ wtls = CacheContext.wtls;
|
|
|
+ wppromap = CacheContext.wppromap;
|
|
|
+ prolinemap = CacheContext.prolinemap;
|
|
|
+ wppointmap = CacheContext.wppointmap;
|
|
|
+ linepointmap = CacheContext.linepointmap;
|
|
|
+ propointmap = CacheContext.propointmap;
|
|
|
+ wtpAimap = CacheContext.wtpAimap;
|
|
|
+ linewtmap = CacheContext.linewtmap;
|
|
|
+ samedayZero = DateUtils.getSamedayZero();
|
|
|
+ currentDate = DateUtils.getCurrentDate();
|
|
|
+ tomorrow = DateUtils.addDays(samedayZero,1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void lossesReal() throws Exception {
|
|
|
+ init();
|
|
|
+ wtDaylossesReal();
|
|
|
+ wtMonthYearlossesReal();
|
|
|
+ wpDaylossesReal();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场站五损,欠发电量
|
|
|
+ */
|
|
|
+ private void wpDaylossesReal() throws Exception {
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
+ wpls.stream().forEach(wp->{
|
|
|
+ List<Project> projects = wppromap.get(wp.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> wppointnewMap = wppointmap.get(wp.getId());
|
|
|
+ AtomicReference<Double> wpdaydjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthdjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyeardjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaysdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaygzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthgzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyeargzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaygzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthgzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyeargzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaywhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaywhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdaydwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthdwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyeardwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpmonthhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpyearhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayqf0 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayqf1 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayqf2 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayqf3 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> wpdayqf4= new AtomicReference<>(0.0);
|
|
|
+ projects.stream().forEach(project -> {
|
|
|
+ List<Line> lines = prolinemap.get(project.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> projectpointnewMap = propointmap.get(project.getId());
|
|
|
+ AtomicReference<Double> projectdaydjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthdjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyeardjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaysdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaygzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthgzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyeargzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaygzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthgzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyeargzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaywhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaywhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdaydwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthdwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyeardwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectmonthhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectyearhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayqf0 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayqf1 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayqf2 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayqf3 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> projectdayqf4 = new AtomicReference<>(0.0);
|
|
|
+ lines.stream().forEach(line -> {
|
|
|
+ List<Inverter> windturbines = linewtmap.get(line.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> linepointnewMap = linepointmap.get(line.getId());
|
|
|
+ AtomicReference<Double> linedaydjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthdjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyeardjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaysdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearsdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearxnloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearfdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaygzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthgzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyeargzloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaygzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthgzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyeargzslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaywhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearwhloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaywhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearwhslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearxdtjloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearxdjclloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedaydwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthdwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyeardwslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linemonthhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> lineyearhjslloss = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayqf0 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayqf1 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayqf2 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayqf3 = new AtomicReference<>(0.0);
|
|
|
+ AtomicReference<Double> linedayqf4 = new AtomicReference<>(0.0);
|
|
|
+ windturbines.stream().forEach(wt->{
|
|
|
+ Map<String, Photovoltaictestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
|
+ //待机
|
|
|
+ Photovoltaictestingpointnew dayDjPoint = windturbinetestingpointnewMap.get(Contant.WTRDJSSDL);
|
|
|
+ Photovoltaictestingpointnew monthDjPoint = windturbinetestingpointnewMap.get(Contant.WTYDJSSDL);
|
|
|
+ Photovoltaictestingpointnew yearDjPoint = windturbinetestingpointnewMap.get(Contant.WTNDJSSDL);
|
|
|
+ geneLineloss(linedaydjloss, linemonthdjloss, lineyeardjloss, dayDjPoint, monthDjPoint, yearDjPoint);
|
|
|
+ //手动停机
|
|
|
+ Photovoltaictestingpointnew daySdtjPoint = windturbinetestingpointnewMap.get(Contant.WTRSTSSDL);
|
|
|
+ Photovoltaictestingpointnew monthSdtjPoint = windturbinetestingpointnewMap.get(Contant.WTYSTSSDL);
|
|
|
+ Photovoltaictestingpointnew yearSdtjPoint = windturbinetestingpointnewMap.get(Contant.WTNSTSSDL);
|
|
|
+ geneLineloss(linedaysdtjloss, linemonthsdtjloss, lineyearsdtjloss, daySdtjPoint, monthSdtjPoint, yearSdtjPoint);
|
|
|
+ //性能
|
|
|
+ Photovoltaictestingpointnew dayXnPoint = windturbinetestingpointnewMap.get(Contant.WTRXNSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXnPoint = windturbinetestingpointnewMap.get(Contant.WTYXNSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXnPoint = windturbinetestingpointnewMap.get(Contant.WTNXNSSDL);
|
|
|
+ geneLineloss(linedayxnloss, linemonthxnloss, lineyearxnloss, dayXnPoint, monthXnPoint, yearXnPoint);
|
|
|
+ //发电降出力
|
|
|
+ Photovoltaictestingpointnew dayFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTRQXSSDL);
|
|
|
+ Photovoltaictestingpointnew monthFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTYQXSSDL);
|
|
|
+ Photovoltaictestingpointnew yearFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTNQXSSDL);
|
|
|
+ geneLineloss(linedayfdjclloss, linemonthfdjclloss, lineyearfdjclloss, dayFdjclPoint, monthFdjclPoint, yearFdjclPoint);
|
|
|
+ //故障
|
|
|
+ Photovoltaictestingpointnew dayGzPoint = windturbinetestingpointnewMap.get(Contant.WTRGZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthGzPoint = windturbinetestingpointnewMap.get(Contant.WTYGZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearGzPoint = windturbinetestingpointnewMap.get(Contant.WTNGZSSDL);
|
|
|
+ geneLineloss(linedaygzloss, linemonthgzloss, lineyeargzloss, dayGzPoint, monthGzPoint, yearGzPoint);
|
|
|
+ //故障受累
|
|
|
+ Photovoltaictestingpointnew dayGzslPoint = windturbinetestingpointnewMap.get(Contant.WTRSZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthGzslPoint = windturbinetestingpointnewMap.get(Contant.WTYSZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearGzslPoint = windturbinetestingpointnewMap.get(Contant.WTNSZSSDL);
|
|
|
+ geneLineloss(linedaygzslloss, linemonthgzslloss, lineyeargzslloss, dayGzslPoint, monthGzslPoint, yearGzslPoint);
|
|
|
+ //维护
|
|
|
+ Photovoltaictestingpointnew dayWhPoint = windturbinetestingpointnewMap.get(Contant.WTRJXSSDL);
|
|
|
+ Photovoltaictestingpointnew monthWhPoint = windturbinetestingpointnewMap.get(Contant.WTYJXSSDL);
|
|
|
+ Photovoltaictestingpointnew yearWhPoint = windturbinetestingpointnewMap.get(Contant.WTNJXSSDL);
|
|
|
+ geneLineloss(linedaywhloss, linemonthwhloss, lineyearwhloss, dayWhPoint, monthWhPoint, yearWhPoint);
|
|
|
+ //维护受累
|
|
|
+ Photovoltaictestingpointnew dayWhslPoint = windturbinetestingpointnewMap.get(Contant.WTRLZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthWhslPoint = windturbinetestingpointnewMap.get(Contant.WTYLZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearWhslPoint = windturbinetestingpointnewMap.get(Contant.WTNLZSSDL);
|
|
|
+ geneLineloss(linedaywhslloss, linemonthwhslloss, lineyearwhslloss, dayWhslPoint, monthWhslPoint, yearWhslPoint);
|
|
|
+ //限电降出力
|
|
|
+ Photovoltaictestingpointnew dayXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTRQFSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTYQFSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTNQFSSDL);
|
|
|
+ geneLineloss(linedayxdjclloss, linemonthxdjclloss, lineyearxdjclloss, dayXdjclPoint, monthXdjclPoint, yearXdjclPoint);
|
|
|
+ //限电停机
|
|
|
+ Photovoltaictestingpointnew dayXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTRXDSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTYXDSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTNXDSSDL);
|
|
|
+ geneLineloss(linedayxdtjloss, linemonthxdtjloss, lineyearxdtjloss, dayXdtjPoint, monthXdtjPoint, yearXdtjPoint);
|
|
|
+ //电网受累
|
|
|
+ Photovoltaictestingpointnew dayDwslPoint = windturbinetestingpointnewMap.get(Contant.WTRWZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthDwslPoint = windturbinetestingpointnewMap.get(Contant.WTYWZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearDwslPoint = windturbinetestingpointnewMap.get(Contant.WTNWZSSDL);
|
|
|
+ geneLineloss(linedaydwslloss, linemonthdwslloss, lineyeardwslloss, dayDwslPoint, monthDwslPoint, yearDwslPoint);
|
|
|
+ //环境受累
|
|
|
+ Photovoltaictestingpointnew dayHjslPoint = windturbinetestingpointnewMap.get(Contant.WTRTZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthHjslPoint = windturbinetestingpointnewMap.get(Contant.WTYTZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearHjslPoint = windturbinetestingpointnewMap.get(Contant.WTNTZSSDL);
|
|
|
+ geneLineloss(linedayhjslloss, linemonthhjslloss, lineyearhjslloss, dayHjslPoint, monthHjslPoint, yearHjslPoint);
|
|
|
+ //欠发发电量
|
|
|
+ Photovoltaictestingpointnew dayqf0 = windturbinetestingpointnewMap.get(Contant.R0QFZT);
|
|
|
+ Photovoltaictestingpointnew dayqf1 = windturbinetestingpointnewMap.get(Contant.R1QFZT);
|
|
|
+ Photovoltaictestingpointnew dayqf2 = windturbinetestingpointnewMap.get(Contant.R2QFZT);
|
|
|
+ Photovoltaictestingpointnew dayqf3 = windturbinetestingpointnewMap.get(Contant.R3QFZT);
|
|
|
+ Photovoltaictestingpointnew dayqf4 = windturbinetestingpointnewMap.get(Contant.R4QFZT);
|
|
|
+ geneLineQfloss(linedayqf0, linedayqf1, linedayqf2,linedayqf3,linedayqf4, dayqf0, dayqf1, dayqf2,dayqf3,dayqf4);
|
|
|
+ });
|
|
|
+ //待机
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RSDJZSDL), linedaydjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YSDJZSDL), linemonthdjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NSDJZSDL), lineyeardjloss);
|
|
|
+ projectdaydjloss.updateAndGet(v->new Double((double) (v + linedaydjloss.get())));
|
|
|
+ projectmonthdjloss.updateAndGet(v->new Double((double) (v + linemonthdjloss.get())));
|
|
|
+ projectyeardjloss.updateAndGet(v->new Double((double) (v + lineyeardjloss.get())));
|
|
|
+ //手动停机
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RSSTZSDL), linedaysdtjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YSSTZSDL), linemonthsdtjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NSSTZSDL), lineyearsdtjloss);
|
|
|
+ projectdaysdtjloss.updateAndGet(v->new Double((double) (v + linedaysdtjloss.get())));
|
|
|
+ projectmonthsdtjloss.updateAndGet(v->new Double((double) (v + linemonthsdtjloss.get())));
|
|
|
+ projectyearsdtjloss.updateAndGet(v->new Double((double) (v + lineyearsdtjloss.get())));
|
|
|
+ //性能
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RXNZSDL), linedayxnloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YXNZSDL), linemonthxnloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NXNZSDL), lineyearxnloss);
|
|
|
+ projectdayxnloss.updateAndGet(v->new Double((double) (v + linedayxnloss.get())));
|
|
|
+ projectmonthxnloss.updateAndGet(v->new Double((double) (v + linemonthxnloss.get())));
|
|
|
+ projectyearxnloss.updateAndGet(v->new Double((double) (v + lineyearxnloss.get())));
|
|
|
+ //发电降出力
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RSQXZSDL), linedayfdjclloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YSQXZSDL), linemonthfdjclloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NSQXZSDL), lineyearfdjclloss);
|
|
|
+ projectdayfdjclloss.updateAndGet(v->new Double((double) (v + linedayfdjclloss.get())));
|
|
|
+ projectmonthfdjclloss.updateAndGet(v->new Double((double) (v + linemonthfdjclloss.get())));
|
|
|
+ projectyearfdjclloss.updateAndGet(v->new Double((double) (v + lineyearfdjclloss.get())));
|
|
|
+ //故障
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RGZZSDL), linedaygzloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YGZZSDL), linemonthgzloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NGZZSDL), lineyeargzloss);
|
|
|
+ projectdaygzloss.updateAndGet(v->new Double((double) (v + linedaygzloss.get())));
|
|
|
+ projectmonthgzloss.updateAndGet(v->new Double((double) (v + linemonthgzloss.get())));
|
|
|
+ projectyeargzloss.updateAndGet(v->new Double((double) (v + lineyeargzloss.get())));
|
|
|
+ //故障受累
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RSZZSDL), linedaygzslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YSZZSDL), linemonthgzslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NSZZSDL), lineyeargzslloss);
|
|
|
+ projectdaygzslloss.updateAndGet(v->new Double((double) (v + linedaygzslloss.get())));
|
|
|
+ projectmonthgzslloss.updateAndGet(v->new Double((double) (v + linemonthgzslloss.get())));
|
|
|
+ projectyeargzslloss.updateAndGet(v->new Double((double) (v + lineyeargzslloss.get())));
|
|
|
+ //维护
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RJXZSDL), linedaywhloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YJXZSDL), linemonthwhloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NJXZSDL), lineyearwhloss);
|
|
|
+ projectdaywhloss.updateAndGet(v->new Double((double) (v + linedaywhloss.get())));
|
|
|
+ projectmonthwhloss.updateAndGet(v->new Double((double) (v + linemonthwhloss.get())));
|
|
|
+ projectyearwhloss.updateAndGet(v->new Double((double) (v + lineyearwhloss.get())));
|
|
|
+ //维护受累
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RLZZSDL), linedaywhslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YLZZSDL), linemonthwhslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NLZZSDL), lineyearwhslloss);
|
|
|
+ projectdaywhslloss.updateAndGet(v->new Double((double) (v + linedaywhslloss.get())));
|
|
|
+ projectmonthwhslloss.updateAndGet(v->new Double((double) (v + linemonthwhslloss.get())));
|
|
|
+ projectyearwhslloss.updateAndGet(v->new Double((double) (v + lineyearwhslloss.get())));
|
|
|
+ //限电降出力
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RQFZSDL), linedayxdjclloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YQFZSDL), linemonthxdjclloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NQFZSDL), lineyearxdjclloss);
|
|
|
+ projectdayxdjclloss.updateAndGet(v->new Double((double) (v + linedayxdjclloss.get())));
|
|
|
+ projectmonthxdjclloss.updateAndGet(v->new Double((double) (v + linemonthxdjclloss.get())));
|
|
|
+ projectyearxdjclloss.updateAndGet(v->new Double((double) (v + lineyearxdjclloss.get())));
|
|
|
+ //限电停机
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RXDZSDL), linedayxdtjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YXDZSDL), linemonthxdtjloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NXDZSDL), lineyearxdtjloss);
|
|
|
+ projectdayxdtjloss.updateAndGet(v->new Double((double) (v + linedayxdtjloss.get())));
|
|
|
+ projectmonthxdtjloss.updateAndGet(v->new Double((double) (v + linemonthxdtjloss.get())));
|
|
|
+ projectyearxdtjloss.updateAndGet(v->new Double((double) (v + lineyearxdtjloss.get())));
|
|
|
+ //电网受累
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RWZZSDL), linedaydwslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YWZZSDL), linemonthdwslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NWZZSDL), lineyeardwslloss);
|
|
|
+ projectdaydwslloss.updateAndGet(v->new Double((double) (v + linedaydwslloss.get())));
|
|
|
+ projectmonthdwslloss.updateAndGet(v->new Double((double) (v + linemonthdwslloss.get())));
|
|
|
+ projectyeardwslloss.updateAndGet(v->new Double((double) (v + lineyeardwslloss.get())));
|
|
|
+ //环境受累
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.RTZZSDL), linedayhjslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.YTZZSDL), linemonthhjslloss);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.NTZZSDL), lineyearhjslloss);
|
|
|
+ projectdayhjslloss.updateAndGet(v->new Double((double) (v + linedayhjslloss.get())));
|
|
|
+ projectmonthhjslloss.updateAndGet(v->new Double((double) (v + linemonthhjslloss.get())));
|
|
|
+ projectyearhjslloss.updateAndGet(v->new Double((double) (v + lineyearhjslloss.get())));
|
|
|
+ //欠发发电量
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.R0QFZT), linedayqf0);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.R1QFZT), linedayqf1);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.R2QFZT), linedayqf2);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.R3QFZT), linedayqf3);
|
|
|
+ addWpPoint(resultList, linepointnewMap.get(Contant.R4QFZT), linedayqf4);
|
|
|
+ projectdayqf0.updateAndGet(v->new Double((double) (v + linedayqf0.get())));
|
|
|
+ projectdayqf1.updateAndGet(v->new Double((double) (v + linedayqf1.get())));
|
|
|
+ projectdayqf2.updateAndGet(v->new Double((double) (v + linedayqf2.get())));
|
|
|
+ projectdayqf3.updateAndGet(v->new Double((double) (v + linedayqf3.get())));
|
|
|
+ projectdayqf4.updateAndGet(v->new Double((double) (v + linedayqf4.get())));
|
|
|
+ });
|
|
|
+ //待机
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RSDJZSDL), projectdaydjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YSDJZSDL), projectmonthdjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NSDJZSDL), projectyeardjloss);
|
|
|
+ wpdaydjloss.updateAndGet(v->new Double((double) (v + projectdaydjloss.get())));
|
|
|
+ wpmonthdjloss.updateAndGet(v->new Double((double) (v + projectmonthdjloss.get())));
|
|
|
+ wpyeardjloss.updateAndGet(v->new Double((double) (v + projectyeardjloss.get())));
|
|
|
+ //手动停机
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RSSTZSDL), projectdaysdtjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YSSTZSDL), projectmonthsdtjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NSSTZSDL), projectyearsdtjloss);
|
|
|
+ wpdaysdtjloss.updateAndGet(v->new Double((double) (v + projectdaysdtjloss.get())));
|
|
|
+ wpmonthsdtjloss.updateAndGet(v->new Double((double) (v + projectmonthsdtjloss.get())));
|
|
|
+ wpyearsdtjloss.updateAndGet(v->new Double((double) (v + projectyearsdtjloss.get())));
|
|
|
+ //性能
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RXNZSDL), projectdayxnloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YXNZSDL), projectmonthxnloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NXNZSDL), projectyearxnloss);
|
|
|
+ wpdayxnloss.updateAndGet(v->new Double((double) (v + projectdayxnloss.get())));
|
|
|
+ wpmonthxnloss.updateAndGet(v->new Double((double) (v + projectmonthxnloss.get())));
|
|
|
+ wpyearxnloss.updateAndGet(v->new Double((double) (v + projectyearxnloss.get())));
|
|
|
+ //发电降出力
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RSQXZSDL), projectdayfdjclloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YSQXZSDL), projectmonthfdjclloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NSQXZSDL), projectyearfdjclloss);
|
|
|
+ wpdayfdjclloss.updateAndGet(v->new Double((double) (v + projectdayfdjclloss.get())));
|
|
|
+ wpmonthfdjclloss.updateAndGet(v->new Double((double) (v + projectmonthfdjclloss.get())));
|
|
|
+ wpyearfdjclloss.updateAndGet(v->new Double((double) (v + projectyearfdjclloss.get())));
|
|
|
+ //故障
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RGZZSDL), projectdaygzloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YGZZSDL), projectmonthgzloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NGZZSDL), projectyeargzloss);
|
|
|
+ wpdaygzloss.updateAndGet(v->new Double((double) (v + projectdaygzloss.get())));
|
|
|
+ wpmonthgzloss.updateAndGet(v->new Double((double) (v + projectmonthgzloss.get())));
|
|
|
+ wpyeargzloss.updateAndGet(v->new Double((double) (v + projectyeargzloss.get())));
|
|
|
+ //故障受累
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RSZZSDL), projectdaygzslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YSZZSDL), projectmonthgzslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NSZZSDL), projectyeargzslloss);
|
|
|
+ wpdaygzslloss.updateAndGet(v->new Double((double) (v + projectdaygzslloss.get())));
|
|
|
+ wpmonthgzslloss.updateAndGet(v->new Double((double) (v + projectmonthgzslloss.get())));
|
|
|
+ wpyeargzslloss.updateAndGet(v->new Double((double) (v + projectyeargzslloss.get())));
|
|
|
+ //维护
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RJXZSDL), projectdaywhloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YJXZSDL), projectmonthwhloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NJXZSDL), projectyearwhloss);
|
|
|
+ wpdaywhloss.updateAndGet(v->new Double((double) (v + projectdaywhloss.get())));
|
|
|
+ wpmonthwhloss.updateAndGet(v->new Double((double) (v + projectmonthwhloss.get())));
|
|
|
+ wpyearwhloss.updateAndGet(v->new Double((double) (v + projectyearwhloss.get())));
|
|
|
+ //维护受累
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RLZZSDL), projectdaywhslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YLZZSDL), projectmonthwhslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NLZZSDL), projectyearwhslloss);
|
|
|
+ wpdaywhslloss.updateAndGet(v->new Double((double) (v + projectdaywhslloss.get())));
|
|
|
+ wpmonthwhslloss.updateAndGet(v->new Double((double) (v + projectmonthwhslloss.get())));
|
|
|
+ wpyearwhslloss.updateAndGet(v->new Double((double) (v + projectyearwhslloss.get())));
|
|
|
+ //限电降出力
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RQFZSDL), projectdayxdjclloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YQFZSDL), projectmonthxdjclloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NQFZSDL), projectyearxdjclloss);
|
|
|
+ wpdayxdjclloss.updateAndGet(v->new Double((double) (v + projectdayxdjclloss.get())));
|
|
|
+ wpmonthxdjclloss.updateAndGet(v->new Double((double) (v + projectmonthxdjclloss.get())));
|
|
|
+ wpyearxdjclloss.updateAndGet(v->new Double((double) (v + projectyearxdjclloss.get())));
|
|
|
+ //限电停机
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RXDZSDL), projectdayxdtjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YXDZSDL), projectmonthxdtjloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NXDZSDL), projectyearxdtjloss);
|
|
|
+ wpdayxdtjloss.updateAndGet(v->new Double((double) (v + projectdayxdtjloss.get())));
|
|
|
+ wpmonthxdtjloss.updateAndGet(v->new Double((double) (v + projectmonthxdtjloss.get())));
|
|
|
+ wpyearxdtjloss.updateAndGet(v->new Double((double) (v + projectyearxdtjloss.get())));
|
|
|
+ //电网受累
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RWZZSDL), projectdaydwslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YWZZSDL), projectmonthdwslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NWZZSDL), projectyeardwslloss);
|
|
|
+ wpdaydwslloss.updateAndGet(v->new Double((double) (v + projectdaydwslloss.get())));
|
|
|
+ wpmonthdwslloss.updateAndGet(v->new Double((double) (v + projectmonthdwslloss.get())));
|
|
|
+ wpyeardwslloss.updateAndGet(v->new Double((double) (v + projectyeardwslloss.get())));
|
|
|
+ //环境受累
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.RTZZSDL), projectdayhjslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.YTZZSDL), projectmonthhjslloss);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.NTZZSDL), projectyearhjslloss);
|
|
|
+ wpdayhjslloss.updateAndGet(v->new Double((double) (v + projectdayhjslloss.get())));
|
|
|
+ wpmonthhjslloss.updateAndGet(v->new Double((double) (v + projectmonthhjslloss.get())));
|
|
|
+ wpyearhjslloss.updateAndGet(v->new Double((double) (v + projectyearhjslloss.get())));
|
|
|
+ //欠发发电量
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.R0QFZT), projectdayqf0);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.R1QFZT), projectdayqf1);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.R2QFZT), projectdayqf2);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.R3QFZT), projectdayqf3);
|
|
|
+ addWpPoint(resultList, projectpointnewMap.get(Contant.R4QFZT), projectdayqf4);
|
|
|
+ wpdayqf0.updateAndGet(v->new Double((double) (v + projectdayqf0.get())));
|
|
|
+ wpdayqf1.updateAndGet(v->new Double((double) (v + projectdayqf1.get())));
|
|
|
+ wpdayqf2.updateAndGet(v->new Double((double) (v + projectdayqf2.get())));
|
|
|
+ wpdayqf3.updateAndGet(v->new Double((double) (v + projectdayqf3.get())));
|
|
|
+ wpdayqf4.updateAndGet(v->new Double((double) (v + projectdayqf4.get())));
|
|
|
+ });
|
|
|
+ //待机
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RSDJZSDL), wpdaydjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YSDJZSDL), wpmonthdjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NSDJZSDL), wpyeardjloss);
|
|
|
+ //手动停机
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RSSTZSDL), wpdaysdtjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YSSTZSDL), wpmonthsdtjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NSSTZSDL), wpyearsdtjloss);
|
|
|
+
|
|
|
+ //性能
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RXNZSDL), wpdayxnloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YXNZSDL), wpmonthxnloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NXNZSDL), wpyearxnloss);
|
|
|
+ //发电降出力
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RSQXZSDL), wpdayfdjclloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YSQXZSDL), wpmonthfdjclloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NSQXZSDL), wpyearfdjclloss);
|
|
|
+ //故障
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RGZZSDL), wpdaygzloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YGZZSDL), wpmonthgzloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NGZZSDL), wpyeargzloss);
|
|
|
+ //故障受累
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RSZZSDL), wpdaygzslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YSZZSDL), wpmonthgzslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NSZZSDL), wpyeargzslloss);
|
|
|
+ //维护
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RJXZSDL), wpdaywhloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YJXZSDL), wpmonthwhloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NJXZSDL), wpyearwhloss);
|
|
|
+ //维护受累
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RLZZSDL), wpdaywhslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YLZZSDL), wpmonthwhslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NLZZSDL), wpyearwhslloss);
|
|
|
+ //限电降出力
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RQFZSDL), wpdayxdjclloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YQFZSDL), wpmonthxdjclloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NQFZSDL), wpyearxdjclloss);
|
|
|
+ //限电停机
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RXDZSDL), wpdayxdtjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YXDZSDL), wpmonthxdtjloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NXDZSDL), wpyearxdtjloss);
|
|
|
+ //电网受累
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RWZZSDL), wpdaydwslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YWZZSDL), wpmonthdwslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NWZZSDL), wpyeardwslloss);
|
|
|
+ //环境受累
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.RTZZSDL), wpdayhjslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.YTZZSDL), wpmonthhjslloss);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.NTZZSDL), wpyearhjslloss);
|
|
|
+ //欠发发电量
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.R0QFZT), wpdayqf0);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.R1QFZT), wpdayqf1);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.R2QFZT), wpdayqf2);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.R3QFZT), wpdayqf3);
|
|
|
+ addWpPoint(resultList, wppointnewMap.get(Contant.R4QFZT), wpdayqf4);
|
|
|
+ });
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void geneLineQfloss(AtomicReference<Double> linedayqf0, AtomicReference<Double> linedayqf1, AtomicReference<Double> linedayqf2, AtomicReference<Double> linedayqf3, AtomicReference<Double> linedayqf4, Photovoltaictestingpointnew dayqf0, Photovoltaictestingpointnew dayqf1, Photovoltaictestingpointnew dayqf2, Photovoltaictestingpointnew dayqf3, Photovoltaictestingpointnew dayqf4) {
|
|
|
+ double wtdayqf0 = 0.0;
|
|
|
+ double wtdayqf1 = 0.0;
|
|
|
+ double wtdayqf2 = 0.0;
|
|
|
+ double wtdayqf3 = 0.0;
|
|
|
+ double wtdayqf4 = 0.0;
|
|
|
+ try {
|
|
|
+ wtdayqf0 = edosUtil.getSectionData(dayqf0,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtdayqf1 = edosUtil.getSectionData(dayqf1,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtdayqf2 = edosUtil.getSectionData(dayqf2,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtdayqf3 = edosUtil.getSectionData(dayqf3,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtdayqf4 = edosUtil.getSectionData(dayqf4,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ double finalWtdayqf = wtdayqf0;
|
|
|
+ linedayqf0.updateAndGet(v -> new Double((double) (v + finalWtdayqf)));
|
|
|
+ double finalWtdayqf1 = wtdayqf1;
|
|
|
+ linedayqf1.updateAndGet(v -> new Double((double) (v + finalWtdayqf1)));
|
|
|
+ double finalWtdayqf2 = wtdayqf2;
|
|
|
+ linedayqf2.updateAndGet(v -> new Double((double) (v + finalWtdayqf2)));
|
|
|
+ double finalWtdayqf3 = wtdayqf3;
|
|
|
+ linedayqf3.updateAndGet(v -> new Double((double) (v + finalWtdayqf3)));
|
|
|
+ double finalWtdayqf4 = wtdayqf4;
|
|
|
+ linedayqf4.updateAndGet(v -> new Double((double) (v + finalWtdayqf4)));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addWpPoint(List<PointData> resultList, Windpowerstationpointnew pointnew, AtomicReference<Double> linedaydjloss) {
|
|
|
+ PointData wpPointData = createWpPointData(pointnew, linedaydjloss.get());
|
|
|
+ resultList.add(wpPointData);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void geneLineloss(AtomicReference<Double> linedaydjloss, AtomicReference<Double> linemonthdjloss, AtomicReference<Double> lineyeardjloss, Photovoltaictestingpointnew dayDjPoint, Photovoltaictestingpointnew monthDjPoint, Photovoltaictestingpointnew yearDjPoint) {
|
|
|
+ double wtdaydj = 0.0;
|
|
|
+ double wtmonthdj = 0.0;
|
|
|
+ double wtyeardj = 0.0;
|
|
|
+ try {
|
|
|
+ wtdaydj = edosUtil.getSectionData(dayDjPoint,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtmonthdj = edosUtil.getSectionData(monthDjPoint,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ wtyeardj = edosUtil.getSectionData(yearDjPoint,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ double finalWtdaydj = wtdaydj;
|
|
|
+ linedaydjloss.updateAndGet(v -> new Double((double) (v + finalWtdaydj)));
|
|
|
+ double finalWtmonthdj = wtmonthdj;
|
|
|
+ linemonthdjloss.updateAndGet(v -> new Double((double) (v + finalWtmonthdj)));
|
|
|
+ double finalWtyeardj = wtyeardj;
|
|
|
+ lineyeardjloss.updateAndGet(v -> new Double((double) (v + finalWtyeardj)));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 风机日五损,欠发状态,欠发电量
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ private void wtDaylossesReal() throws Exception {
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
+ wtls.stream().forEach(wt->{
|
|
|
+ Map<String, Photovoltaictestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
|
+ Photovoltaictestingpointnew powerPoint = windturbinetestingpointnewMap.get(Contant.AI130);
|
|
|
+ Photovoltaictestingpointnew ztmxPoint = windturbinetestingpointnewMap.get(Contant.ZTMX);
|
|
|
+ Photovoltaictestingpointnew bzglPoint = windturbinetestingpointnewMap.get(Contant.BZGL);
|
|
|
+ Photovoltaictestingpointnew zsglPoint = windturbinetestingpointnewMap.get(Contant.ZSGL);
|
|
|
+ Photovoltaictestingpointnew qfztPoint = windturbinetestingpointnewMap.get(Contant.RSSQFZT);
|
|
|
+ List<PointData> powerDatasSnap = null;
|
|
|
+ List<PointData> ztmxDatasSnap = null;
|
|
|
+ List<PointData> bzglDatasSnap = null;
|
|
|
+ List<PointData> zsglDatasSnap = null;
|
|
|
+ List<PointData> qfztDatasSnap = null;
|
|
|
+ try {
|
|
|
+ powerDatasSnap = edosUtil.getHistoryDatasSnap(powerPoint, samedayZero.getTime() / 1000, currentDate.getTime() / 1000, null, 60l);
|
|
|
+ if (powerDatasSnap.size()==1){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ztmxDatasSnap = edosUtil.getHistoryDatasSnap(ztmxPoint,samedayZero.getTime()/1000,currentDate.getTime()/1000,null,60l);
|
|
|
+ bzglDatasSnap = edosUtil.getHistoryDatasSnap(bzglPoint,samedayZero.getTime()/1000,currentDate.getTime()/1000,null,60l);
|
|
|
+ zsglDatasSnap = edosUtil.getHistoryDatasSnap(zsglPoint,samedayZero.getTime()/1000,currentDate.getTime()/1000,null,60l);
|
|
|
+ qfztDatasSnap = edosUtil.getHistoryDatasSnap(qfztPoint,samedayZero.getTime()/1000,currentDate.getTime()/1000,null,60l);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (ztmxDatasSnap.size() == powerDatasSnap.size()){
|
|
|
+ //待机损失
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 0.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRDJSSDL));
|
|
|
+ //手动停机
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 1.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRSTSSDL));
|
|
|
+ //并网损失电量
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 2.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRXNSSDL));
|
|
|
+ //发电降出力
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 3.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRQXSSDL));
|
|
|
+ //限电降出力
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 4.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRQFSSDL));
|
|
|
+ //限电停机
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 5.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRXDSSDL));
|
|
|
+ //故障
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 6.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRGZSSDL));
|
|
|
+ //故障受累
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 7.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRSZSSDL));
|
|
|
+ //检修
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 8.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRJXSSDL));
|
|
|
+ //检修受累
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 9.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRLZSSDL));
|
|
|
+ //电网受累
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 10.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRWZSSDL));
|
|
|
+ //环境受累
|
|
|
+ generalLoss(ztmxDatasSnap, bzglDatasSnap, zsglDatasSnap, powerDatasSnap, 11.0,resultList,windturbinetestingpointnewMap.get(Contant.WTRTZSSDL));
|
|
|
+
|
|
|
+ //欠发状态
|
|
|
+ generalQfzt(powerDatasSnap, ztmxDatasSnap, zsglDatasSnap,qfztPoint,resultList);
|
|
|
+ //欠发电量
|
|
|
+ generalQfss(qfztDatasSnap,bzglDatasSnap,zsglDatasSnap,powerDatasSnap,0.0,resultList,windturbinetestingpointnewMap.get(Contant.R0QFZT));
|
|
|
+ generalQfss(qfztDatasSnap,bzglDatasSnap,zsglDatasSnap,powerDatasSnap,1.0,resultList,windturbinetestingpointnewMap.get(Contant.R1QFZT));
|
|
|
+ generalQfss(qfztDatasSnap,bzglDatasSnap,zsglDatasSnap,powerDatasSnap,2.0,resultList,windturbinetestingpointnewMap.get(Contant.R2QFZT));
|
|
|
+ generalQfss(qfztDatasSnap,bzglDatasSnap,zsglDatasSnap,powerDatasSnap,3.0,resultList,windturbinetestingpointnewMap.get(Contant.R3QFZT));
|
|
|
+ generalQfss(qfztDatasSnap,bzglDatasSnap,zsglDatasSnap,powerDatasSnap,4.0,resultList,windturbinetestingpointnewMap.get(Contant.R4QFZT));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
+ }
|
|
|
+
|
|
|
+ private double generalQfss(List<PointData> ztmxDatasSnap, List<PointData> bzglDatasSnap, List<PointData> zsglDatasSnap, List<PointData> powerDatasSnap,Double statusValue,List<PointData> resultList,Photovoltaictestingpointnew point) {
|
|
|
+ List<PointData> pointDataList = ztmxDatasSnap.stream().filter(zt -> zt.getPointValueInDouble() == statusValue).collect(Collectors.toList());
|
|
|
+ Double bzss = 0.0;
|
|
|
+ Double zsss = 0.0;
|
|
|
+ for(int i= 0;i<ztmxDatasSnap.size();i++){
|
|
|
+ for (int j=0;j<pointDataList.size();j++){
|
|
|
+ if (pointDataList.get(j).getPointTime().equals(ztmxDatasSnap.get(i).getPointTime())){
|
|
|
+ double bzgl = bzglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double zsgl = zsglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double power = powerDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double temp = bzgl - power;
|
|
|
+ if (temp>0){
|
|
|
+ bzss+=temp;
|
|
|
+ }
|
|
|
+ double temp1 = zsgl - power;
|
|
|
+ if (temp1>0){
|
|
|
+ zsss+=temp1;
|
|
|
+ }
|
|
|
+// bzss += (bzgl-power<0?0:bzgl-power);
|
|
|
+// zsss += (zsgl-power<0?0:zsgl-power);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ bzss = bzss /60>=0?bzss/60:0;
|
|
|
+ zsss = zsss/60>=0?zsss/60:0;
|
|
|
+ //待有历史改为用自算损失
|
|
|
+ PointData wtPointData = createWtPointData(point, zsss);
|
|
|
+ resultList.add(wtPointData);
|
|
|
+ return zsss;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void generalQfzt(List<PointData> powerDatasSnap, List<PointData> ztmxDatasSnap, List<PointData> zsglDatasSnap,Photovoltaictestingpointnew qfztPoint,List<PointData> resultList) {
|
|
|
+ double zs = 0;
|
|
|
+ double pp = 0;
|
|
|
+ int i = 1;
|
|
|
+ for ( ; i <= 5; i++) {
|
|
|
+ zs += zsglDatasSnap.get(zsglDatasSnap.size()-i).getPointValueInDouble();
|
|
|
+ pp += powerDatasSnap.get(powerDatasSnap.size()-1).getPointValueInDouble();
|
|
|
+ }
|
|
|
+ zs /= i;
|
|
|
+ pp /= i;
|
|
|
+ double ztmx = ztmxDatasSnap.get(ztmxDatasSnap.size() - 1).getPointValueInDouble();
|
|
|
+ double[] underissuanceArray = {0,1,2,3,4,5,11};
|
|
|
+ double qfzt = 0;
|
|
|
+ if (Arrays.asList(underissuanceArray).contains(ztmx)){
|
|
|
+ double ratioll = 0;
|
|
|
+ if (zs != 0){
|
|
|
+ ratioll = (zs-pp)/zs;
|
|
|
+ }
|
|
|
+ if (ratioll<0.05){
|
|
|
+ qfzt = 0;
|
|
|
+ }else if (ratioll >= 0.05 && ratioll < 0.1){
|
|
|
+ qfzt = 1;
|
|
|
+ }else if (ratioll >= 0.1 && ratioll < 0.2){
|
|
|
+ qfzt = 2;
|
|
|
+ }else if (ratioll >= 0.2 && ratioll < 0.4) {
|
|
|
+ qfzt = 3;
|
|
|
+ }else {
|
|
|
+ qfzt = 4;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ PointData wtPointData = createWtPointData(qfztPoint, qfzt);
|
|
|
+ resultList.add(wtPointData);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private PointData createWpPointData(Windpowerstationpointnew linepointnew, double linespeed) {
|
|
|
+ PointData pointData = new PointData();
|
|
|
+ pointData.setEdnaId(linepointnew.getCode());
|
|
|
+ pointData.setPointTime(currentDate.getTime());
|
|
|
+ pointData.setPointName(linepointnew.getName());
|
|
|
+ pointData.setPointValue(String.valueOf(linespeed));
|
|
|
+ pointData.setPointValueInDouble(linespeed);
|
|
|
+ return pointData;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 风机月、年五损
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ private void wtMonthYearlossesReal() throws Exception {
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
+ boolean firstDayOfMonth = DateUtils.isFirstDayOfMonth(currentDate);
|
|
|
+ boolean firstDayOfYear = DateUtils.isFirstDayOfYear(currentDate);
|
|
|
+ wtls.stream().forEach(wt->{
|
|
|
+ Map<String, Photovoltaictestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
|
+ //待机
|
|
|
+ Photovoltaictestingpointnew dayDjPoint = windturbinetestingpointnewMap.get(Contant.WTRDJSSDL);
|
|
|
+ Photovoltaictestingpointnew monthDjPoint = windturbinetestingpointnewMap.get(Contant.WTYDJSSDL);
|
|
|
+ Photovoltaictestingpointnew yearDjPoint = windturbinetestingpointnewMap.get(Contant.WTNDJSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayDjPoint,monthDjPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayDjPoint,yearDjPoint,firstDayOfYear);
|
|
|
+ //手动停机
|
|
|
+ Photovoltaictestingpointnew daySdtjPoint = windturbinetestingpointnewMap.get(Contant.WTRSTSSDL);
|
|
|
+ Photovoltaictestingpointnew monthSdtjPoint = windturbinetestingpointnewMap.get(Contant.WTYSTSSDL);
|
|
|
+ Photovoltaictestingpointnew yearSdtjPoint = windturbinetestingpointnewMap.get(Contant.WTNSTSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, daySdtjPoint,monthSdtjPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, daySdtjPoint,yearSdtjPoint,firstDayOfYear);
|
|
|
+ //性能
|
|
|
+ Photovoltaictestingpointnew dayXnPoint = windturbinetestingpointnewMap.get(Contant.WTRXNSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXnPoint = windturbinetestingpointnewMap.get(Contant.WTYXNSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXnPoint = windturbinetestingpointnewMap.get(Contant.WTNXNSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXnPoint,monthXnPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXnPoint,yearXnPoint,firstDayOfYear);
|
|
|
+ //发电降出力
|
|
|
+ Photovoltaictestingpointnew dayFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTRQXSSDL);
|
|
|
+ Photovoltaictestingpointnew monthFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTYQXSSDL);
|
|
|
+ Photovoltaictestingpointnew yearFdjclPoint = windturbinetestingpointnewMap.get(Contant.WTNQXSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayFdjclPoint,monthFdjclPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayFdjclPoint,yearFdjclPoint,firstDayOfYear);
|
|
|
+ //故障
|
|
|
+ Photovoltaictestingpointnew dayGzPoint = windturbinetestingpointnewMap.get(Contant.WTRGZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthGzPoint = windturbinetestingpointnewMap.get(Contant.WTYGZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearGzPoint = windturbinetestingpointnewMap.get(Contant.WTNGZSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayGzPoint,monthGzPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayGzPoint,yearGzPoint,firstDayOfYear);
|
|
|
+ //故障受累
|
|
|
+ Photovoltaictestingpointnew dayGzslPoint = windturbinetestingpointnewMap.get(Contant.WTRSZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthGzslPoint = windturbinetestingpointnewMap.get(Contant.WTYSZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearGzslPoint = windturbinetestingpointnewMap.get(Contant.WTNSZSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayGzslPoint,monthGzslPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayGzslPoint,yearGzslPoint,firstDayOfYear);
|
|
|
+ //维护
|
|
|
+ Photovoltaictestingpointnew dayWhPoint = windturbinetestingpointnewMap.get(Contant.WTRJXSSDL);
|
|
|
+ Photovoltaictestingpointnew monthWhPoint = windturbinetestingpointnewMap.get(Contant.WTYJXSSDL);
|
|
|
+ Photovoltaictestingpointnew yearWhPoint = windturbinetestingpointnewMap.get(Contant.WTNJXSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayWhPoint,monthWhPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayWhPoint,yearWhPoint,firstDayOfYear);
|
|
|
+ //维护受累
|
|
|
+ Photovoltaictestingpointnew dayWhslPoint = windturbinetestingpointnewMap.get(Contant.WTRLZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthWhslPoint = windturbinetestingpointnewMap.get(Contant.WTYLZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearWhslPoint = windturbinetestingpointnewMap.get(Contant.WTNLZSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayWhslPoint,monthWhslPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayWhslPoint,yearWhslPoint,firstDayOfYear);
|
|
|
+ //限电降出力
|
|
|
+ Photovoltaictestingpointnew dayXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTRQFSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTYQFSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXdjclPoint = windturbinetestingpointnewMap.get(Contant.WTNQFSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXdjclPoint,monthXdjclPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXdjclPoint,yearXdjclPoint,firstDayOfYear);
|
|
|
+ //限电停机
|
|
|
+ Photovoltaictestingpointnew dayXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTRXDSSDL);
|
|
|
+ Photovoltaictestingpointnew monthXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTYXDSSDL);
|
|
|
+ Photovoltaictestingpointnew yearXdtjPoint = windturbinetestingpointnewMap.get(Contant.WTNXDSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXdtjPoint,monthXdtjPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayXdtjPoint,yearXdtjPoint,firstDayOfYear);
|
|
|
+ //电网受累
|
|
|
+ Photovoltaictestingpointnew dayDwslPoint = windturbinetestingpointnewMap.get(Contant.WTRWZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthDwslPoint = windturbinetestingpointnewMap.get(Contant.WTYWZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearDwslPoint = windturbinetestingpointnewMap.get(Contant.WTNWZSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayDwslPoint,monthDwslPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayDwslPoint,yearDwslPoint,firstDayOfYear);
|
|
|
+ //环境受累
|
|
|
+ Photovoltaictestingpointnew dayHjslPoint = windturbinetestingpointnewMap.get(Contant.WTRTZSSDL);
|
|
|
+ Photovoltaictestingpointnew monthHjslPoint = windturbinetestingpointnewMap.get(Contant.WTYTZSSDL);
|
|
|
+ Photovoltaictestingpointnew yearHjslPoint = windturbinetestingpointnewMap.get(Contant.WTNTZSSDL);
|
|
|
+ geneMonthOrYearLoss(resultList, dayHjslPoint,monthHjslPoint,firstDayOfMonth);
|
|
|
+ geneMonthOrYearLoss(resultList, dayHjslPoint,yearHjslPoint,firstDayOfYear);
|
|
|
+ });
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private void geneMonthOrYearLoss(List<PointData> resultList,Photovoltaictestingpointnew dayPoint,Photovoltaictestingpointnew monthPoint,boolean firstDayOfMonthOrYear) {
|
|
|
+ Double dayValue = 0.0;
|
|
|
+ Double yestodayMonth = 0.0;
|
|
|
+ try {
|
|
|
+ if (!firstDayOfMonthOrYear){
|
|
|
+ yestodayMonth = edosUtil.getSectionData(monthPoint, DateUtils.getYesterdayEnd().getTime()).getPointValueInDouble();
|
|
|
+ }
|
|
|
+ dayValue = edosUtil.getSectionData(dayPoint,tomorrow.getTime()).getPointValueInDouble();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ Double monthValue = dayValue + yestodayMonth;
|
|
|
+ resultList.add(createWtPointData(monthPoint,monthValue));
|
|
|
+ }
|
|
|
+
|
|
|
+ private double generalLoss(List<PointData> ztmxDatasSnap, List<PointData> bzglDatasSnap, List<PointData> zsglDatasSnap, List<PointData> powerDatasSnap,Double statusValue,List<PointData> resultList,Photovoltaictestingpointnew point) {
|
|
|
+ List<PointData> pointDataList = ztmxDatasSnap.stream().filter(zt -> zt.getPointValueInDouble() == statusValue).collect(Collectors.toList());
|
|
|
+ Double bzss = 0.0;
|
|
|
+ Double zsss = 0.0;
|
|
|
+ if (statusValue == 2.0 || statusValue == 3.0 || statusValue == 4.0){
|
|
|
+ for(int i= 0;i<ztmxDatasSnap.size();i++){
|
|
|
+ for (int j=0;j<pointDataList.size();j++){
|
|
|
+ if (pointDataList.get(j).getPointTime().equals(ztmxDatasSnap.get(i).getPointTime())){
|
|
|
+ double bzgl = bzglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double zsgl = zsglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double power = powerDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double temp = bzgl - power;
|
|
|
+ if (temp>0){
|
|
|
+ bzss+=temp;
|
|
|
+ }
|
|
|
+ double temp1 = zsgl - power;
|
|
|
+ if (temp1>0){
|
|
|
+ zsss+=temp1;
|
|
|
+ }
|
|
|
+// bzss += (bzgl-power<0?0:bzgl-power);
|
|
|
+// zsss += (zsgl-power<0?0:zsgl-power);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ for(int i= 0;i<ztmxDatasSnap.size();i++){
|
|
|
+ for (int j=0;j<pointDataList.size();j++){
|
|
|
+ if (pointDataList.get(j).getPointTime().equals(ztmxDatasSnap.get(i).getPointTime())){
|
|
|
+ double bzgl = bzglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ double zsgl = zsglDatasSnap.get(i).getPointValueInDouble();
|
|
|
+ if (bzgl>0){
|
|
|
+ bzss+=bzgl;
|
|
|
+ }
|
|
|
+ if (zsgl>0){
|
|
|
+ zsss+=zsgl;
|
|
|
+ }
|
|
|
+// bzss += bzgl<0?0:bzgl;
|
|
|
+// zsss += zsgl<0?0:zsgl;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bzss = bzss /60>=0?bzss/60:0;
|
|
|
+ zsss = zsss/60>=0?zsss/60:0;
|
|
|
+ //待有历史改为用自算损失
|
|
|
+ PointData wtPointData = createWtPointData(point, zsss);
|
|
|
+ resultList.add(wtPointData);
|
|
|
+ return zsss;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private PointData createWtPointData(Photovoltaictestingpointnew fjfdl, Double rfdl) {
|
|
|
+ PointData pointData = new PointData();
|
|
|
+ pointData.setEdnaId(fjfdl.getCode());
|
|
|
+ pointData.setPointName(fjfdl.getName());
|
|
|
+ pointData.setPointTime(currentDate.getTime());
|
|
|
+ pointData.setPointValueInDouble(rfdl);
|
|
|
+ pointData.setPointValue(String.valueOf(rfdl));
|
|
|
+ return pointData;
|
|
|
+ }
|
|
|
+}
|