|
@@ -10,7 +10,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -72,13 +71,22 @@ public class EconomyPointHomePageService {
|
|
|
/** 电量统计分析 */
|
|
|
private List<ProEconPowerstationInfoDay1> dltjfxlist = new ArrayList<>();
|
|
|
|
|
|
+ private List<ProEconPowerstationInfoDay4> threeRateCurvelist = new ArrayList<>();//三率曲线数据
|
|
|
+
|
|
|
private BigDecimal capacity = null;
|
|
|
|
|
|
private Map<String,BigDecimal> wsdlfx = null;//五损电量分析
|
|
|
|
|
|
private Map<String,BigDecimal> zhcydl = null;//综合场用电率
|
|
|
|
|
|
- private List<Map<String,BigDecimal>> dltjfxList = null;//电量统计分析
|
|
|
+ private List<Map<String,Object>> dltjfxList = null;//电量统计分析
|
|
|
+
|
|
|
+ private List<Map<String,Object>> slqxList = null;//三率曲线
|
|
|
+
|
|
|
+ private Map<String,Object> fdinfomap = null;//发电(风能利用率、发电量、欠发电量)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -100,14 +108,13 @@ public class EconomyPointHomePageService {
|
|
|
*/
|
|
|
public EconHomePagePointRateDTO getEconomyPointHomePageInfo(String regionId, String companyId, String windpowerstationId, String projectId, String lineId, String staType, String dateType) throws ParseException {
|
|
|
//获取当前时间
|
|
|
- String date = DateUtils.toDate1(new Date());
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Date date3 = sdf.parse(date);
|
|
|
+ String strdate = DateUtils.toDate1(new Date());
|
|
|
+ Date date = DateUtils.parseDate(strdate);
|
|
|
|
|
|
|
|
|
|
|
|
/** 五损 */
|
|
|
- wsmap = proEconPowerstationInfoDay1Service.getEconFiveLoss(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date3);
|
|
|
+ wsmap = proEconPowerstationInfoDay1Service.getEconFiveLoss(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
|
|
|
|
/** 三率 */
|
|
|
slmap = proEconPowerstationInfoDay4Service.getEconThreeRate(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
@@ -121,20 +128,24 @@ public class EconomyPointHomePageService {
|
|
|
/** 五损时间 */
|
|
|
wstimemap = proEconPowerstationInfoDay2Service.getEconFiveLossTime(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
|
|
|
|
- //装机容量
|
|
|
+ /** 装机容量 */
|
|
|
capacity = proBasicCompanyService.getProBasicCompanyCapacity(regionId, companyId);
|
|
|
- //综合场用电量、
|
|
|
+ //综合场用电量
|
|
|
zhcydllist = proEconPowerstationInfoDay5Service.getEconZhcydldb(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
|
|
|
|
//电量统计分析
|
|
|
dltjfxlist = proEconPowerstationInfoDay1Service.getEconFiveLosslist(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
|
|
|
|
-
|
|
|
- /** 场站信息 */
|
|
|
+ //三率曲线
|
|
|
+ threeRateCurvelist = proEconPowerstationInfoDay4Service.getEconThreeRateCurve(regionId, companyId, windpowerstationId, projectId, lineId, staType, dateType, date);
|
|
|
+ /** 场站信息 */
|
|
|
List<ProBasicPowerstation> powerstationList = proBasicPowerstationService.getProBasicPowerstationlist(regionId,companyId,windpowerstationId,staType);
|
|
|
wsdlfx = new HashMap<>();//五损电量分析
|
|
|
zhcydl= new HashMap<>();//综合场用电率
|
|
|
dltjfxList = new ArrayList<>();//电量统计分析
|
|
|
+ fdinfomap = new HashMap<>();//(风能利用率、发电量、欠发电量)
|
|
|
+
|
|
|
+
|
|
|
switch (dateType) {
|
|
|
|
|
|
case "r":
|
|
@@ -144,6 +155,7 @@ public class EconomyPointHomePageService {
|
|
|
currFiveDlFx();
|
|
|
currZhcydl();
|
|
|
currDltjfx();
|
|
|
+ currThreeRateCurve();
|
|
|
|
|
|
|
|
|
break;
|
|
@@ -154,6 +166,7 @@ public class EconomyPointHomePageService {
|
|
|
monthFiveDlFx();
|
|
|
monthZhcydl();
|
|
|
monthDltjfx();
|
|
|
+ monthThreeRateCurve();
|
|
|
|
|
|
|
|
|
break;
|
|
@@ -164,15 +177,87 @@ public class EconomyPointHomePageService {
|
|
|
yearFiveDlFx();
|
|
|
yearZhcydl();
|
|
|
yearDltjfx();
|
|
|
-
|
|
|
+ yearThreeRateCurve();
|
|
|
break;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return dto;
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ /** (风能利用率、发电量、欠发电量) */
|
|
|
+ private void currfdinfo() {
|
|
|
+ ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
+ if(null != fdinfo){
|
|
|
+ fdinfomap.put("fdl",fdinfo.getRfdl());
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getRqfdl());
|
|
|
+ fdinfomap.put("fnlyl",fdinfo.getRfdl().divide(fdinfo.getRllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ private void monthfdinfo() {
|
|
|
+ ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
+ if(null != fdinfo){
|
|
|
+ fdinfomap.put("fdl",fdinfo.getYfdl());
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getYqfdl());
|
|
|
+ fdinfomap.put("fnlyl",fdinfo.getYfdl().divide(fdinfo.getYllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void yearfdinfo() {
|
|
|
+ ProEconPowerstationInfoDay1 fdinfo = wsmap.get("currFiveInfo");
|
|
|
+ if(null != fdinfo){
|
|
|
+ fdinfomap.put("fdl",fdinfo.getNfdl());
|
|
|
+ fdinfomap.put("qfdl",fdinfo.getNqfdl());
|
|
|
+ fdinfomap.put("fnlyl",fdinfo.getNfdl().divide(fdinfo.getNllfdl(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 三率曲线
|
|
|
+ */
|
|
|
+ private void currThreeRateCurve() {
|
|
|
+ threeRateCurvelist.stream().forEach(i->{
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
+ m.put("fejsl",i.getRfwjsl());
|
|
|
+ m.put("ztzhjsl",i.getRztzhjsl());
|
|
|
+ m.put("gzxqjsl",i.getRgzxqjsl());
|
|
|
+ m.put("date",i.getRecordDate());
|
|
|
+ slqxList.add(null);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ private void monthThreeRateCurve() {
|
|
|
+ threeRateCurvelist.stream().forEach(i->{
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
+ m.put("fejsl",i.getYfwjsl());
|
|
|
+ m.put("ztzhjsl",i.getYztzhjsl());
|
|
|
+ m.put("gzxqjsl",i.getYgzxqjsl());
|
|
|
+ m.put("date",i.getRecordDate());
|
|
|
+ slqxList.add(null);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void yearThreeRateCurve() {
|
|
|
+ threeRateCurvelist.stream().forEach(i->{
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
+ m.put("fejsl",i.getNfwjsl());
|
|
|
+ m.put("ztzhjsl",i.getNztzhjsl());
|
|
|
+ m.put("gzxqjsl",i.getNgzxqjsl());
|
|
|
+ m.put("date",i.getRecordDate());
|
|
|
+ slqxList.add(null);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 电量统计分析
|
|
|
*/
|
|
@@ -180,39 +265,42 @@ public class EconomyPointHomePageService {
|
|
|
private void currDltjfx() {
|
|
|
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
- Map<String, BigDecimal> m = new HashMap<>();
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
m.put("fdl", i.getRfdl()); //发电量
|
|
|
m.put("sldl", i.getRcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
m.put("jxdl", i.getRjxssdl()); //检修
|
|
|
m.put("xddl", i.getRxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
m.put("fgzdl", i.getRgzssdl()); //故障
|
|
|
m.put("xndl", i.getRxnssdl());//性能
|
|
|
+ m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
private void monthDltjfx() {
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
- Map<String, BigDecimal> m = new HashMap<>();
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
m.put("fdl", i.getYfdl()); //发电量
|
|
|
m.put("sldl", i.getYcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
m.put("jxdl", i.getYjxssdl()); //检修
|
|
|
m.put("xddl", i.getYxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
m.put("fgzdl", i.getYgzssdl()); //故障
|
|
|
m.put("xndl", i.getYxnssdl());//性能
|
|
|
+ m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
private void yearDltjfx() {
|
|
|
dltjfxlist.stream().forEach(i -> {
|
|
|
- Map<String, BigDecimal> m = new HashMap<>();
|
|
|
+ Map<String, Object> m = new HashMap<>();
|
|
|
m.put("fdl", i.getNfdl()); //发电量
|
|
|
m.put("sldl", i.getNcwsldwssdl().add(i.getRcwsltqssdl())); //受累
|
|
|
m.put("jxdl", i.getNjxssdl()); //检修
|
|
|
m.put("xddl", i.getNxdtjssdl().add(i.getRxdjclssdl()));//限电
|
|
|
m.put("fgzdl", i.getNgzssdl()); //故障
|
|
|
m.put("xndl", i.getNxnssdl());//性能
|
|
|
+ m.put("date",DateUtils.toDate1(i.getRecordDate()));
|
|
|
dltjfxList.add(m);
|
|
|
});
|
|
|
}
|