|
|
@@ -0,0 +1,713 @@
|
|
|
+package com.gyee.benchmarkingimpala.service;
|
|
|
+
|
|
|
+import cn.hutool.core.date.DateField;
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.gyee.benchmarkingimpala.config.R;
|
|
|
+import com.gyee.benchmarkingimpala.init.CacheContext;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Benchmark;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Projectplan;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Windpowerinfoday;
|
|
|
+import com.gyee.benchmarkingimpala.service.auto.IBenchmarkService;
|
|
|
+import com.gyee.benchmarkingimpala.service.auto.IProjectplanService;
|
|
|
+import com.gyee.benchmarkingimpala.service.auto.IWindpowerinfodayService;
|
|
|
+import com.gyee.benchmarkingimpala.util.taos.EdosUtil;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class EconomyAnalysisService {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBenchmarkService benchmarkService;
|
|
|
+ @Resource
|
|
|
+ private IProjectplanService projectplanService;
|
|
|
+
|
|
|
+ private EdosUtil edosUtil = new EdosUtil();
|
|
|
+ private List<String> stationList;
|
|
|
+ @Resource
|
|
|
+ private IWindpowerinfodayService windpowerinfodayService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场站,指标,数据
|
|
|
+ */
|
|
|
+ private Map<String, Map<String, String>> monthMap = new HashMap<>();
|
|
|
+
|
|
|
+ public R getReport(String year, String month) {
|
|
|
+ //Map<String, Map<String, String>> map = getMap();
|
|
|
+ calc(year, month);
|
|
|
+ Map<String, List<String>> word = getWord(year, month);
|
|
|
+
|
|
|
+ return R.ok().data(word);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void calc(String year, String month) {
|
|
|
+ getMonthMap();
|
|
|
+ //月初
|
|
|
+ DateTime monthbegin = DateUtil.parse(year + "-" + month + "-1");
|
|
|
+ //月结束
|
|
|
+ DateTime monthend = DateUtil.endOfMonth(monthbegin);
|
|
|
+ //去年同期
|
|
|
+ DateTime lastyearbegin = DateUtil.offset(monthbegin, DateField.YEAR, -1);
|
|
|
+ //上期
|
|
|
+ DateTime lastmonthbegin = DateUtil.offsetMonth(monthbegin, -1);
|
|
|
+ //去年同期结束
|
|
|
+ DateTime lastyearend = DateUtil.offset(monthend, DateField.YEAR, -1);
|
|
|
+ //上期结束
|
|
|
+ DateTime lastmonthend = DateUtil.offsetMonth(monthend, -1);
|
|
|
+
|
|
|
+ QueryWrapper<Projectplan> ppwrapper = new QueryWrapper<>();
|
|
|
+ ppwrapper.eq("YEAR", year).eq("MONTH", month);
|
|
|
+ List<Projectplan> pplist = projectplanService.list(ppwrapper);
|
|
|
+ int gcyjhfdl = pplist.stream().mapToInt(pp -> Integer.parseInt(pp.getGeneratingcapacity())).sum();
|
|
|
+ monthMap.get("0").put("计划电量", String.valueOf(gcyjhfdl));
|
|
|
+ Map<String, Integer> gczyjhfdl = pplist.stream().collect(Collectors.groupingBy(Projectplan::getWindpower, Collectors.summingInt(gc -> Integer.parseInt(gc.getGeneratingcapacity()))));
|
|
|
+ gczyjhfdl.forEach((cz, jhfdl) -> {
|
|
|
+ monthMap.get(cz).put("计划电量", String.valueOf(jhfdl));
|
|
|
+ });
|
|
|
+ //场站,月发电量点
|
|
|
+ Map<String, String> yfdls = CacheContext.wppointmap.entrySet().stream().filter(cz -> isnotqc(cz.getKey())).collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().get("YFDLB").getCode()));
|
|
|
+ yfdls.forEach((cz, p) -> {
|
|
|
+ double sec = edosUtil.getSec(p, monthend.getTime());
|
|
|
+ double lastyearsec = edosUtil.getSec(p, lastyearend.getTime());
|
|
|
+ double lastmonthsec = edosUtil.getSec(p, lastmonthend.getTime());
|
|
|
+ monthMap.get(cz).put("实际电量", NumberUtil.roundStr(sec, 2));
|
|
|
+ monthMap.get(cz).put("去年同期实际电量", NumberUtil.roundStr(lastyearsec, 2));
|
|
|
+ monthMap.get(cz).put("上期实际电量", NumberUtil.roundStr(lastmonthsec, 2));
|
|
|
+ monthMap.get(cz).put("实际电量同比", getRatio(cz, "实际电量", "去年同期实际电量"));
|
|
|
+ monthMap.get(cz).put("实际电量环比", getRatio(cz, "实际电量", "上期实际电量"));
|
|
|
+ monthMap.get(cz).put("实际电量完成率", getCompletRate(cz, "实际电量", "计划电量"));
|
|
|
+ });
|
|
|
+
|
|
|
+ /*----------------------------------------本月----------------------------------------------*/
|
|
|
+ QueryWrapper<Benchmark> bmwrapper = new QueryWrapper<>();
|
|
|
+ bmwrapper.between("RECORDDATE", monthbegin, monthend);
|
|
|
+ List<Benchmark> bmlist = benchmarkService.list(bmwrapper);
|
|
|
+ List<Benchmark> bmlist1 = bmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_FDC")).collect(Collectors.toList());
|
|
|
+ List<Benchmark> bmlist2 = bmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_GDC")).collect(Collectors.toList());
|
|
|
+
|
|
|
+ putBenchmarkData("0", "", bmlist);
|
|
|
+ putBenchmarkData("-1", "", bmlist1);
|
|
|
+ putBenchmarkData("-2", "", bmlist2);
|
|
|
+ Map<String, List<Benchmark>> bmsl = bmlist.stream().collect(Collectors.groupingBy(Benchmark::getForeignkeyid));
|
|
|
+ bmsl.forEach((cz, bml) -> {
|
|
|
+ putBenchmarkData(cz, "", bml);
|
|
|
+ });
|
|
|
+
|
|
|
+ bmwrapper.clear();
|
|
|
+ bmwrapper.between("RECORDDATE", lastyearbegin, lastyearend);
|
|
|
+ List<Benchmark> qntqbmlist = benchmarkService.list(bmwrapper);
|
|
|
+ List<Benchmark> qntqbmlist1 = qntqbmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_FDC")).collect(Collectors.toList());
|
|
|
+ List<Benchmark> qntqbmlist2 = qntqbmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_FDC")).collect(Collectors.toList());
|
|
|
+
|
|
|
+ putBenchmarkData("0", "去年同期", qntqbmlist);
|
|
|
+ putBenchmarkData("-1", "去年同期", qntqbmlist1);
|
|
|
+ putBenchmarkData("-2", "去年同期", qntqbmlist2);
|
|
|
+ Map<String, List<Benchmark>> qntqbmsl = qntqbmlist.stream().collect(Collectors.groupingBy(Benchmark::getForeignkeyid));
|
|
|
+ qntqbmsl.forEach((cz, bml) -> {
|
|
|
+ putBenchmarkData(cz, "去年同期", bml);
|
|
|
+ });
|
|
|
+
|
|
|
+ bmwrapper.clear();
|
|
|
+ bmwrapper.between("RECORDDATE", lastmonthbegin, lastmonthend);
|
|
|
+ List<Benchmark> sqbmlist = benchmarkService.list(bmwrapper);
|
|
|
+ List<Benchmark> sqbmlist1 = sqbmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_FDC")).collect(Collectors.toList());
|
|
|
+ List<Benchmark> sqbmlist2 = sqbmlist.stream().filter(bm -> bm.getForeignkeyid().endsWith("_FDC")).collect(Collectors.toList());
|
|
|
+
|
|
|
+ putBenchmarkData("0", "上期", sqbmlist);
|
|
|
+ putBenchmarkData("-1", "上期", sqbmlist1);
|
|
|
+ putBenchmarkData("-2", "上期", sqbmlist2);
|
|
|
+ Map<String, List<Benchmark>> sqbmsl = sqbmlist.stream().collect(Collectors.groupingBy(Benchmark::getForeignkeyid));
|
|
|
+ sqbmsl.forEach((cz, bml) -> {
|
|
|
+ putBenchmarkData(cz, "上期", bml);
|
|
|
+ });
|
|
|
+
|
|
|
+ for (String s : getStationList()) {
|
|
|
+ putBenchmarkTBHBData(s);
|
|
|
+ }
|
|
|
+ /***************************************计算厂用电量***********************************************/
|
|
|
+ QueryWrapper<Windpowerinfoday> wpidwrapper = new QueryWrapper<>();
|
|
|
+ wpidwrapper.between("RECORDDATE", monthbegin, monthend);
|
|
|
+ List<Windpowerinfoday> wpidlist = windpowerinfodayService.list(wpidwrapper);
|
|
|
+ List<Windpowerinfoday> wpidlist0 = wpidlist.stream().filter(bm -> "0".equals(bm.getForeignkeyid())).collect(Collectors.toList());
|
|
|
+ double fdl = wpidlist0.stream().mapToDouble(Windpowerinfoday::getGeneratingcapacity).sum();
|
|
|
+ double swdl = wpidlist0.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();
|
|
|
+ double gwdl = wpidlist0.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();
|
|
|
+ monthMap.get("0").put("场用电量", NumberUtil.roundStr(fdl + gwdl - swdl, 2));
|
|
|
+ monthMap.get("0").put("场用电率", NumberUtil.roundStr((fdl + gwdl - swdl) / fdl, 2));
|
|
|
+
|
|
|
+ wpidwrapper.clear();
|
|
|
+ wpidwrapper.between("RECORDDATE", lastyearbegin, lastyearend);
|
|
|
+ List<Windpowerinfoday> wpidlistly = windpowerinfodayService.list(wpidwrapper);
|
|
|
+ List<Windpowerinfoday> wpidlist0ly = wpidlistly.stream().filter(bm -> "0".equals(bm.getForeignkeyid())).collect(Collectors.toList());
|
|
|
+ double fdlly = wpidlist0ly.stream().mapToDouble(Windpowerinfoday::getGeneratingcapacity).sum();
|
|
|
+ double swdlly = wpidlist0ly.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();
|
|
|
+ double gwdlly = wpidlist0ly.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();
|
|
|
+ monthMap.get("0").put("去年同期场用电量", NumberUtil.roundStr(fdlly + gwdlly - swdlly, 2));
|
|
|
+ monthMap.get("0").put("去年同期场用电率", NumberUtil.roundStr((fdlly + gwdlly - swdlly) / fdlly, 2));
|
|
|
+
|
|
|
+ wpidwrapper.clear();
|
|
|
+ wpidwrapper.between("RECORDDATE", lastmonthbegin, lastmonthend);
|
|
|
+ List<Windpowerinfoday> wpidlistlm = windpowerinfodayService.list(wpidwrapper);
|
|
|
+ List<Windpowerinfoday> wpidlist0lm = wpidlistlm.stream().filter(bm -> "0".equals(bm.getForeignkeyid())).collect(Collectors.toList());
|
|
|
+ double fdllm = wpidlist0lm.stream().mapToDouble(Windpowerinfoday::getGeneratingcapacity).sum();
|
|
|
+ double swdllm = wpidlist0lm.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();
|
|
|
+ double gwdllm = wpidlist0lm.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();
|
|
|
+ monthMap.get("0").put("上期场用电量", NumberUtil.roundStr(fdllm + gwdllm - swdllm, 2));
|
|
|
+ monthMap.get("0").put("上期场用电率", NumberUtil.roundStr((fdllm + gwdllm - swdllm) / fdllm, 2));
|
|
|
+
|
|
|
+ monthMap.get("0").put("场用电率同比", getRatio("0", "场用电率", "去年同期场用电率"));
|
|
|
+ monthMap.get("0").put("场用电率环比", getRatio("0", "场用电率", "上期场用电率"));
|
|
|
+ monthMap.get("0").put("场用电量同比", getRatioNoBFB("0", "场用电量", "去年同期场用电量"));
|
|
|
+ monthMap.get("0").put("场用电量环比", getRatioNoBFB("0", "场用电量", "上期场用电量"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //经济运行首页数据同比环比
|
|
|
+ private void putBenchmarkTBHBData(String station) {
|
|
|
+ monthMap.get(station).put("理论发电量同比", getRatio(station, "理论发电量", "去年同期理论发电量"));
|
|
|
+ monthMap.get(station).put("理论发电量环比", getRatio(station, "理论发电量", "上期理论发电量"));
|
|
|
+ monthMap.get(station).put("实际电量同比", getRatio(station, "实际电量", "去年同期实际电量"));
|
|
|
+ monthMap.get(station).put("实际电量环比", getRatio(station, "实际电量", "上期实际电量"));
|
|
|
+ monthMap.get(station).put("设备利用小时同比", getRatioNoBFB(station, "设备利用小时", "去年同期设备利用小时"));
|
|
|
+ monthMap.get(station).put("设备利用小时环比", getRatioNoBFB(station, "设备利用小时", "上期设备利用小时"));
|
|
|
+ monthMap.get(station).put("风能利用率同比", getRatio(station, "风能利用率", "去年同期风能利用率"));
|
|
|
+ monthMap.get(station).put("风能利用率环比", getRatio(station, "风能利用率", "上期风能利用率"));
|
|
|
+ monthMap.get(station).put("故障损失电量同比", getRatio(station, "故障损失电量", "去年同期故障损失电量"));
|
|
|
+ monthMap.get(station).put("故障损失电量环比", getRatio(station, "故障损失电量", "上期故障损失电量"));
|
|
|
+ monthMap.get(station).put("限电损失电量同比", getRatio(station, "限电损失电量", "去年同期限电损失电量"));
|
|
|
+ monthMap.get(station).put("限电损失电量环比", getRatio(station, "限电损失电量", "上期限电损失电量"));
|
|
|
+ monthMap.get(station).put("受累损失电量同比", getRatio(station, "受累损失电量", "去年同期受累损失电量"));
|
|
|
+ monthMap.get(station).put("受累损失电量环比", getRatio(station, "受累损失电量", "上期受累损失电量"));
|
|
|
+ monthMap.get(station).put("性能损失电量同比", getRatioNoBFB(station, "性能损失电量", "去年同期性能损失电量"));
|
|
|
+ monthMap.get(station).put("性能损失电量环比", getRatioNoBFB(station, "性能损失电量", "上期性能损失电量"));
|
|
|
+ monthMap.get(station).put("计划检修损失电量同比", getRatio(station, "计划检修损失电量", "去年同期计划检修损失电量"));
|
|
|
+ monthMap.get(station).put("计划检修损失电量环比", getRatio(station, "计划检修损失电量", "上期计划检修损失电量"));
|
|
|
+ monthMap.get(station).put("故障损失率同比", getRatio(station, "故障损失率", "去年同期故障损失率"));
|
|
|
+ monthMap.get(station).put("故障损失率环比", getRatio(station, "故障损失率", "上期故障损失率"));
|
|
|
+ monthMap.get(station).put("限电损失率同比", getRatio(station, "限电损失率", "去年同期限电损失率"));
|
|
|
+ monthMap.get(station).put("限电损失率环比", getRatio(station, "限电损失率", "上期限电损失率"));
|
|
|
+ monthMap.get(station).put("受累损失率同比", getRatio(station, "受累损失率", "去年同期受累损失率"));
|
|
|
+ monthMap.get(station).put("受累损失率环比", getRatio(station, "受累损失率", "上期受累损失率"));
|
|
|
+ monthMap.get(station).put("性能损失率同比", getRatio(station, "性能损失率", "去年同期性能损失率"));
|
|
|
+ monthMap.get(station).put("性能损失率环比", getRatio(station, "性能损失率", "上期性能损失率"));
|
|
|
+ monthMap.get(station).put("计划检修损失率同比", getRatio(station, "计划检修损失率", "去年同期计划检修损失率"));
|
|
|
+ monthMap.get(station).put("计划检修损失率环比", getRatio(station, "计划检修损失率", "上期计划检修损失率"));
|
|
|
+ monthMap.get(station).put("平均风速同比", getRatio(station, "平均风速", "去年同期平均风速"));
|
|
|
+ monthMap.get(station).put("平均风速环比", getRatio(station, "平均风速", "上期平均风速"));
|
|
|
+ monthMap.get(station).put("损失电量同比", getRatio(station, "损失电量", "去年同期损失电量"));
|
|
|
+ monthMap.get(station).put("损失电量环比", getRatio(station, "损失电量", "上期损失电量"));
|
|
|
+ monthMap.get(station).put("损失率同比", getRatio(station, "损失率", "去年同期损失率"));
|
|
|
+ monthMap.get(station).put("损失率环比", getRatio(station, "损失率", "上期损失率"));
|
|
|
+ monthMap.get(station).put("复位及时率同比", getRatio(station, "复位及时率", "去年同期复位及时率"));
|
|
|
+ monthMap.get(station).put("复位及时率环比", getRatio(station, "复位及时率", "上期复位及时率"));
|
|
|
+ monthMap.get(station).put("状态转换率同比", getRatio(station, "状态转换率", "去年同期状态转换率"));
|
|
|
+ monthMap.get(station).put("状态转换率环比", getRatio(station, "状态转换率", "上期状态转换率"));
|
|
|
+ monthMap.get(station).put("消缺及时率同比", getRatio(station, "消缺及时率", "去年同期消缺及时率"));
|
|
|
+ monthMap.get(station).put("消缺及时率环比", getRatio(station, "消缺及时率", "上期消缺及时率"));
|
|
|
+ monthMap.get(station).put("厂用电率同比", getRatio(station, "厂用电率", "去年同期厂用电率"));
|
|
|
+ monthMap.get(station).put("厂用电率环比", getRatio(station, "厂用电率", "上期厂用电率"));
|
|
|
+ monthMap.get(station).put("厂用电量同比", getRatioNoBFB(station, "厂用电量", "去年同期厂用电量"));
|
|
|
+ monthMap.get(station).put("厂用电量环比", getRatioNoBFB(station, "厂用电量", "上期厂用电量"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //经济运行首页数据
|
|
|
+ private void putBenchmarkData(String station, String addStr, List<Benchmark> bml) {
|
|
|
+ double llfdlsum = bml.stream().mapToDouble(Benchmark::getTheoreticalpower).sum();
|
|
|
+ monthMap.get(station).put(addStr + "理论发电量", String.valueOf(llfdlsum));
|
|
|
+ double sjdlsum = bml.stream().mapToDouble(Benchmark::getActualpower).sum();
|
|
|
+ monthMap.get(station).put(addStr + "实际电量", NumberUtil.roundStr(sjdlsum, 2));
|
|
|
+ double sblyxssum = bml.stream().mapToDouble(Benchmark::getUtilizationhours).sum();
|
|
|
+ monthMap.get(station).put(addStr + "设备利用小时", String.valueOf(sblyxssum));
|
|
|
+ double fnlylsum = bml.stream().mapToDouble(Benchmark::getWindenergy).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "风能利用率", NumberUtil.roundStr(fnlylsum, 2));
|
|
|
+ double gzsssum = bml.stream().mapToDouble(Benchmark::getDaynhgzssdl).sum();
|
|
|
+ monthMap.get(station).put(addStr + "故障损失电量", String.valueOf(gzsssum));
|
|
|
+ monthMap.get(station).put(addStr + "故障损失率", getCompletRate(station, addStr + "故障损失电量", addStr + "实际电量"));
|
|
|
+ double xdsssum = bml.stream().mapToDouble(Benchmark::getDaynhxdssdl).sum();
|
|
|
+ monthMap.get(station).put(addStr + "限电损失电量", NumberUtil.roundStr(xdsssum, 2));
|
|
|
+ double xdssl = bml.stream().mapToDouble(Benchmark::getPowerlossrate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "限电损失率", NumberUtil.roundStr(xdssl, 2));
|
|
|
+ double slsssum = bml.stream().mapToDouble(Benchmark::getDaynhcfdl).sum();
|
|
|
+ monthMap.get(station).put(addStr + "受累损失电量", String.valueOf(slsssum));
|
|
|
+ monthMap.get(station).put(addStr + "受累损失率", getCompletRate(station, addStr + "受累损失电量", addStr + "实际电量"));
|
|
|
+ double xnsssum = bml.stream().mapToDouble(Benchmark::getDaynhqfdl).sum();
|
|
|
+ monthMap.get(station).put(addStr + "性能损失电量", String.valueOf(xnsssum));
|
|
|
+ double xnssl = bml.stream().mapToDouble(Benchmark::getPerformancelossrate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "性能损失率", NumberUtil.roundStr(xnssl, 2));
|
|
|
+ double jhjxsum = bml.stream().mapToDouble(Benchmark::getDaynhwhssdl).sum();
|
|
|
+ monthMap.get(station).put(addStr + "计划检修损失电量", String.valueOf(jhjxsum));
|
|
|
+ monthMap.get(station).put(addStr + "计划检修损失率", getCompletRate(station, addStr + "计划检修损失电量", addStr + "实际电量"));
|
|
|
+ double pjfssum = bml.stream().filter(bm -> bm.getSpeed() > 0).mapToDouble(Benchmark::getSpeed).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "平均风速", NumberUtil.roundStr(pjfssum, 2));
|
|
|
+ monthMap.get(station).put(addStr + "损失电量", getSum(station, addStr + "故障损失电量", addStr + "限电损失电量", addStr + "受累损失电量", addStr + "性能损失电量", addStr + "计划检修损失电量"));
|
|
|
+ monthMap.get(station).put(addStr + "损失率", getCompletRate(station, addStr + "损失电量", addStr + "实际电量"));
|
|
|
+ double fwjsl = bml.stream().mapToDouble(Benchmark::getResettimelyrate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "复位及时率", NumberUtil.roundStr(fwjsl, 2));
|
|
|
+ double ztzhl = bml.stream().mapToDouble(Benchmark::getStatetransitionrate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "状态转换率", NumberUtil.roundStr(ztzhl, 2));
|
|
|
+ double xqjsl = bml.stream().mapToDouble(Benchmark::getEliminationrate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "消缺及时率", NumberUtil.roundStr(xqjsl, 2));
|
|
|
+ double cydl = bml.stream().mapToDouble(Benchmark::getComprehensiverate).average().orElse(0);
|
|
|
+ monthMap.get(station).put(addStr + "厂用电率", NumberUtil.roundStr(cydl, 2));
|
|
|
+ monthMap.get(station).put(addStr + "厂用电量", getProduct(station, addStr + "实际电量", addStr + "厂用电率"));
|
|
|
+ monthMap.get(station).put(addStr + "实际电量完成率", getCompletRate(station, addStr + "实际电量", addStr + "计划电量"));
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getProduct(String station, String one, String two) {
|
|
|
+ String oone = monthMap.get(station).get(one);
|
|
|
+ String otwo = monthMap.get(station).get(two);
|
|
|
+ if (oone == null || otwo == null) return "NaN";
|
|
|
+ Double v = Double.parseDouble(oone) * Double.parseDouble(otwo) / 100;
|
|
|
+ if (!(v.isInfinite() || v.isNaN()))
|
|
|
+ return NumberUtil.roundStr(v, 2);
|
|
|
+ return "NaN";
|
|
|
+ }
|
|
|
+
|
|
|
+ //场站指标合并成公司指标
|
|
|
+ private double getCz2Gs(String data) {
|
|
|
+ double o = 0;
|
|
|
+ for (String s : getStationList()) {
|
|
|
+ if ("0".equals(s) || "-1".equals(s) || "-2".equals(s)) continue;
|
|
|
+ o += Double.valueOf(monthMap.get(s).get(data));
|
|
|
+ }
|
|
|
+ return o;
|
|
|
+ }
|
|
|
+
|
|
|
+ //和
|
|
|
+ private String getSum(String cz, String... ws) {
|
|
|
+ double o = 0;
|
|
|
+ for (String w : ws) {
|
|
|
+ o += Double.parseDouble(monthMap.get(cz).get(w));
|
|
|
+ }
|
|
|
+ return String.valueOf(o);
|
|
|
+ }
|
|
|
+
|
|
|
+ //初始化monthMap
|
|
|
+ public Map<String, Map<String, String>> getMonthMap() {
|
|
|
+ if (monthMap.isEmpty()) {
|
|
|
+ for (String s : getStationList()) {
|
|
|
+ monthMap.put(s, new LinkedHashMap<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return monthMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ //定义场站
|
|
|
+ private List<String> getStationList() {
|
|
|
+ if (stationList == null) {
|
|
|
+ stationList = new ArrayList<>();
|
|
|
+ stationList.add("0");
|
|
|
+ stationList.add("-1");
|
|
|
+ stationList.add("-2");
|
|
|
+ stationList.add("MHS_FDC");
|
|
|
+ stationList.add("NSS_FDC");
|
|
|
+ stationList.add("QS_FDC");
|
|
|
+ stationList.add("SBQ_FDC");
|
|
|
+ stationList.add("XS_FDC");
|
|
|
+ stationList.add("DWK_GDC");
|
|
|
+ stationList.add("PL_GDC");
|
|
|
+ stationList.add("XH_GDC");
|
|
|
+ stationList.add("MCH_GDC");
|
|
|
+ stationList.add("HZJ_GDC");
|
|
|
+ stationList.add("AK_GDC");
|
|
|
+ }
|
|
|
+ return stationList;
|
|
|
+ }
|
|
|
+
|
|
|
+ //场站,同比环比双方,算同比环比
|
|
|
+ private String getRatio(String cz, String one, String two) {
|
|
|
+ String oone = monthMap.get(cz).get(one);
|
|
|
+ String otwo = monthMap.get(cz).get(two);
|
|
|
+ if (oone == null || otwo == null) return "NaN";
|
|
|
+ Double twodou = Double.parseDouble(otwo);
|
|
|
+ Double v = (Double.parseDouble(oone) - twodou) / twodou * 100;
|
|
|
+ if (!(v.isInfinite() || v.isNaN()))
|
|
|
+ return NumberUtil.roundStr(v, 2);
|
|
|
+ return "NaN";
|
|
|
+ }
|
|
|
+
|
|
|
+ //算同比环比,不是百分比
|
|
|
+ private String getRatioNoBFB(String cz, String one, String two) {
|
|
|
+ String oone = monthMap.get(cz).get(one);
|
|
|
+ String otwo = monthMap.get(cz).get(two);
|
|
|
+ if (oone == null || otwo == null) return "NaN";
|
|
|
+ Double v = Double.valueOf(oone) - Double.valueOf(otwo);
|
|
|
+ if (!(v.isInfinite() || v.isNaN()))
|
|
|
+ return NumberUtil.roundStr(v, 2);
|
|
|
+ return "NaN";
|
|
|
+ }
|
|
|
+
|
|
|
+ private String douStr2Str3(String str, String one, String two) {
|
|
|
+ if (str != null && str.startsWith("-")) {
|
|
|
+ return str.replaceFirst("-", two);
|
|
|
+ } else {
|
|
|
+ return one + str;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private String douStr2Str(String str) {
|
|
|
+ return douStr2Str3(str, "增加", "减少");
|
|
|
+ }
|
|
|
+
|
|
|
+ private String douStr2Str2(String str) {
|
|
|
+ return douStr2Str3(str, "上升", "下降");
|
|
|
+ }
|
|
|
+
|
|
|
+ //算比率
|
|
|
+ private String getCompletRate(String cz, String one, String two) {
|
|
|
+ String oone = monthMap.get(cz).get(one);
|
|
|
+ String otwo = monthMap.get(cz).get(two);
|
|
|
+ if (StrUtil.isEmpty(oone) || StrUtil.isEmpty(otwo)) return "NaN";
|
|
|
+ double v = Double.valueOf(oone) / Double.valueOf(otwo) * 100;
|
|
|
+ return String.format("%.2f", v);
|
|
|
+ }
|
|
|
+
|
|
|
+ //过滤期次
|
|
|
+ private boolean isnotqc(String cz) {
|
|
|
+ return cz.endsWith("DC") || cz.equals("0") || cz.equals("-1") || cz.equals("-2");
|
|
|
+ }
|
|
|
+
|
|
|
+ private Map<String, List<String>> getWord(String year, String month) {
|
|
|
+ Map<String, List<String>> map = new LinkedHashMap<>();
|
|
|
+ List<String> title = new ArrayList<>();
|
|
|
+ String str;
|
|
|
+ title.add(StrUtil.format("{}年{}月经济运行分析报告", year, month));
|
|
|
+ map.put("标题", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "公司本月计划电量为{}万千瓦时,实际完成{}万千瓦时,同比{}%,环比{}%,计划完成率{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("0").get("计划电量"), monthMap.get("0").get("实际电量"),
|
|
|
+ douStr2Str(monthMap.get("0").get("实际电量同比")), douStr2Str(monthMap.get("0").get("实际电量环比")), monthMap.get("0").get("实际电量完成率")));
|
|
|
+ str = "本月各风场发电量:麻黄山{}万千瓦时,完成率{}%、牛首山{}万千瓦时,完成率{}%、青山{}万千瓦时,完成率{}%、石板泉{}万千瓦时,完成率{}%、香山风电场{}万千瓦时,完成率{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("MHS_FDC").get("实际电量"), monthMap.get("MHS_FDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("NSS_FDC").get("实际电量"), monthMap.get("NSS_FDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("QS_FDC").get("实际电量"), monthMap.get("QS_FDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("SBQ_FDC").get("实际电量"), monthMap.get("SBQ_FDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("XS_FDC").get("实际电量"), monthMap.get("XS_FDC").get("实际电量完成率")));
|
|
|
+ str = "本月各电站发电量:大武口{}万千瓦时,完成率{}%、平罗{}万千瓦时,完成率{}%、宣和{}万千瓦时,完成率{}%、马场湖{}万千瓦时,完成率{}%、 海子井{}万千瓦时,完成{}%、埃肯{}万千瓦时,完成率{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("DWK_GDC").get("实际电量"), monthMap.get("DWK_GDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("PL_GDC").get("实际电量"), monthMap.get("PL_GDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("XH_GDC").get("实际电量"), monthMap.get("XH_GDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("MCH_GDC").get("实际电量"), monthMap.get("MCH_GDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("HZJ_GDC").get("实际电量"), monthMap.get("HZJ_GDC").get("实际电量完成率")
|
|
|
+ , monthMap.get("AK_GDC").get("实际电量"), monthMap.get("AK_GDC").get("实际电量完成率")));
|
|
|
+ map.put("发电量完成情况", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月各风电场平均风速为{}m/s,同比{}m/s,环比{}m/s。风力发电理论发电量{}万千瓦时,同比{}%,环比{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-1").get("平均风速"), douStr2Str(monthMap.get("-1").get("平均风速同比")), douStr2Str(monthMap.get("-1").get("平均风速环比"))
|
|
|
+ , monthMap.get("-1").get("理论发电量"), douStr2Str(monthMap.get("-1").get("理论发电量同比")), douStr2Str(monthMap.get("-1").get("理论发电量环比"))));
|
|
|
+ str = "本月各光伏场站月累计辐照总量{}MJ/㎡,同比{}%,环比{}%。光伏理论发电量{}万千瓦时,同比{}%,环比{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-2").get("平均风速"), douStr2Str(monthMap.get("-2").get("平均风速同比")), douStr2Str(monthMap.get("-2").get("平均风速环比"))
|
|
|
+ , monthMap.get("-2").get("理论发电量"), douStr2Str(monthMap.get("-2").get("理论发电量同比")), douStr2Str(monthMap.get("-2").get("理论发电量环比"))));
|
|
|
+ str = "公司本月理论发电量为{}万千瓦时,同比{}%,环比{}%;利用小时数{}小时,同比{}小时,环比{}小时;本月风能利用率{}%,同比{}%,环比{}%;光能利用率{}%,同比{}%,环比{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("0").get("理论发电量"), douStr2Str(monthMap.get("0").get("理论发电量同比")), douStr2Str(monthMap.get("0").get("理论发电量环比"))
|
|
|
+ , monthMap.get("0").get("设备利用小时"), douStr2Str(monthMap.get("0").get("设备利用小时同比")), douStr2Str(monthMap.get("0").get("设备利用小时环比"))
|
|
|
+ , monthMap.get("-1").get("风能利用率"), douStr2Str(monthMap.get("-1").get("风能利用率同比")), douStr2Str(monthMap.get("-1").get("风能利用率环比"))
|
|
|
+ , monthMap.get("-2").get("风能利用率"), douStr2Str(monthMap.get("-2").get("风能利用率同比")), douStr2Str(monthMap.get("-2").get("风能利用率环比"))));
|
|
|
+ str = "公司本月损失电量{}万千瓦时,同比{}%,环比{}%;损失率{}%,同比{}%,环比{}%。其中,受累损失电量{}万千瓦时,损失率{}%,同比{}%,环比{}%;" +
|
|
|
+ "限电损失电量{}万千瓦时,损失率{}%,同比{}%,环比{}%;故障损失电量{}万千瓦时,损失率{}%,同比{}%,环比{}%;计划检修损失电量{}万千瓦时,损失率{}%,同比{}%,环比{}%;性能损失电量{}万千瓦时,损失率{}%,同比{}%,环比{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("0").get("损失电量"), douStr2Str(monthMap.get("0").get("损失电量同比")), douStr2Str(monthMap.get("0").get("损失电量环比"))
|
|
|
+ , monthMap.get("0").get("损失率"), douStr2Str(monthMap.get("0").get("损失率同比")), douStr2Str(monthMap.get("0").get("损失率环比"))
|
|
|
+ , monthMap.get("0").get("受累损失电量"), monthMap.get("0").get("受累损失率"), douStr2Str2(monthMap.get("0").get("受累损失率同比")),
|
|
|
+ douStr2Str2(monthMap.get("0").get("受累损失率环比")), monthMap.get("0").get("限电损失电量"), monthMap.get("0").get("限电损失率")
|
|
|
+ , douStr2Str2(monthMap.get("0").get("限电损失率同比")), douStr2Str2(monthMap.get("0").get("限电损失率环比"))
|
|
|
+ , monthMap.get("0").get("故障损失电量"), monthMap.get("0").get("故障损失率"), douStr2Str2(monthMap.get("0").get("故障损失率同比")), douStr2Str2(monthMap.get("0").get("故障损失率环比"))
|
|
|
+ , monthMap.get("0").get("计划检修损失电量"), monthMap.get("0").get("计划检修损失率"), douStr2Str2(monthMap.get("0").get("计划检修损失率同比")), douStr2Str2(monthMap.get("0").get("计划检修损失率环比"))
|
|
|
+ , monthMap.get("0").get("性能损失电量"), monthMap.get("0").get("性能损失率"), douStr2Str2(monthMap.get("0").get("性能损失率同比")), douStr2Str2(monthMap.get("0").get("性能损失率环比"))));
|
|
|
+ str = "本月各场站发生极端天气{}次,持续时长{}小时,受累损失电量{}万千瓦时。主要事件为:{}";
|
|
|
+ title.add(StrUtil.format(str, "0", "0", monthMap.get("0").get("受累损失电量"), ""));
|
|
|
+ map.put("资源及理论发电量平衡分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月各场站收到电网调度限电指令11次,累计持续时间78小时,同比增加28小时,环比增加14小时。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月累计发生两个细则考核1116.3分,同比(626.07分)增加490.23分,累计补偿34.46分,同比(15.12分)增加19.34分。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月考核指标占比最多的是功率预测指标,共计考核1007.45分,其中风光短期预测考核213.82分,考核最多的场站为香山风电场(香五),考核58.12分;超短期预测考核110.15分,考核最多的场站为石板泉二、三、四期(牛五),考核26.38分;可用电量准确率考核682.84分,考核最高的场站为石板泉一期(星六),考核495分,本月按上限考核,主要原因为远动装置主备机数据不同步,数据上传出现偏差造成考核分值较大,目前已整改完成。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月未发生电网输变电故障,受累电网损失电量为0。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ map.put("电网调度因素损失分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月各场站累计发生输变电故障2次,故障消缺时长累计48小时,损失电量79.78万千瓦时。故障事件为2月22日-25日石板泉110kV能风六线111开关差动保护跳闸;2月12日-16日香山国风二线315开关零序过流Ⅰ段保护动作跳闸。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月各风电场累计发生风机故障44台次,损失电量4.53万千瓦时,同比增加10%,环比减少5%。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月各场站平均故障消缺时间为4.8小时,同比下降10%,环比下降5%;故障消缺及时率86%,同比增加10%,环比减少5%。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ map.put("故障及损失分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月累计执行风机计划检修186台次,同比增加90次,环比增加80次,平均检修时长4小时,同比下降0.5小时,环比下降0.5小时。损失电量8.13万千瓦时,同比增长7.06万千瓦时。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ map.put("计划检修损失分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月风力发电性能损失{}万千瓦时,同比{}万千瓦时,环比{}万千瓦时。损失率{}%,同比{}%,环比{}%;其中性能损失率最高的是{},性能损失率{}%,性能损失率最低的是{},性能损失率{}%;性能损失率改善的场站有:{};性能损失率劣化的场站有{}。";
|
|
|
+ //性能损失率排序
|
|
|
+ List<String> xnsslpx = getTargetSort("FDC", "性能损失率");
|
|
|
+ List<String> xnsslhbpx = getTargetSort("FDC", "性能损失率环比");
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-1").get("性能损失电量"), douStr2Str2(monthMap.get("-1").get("性能损失电量同比"))
|
|
|
+ , douStr2Str2(monthMap.get("-1").get("性能损失电量环比")), monthMap.get("-1").get("性能损失率")
|
|
|
+ , douStr2Str2(monthMap.get("-1").get("性能损失率同比")), douStr2Str2(monthMap.get("-1").get("性能损失率环比"))
|
|
|
+ , max(xnsslpx), monthMap.get(xnsslpx.get(xnsslpx.size() - 1)).get("性能损失率")
|
|
|
+ , min(xnsslpx), monthMap.get(xnsslpx.get(0)).get("性能损失率")
|
|
|
+ , max2(xnsslhbpx), min2(xnsslhbpx)));
|
|
|
+ str = "本月风机状态转换及时率{}%,同比{}%,环比{}%。其中,状态转换及时率最高的场站是{},状态转换及时率最低的是{}。";
|
|
|
+ //状态转换率排序
|
|
|
+ List<String> ztzhlpx = getTargetSort("FDC", "状态转换率");
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-1").get("状态转换率"), douStr2Str2(monthMap.get("-1").get("状态转换率同比"))
|
|
|
+ , douStr2Str2(monthMap.get("-1").get("状态转换率环比")), max(ztzhlpx), min(ztzhlpx)));
|
|
|
+ str = "本月风机复位及时率{}%,同比{}%,环比{}%。其中,复位及时率最高的场站是{},复位及时率最低的是{}。";
|
|
|
+ //复位及时率排序
|
|
|
+ List<String> fwjslpx = getTargetSort("FDC", "复位及时率");
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-1").get("复位及时率"), douStr2Str2(monthMap.get("-1").get("复位及时率同比"))
|
|
|
+ , douStr2Str2(monthMap.get("-1").get("复位及时率环比")), max(fwjslpx), min(fwjslpx)));
|
|
|
+ str = "根据本月风机历史数据分析,存在静态偏航误差的风机有33台,分别是xxxxxxx;存在额定功率不达标的风机有44台,分别是xxxxxx。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ str = "本月光伏发电性能损失{}万千瓦时,同比{}万千瓦时,环比{}万千瓦时,损失率{}%, 同比{}%, 环比{}%;其中性能损失率最高的是{},性能损失电量{}万千瓦时;性能损失率最低的是{},性能损失电量{}万千瓦时。";
|
|
|
+ //性能损失率排序
|
|
|
+ List<String> xnsslpxgf = getTargetSort("GDC", "性能损失率");
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("-2").get("性能损失电量"), douStr2Str2(monthMap.get("-2").get("性能损失电量同比"))
|
|
|
+ , douStr2Str2(monthMap.get("-2").get("性能损失电量环比")), monthMap.get("-2").get("性能损失率")
|
|
|
+ , douStr2Str2(monthMap.get("-2").get("性能损失率同比")), douStr2Str2(monthMap.get("-2").get("性能损失率环比"))
|
|
|
+ , max(xnsslpxgf), monthMap.get(xnsslpxgf.get(xnsslpxgf.size() - 1)).get("性能损失电量")
|
|
|
+ , min(xnsslpxgf), monthMap.get(xnsslpxgf.get(0)).get("性能损失电量")));
|
|
|
+ str = "根据本月逆变器历史数据分析,存在功率偏差的设备有22台,分别是xxxxxxx。";
|
|
|
+ title.add(StrUtil.format(str));
|
|
|
+ map.put("性能损失分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ str = "本月场用电量累计{}万千瓦时,同比{}千瓦时,环比{}千瓦时;综合场用电率{}%,同比{}%,环比{}%。";
|
|
|
+ title.add(StrUtil.format(str, monthMap.get("0").get("场用电量"), douStr2Str(monthMap.get("0").get("场用电量同比"))
|
|
|
+ , douStr2Str(monthMap.get("0").get("场用电量环比")), monthMap.get("0").get("场用电率"),
|
|
|
+ douStr2Str2(monthMap.get("0").get("场用电率同比")), douStr2Str2(monthMap.get("0").get("场用电率环比"))));
|
|
|
+ map.put("厂用电量分析", title);
|
|
|
+ title = new ArrayList<>();
|
|
|
+ //风能利用率排序
|
|
|
+ List<String> fnlylpx = getTargetSort("FDC", "风能利用率");
|
|
|
+ str = "{}:风能利用率偏低,设备维护维修及时率有待提高。";
|
|
|
+ title.add(StrUtil.format(str, min(fnlylpx)));
|
|
|
+ //计划检修损失率排序
|
|
|
+ List<String> jhjxsslpx = getTargetSort("FDC", "计划检修损失率");
|
|
|
+ str = "{}:计划检修损失率太高,需要重新审视安排合理检修时间。";
|
|
|
+ title.add(StrUtil.format(str, max(jhjxsslpx)));
|
|
|
+ //风能利用率排序
|
|
|
+ List<String> xnssdlpx = getTargetSort("FDC", "性能损失电量");
|
|
|
+ str = "{}:风机性能损失电量高,存在性能缺陷的风机多,需要限时整改。";
|
|
|
+ title.add(StrUtil.format(str, max(xnssdlpx)));
|
|
|
+ map.put("场站问题总结和建议", title);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ private String min(List<String> list) {
|
|
|
+ return CacheContext.pmap.get(list.get(0)).getName();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String max(List<String> list) {
|
|
|
+ return CacheContext.pmap.get(list.get(list.size() - 1)).getName();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String min2(List<String> list) {
|
|
|
+ return CacheContext.pmap.get(list.get(1)).getName() + "," + CacheContext.wpmap.get(list.get(0)).getName();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String max2(List<String> list) {
|
|
|
+ return CacheContext.pmap.get(list.get(list.size() - 1)).getName() + "," + CacheContext.wpmap.get(list.get(list.size() - 2)).getName();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 按指标从小到大排序
|
|
|
+ *
|
|
|
+ * @param dc 风电场or光电场
|
|
|
+ * @param target 指标
|
|
|
+ * @return 按指标从小到大排序场站
|
|
|
+ */
|
|
|
+ private List<String> getTargetSort(String dc, String target) {
|
|
|
+ List<String> lists = new ArrayList<>();
|
|
|
+ getStationTarget(dc, target).entrySet().stream().sorted(Map.Entry.comparingByValue()).forEach(o -> lists.add(o.getKey()));
|
|
|
+ return lists;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 场站,指标值
|
|
|
+ */
|
|
|
+ public Map<String, Double> getStationTarget(String dc, String target) {
|
|
|
+ Map<String, Double> map = new HashMap<>();
|
|
|
+ monthMap.forEach((cz, zb) -> {
|
|
|
+ if (cz.endsWith(dc))
|
|
|
+ map.put(cz, Double.valueOf(zb.get(target)));
|
|
|
+ });
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Map<String, Map<String, String>> getMap() {
|
|
|
+ Map<String, String> 公司Map = monthMap.get("0");
|
|
|
+ Map<String, String> 风电场Map = monthMap.get("-1");
|
|
|
+ Map<String, String> 光电场Map = monthMap.get("-2");
|
|
|
+ Map<String, String> 麻黄山Map = monthMap.get("MHS_FDC");
|
|
|
+ Map<String, String> 牛首山Map = monthMap.get("NSS_FDC");
|
|
|
+ Map<String, String> 青山Map = monthMap.get("QS_FDC");
|
|
|
+ Map<String, String> 石板泉Map = monthMap.get("SBQ_FDC");
|
|
|
+ Map<String, String> 香山Map = monthMap.get("XS_FDC");
|
|
|
+ Map<String, String> 大武口Map = monthMap.get("DWK_GDC");
|
|
|
+ Map<String, String> 平罗Map = monthMap.get("PL_GDC");
|
|
|
+ Map<String, String> 宣和Map = monthMap.get("XH_GDC");
|
|
|
+ Map<String, String> 马场湖Map = monthMap.get("MCH_GDC");
|
|
|
+ Map<String, String> 海子井Map = monthMap.get("HZJ_GDC");
|
|
|
+ Map<String, String> 艾肯Map = monthMap.get("AK_GDC");
|
|
|
+
|
|
|
+ 公司Map.put("计划电量", "10000");
|
|
|
+ 公司Map.put("实际电量", "9332.97");
|
|
|
+ 公司Map.put("实际电量同比", "18");
|
|
|
+ 公司Map.put("实际电量环比", "-15");
|
|
|
+ 公司Map.put("实际电量完成率", "93.33");
|
|
|
+
|
|
|
+ 麻黄山Map.put("实际电量", "831.41");
|
|
|
+ 麻黄山Map.put("实际电量完成率", "63.08");
|
|
|
+
|
|
|
+ 牛首山Map.put("实际电量", "1240.05");
|
|
|
+ 牛首山Map.put("实际电量完成率", "70.70");
|
|
|
+
|
|
|
+ 青山Map.put("实际电量", "2111.7");
|
|
|
+ 青山Map.put("实际电量完成率", "83.27");
|
|
|
+
|
|
|
+ 石板泉Map.put("实际电量", "1933.18");
|
|
|
+ 石板泉Map.put("实际电量完成率", "82.19");
|
|
|
+
|
|
|
+ 香山Map.put("实际电量", "1962.54");
|
|
|
+ 香山Map.put("实际电量完成率", "102.75");
|
|
|
+
|
|
|
+ 大武口Map.put("实际电量", "94.56");
|
|
|
+ 大武口Map.put("实际电量完成率", "95.52");
|
|
|
+
|
|
|
+ 平罗Map.put("实际电量", "281.12");
|
|
|
+ 平罗Map.put("实际电量完成率", "101.49");
|
|
|
+
|
|
|
+ 宣和Map.put("实际电量", "214.82");
|
|
|
+ 宣和Map.put("实际电量完成率", "106.88");
|
|
|
+
|
|
|
+ 马场湖Map.put("实际电量", "104.79");
|
|
|
+ 马场湖Map.put("实际电量完成率", "108.03");
|
|
|
+
|
|
|
+ 海子井Map.put("实际电量", "534.97");
|
|
|
+ 海子井Map.put("实际电量完成率", "101.32");
|
|
|
+
|
|
|
+ 艾肯Map.put("实际电量", "23.83");
|
|
|
+ 艾肯Map.put("实际电量完成率", "85.11");
|
|
|
+
|
|
|
+ 公司Map.put("电网限电指令", "11");
|
|
|
+ 公司Map.put("电网限电指令持续时间", "78");
|
|
|
+ 公司Map.put("电网限电指令持续时间同比", "28");//没有百分比
|
|
|
+ 公司Map.put("电网限电指令持续时间环比", "14");//没有百分比
|
|
|
+ 公司Map.put("两个细则分数", "1116.3");
|
|
|
+ 公司Map.put("两个细则分数去年同期", "626.07");
|
|
|
+ 公司Map.put("两个细则分数同比", "490.23");//没有百分比
|
|
|
+ 公司Map.put("两个细则分数累计补偿", "34.46");
|
|
|
+ 公司Map.put("两个细则分数累计补偿上期", "15.12");
|
|
|
+ 公司Map.put("两个细则分数累计补偿环比", "19.34");//没有百分比
|
|
|
+ 公司Map.put("受累损失电量", "0");
|
|
|
+
|
|
|
+ 风电场Map.put("平均风速", "4.63");
|
|
|
+ 风电场Map.put("平均风速同比", "0.52");
|
|
|
+ 风电场Map.put("平均风速环比", "1.51");
|
|
|
+ 风电场Map.put("理论发电量", "9800");
|
|
|
+ 风电场Map.put("理论发电量同比", "11");
|
|
|
+ 风电场Map.put("理论发电量环比", "-20");
|
|
|
+ 光电场Map.put("辐照总量", "2229.66");
|
|
|
+ 光电场Map.put("辐照总量同比", "54.18");//没有百分比
|
|
|
+ 光电场Map.put("辐照总量环比", "23.45");//没有百分比
|
|
|
+ 光电场Map.put("理论发电量", "1200");
|
|
|
+ 光电场Map.put("理论发电量同比", "6");
|
|
|
+ 光电场Map.put("理论发电量环比", "3");
|
|
|
+
|
|
|
+ 公司Map.put("理论发电量", "11000");
|
|
|
+ 公司Map.put("理论发电量同比", "20");
|
|
|
+ 公司Map.put("理论发电量环比", "-30");
|
|
|
+ 公司Map.put("设备利用小时", "120");
|
|
|
+ 公司Map.put("设备利用小时同比", "20");
|
|
|
+ 公司Map.put("设备利用小时环比", "-13");
|
|
|
+ 公司Map.put("风能利用率", "86");
|
|
|
+ 公司Map.put("风能利用率同比", "-1");
|
|
|
+ 公司Map.put("风能利用率环比", "-2");
|
|
|
+ 公司Map.put("光能利用率", "82");
|
|
|
+ 公司Map.put("光能利用率同比", "2");
|
|
|
+ 公司Map.put("光能利用率环比", "2.2");
|
|
|
+ 公司Map.put("损失电量", "1234");
|
|
|
+ 公司Map.put("损失电量同比", "18");
|
|
|
+ 公司Map.put("损失电量环比", "-45");
|
|
|
+ 公司Map.put("损失率", "12.5");
|
|
|
+ 公司Map.put("损失率同比", "-1");
|
|
|
+ 公司Map.put("损失率环比", "1.2");
|
|
|
+ 公司Map.put("受累损失电量", "501.64");
|
|
|
+ 公司Map.put("受累损失率", "4.9");
|
|
|
+ 公司Map.put("受累损失率同比", "234");
|
|
|
+ 公司Map.put("受累损失率环比", "-50");
|
|
|
+ 公司Map.put("限电损失电量", "310");
|
|
|
+ 公司Map.put("限电损失率", "2.6");
|
|
|
+ 公司Map.put("限电损失率同比", "66");
|
|
|
+ 公司Map.put("限电损失率环比", "-20");
|
|
|
+ 公司Map.put("故障损失电量", "200");
|
|
|
+ 公司Map.put("故障损失率", "1.5");
|
|
|
+ 公司Map.put("故障损失率同比", "-5");
|
|
|
+ 公司Map.put("故障损失率环比", "3");
|
|
|
+ 公司Map.put("计划检修损失电量", "8.13");
|
|
|
+ 公司Map.put("计划检修损失电量同比", "7.06");
|
|
|
+ 公司Map.put("计划检修损失电量环比", "1.13");
|
|
|
+ 公司Map.put("计划检修损失率", "0.4");
|
|
|
+ 公司Map.put("计划检修损失率同比", "-2");
|
|
|
+ 公司Map.put("计划检修损失率环比", "1");
|
|
|
+ 公司Map.put("性能损失电量", "434");
|
|
|
+ 公司Map.put("性能损失电量同比", "28.62");//没有百分比
|
|
|
+ 公司Map.put("性能损失电量环比", "15.73");//没有百分比
|
|
|
+ 公司Map.put("性能损失率", "3.8");
|
|
|
+ 公司Map.put("性能损失率同比", "5");
|
|
|
+ 公司Map.put("性能损失率环比", "2");
|
|
|
+
|
|
|
+ 公司Map.put("输变电故障次数", "2");
|
|
|
+ 公司Map.put("故障消缺时长", "48");
|
|
|
+ 公司Map.put("故障消缺损失电量", "79.78");
|
|
|
+ 公司Map.put("故障事件", "2月22日-25日石板泉110kV能风六线111开关差动保护跳闸;2月12日-16日香山国风二线315开关零序过流Ⅰ段保护动作跳闸;");
|
|
|
+ 公司Map.put("风机故障台次", "44");
|
|
|
+ 公司Map.put("风机故障损失电量", "4.53");
|
|
|
+ 公司Map.put("风机故障损失电量同比", "10");
|
|
|
+ 公司Map.put("风机故障损失电量环比", "-5");
|
|
|
+ 公司Map.put("平均故障消缺时间", "4.8");
|
|
|
+ 公司Map.put("平均故障消缺时间同比", "-10");
|
|
|
+ 公司Map.put("平均故障消缺时间环比", "-5");
|
|
|
+ 公司Map.put("消缺及时率", "86");
|
|
|
+ 公司Map.put("消缺及时率同比", "10");
|
|
|
+ 公司Map.put("消缺及时率环比", "-5");
|
|
|
+
|
|
|
+ 公司Map.put("计划检修台次", "186");
|
|
|
+ 公司Map.put("计划检修台次同比", "90");
|
|
|
+ 公司Map.put("计划检修台次环比", "80");
|
|
|
+ 公司Map.put("平均检修时长", "4");
|
|
|
+ 公司Map.put("平均检修时长同比", "-0.5");
|
|
|
+ 公司Map.put("平均检修时长环比", "-0.5");
|
|
|
+
|
|
|
+ 公司Map.put("状态转换及时率", "98.5");
|
|
|
+ 公司Map.put("状态转换及时率同比", "1");
|
|
|
+ 公司Map.put("状态转换及时率环比", "0.5");
|
|
|
+ 公司Map.put("复位及时率", "88.5");
|
|
|
+ 公司Map.put("复位及时率同比", "0.8");
|
|
|
+ 公司Map.put("复位及时率环比", "0.3");
|
|
|
+
|
|
|
+ 光电场Map.put("性能损失电量", "3.25");
|
|
|
+ 光电场Map.put("性能损失电量同比", "-0.3");//没有百分比
|
|
|
+ 光电场Map.put("性能损失电量环比", "1.73");//没有百分比
|
|
|
+ 光电场Map.put("性能损失率", "6.8");
|
|
|
+ 光电场Map.put("性能损失率同比", "-0.5");
|
|
|
+ 光电场Map.put("性能损失率环比", "0.5");
|
|
|
+
|
|
|
+ 公司Map.put("场用电量", "103");
|
|
|
+ 公司Map.put("场用电量同比", "15");//没有百分比
|
|
|
+ 公司Map.put("场用电量环比", "11");//没有百分比
|
|
|
+ 公司Map.put("场用电率", "1.02");
|
|
|
+ 公司Map.put("场用电率", "0.24");
|
|
|
+ 公司Map.put("场用电率", "-0.11");
|
|
|
+
|
|
|
+ return monthMap;
|
|
|
+ }
|
|
|
+}
|