|
@@ -1,6 +1,7 @@
|
|
|
package com.gyee.frame.service.websocket;
|
|
|
|
|
|
|
|
|
+import com.gyee.frame.common.conf.AccessConfig;
|
|
|
import com.gyee.frame.common.conf.V2Config;
|
|
|
import com.gyee.frame.common.spring.Constant;
|
|
|
import com.gyee.frame.common.spring.InitialRunner;
|
|
@@ -128,7 +129,6 @@ public class GenreSetPushService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
Map<String, Double> sftjmap = new HashMap<>();//省份装机容量和台数统计
|
|
|
for (Windpowerstation wp : wplist) {
|
|
|
|
|
@@ -1778,9 +1778,58 @@ public class GenreSetPushService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ double fd_zjrl=0;
|
|
|
+ double gf_zjrl=0;
|
|
|
+ double qjny_fj_ts=0;
|
|
|
+ double qjny_gf_zcts=0;
|
|
|
+ double qjny_gf_jzts=0;
|
|
|
+
|
|
|
+ double jr_fj_ts=0;
|
|
|
+ double jr_gf_zcts=0;
|
|
|
+ double jr_gf_jzts=0;
|
|
|
+
|
|
|
+ double fd_r_ycdl=0;
|
|
|
+ double fd_y_ycdl=0;
|
|
|
+ double gf_r_ycdl=0;
|
|
|
+ double gf_y_ycdl=0;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
+
|
|
|
+ c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
|
|
+ int daynum = c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
|
|
Map<String, Double> sftjmap = new HashMap<>();//省份装机容量和台数统计
|
|
|
for (Windpowerstation wp : wplist) {
|
|
|
+ String rfdlpoint=windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_RFDL).getCode();
|
|
|
+
|
|
|
+ String yfdlpoint=windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_YFDL).getCode();
|
|
|
+
|
|
|
+
|
|
|
+ PointData rfdldata = realApiUtil.getRealData(rfdlpoint);
|
|
|
+ PointData yfdldata = realApiUtil.getRealData(yfdlpoint);
|
|
|
+
|
|
|
+ double rfdl=MathUtil.twoBit(rfdldata.getPointValueInDouble()/1000);
|
|
|
+ double yfdl=MathUtil.twoBit(yfdldata.getPointValueInDouble()/1000);
|
|
|
+
|
|
|
+ if(wp.getId().endsWith("FDC"))
|
|
|
+ {
|
|
|
+ fd_r_ycdl =fd_r_ycdl+(rfdl * YCFDLXS) ;
|
|
|
+
|
|
|
+ c = Calendar.getInstance();
|
|
|
+ double yycfdl = (yfdl + fd_r_ycdl * (daynum - c.get(Calendar.DAY_OF_MONTH))) * YCFDLXS;
|
|
|
+ fd_y_ycdl=fd_y_ycdl+yycfdl;
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ gf_r_ycdl =gf_r_ycdl+(rfdl * YCFDLXS) ;
|
|
|
+
|
|
|
+ c = Calendar.getInstance();
|
|
|
+ double yycfdl = (yfdl + gf_r_ycdl * (daynum - c.get(Calendar.DAY_OF_MONTH))) * YCFDLXS;
|
|
|
+ gf_y_ycdl=gf_y_ycdl+yycfdl;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (StringUtils.notEmp(wp.getCompanyid()) && sftjmap.containsKey(wp.getCompanyid() + "_zjrl")) {
|
|
|
|
|
@@ -1794,6 +1843,8 @@ public class GenreSetPushService {
|
|
|
|
|
|
if(wp.getId().endsWith("GDC") && InitialRunner.gp_sqmap.containsKey(wp.getId()))
|
|
|
{
|
|
|
+
|
|
|
+ gf_zjrl=gf_zjrl+wp.getCapacity();
|
|
|
List<Square> sqls=InitialRunner.gp_sqmap.get(wp.getId());
|
|
|
for(Square sq:sqls)
|
|
|
{
|
|
@@ -1806,13 +1857,21 @@ public class GenreSetPushService {
|
|
|
{
|
|
|
List<Inverter> nbqls=InitialRunner.sq_nbqmap.get(sq.getId());
|
|
|
temp = temp + nbqls.size();
|
|
|
+
|
|
|
+ qjny_gf_zcts=qjny_gf_zcts + nbqls.size();
|
|
|
+ if(AccessConfig.getWpmap().containsKey(wp.getId()))
|
|
|
+ {
|
|
|
+ jr_gf_zcts=jr_gf_zcts + nbqls.size();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
sftjmap.put(wp.getPhoto() + "_zc_zjts", temp);
|
|
|
} else {
|
|
|
- double temp = wp.getCapacity();
|
|
|
+ double temp = wp.getQuantity();
|
|
|
sftjmap.put(wp.getPhoto() + "_zc_zjts", temp);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}else
|
|
|
{
|
|
|
if (StringUtils.notEmp(wp.getPhoto()) && sftjmap.containsKey(wp.getPhoto() + "_jz_zjts")) {
|
|
@@ -1822,10 +1881,16 @@ public class GenreSetPushService {
|
|
|
{
|
|
|
List<Inverter> nbqls=InitialRunner.sq_nbqmap.get(sq.getId());
|
|
|
temp = temp + nbqls.size();
|
|
|
+
|
|
|
+ qjny_gf_jzts=qjny_gf_jzts + nbqls.size();
|
|
|
+ if(AccessConfig.getWpmap().containsKey(wp.getId()))
|
|
|
+ {
|
|
|
+ jr_gf_jzts=jr_gf_jzts + nbqls.size();
|
|
|
+ }
|
|
|
}
|
|
|
sftjmap.put(wp.getPhoto() + "_jz_zjts", temp);
|
|
|
} else {
|
|
|
- double temp = wp.getCapacity();
|
|
|
+ double temp = wp.getQuantity();
|
|
|
sftjmap.put(wp.getPhoto() + "_jz_zjts", temp);
|
|
|
}
|
|
|
}
|
|
@@ -1838,14 +1903,41 @@ public class GenreSetPushService {
|
|
|
|
|
|
double temp = sftjmap.get(wp.getPhoto() + "_zjts");
|
|
|
temp = temp + wp.getQuantity();
|
|
|
+
|
|
|
+
|
|
|
sftjmap.put(wp.getPhoto() + "_zjts", temp);
|
|
|
} else {
|
|
|
double temp = wp.getQuantity();
|
|
|
sftjmap.put(wp.getPhoto() + "_zjts", temp);
|
|
|
}
|
|
|
+
|
|
|
+ fd_zjrl=fd_zjrl+wp.getCapacity();
|
|
|
+ qjny_fj_ts=qjny_fj_ts + wp.getQuantity();
|
|
|
+ if(AccessConfig.getWpmap().containsKey(wp.getId()))
|
|
|
+ {
|
|
|
+ jr_fj_ts=jr_fj_ts + wp.getQuantity();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Map<String,Double> newpointmap=new HashMap<>();
|
|
|
+
|
|
|
+ newpointmap.put("fd_zjrl",StringUtils.round(fd_zjrl,2));
|
|
|
+ newpointmap.put("gf_zjrl",StringUtils.round(gf_zjrl,2));
|
|
|
+ newpointmap.put("qjny_fj_ts",StringUtils.round(qjny_fj_ts,2));
|
|
|
+ newpointmap.put("qjny_gf_zcts",StringUtils.round(qjny_gf_zcts,2));
|
|
|
+ newpointmap.put("qjny_gf_jzts",StringUtils.round(qjny_gf_jzts,2));
|
|
|
+ newpointmap.put("jr_fj_ts",StringUtils.round(jr_fj_ts,2));
|
|
|
+ newpointmap.put("jr_gf_zcts",StringUtils.round(jr_gf_zcts,2));
|
|
|
+ newpointmap.put("jr_gf_jzts",StringUtils.round(jr_gf_jzts,2));
|
|
|
+ newpointmap.put("fd_r_ycdl",StringUtils.round(fd_r_ycdl,2));
|
|
|
+ newpointmap.put("fd_y_ycdl",StringUtils.round(fd_y_ycdl,2));
|
|
|
+ newpointmap.put("gf_r_ycdl",StringUtils.round(gf_r_ycdl,2));
|
|
|
+ newpointmap.put("gf_y_ycdl",StringUtils.round(gf_y_ycdl,2));
|
|
|
+ map.put("newpointmap",newpointmap);
|
|
|
// for (Windpowerstation wp : wplist) {
|
|
|
//
|
|
|
// if (StringUtils.notEmp(wp.getCompanyid()) && sftjmap.containsKey(wp.getCompanyid() + "_zjrl")) {
|