|
@@ -8,6 +8,7 @@ import com.gyee.runeconomy.model.auto.*;
|
|
|
import com.gyee.runeconomy.service.auto.IProBasicEquipmentPointService;
|
|
|
import com.gyee.runeconomy.service.auto.IProBasicPowerstationPointService;
|
|
|
import com.gyee.runeconomy.service.auto.IProBasicProjectPlanService;
|
|
|
+import com.gyee.runeconomy.util.MathUtil;
|
|
|
import com.gyee.runeconomy.util.StringUtils;
|
|
|
import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
|
|
|
import org.slf4j.Logger;
|
|
@@ -98,10 +99,11 @@ public class MonitorService {
|
|
|
/**********************************************首页场站所有风场信息展示统计**********************************************************/
|
|
|
|
|
|
List<ProBasicPowerstation> wpls1 = CacheContext.wpls;
|
|
|
- Map<String, Double> xx = new LinkedHashMap<>();
|
|
|
- Map<String, Object> czxx = new LinkedHashMap<>();
|
|
|
+
|
|
|
+ Map<String, Object> station = new LinkedHashMap<>();
|
|
|
if (!wpls1.isEmpty()) {
|
|
|
for (ProBasicPowerstation wp : wpls1) {
|
|
|
+ Map<String, Double> xx = new LinkedHashMap<>();
|
|
|
String id = wp.getId();
|
|
|
if (CacheContext.wpmap.containsKey(id)) {
|
|
|
xx.put("zjts", Double.valueOf(wp.getWindQuantityLd()));
|
|
@@ -109,12 +111,12 @@ public class MonitorService {
|
|
|
double gl = 0.0;
|
|
|
ProBasicPowerstationPoint glvalue = proBasicPowerstationPointService.getPowerstationPoint(id, ContantXk.SSZGL);
|
|
|
gl = edosUtil.getRealData(glvalue).getPointValueInDouble();
|
|
|
- xx.put("gl",gl);
|
|
|
+ xx.put("gl", gl);
|
|
|
}
|
|
|
- czxx.put(id, xx);
|
|
|
+ station.put(id, xx);
|
|
|
}
|
|
|
}
|
|
|
- map.put("station",czxx);
|
|
|
+ map.put("station", station);
|
|
|
|
|
|
/**********************************************首页场站所有风场信息展示统计**********************************************************/
|
|
|
|
|
@@ -122,28 +124,36 @@ public class MonitorService {
|
|
|
|
|
|
Map<String, Double> xl = new LinkedHashMap<>();
|
|
|
Map<String, Object> xlmap = new LinkedHashMap<>();
|
|
|
- if (!wpls1.isEmpty()){
|
|
|
- for (ProBasicLine ls : CacheContext.lnls){
|
|
|
+ if (!wpls1.isEmpty()) {
|
|
|
+ for (ProBasicLine ls : CacheContext.lnls) {
|
|
|
String lineid = ls.getId();
|
|
|
double xlgl = 0.0;
|
|
|
ProBasicPowerstationPoint xlglvalue = proBasicPowerstationPointService.getPowerstationPoint(lineid, ContantXk.SSZGL);
|
|
|
xlgl = edosUtil.getRealData(xlglvalue).getPointValueInDouble();
|
|
|
- xl.put("xlgl",xlgl);
|
|
|
- xlmap.put(lineid,xl);
|
|
|
+ xl.put("xlgl", xlgl);
|
|
|
+ xlmap.put(lineid, xl);
|
|
|
}
|
|
|
}
|
|
|
- map.put("xlmap",xlmap);
|
|
|
+ map.put("xlmap", xlmap);
|
|
|
/**********************************************首页穿透线路信息统计**********************************************************/
|
|
|
|
|
|
|
|
|
/**********************************************首页明细状态统计**********************************************************/
|
|
|
|
|
|
+ //运行
|
|
|
double fd_yxnum = 0;
|
|
|
+ //检修
|
|
|
double fd_jxnum = 0;
|
|
|
+ //故障
|
|
|
double fd_gznum = 0;
|
|
|
+ //离线
|
|
|
double fd_lxnum = 0;
|
|
|
+ //待机
|
|
|
double fd_djnum = 0;
|
|
|
+ //限电
|
|
|
double fd_xdnum = 0;
|
|
|
+ //受累
|
|
|
+ double fd_slnum = 0;
|
|
|
|
|
|
double gf_yxnum = 0;
|
|
|
double gf_jxnum = 0;
|
|
@@ -151,29 +161,118 @@ public class MonitorService {
|
|
|
double gf_lxnum = 0;
|
|
|
double gf_djnum = 0;
|
|
|
double gf_xdnum = 0;
|
|
|
+ double gf_slnum = 0;
|
|
|
|
|
|
- for (ProBasicPowerstation wp : wplist){
|
|
|
+ Map<String, Double> mxztmap = new HashMap<>();
|
|
|
+
|
|
|
+ for (ProBasicPowerstation wp : wplist) {
|
|
|
|
|
|
List<String> fjztls = new ArrayList<>();
|
|
|
List<String> gfztls = new ArrayList<>();
|
|
|
|
|
|
- if (wp.getId().endsWith("FDC_STA") && CacheContext.sqwtmap.containsKey(wp.getId())){
|
|
|
- List<ProBasicEquipment> wtls = new ArrayList<>();
|
|
|
- for (ProBasicEquipment wt : wtls){
|
|
|
- fjztls.add(proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.MXZT).getUniformCode());
|
|
|
+ if (wp.getId().endsWith("FDC_STA") && CacheContext.wpwtmap.containsKey(wp.getId())) {
|
|
|
+ List<ProBasicEquipment> wtls = CacheContext.wpwtmap.get(wp.getId());
|
|
|
+ for (ProBasicEquipment wt : wtls) {
|
|
|
+ fjztls.add(proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.MXZT).getNemCode());
|
|
|
}
|
|
|
|
|
|
- List<PointData> fjzblist = edosUtil.getRealData(fjztls);
|
|
|
+ }else if (wp.getId().endsWith("GDC_STA") && CacheContext.wpwtmap.containsKey(wp.getId())){
|
|
|
+ List<ProBasicEquipment> wtls = CacheContext.wpwtmap.get(wp.getId());
|
|
|
+ for (ProBasicEquipment wt : wtls) {
|
|
|
+ gfztls.add(proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.MXZT).getNemCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<PointData> fjztlist = edosUtil.getRealData(fjztls);
|
|
|
+ List<PointData> gfztlist = edosUtil.getRealData(gfztls);
|
|
|
+
|
|
|
+ if (!fjztlist.isEmpty() && fjztlist.size() == fjztls.size()) {
|
|
|
+ for (int i = 0; i < fjztlist.size(); i++) {
|
|
|
+ double fjzt = MathUtil.twoBit(MathUtil.twoBit(fjztlist.get(i).getPointValueInDouble()));
|
|
|
+ switch (Double.valueOf(fjzt).intValue()) {
|
|
|
+ case 0:
|
|
|
+ fd_djnum++;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ fd_yxnum++;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ fd_gznum++;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ fd_lxnum++;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ fd_jxnum++;
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ fd_xdnum++;
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ fd_slnum++;
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ mxztmap.put("fd_djnum",fd_djnum);
|
|
|
+ mxztmap.put("fd_yxnum",fd_yxnum);
|
|
|
+ mxztmap.put("fd_gznum",fd_gznum);
|
|
|
+ mxztmap.put("fd_lxnum",fd_lxnum);
|
|
|
+ mxztmap.put("fd_jxnum",fd_jxnum);
|
|
|
+ mxztmap.put("fd_xdnum",fd_xdnum);
|
|
|
+ mxztmap.put("fd_slnum",fd_slnum);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ if (!gfztlist.isEmpty() && gfztlist.size() == gfztls.size()) {
|
|
|
+ for (int i = 0; i < gfztlist.size(); i++) {
|
|
|
+ double gfzt = MathUtil.twoBit(MathUtil.twoBit(gfztlist.get(i).getPointValueInDouble()));
|
|
|
+ switch (Double.valueOf(gfzt).intValue()) {
|
|
|
+ case 0:
|
|
|
+ gf_djnum++;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ gf_yxnum++;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ gf_gznum++;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ gf_lxnum++;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ gf_jxnum++;
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ gf_xdnum++;
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ gf_slnum++;
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ mxztmap.put("gf_djnum",gf_djnum);
|
|
|
+ mxztmap.put("gf_yxnum",gf_yxnum);
|
|
|
+ mxztmap.put("gf_gznum",gf_gznum);
|
|
|
+ mxztmap.put("gf_lxnum",gf_lxnum);
|
|
|
+ mxztmap.put("gf_jxnum",gf_jxnum);
|
|
|
+ mxztmap.put("gf_xdnum",gf_xdnum);
|
|
|
+ mxztmap.put("gf_slnum",gf_slnum);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ map.put("mxztmap",mxztmap);
|
|
|
|
|
|
|
|
|
/**********************************************首页明细状态统计**********************************************************/
|
|
|
|
|
|
|
|
|
-
|
|
|
/**********************************************首页安全天数、实时功率及节能减排等信息统计**********************************************************/
|
|
|
|
|
|
double aqts = 0.0;
|