|
@@ -4,8 +4,10 @@ package com.gyee.frame.service.websocket;
|
|
import com.gyee.frame.common.spring.Constant;
|
|
import com.gyee.frame.common.spring.Constant;
|
|
import com.gyee.frame.common.spring.ConstantTR;
|
|
import com.gyee.frame.common.spring.ConstantTR;
|
|
import com.gyee.frame.common.spring.InitialRunner;
|
|
import com.gyee.frame.common.spring.InitialRunner;
|
|
|
|
+import com.gyee.frame.common.spring.WpEnum;
|
|
import com.gyee.frame.model.auto.*;
|
|
import com.gyee.frame.model.auto.*;
|
|
import com.gyee.frame.model.custom.DataVo;
|
|
import com.gyee.frame.model.custom.DataVo;
|
|
|
|
+import com.gyee.frame.model.custom.MatrixVo;
|
|
import com.gyee.frame.model.custom.PointData;
|
|
import com.gyee.frame.model.custom.PointData;
|
|
import com.gyee.frame.service.*;
|
|
import com.gyee.frame.service.*;
|
|
import com.gyee.frame.util.DateUtils;
|
|
import com.gyee.frame.util.DateUtils;
|
|
@@ -37,11 +39,12 @@ public class GenreSetPushService {
|
|
private ShutdowneventService shutdowneventService;
|
|
private ShutdowneventService shutdowneventService;
|
|
@Resource
|
|
@Resource
|
|
private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
|
|
private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
|
|
-
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
|
|
private final String QS = "0";
|
|
private final String QS = "0";
|
|
private final String FD = "-1";
|
|
private final String FD = "-1";
|
|
private final String GF = "-2";
|
|
private final String GF = "-2";
|
|
-
|
|
|
|
|
|
+ private final double YCFDLXS = 1.08;
|
|
IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
|
|
IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
|
|
|
|
|
|
|
|
|
|
@@ -54,9 +57,9 @@ public class GenreSetPushService {
|
|
map.put(FD, findBasicDataInfo(FD));
|
|
map.put(FD, findBasicDataInfo(FD));
|
|
map.put(GF, findBasicDataInfo(GF));
|
|
map.put(GF, findBasicDataInfo(GF));
|
|
|
|
|
|
- map.put("SBQ_FDC",findBasicDataInfo("SBQ_FDC"));
|
|
|
|
- map.put("SBQ02_GC",findBasicDataInfo("SBQ02_GC"));
|
|
|
|
- map.put("SBQ05_XL",findBasicDataInfo("SBQ05_XL"));
|
|
|
|
|
|
+ map.put("SBQ_FDC", findBasicDataInfo("SBQ_FDC"));
|
|
|
|
+ map.put("SBQ02_GC", findBasicDataInfo("SBQ02_GC"));
|
|
|
|
+ map.put("SBQ05_XL", findBasicDataInfo("SBQ05_XL"));
|
|
return map;
|
|
return map;
|
|
|
|
|
|
}
|
|
}
|
|
@@ -74,140 +77,159 @@ public class GenreSetPushService {
|
|
Double yfgl = 0.0;
|
|
Double yfgl = 0.0;
|
|
/*************************************************风场指标*************************************************************/
|
|
/*************************************************风场指标*************************************************************/
|
|
|
|
|
|
- Map<String, Object> fcmap = new HashMap<>();
|
|
|
|
|
|
+ Map<String, Object> fcmap = new HashMap<>();
|
|
|
|
|
|
- if(id.equals(QS) || id.equals(FD) || id.equals(GF) )
|
|
|
|
- {
|
|
|
|
|
|
+ if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
|
|
|
|
|
|
- //初始化场站信息
|
|
|
|
|
|
+ //初始化场站信息
|
|
|
|
|
|
- List<Windpowerstation> wplist=new ArrayList<>();
|
|
|
|
|
|
+ List<Windpowerstation> wplist = new ArrayList<>();
|
|
|
|
|
|
- for (Windpowerstation wp : InitialRunner.wpallls) {
|
|
|
|
- if (id.equals(FD)) {
|
|
|
|
- if (wp.getId().endsWith("FDC")) {
|
|
|
|
- wplist.add(wp);
|
|
|
|
- }
|
|
|
|
- }else if (id.equals(GF)) {
|
|
|
|
- if (wp.getId().endsWith("GDC")) {
|
|
|
|
|
|
+ for (Windpowerstation wp : InitialRunner.wpallls) {
|
|
|
|
+ if (id.equals(FD)) {
|
|
|
|
+ if (wp.getId().endsWith("FDC")) {
|
|
|
|
+ wplist.add(wp);
|
|
|
|
+ }
|
|
|
|
+ } else if (id.equals(GF)) {
|
|
|
|
+ if (wp.getId().endsWith("GDC")) {
|
|
|
|
+ wplist.add(wp);
|
|
|
|
+ }
|
|
|
|
+ } else if (id.equals(QS)) {
|
|
wplist.add(wp);
|
|
wplist.add(wp);
|
|
}
|
|
}
|
|
- }else if (id.equals(QS)) {
|
|
|
|
- wplist.add(wp);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- for (Windpowerstation wp : wplist) {
|
|
|
|
|
|
|
|
- zjrl += wp.getCapacity();
|
|
|
|
- zjts += wp.getQuantity();
|
|
|
|
-
|
|
|
|
- WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FJZT);
|
|
|
|
- WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
-
|
|
|
|
- Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
|
|
- Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
-
|
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
|
- sb.append(wp.getId()).append("_").append("zjrl");
|
|
|
|
- fcmap.put(String.valueOf(sb), wp.getCapacity());
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(wp.getId()).append("_").append("zjts");
|
|
|
|
- fcmap.put(String.valueOf(sb), Double.valueOf(wp.getQuantity()));
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(wp.getId()).append("_").append("fczt");
|
|
|
|
- fcmap.put(String.valueOf(sb), fcztvalue);
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(wp.getId()).append("_").append("fcgl");
|
|
|
|
- fcmap.put(String.valueOf(sb), fcglvalue);
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- fcmap.put("name",wp.getName());
|
|
|
|
- fcmap.put("id",wp.getId());
|
|
|
|
- }
|
|
|
|
|
|
|
|
- //所属风场指标
|
|
|
|
- map.put("fcmap", fcmap);
|
|
|
|
- }else if(InitialRunner.wpmap.containsKey(id))
|
|
|
|
- {
|
|
|
|
-
|
|
|
|
- if(InitialRunner.pjsmap.containsKey(id))
|
|
|
|
- {
|
|
|
|
- List<Project> pjls=InitialRunner.pjsmap.get(id);
|
|
|
|
- for(Project pj:pjls)
|
|
|
|
- {
|
|
|
|
- if(InitialRunner.lnsmap.containsKey(pj.getId()))
|
|
|
|
- {
|
|
|
|
- List<Line> lnls=InitialRunner.lnsmap.get(pj.getId());
|
|
|
|
- for(Line ln:lnls)
|
|
|
|
- {
|
|
|
|
- zjrl += ln.getCapacity();
|
|
|
|
- zjts += ln.getQuantity();
|
|
|
|
-
|
|
|
|
- WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.FJZT);
|
|
|
|
- WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
-
|
|
|
|
- Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
|
|
- Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
-
|
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
|
- sb.append(ln.getId()).append("_").append("zjrl");
|
|
|
|
- fcmap.put(String.valueOf(sb), ln.getCapacity());
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(ln.getId()).append("_").append("zjts");
|
|
|
|
- fcmap.put(String.valueOf(sb), Double.valueOf(ln.getQuantity()));
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(ln.getId()).append("_").append("fczt");
|
|
|
|
- fcmap.put(String.valueOf(sb), fcztvalue);
|
|
|
|
- sb.setLength(0);
|
|
|
|
- sb.append(ln.getId()).append("_").append("fcgl");
|
|
|
|
- fcmap.put(String.valueOf(sb), fcglvalue);
|
|
|
|
- fcmap.put("name",ln.getName());
|
|
|
|
- fcmap.put("id",ln.getId());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else if(InitialRunner.pjmap.containsKey(id))
|
|
|
|
- {
|
|
|
|
|
|
+ for (Windpowerstation wp : wplist) {
|
|
|
|
|
|
- if(InitialRunner.lnsmap.containsKey(id))
|
|
|
|
- {
|
|
|
|
- List<Line> lnls=InitialRunner.lnsmap.get(id);
|
|
|
|
- for(Line ln:lnls)
|
|
|
|
- {
|
|
|
|
- zjrl += ln.getCapacity();
|
|
|
|
- zjts += ln.getQuantity();
|
|
|
|
|
|
+ zjrl += wp.getCapacity();
|
|
|
|
+ zjts += wp.getQuantity();
|
|
|
|
|
|
- WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.FJZT);
|
|
|
|
- WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
|
|
+ WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FJZT);
|
|
|
|
+ WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
|
|
Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
StringBuilder sb = new StringBuilder();
|
|
- sb.append(ln.getId()).append("_").append("zjrl");
|
|
|
|
- fcmap.put(String.valueOf(sb), ln.getCapacity());
|
|
|
|
|
|
+ sb.append(wp.getId()).append("_").append("zjrl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), wp.getCapacity());
|
|
sb.setLength(0);
|
|
sb.setLength(0);
|
|
- sb.append(ln.getId()).append("_").append("zjts");
|
|
|
|
- fcmap.put(String.valueOf(sb), Double.valueOf(ln.getQuantity()));
|
|
|
|
|
|
+ sb.append(wp.getId()).append("_").append("zjts");
|
|
|
|
+ fcmap.put(String.valueOf(sb), Double.valueOf(wp.getQuantity()));
|
|
sb.setLength(0);
|
|
sb.setLength(0);
|
|
- sb.append(ln.getId()).append("_").append("fczt");
|
|
|
|
|
|
+ sb.append(wp.getId()).append("_").append("fczt");
|
|
fcmap.put(String.valueOf(sb), fcztvalue);
|
|
fcmap.put(String.valueOf(sb), fcztvalue);
|
|
sb.setLength(0);
|
|
sb.setLength(0);
|
|
- sb.append(ln.getId()).append("_").append("fcgl");
|
|
|
|
- fcmap.put(String.valueOf(sb), fcglvalue);
|
|
|
|
- fcmap.put("name",ln.getName());
|
|
|
|
- fcmap.put("id",ln.getId());
|
|
|
|
|
|
+ sb.append(wp.getId()).append("_").append("fcgl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), MathUtil.twoBit(fcglvalue));
|
|
|
|
+
|
|
|
|
+ fcmap.put("name", wp.getName());
|
|
|
|
+ fcmap.put("id", wp.getId());
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ } else if (InitialRunner.wpmap.containsKey(id)) {
|
|
|
|
+
|
|
|
|
+ if (InitialRunner.pjsmap.containsKey(id)) {
|
|
|
|
+ List<Project> pjls = InitialRunner.pjsmap.get(id);
|
|
|
|
+ for (Project pj : pjls) {
|
|
|
|
+ if (InitialRunner.lnsmap.containsKey(pj.getId())) {
|
|
|
|
+ List<Line> lnls = InitialRunner.lnsmap.get(pj.getId());
|
|
|
|
+ for (Line ln : lnls) {
|
|
|
|
+ zjrl += ln.getCapacity();
|
|
|
|
+ zjts += ln.getQuantity();
|
|
|
|
+
|
|
|
|
+ WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.FJZT);
|
|
|
|
+ WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
+
|
|
|
|
+ Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
|
|
+ Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
+
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjrl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), ln.getCapacity());
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjts");
|
|
|
|
+ fcmap.put(String.valueOf(sb), Double.valueOf(ln.getQuantity()));
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fczt");
|
|
|
|
+ fcmap.put(String.valueOf(sb), fcztvalue);
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fcgl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), MathUtil.twoBit(fcglvalue));
|
|
|
|
+ fcmap.put("name", ln.getName());
|
|
|
|
+ fcmap.put("id", ln.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (InitialRunner.pjmap.containsKey(id)) {
|
|
|
|
+
|
|
|
|
+ if (InitialRunner.lnsmap.containsKey(id)) {
|
|
|
|
+ List<Line> lnls = InitialRunner.lnsmap.get(id);
|
|
|
|
+ for (Line ln : lnls) {
|
|
|
|
+ zjrl += ln.getCapacity();
|
|
|
|
+ zjts += ln.getQuantity();
|
|
|
|
+
|
|
|
|
+ WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.FJZT);
|
|
|
|
+ WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
+
|
|
|
|
+ Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
|
|
+ Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
+
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjrl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), ln.getCapacity());
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjts");
|
|
|
|
+ fcmap.put(String.valueOf(sb), Double.valueOf(ln.getQuantity()));
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fczt");
|
|
|
|
+ fcmap.put(String.valueOf(sb), fcztvalue);
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fcgl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), MathUtil.twoBit(fcglvalue));
|
|
|
|
+ fcmap.put("name", ln.getName());
|
|
|
|
+ fcmap.put("id", ln.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (InitialRunner.lnmap.containsKey(id)) {
|
|
|
|
+
|
|
|
|
+ if (InitialRunner.lnsmap.containsKey(InitialRunner.lnmap.get(id).getProjectid())) {
|
|
|
|
+ List<Line> lnls = InitialRunner.lnsmap.get(InitialRunner.lnmap.get(id).getProjectid());
|
|
|
|
+ for (Line ln : lnls) {
|
|
|
|
+ zjrl += ln.getCapacity();
|
|
|
|
+ zjts += ln.getQuantity();
|
|
|
|
+
|
|
|
|
+ WindPowerStationTestingPoint2 fczt = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.FJZT);
|
|
|
|
+ WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(ln.getId(), Constant.TPOINT_WP_SJGL);
|
|
|
|
+
|
|
|
|
+ Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
|
|
|
|
+ Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
|
|
|
|
+
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjrl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), ln.getCapacity());
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("zjts");
|
|
|
|
+ fcmap.put(String.valueOf(sb), Double.valueOf(ln.getQuantity()));
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fczt");
|
|
|
|
+ fcmap.put(String.valueOf(sb), fcztvalue);
|
|
|
|
+ sb.setLength(0);
|
|
|
|
+ sb.append(ln.getId()).append("_").append("fcgl");
|
|
|
|
+ fcmap.put(String.valueOf(sb), MathUtil.twoBit(fcglvalue));
|
|
|
|
+ fcmap.put("name", ln.getName());
|
|
|
|
+ fcmap.put("id", ln.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
+ //所属风场指标
|
|
|
|
+ map.put("fcmap", fcmap);
|
|
|
|
|
|
/*************************************************风场指标*************************************************************/
|
|
/*************************************************风场指标*************************************************************/
|
|
|
|
|
|
@@ -249,6 +271,8 @@ public class GenreSetPushService {
|
|
jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL).getCode());
|
|
jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_ZZSGL).getCode());
|
|
|
|
|
|
|
|
|
|
|
|
+ double rfdl = 0.0;
|
|
|
|
+ double yfdl = 0.0;
|
|
List<PointData> jczblist = realApiUtil.getRealData(jczbls);
|
|
List<PointData> jczblist = realApiUtil.getRealData(jczbls);
|
|
|
|
|
|
if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
|
|
if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
|
|
@@ -256,9 +280,11 @@ public class GenreSetPushService {
|
|
sjgl = MathUtil.twoBit(jczblist.get(0).getPointValueInDouble());
|
|
sjgl = MathUtil.twoBit(jczblist.get(0).getPointValueInDouble());
|
|
jczbmap.put("sjgl", sjgl);
|
|
jczbmap.put("sjgl", sjgl);
|
|
//日发电量
|
|
//日发电量
|
|
- jczbmap.put("rfdl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
|
|
|
|
|
|
+ rfdl = MathUtil.twoBit(jczblist.get(1).getPointValueInDouble());
|
|
|
|
+ jczbmap.put("rfdl", rfdl);
|
|
//月发电量
|
|
//月发电量
|
|
- jczbmap.put("yfdl", MathUtil.twoBit(jczblist.get(2).getPointValueInDouble()));
|
|
|
|
|
|
+ yfdl = MathUtil.twoBit(jczblist.get(2).getPointValueInDouble());
|
|
|
|
+ jczbmap.put("yfdl", yfdl);
|
|
//年发电量
|
|
//年发电量
|
|
jczbmap.put("nfdl", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));
|
|
jczbmap.put("nfdl", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));
|
|
//月利用小时
|
|
//月利用小时
|
|
@@ -340,26 +366,39 @@ public class GenreSetPushService {
|
|
|
|
|
|
int tempyear = c.get(Calendar.YEAR);
|
|
int tempyear = c.get(Calendar.YEAR);
|
|
int tempmonth = c.get(Calendar.MONTH) + 1;
|
|
int tempmonth = c.get(Calendar.MONTH) + 1;
|
|
- int daynum=c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
- List<WpMttrAndMtbMonth> mmls=wpMttrAndMtbMonthService.getMttrAndMtbf(id, tempyear, tempmonth);
|
|
|
|
-
|
|
|
|
- if(!mmls.isEmpty())
|
|
|
|
- {
|
|
|
|
- WpMttrAndMtbMonth mm=mmls.get(0);
|
|
|
|
- double stoptimes=mm.getStoprtimes();
|
|
|
|
- double stophours=mm.getStophours();
|
|
|
|
- double mttr=0.0;
|
|
|
|
- double mtbf=mm.getWthours();
|
|
|
|
- if(stoptimes!=0)
|
|
|
|
- {
|
|
|
|
- mttr=new BigDecimal(stophours).divide(new BigDecimal(stoptimes), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
|
- mtbf=new BigDecimal(mm.getWthours()).divide(new BigDecimal(stoptimes), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
|
|
|
+ int daynum = c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
+ List<WpMttrAndMtbMonth> mmls = wpMttrAndMtbMonthService.getMttrAndMtbf(id, tempyear, tempmonth);
|
|
|
|
+
|
|
|
|
+ if (!mmls.isEmpty()) {
|
|
|
|
+ WpMttrAndMtbMonth mm = mmls.get(0);
|
|
|
|
+ double stoptimes = mm.getStoprtimes();
|
|
|
|
+ double stophours = mm.getStophours();
|
|
|
|
+ double mttr = 0.0;
|
|
|
|
+ double mtbf = mm.getWthours();
|
|
|
|
+ if (stoptimes != 0) {
|
|
|
|
+ mttr = new BigDecimal(stophours).divide(new BigDecimal(stoptimes), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
|
+ mtbf = new BigDecimal(mm.getWthours()).divide(new BigDecimal(stoptimes), 2, RoundingMode.HALF_EVEN).doubleValue();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
jczbmap.put("mttr", mttr);
|
|
jczbmap.put("mttr", mttr);
|
|
jczbmap.put("mtbf", mtbf);
|
|
jczbmap.put("mtbf", mtbf);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //预测发电上限
|
|
|
|
+ if (null != zjrl) {
|
|
|
|
+ double rfdlsx = zjrl * 24;
|
|
|
|
+ double yfdlsx = zjrl * 24 * daynum;
|
|
|
|
+ jczbmap.put("rfdlsx", MathUtil.twoBit(rfdlsx));
|
|
|
|
+ jczbmap.put("yfdlsx", MathUtil.twoBit(yfdlsx));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //预测发电量
|
|
|
|
+ double rycfdl = rfdl * YCFDLXS;
|
|
|
|
+ double yycfdl = yfdl * YCFDLXS;
|
|
|
|
+ jczbmap.put("rycfdl", MathUtil.twoBit(rycfdl));
|
|
|
|
+ jczbmap.put("yycfdl", MathUtil.twoBit(yycfdl));
|
|
|
|
+
|
|
map.put("jczbmap", jczbmap);
|
|
map.put("jczbmap", jczbmap);
|
|
|
|
|
|
|
|
|
|
@@ -370,67 +409,244 @@ public class GenreSetPushService {
|
|
|
|
|
|
Map<String, Double> mxztmap = new HashMap<>();
|
|
Map<String, Double> mxztmap = new HashMap<>();
|
|
|
|
|
|
- List<String> mxztls = new ArrayList<>();
|
|
|
|
- //待机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DJNUM).getCode());
|
|
|
|
- //手动停机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TJNUM).getCode());
|
|
|
|
- //正常发电台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDNUM).getCode());
|
|
|
|
- // 缺陷降出力台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDJCLNUM).getCode());
|
|
|
|
- // 限电降出力台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDJCLNUM).getCode());
|
|
|
|
- // 限电停机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDTJNUM).getCode());
|
|
|
|
- // 故障停机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.GZNUM).getCode());
|
|
|
|
- // 场内受累停机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNGZNUM).getCode());
|
|
|
|
- // 检修停机台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.JXNUM).getCode());
|
|
|
|
- // 场内受累检修台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNJXNUM).getCode());
|
|
|
|
- // 电网受累台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DWSLNUM).getCode());
|
|
|
|
- // 环境受累台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.HJSLNUM).getCode());
|
|
|
|
- // 风机离线台数
|
|
|
|
- mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.LXNUM).getCode());
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- List<PointData> mxztlist = realApiUtil.getRealData(mxztls);
|
|
|
|
-
|
|
|
|
- if (!mxztlist.isEmpty() && mxztlist.size() == mxztls.size()) {
|
|
|
|
- mxztmap.put("djts", MathUtil.twoBit(mxztlist.get(0).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("sdtjts", MathUtil.twoBit(mxztlist.get(1).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("yxts", MathUtil.twoBit(mxztlist.get(2).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("fdjclts", MathUtil.twoBit(mxztlist.get(3).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("xdjclts", MathUtil.twoBit(mxztlist.get(4).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("xdtjts", MathUtil.twoBit(mxztlist.get(5).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("gzts", MathUtil.twoBit(mxztlist.get(6).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("cnslgzts", MathUtil.twoBit(mxztlist.get(7).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("jxts", MathUtil.twoBit(mxztlist.get(8).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("cnsljxts", MathUtil.twoBit(mxztlist.get(9).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("dwslts", MathUtil.twoBit(mxztlist.get(10).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("hjslts", MathUtil.twoBit(mxztlist.get(11).getPointValueInDouble()));
|
|
|
|
- mxztmap.put("lxts", MathUtil.twoBit(mxztlist.get(12).getPointValueInDouble()));
|
|
|
|
|
|
+ if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
|
|
|
|
+
|
|
|
|
+ //初始化场站信息
|
|
|
|
+
|
|
|
|
+ List<Windpowerstation> wplist = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ for (Windpowerstation wp : InitialRunner.wpallls) {
|
|
|
|
+ if (id.equals(FD)) {
|
|
|
|
+ if (wp.getId().endsWith("FDC")) {
|
|
|
|
+ wplist.add(wp);
|
|
|
|
+ }
|
|
|
|
+ } else if (id.equals(GF)) {
|
|
|
|
+ if (wp.getId().endsWith("GDC")) {
|
|
|
|
+ wplist.add(wp);
|
|
|
|
+ }
|
|
|
|
+ } else if (id.equals(QS)) {
|
|
|
|
+ wplist.add(wp);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //待机台数
|
|
|
|
+ Double djnum = 0.0;
|
|
|
|
+ //手动停机台数
|
|
|
|
+ Double sdtjnum = 0.0;
|
|
|
|
+ //正常发电台数
|
|
|
|
+ Double zcfdnum = 0.0;
|
|
|
|
+ //缺陷降出力台数
|
|
|
|
+ Double qxjclnum = 0.0;
|
|
|
|
+ // 限电降出力台数
|
|
|
|
+ Double xdjclnum = 0.0;
|
|
|
|
+ // 限电停机台数
|
|
|
|
+ Double xdtjnum = 0.0;
|
|
|
|
+ // 故障停机台数
|
|
|
|
+ Double gztjnum = 0.0;
|
|
|
|
+ // 场内受累停机台数
|
|
|
|
+ Double cnsltjnum = 0.0;
|
|
|
|
+ // 检修停机台数
|
|
|
|
+ Double jxtjnum = 0.0;
|
|
|
|
+ // 场内受累检修台数
|
|
|
|
+ Double cnsljxnum = 0.0;
|
|
|
|
+ // 电网受累台数
|
|
|
|
+ Double dwslnum = 0.0;
|
|
|
|
+ // 环境受累台数
|
|
|
|
+ Double hjslnum = 0.0;
|
|
|
|
+ // 风机离线台数
|
|
|
|
+ Double lxnum = 0.0;
|
|
|
|
+ for (Windpowerstation wp : wplist) {
|
|
|
|
+
|
|
|
|
+ List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
|
|
|
|
+
|
|
|
|
+ List<MatrixVo> vos = new ArrayList<>();
|
|
|
|
+ List<String> fjzbls = new ArrayList<>();
|
|
|
|
+ for (Windturbine wt : wtls) {
|
|
|
|
+ //状态
|
|
|
|
+ fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
|
|
|
|
+
|
|
|
|
+ if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ for (int i = 0; i < wtls.size(); i++) {
|
|
|
|
+ Windturbine wt = wtls.get(i);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ double fjzt = MathUtil.twoBit(MathUtil.twoBit(fjzblist.get(i).getPointValueInDouble()));
|
|
|
|
+
|
|
|
|
+ switch (Double.valueOf(fjzt).intValue()) {
|
|
|
|
+ case 0:
|
|
|
|
+ djnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ sdtjnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ zcfdnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ qxjclnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 4:
|
|
|
|
+ xdjclnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 5:
|
|
|
|
+ xdtjnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 6:
|
|
|
|
+ gztjnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 7:
|
|
|
|
+ cnsltjnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 8:
|
|
|
|
+ jxtjnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 9:
|
|
|
|
+ cnsljxnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 10:
|
|
|
|
+ dwslnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 11:
|
|
|
|
+ hjslnum++;
|
|
|
|
+ break;
|
|
|
|
+ case 12:
|
|
|
|
+ lxnum++;
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ default:
|
|
|
|
+
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ mxztmap.put("djts", djnum);
|
|
|
|
+ mxztmap.put("sdtjts", sdtjnum);
|
|
|
|
+ mxztmap.put("yxts", zcfdnum);
|
|
|
|
+ mxztmap.put("fdjclts", qxjclnum);
|
|
|
|
+ mxztmap.put("xdjclts", xdjclnum);
|
|
|
|
+ mxztmap.put("xdtjts", xdtjnum);
|
|
|
|
+ mxztmap.put("gzts", gztjnum);
|
|
|
|
+ mxztmap.put("cnslgzts", cnsltjnum);
|
|
|
|
+ mxztmap.put("jxts", jxtjnum);
|
|
|
|
+ mxztmap.put("cnsljxts", cnsljxnum);
|
|
|
|
+ mxztmap.put("dwslts", dwslnum);
|
|
|
|
+ mxztmap.put("hjslts", hjslnum);
|
|
|
|
+ mxztmap.put("lxts", lxnum);
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
+ List<String> mxztls = new ArrayList<>();
|
|
|
|
+ //待机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DJNUM).getCode());
|
|
|
|
+ //手动停机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TJNUM).getCode());
|
|
|
|
+ //正常发电台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDNUM).getCode());
|
|
|
|
+ // 缺陷降出力台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.FDJCLNUM).getCode());
|
|
|
|
+ // 限电降出力台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDJCLNUM).getCode());
|
|
|
|
+ // 限电停机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.XDTJNUM).getCode());
|
|
|
|
+ // 故障停机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.GZNUM).getCode());
|
|
|
|
+ // 场内受累停机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNGZNUM).getCode());
|
|
|
|
+ // 检修停机台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.JXNUM).getCode());
|
|
|
|
+ // 场内受累检修台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.CNJXNUM).getCode());
|
|
|
|
+ // 电网受累台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.DWSLNUM).getCode());
|
|
|
|
+ // 环境受累台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.HJSLNUM).getCode());
|
|
|
|
+ // 风机离线台数
|
|
|
|
+ mxztls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.LXNUM).getCode());
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<PointData> mxztlist = realApiUtil.getRealData(mxztls);
|
|
|
|
+
|
|
|
|
+ if (!mxztlist.isEmpty() && mxztlist.size() == mxztls.size()) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //待机台数
|
|
|
|
+ Double djnum = MathUtil.twoBit(mxztlist.get(0).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("djts", djnum);
|
|
|
|
+ //手动停机台数
|
|
|
|
+ Double sdtjnum = MathUtil.twoBit(mxztlist.get(1).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("sdtjts", sdtjnum);
|
|
|
|
+ //正常发电台数
|
|
|
|
+ Double zcfdnum = MathUtil.twoBit(mxztlist.get(2).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("yxts", zcfdnum);
|
|
|
|
+ //缺陷降出力台数
|
|
|
|
+ Double qxjclnum = MathUtil.twoBit(mxztlist.get(3).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("fdjclts", qxjclnum);
|
|
|
|
+ // 限电降出力台数
|
|
|
|
+ Double xdjclnum = MathUtil.twoBit(mxztlist.get(4).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("xdjclts", xdjclnum);
|
|
|
|
+ // 限电停机台数
|
|
|
|
+ Double xdtjnum = MathUtil.twoBit(mxztlist.get(5).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("xdtjts", xdtjnum);
|
|
|
|
+ // 故障停机台数
|
|
|
|
+ Double gztjnum = MathUtil.twoBit(mxztlist.get(6).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("gzts", gztjnum);
|
|
|
|
+ // 场内受累停机台数
|
|
|
|
+ Double cnsltjnum = MathUtil.twoBit(mxztlist.get(7).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("cnslgzts", cnsltjnum);
|
|
|
|
+ // 检修停机台数
|
|
|
|
+ Double jxtjnum = MathUtil.twoBit(mxztlist.get(8).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("jxts", jxtjnum);
|
|
|
|
+ // 场内受累检修台数
|
|
|
|
+ Double cnsljxnum = MathUtil.twoBit(mxztlist.get(9).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("cnsljxts", cnsljxnum);
|
|
|
|
+ // 电网受累台数
|
|
|
|
+ Double dwslnum = MathUtil.twoBit(mxztlist.get(10).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("dwslts", dwslnum);
|
|
|
|
+ // 环境受累台数
|
|
|
|
+ Double hjslnum = MathUtil.twoBit(mxztlist.get(11).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("hjslts", hjslnum);
|
|
|
|
+ // 风机离线台数
|
|
|
|
+ Double lxnum = MathUtil.twoBit(mxztlist.get(12).getPointValueInDouble());
|
|
|
|
+ mxztmap.put("lxts", lxnum);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
|
|
- mxztmap.put("djts", 0.0);
|
|
|
|
- mxztmap.put("sdtjts", 0.0);
|
|
|
|
- mxztmap.put("yxts", 0.0);
|
|
|
|
- mxztmap.put("fdjclts", 0.0);
|
|
|
|
- mxztmap.put("xdjclts", 0.0);
|
|
|
|
- mxztmap.put("xdtjts", 0.0);
|
|
|
|
- mxztmap.put("gzts", 0.0);
|
|
|
|
- mxztmap.put("cnslgzts", 0.0);
|
|
|
|
- mxztmap.put("jxts", 0.0);
|
|
|
|
- mxztmap.put("cnsljxts", 0.0);
|
|
|
|
- mxztmap.put("dwslts", 0.0);
|
|
|
|
- mxztmap.put("hjslts", 0.0);
|
|
|
|
- mxztmap.put("lxts", 0.0);
|
|
|
|
|
|
+ mxztmap.put("djts", 0.0);
|
|
|
|
+ mxztmap.put("sdtjts", 0.0);
|
|
|
|
+ mxztmap.put("yxts", 0.0);
|
|
|
|
+ mxztmap.put("fdjclts", 0.0);
|
|
|
|
+ mxztmap.put("xdjclts", 0.0);
|
|
|
|
+ mxztmap.put("xdtjts", 0.0);
|
|
|
|
+ mxztmap.put("gzts", 0.0);
|
|
|
|
+ mxztmap.put("cnslgzts", 0.0);
|
|
|
|
+ mxztmap.put("jxts", 0.0);
|
|
|
|
+ mxztmap.put("cnsljxts", 0.0);
|
|
|
|
+ mxztmap.put("dwslts", 0.0);
|
|
|
|
+ mxztmap.put("hjslts", 0.0);
|
|
|
|
+ mxztmap.put("lxts", 0.0);
|
|
|
|
+ mxztmap.put("jrts", 0.0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
map.put("mxztmap", mxztmap);
|
|
map.put("mxztmap", mxztmap);
|
|
//
|
|
//
|
|
|
|
|
|
@@ -670,7 +886,7 @@ public class GenreSetPushService {
|
|
/****************************************************五项损失************************************************************/
|
|
/****************************************************五项损失************************************************************/
|
|
/****************************************************日功率曲线**********************************************************/
|
|
/****************************************************日功率曲线**********************************************************/
|
|
|
|
|
|
- List<DataVo> glvos =realPowerPushService.findRealPower(id);
|
|
|
|
|
|
+ List<DataVo> glvos = realPowerPushService.findRealPower(id);
|
|
map.put("glvos", glvos);
|
|
map.put("glvos", glvos);
|
|
/*************************************************日功率曲线*************************************************************/
|
|
/*************************************************日功率曲线*************************************************************/
|
|
|
|
|
|
@@ -680,6 +896,10 @@ public class GenreSetPushService {
|
|
map.put("rdlvos", rdlvos);
|
|
map.put("rdlvos", rdlvos);
|
|
/*************************************************日电量历史*************************************************************/
|
|
/*************************************************日电量历史*************************************************************/
|
|
|
|
|
|
|
|
+/*************************************************悬停指标*************************************************************/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /************************************************悬停指标*************************************************************/
|
|
|
|
|
|
/*************************************************关系库指标*************************************************************/
|
|
/*************************************************关系库指标*************************************************************/
|
|
|
|
|
|
@@ -690,9 +910,18 @@ public class GenreSetPushService {
|
|
gxkmap.put("ndxkyss", wd.getYeardxkyxs());
|
|
gxkmap.put("ndxkyss", wd.getYeardxkyxs());
|
|
gxkmap.put("nsbklyl", wd.getYearsbklyl());
|
|
gxkmap.put("nsbklyl", wd.getYearsbklyl());
|
|
|
|
|
|
|
|
+ gxkmap.put("ndjxs", wd.getYearstoptime());
|
|
|
|
+ gxkmap.put("nyxxs", wd.getYearruntime());
|
|
|
|
+ gxkmap.put("ngzxs", wd.getYearfaulttime());
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
gxkmap.put("ndxkyss", 0.0);
|
|
gxkmap.put("ndxkyss", 0.0);
|
|
gxkmap.put("nsbklyl", 0.0);
|
|
gxkmap.put("nsbklyl", 0.0);
|
|
|
|
+ gxkmap.put("nzhcydl", 0.0);
|
|
|
|
+
|
|
|
|
+ gxkmap.put("ndjxs", 0.0);
|
|
|
|
+ gxkmap.put("nyxxs", 0.0);
|
|
|
|
+ gxkmap.put("ngzxs", 0.0);
|
|
}
|
|
}
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
cal.setTime(new Date());
|
|
cal.setTime(new Date());
|
|
@@ -708,14 +937,13 @@ public class GenreSetPushService {
|
|
Double yfdljh = 0.0;
|
|
Double yfdljh = 0.0;
|
|
Double nfdljh = 0.0;
|
|
Double nfdljh = 0.0;
|
|
|
|
|
|
- Double yfdl = jczbmap.get("yfdl");
|
|
|
|
|
|
+ //Double yfdltemp = jczbmap.get("yfdl");
|
|
Double nfdl = jczbmap.get("nfdl");
|
|
Double nfdl = jczbmap.get("nfdl");
|
|
|
|
|
|
yfdljh = gxkmap.get("yfdljh");
|
|
yfdljh = gxkmap.get("yfdljh");
|
|
nfdljh = gxkmap.get("nfdljh");
|
|
nfdljh = gxkmap.get("nfdljh");
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
if (yfdljh == 0.0) {
|
|
if (yfdljh == 0.0) {
|
|
nfdljh = 1.0;
|
|
nfdljh = 1.0;
|
|
}
|
|
}
|
|
@@ -776,16 +1004,16 @@ public class GenreSetPushService {
|
|
WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
|
|
WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
|
|
WindPowerStationTestingPoint2 swdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SWDL);
|
|
WindPowerStationTestingPoint2 swdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SWDL);
|
|
WindPowerStationTestingPoint2 gwdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_GWDL);
|
|
WindPowerStationTestingPoint2 gwdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_GWDL);
|
|
- // WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_PJFS);
|
|
|
|
|
|
+ // WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_PJFS);
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
List<PointData> swdls = realApiUtil.getHistoryDatasSnap(swdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
List<PointData> swdls = realApiUtil.getHistoryDatasSnap(swdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
List<PointData> gwdls = realApiUtil.getHistoryDatasSnap(gwdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
List<PointData> gwdls = realApiUtil.getHistoryDatasSnap(gwdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
- // List<PointData> ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
|
|
|
|
+ // List<PointData> ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
|
|
|
|
|
|
if (!rfdls.isEmpty() && !swdls.isEmpty() && !gwdls.isEmpty()
|
|
if (!rfdls.isEmpty() && !swdls.isEmpty() && !gwdls.isEmpty()
|
|
- && rfdls.size()==swdls.size() && rfdls.size()==gwdls.size()
|
|
|
|
|
|
+ && rfdls.size() == swdls.size() && rfdls.size() == gwdls.size()
|
|
) {
|
|
) {
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
int today = c.get(Calendar.DAY_OF_MONTH);
|
|
int today = c.get(Calendar.DAY_OF_MONTH);
|
|
@@ -803,7 +1031,7 @@ public class GenreSetPushService {
|
|
vo.setValue1(StringUtils.round(rfdls.get(i).getPointValueInDouble(), 2));// 日发电量
|
|
vo.setValue1(StringUtils.round(rfdls.get(i).getPointValueInDouble(), 2));// 日发电量
|
|
vo.setValue2(StringUtils.round(swdls.get(i).getPointValueInDouble(), 2));// 上网电量
|
|
vo.setValue2(StringUtils.round(swdls.get(i).getPointValueInDouble(), 2));// 上网电量
|
|
vo.setValue3(StringUtils.round(gwdls.get(i).getPointValueInDouble(), 2));// 购网电量
|
|
vo.setValue3(StringUtils.round(gwdls.get(i).getPointValueInDouble(), 2));// 购网电量
|
|
- // vo.setSpeed(StringUtils.round(ssfss.get(i).getPointValueInDouble(), 2));
|
|
|
|
|
|
+ // vo.setSpeed(StringUtils.round(ssfss.get(i).getPointValueInDouble(), 2));
|
|
} else {
|
|
} else {
|
|
vo.setTimestr("");
|
|
vo.setTimestr("");
|
|
vo.setValue1(0.0);// 日发电量
|
|
vo.setValue1(0.0);// 日发电量
|
|
@@ -843,32 +1071,31 @@ public class GenreSetPushService {
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
cal.setTime(new Date());
|
|
cal.setTime(new Date());
|
|
int month = cal.get(Calendar.MONTH) + 1;
|
|
int month = cal.get(Calendar.MONTH) + 1;
|
|
- int num=1;
|
|
|
|
|
|
+ int num = 1;
|
|
|
|
|
|
- List<ProjectPlan> planlist=new ArrayList<>();
|
|
|
|
|
|
+ List<ProjectPlan> planlist = new ArrayList<>();
|
|
|
|
|
|
- for(ProjectPlan pl:planls)
|
|
|
|
- {
|
|
|
|
|
|
+ for (ProjectPlan pl : planls) {
|
|
if (id.equals(QS)) {
|
|
if (id.equals(QS)) {
|
|
planlist.add(pl);
|
|
planlist.add(pl);
|
|
- }else if (id.equals(FD)) {
|
|
|
|
|
|
+ } else if (id.equals(FD)) {
|
|
if (pl.getWindpower().endsWith("FDC")) {
|
|
if (pl.getWindpower().endsWith("FDC")) {
|
|
planlist.add(pl);
|
|
planlist.add(pl);
|
|
}
|
|
}
|
|
- }else if (id.equals(GF)) {
|
|
|
|
|
|
+ } else if (id.equals(GF)) {
|
|
if (pl.getWindpower().endsWith("GDC")) {
|
|
if (pl.getWindpower().endsWith("GDC")) {
|
|
planlist.add(pl);
|
|
planlist.add(pl);
|
|
}
|
|
}
|
|
- }else if (InitialRunner.wpmap.containsKey(id)) {
|
|
|
|
|
|
+ } else if (InitialRunner.wpmap.containsKey(id)) {
|
|
if (pl.getWindpower().equals(id)) {
|
|
if (pl.getWindpower().equals(id)) {
|
|
planlist.add(pl);
|
|
planlist.add(pl);
|
|
}
|
|
}
|
|
- }else if (InitialRunner.pjmap.containsKey(id)) {
|
|
|
|
|
|
+ } else if (InitialRunner.pjmap.containsKey(id)) {
|
|
if (pl.getProjectid().equals(id)) {
|
|
if (pl.getProjectid().equals(id)) {
|
|
planlist.add(pl);
|
|
planlist.add(pl);
|
|
}
|
|
}
|
|
- }else if (InitialRunner.lnmap.containsKey(id)) {
|
|
|
|
- Line ln=InitialRunner.lnmap.get(id);
|
|
|
|
|
|
+ } else if (InitialRunner.lnmap.containsKey(id)) {
|
|
|
|
+ Line ln = InitialRunner.lnmap.get(id);
|
|
|
|
|
|
if (InitialRunner.lnsmap.containsKey(ln.getProjectid())) {
|
|
if (InitialRunner.lnsmap.containsKey(ln.getProjectid())) {
|
|
List<Line> linels = InitialRunner.lnsmap.get(ln.getProjectid());
|
|
List<Line> linels = InitialRunner.lnsmap.get(ln.getProjectid());
|
|
@@ -911,8 +1138,109 @@ public class GenreSetPushService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public Map<String, Double> tooltipAjax(String wpId) throws Exception {
|
|
|
|
+ Map<String, Double> retValue = new HashMap<String, Double>();
|
|
|
|
+ if (InitialRunner.wpmap.containsKey(wpId)) {
|
|
|
|
+ Windpowerstation station = InitialRunner.wpmap.get(wpId);
|
|
|
|
+ retValue.put("jd", station.getLongitude() == null ? 0 : StringUtils.round(station.getLongitude(), 2));
|
|
|
|
+ retValue.put("wd", station.getLatitude() == null ? 0 : StringUtils.round(station.getLatitude(), 2));
|
|
|
|
+
|
|
|
|
+ retValue.put("zjts", StringUtils.round(station.getQuantity(), 0));
|
|
|
|
+ Map<String, WindPowerStationTestingPoint2> map;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ WindPowerStationTestingPoint2 yxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS);
|
|
|
|
+ WindPowerStationTestingPoint2 djts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS);
|
|
|
|
+ WindPowerStationTestingPoint2 jxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ);
|
|
|
|
+ WindPowerStationTestingPoint2 tjts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ);
|
|
|
|
+ WindPowerStationTestingPoint2 lxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD);
|
|
|
|
+
|
|
|
|
+ PointData ptValue = realApiUtil.getRealData(yxts);
|
|
|
|
+ retValue.put("yxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
|
|
|
|
+ ptValue = realApiUtil.getRealData(djts);
|
|
|
|
+ retValue.put("djts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
|
|
|
|
+ ptValue = realApiUtil.getRealData(jxts);
|
|
|
|
+ retValue.put("jxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+
|
|
|
|
+ ptValue = realApiUtil.getRealData(tjts);
|
|
|
|
+ retValue.put("tjts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+
|
|
|
|
+ ptValue = realApiUtil.getRealData(lxts);
|
|
|
|
+ retValue.put("lxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+
|
|
|
|
+ if (wpId.endsWith("GDC")) {
|
|
|
|
+ WindPowerStationTestingPoint2 wd = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_FCCFTWD);
|
|
|
|
+
|
|
|
|
+ if (StringUtils.notEmp(wd)) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(wd);
|
|
|
|
+ retValue.put("cftwd", StringUtils.round(ptValue.getPointValueInDouble(), 2));
|
|
|
|
+ } else {
|
|
|
|
+ retValue.put("cftwd", 0.0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (wpId.equals(WpEnum.MHS_FDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.MHSFGL_AI000305);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1893.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.JSFW_MHSSFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.NSS_FDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.NSSWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1810.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.NSSPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.QS_FDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.QSWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1573.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.QSPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+
|
|
|
|
+ } else if (wpId.equals(WpEnum.SBQ_FDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.SBQFGL_AI000305);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1357.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.JSFW_SBSSFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.DWK_GDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.DWKWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1100.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.DWKPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.PL_GDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.PLWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1080.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.PLPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.MCH_GDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.MCHWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1360.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.MCHPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.XH_GDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.XHWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 1385.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.XHPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ } else if (wpId.equals(WpEnum.XS_FDC.name())) {
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.XSWD);
|
|
|
|
+ retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ retValue.put("hb", 2210.0);
|
|
|
|
+ ptValue = realApiUtil.getRealData(ConstantTR.XSPJFS);
|
|
|
|
+ retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return retValue;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|