|
|
@@ -1,5 +1,7 @@
|
|
|
package com.gyee.runeconomy.service.EarlyWarning;
|
|
|
|
|
|
+import com.gyee.runeconomy.dto.response.FwjslDTO;
|
|
|
+import com.gyee.runeconomy.dto.response.QxjslDTO;
|
|
|
import com.gyee.runeconomy.entity.StationInfoMonth;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
|
import com.gyee.runeconomy.model.auto.*;
|
|
|
@@ -13,6 +15,8 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
+import java.time.YearMonth;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.function.BiConsumer;
|
|
|
import java.util.function.Function;
|
|
|
@@ -39,6 +43,8 @@ public class WindReportService {
|
|
|
private IProEconEquipmentInfoDay5Service day5Service;
|
|
|
@Resource
|
|
|
private IProEconFaultLiminatedefectsService proEconFaultLiminatedefectsService;
|
|
|
+ @Resource
|
|
|
+ private IProEconBrownoutsEvent2Service event2Service;
|
|
|
|
|
|
// 定义等级常量,便于维护
|
|
|
private static final String[] LEVELS = {"A", "B", "C"};
|
|
|
@@ -50,6 +56,26 @@ public class WindReportService {
|
|
|
// 去除前导零
|
|
|
month = month.replaceFirst("^0", "");
|
|
|
|
|
|
+ String yearbegin = year + "-01-01";
|
|
|
+ String yearend = year + "-12-31";
|
|
|
+ // 解析年月字符串
|
|
|
+ YearMonth yearMonth = YearMonth.parse(time);
|
|
|
+
|
|
|
+ // 计算开始日期(当月第一天)
|
|
|
+ String beginDate = yearMonth.atDay(1).format(DateTimeFormatter.ISO_LOCAL_DATE);
|
|
|
+
|
|
|
+ // 计算结束日期(当月最后一天)
|
|
|
+ String endDate = yearMonth.atEndOfMonth().format(DateTimeFormatter.ISO_LOCAL_DATE);
|
|
|
+
|
|
|
+ // 减去一个月
|
|
|
+ YearMonth previousYearMonth = yearMonth.minusMonths(1);
|
|
|
+
|
|
|
+ // 计算开始日期(上个月第一天)
|
|
|
+ String sybeginDate = previousYearMonth.atDay(1).format(DateTimeFormatter.ISO_LOCAL_DATE);
|
|
|
+
|
|
|
+ // 计算结束日期(上个月最后一天)
|
|
|
+ String syendDate = previousYearMonth.atEndOfMonth().format(DateTimeFormatter.ISO_LOCAL_DATE);
|
|
|
+
|
|
|
Map<String, Object> map = new LinkedHashMap<>();
|
|
|
|
|
|
List<ProBasicEquipment> wtls = CacheContext.wtls;
|
|
|
@@ -86,17 +112,28 @@ public class WindReportService {
|
|
|
List<ProEconWindturbineGoodness> getsy_nhtop = goodnessService.getsytop(time);
|
|
|
List<ProEconWindturbineGoodness> getsy_nhbottom = goodnessService.getsybottom(time);
|
|
|
|
|
|
- List<ProEconEquipmentInfoDay5> stateRateList = day5Service.getStateRateList(time);
|
|
|
- List<ProEconEquipmentInfoDay5> systateRateList = day5Service.getsyStateRateList(time);
|
|
|
- List<ProEconEquipmentInfoDay5> stateRatebotList = day5Service.getStateRatebottomList(time);
|
|
|
+// List<ProEconEquipmentInfoDay5> stateRateList = day5Service.getStateRateList(time);
|
|
|
+// List<ProEconEquipmentInfoDay5> systateRateList = day5Service.getsyStateRateList(time);
|
|
|
+// List<ProEconEquipmentInfoDay5> stateRatebotList = day5Service.getStateRatebottomList(time);
|
|
|
|
|
|
List<ProEconEquipmentInfoDay5> threestateRateList = day5Service.getthreeStateRateList(time);
|
|
|
List<ProEconEquipmentInfoDay5> threesystateRateList = day5Service.getsythreeStateRateList(time);
|
|
|
List<ProEconEquipmentInfoDay5> threestateRatebotList = day5Service.getthreeStateRatebottomList(time);
|
|
|
|
|
|
- List<ProEconFaultLiminatedefects> liminatedefects = proEconFaultLiminatedefectsService.getlist(time);
|
|
|
- List<ProEconFaultLiminatedefects> syliminatedefects = proEconFaultLiminatedefectsService.getsylist(time);
|
|
|
- List<ProEconFaultLiminatedefects> yearliminatedefects = proEconFaultLiminatedefectsService.getyearlist(time);
|
|
|
+// List<ProEconFaultLiminatedefects> liminatedefects = proEconFaultLiminatedefectsService.getlist(time);
|
|
|
+// List<ProEconFaultLiminatedefects> syliminatedefects = proEconFaultLiminatedefectsService.getsylist(time);
|
|
|
+// List<ProEconFaultLiminatedefects> yearliminatedefects = proEconFaultLiminatedefectsService.getyearlist(time);
|
|
|
+
|
|
|
+ List<FwjslDTO> fwjsllist = event2Service.getResetTimelyRateInfo(null,null , beginDate, endDate);
|
|
|
+ List<FwjslDTO> syfwjsllist = event2Service.getResetTimelyRateInfo(null,null , sybeginDate, syendDate);
|
|
|
+ List<FwjslDTO> wtfwjsllist = event2Service.getWtResetTimelyRateInfo(null,null , beginDate, endDate);
|
|
|
+ List<QxjslDTO> xqjsllist = event2Service.getDefectsEliminatRateList(null, null, beginDate, endDate);
|
|
|
+ List<QxjslDTO> syxqjsllist = event2Service.getDefectsEliminatRateList(null, null, sybeginDate, syendDate);
|
|
|
+ List<QxjslDTO> yearxqjsllist = event2Service.getyearRateList(null, null, yearbegin, yearend);
|
|
|
+
|
|
|
+ List<FwjslDTO> firstThree = wtfwjsllist.stream()
|
|
|
+ .limit(3)
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
|
// 分组 1: TurbineInfoDay 相关列表
|
|
|
applySetIdFromNemCode(wtls, Arrays.asList(
|
|
|
@@ -106,6 +143,10 @@ public class WindReportService {
|
|
|
TurbineInfoDay::getTurbineId,
|
|
|
TurbineInfoDay::setStationId);
|
|
|
|
|
|
+ applySetIdFromNemCode(wtls,Arrays.asList(firstThree),
|
|
|
+ FwjslDTO::getWpid,
|
|
|
+ FwjslDTO::setWpid);
|
|
|
+
|
|
|
// 分组 2: ProEconCurveFittMonthMain 相关列表
|
|
|
applySetIdFromNemCode(wtls, Arrays.asList(getqxlist),
|
|
|
ProEconCurveFittMonthMain::getWindturbineId,
|
|
|
@@ -118,8 +159,7 @@ public class WindReportService {
|
|
|
|
|
|
// 分组 4: ProEconEquipmentInfoDay5 相关列表
|
|
|
applySetIdFromNemCode(wtls, Arrays.asList(
|
|
|
- stateRatebotList, threestateRateList,
|
|
|
- threesystateRateList, threestateRatebotList),
|
|
|
+ threestateRateList, threesystateRateList, threestateRatebotList),
|
|
|
ProEconEquipmentInfoDay5::getWindturbineId,
|
|
|
ProEconEquipmentInfoDay5::setWindturbineId);
|
|
|
|
|
|
@@ -197,6 +237,7 @@ public class WindReportService {
|
|
|
double yearllfdl = !yeardllist.isEmpty() ? StringUtils.round(yeardllist.get(0).getLlfdl() / bl, 2) : 0.0;
|
|
|
|
|
|
String[] dltopId = new String[3];
|
|
|
+ Arrays.fill(dltopId, "");
|
|
|
double[] dltopFdl = new double[3];
|
|
|
double month_dtpjFdl = StringUtils.round(monthfdl / 50, 2);
|
|
|
double year_dtpjFdl = StringUtils.round(yearfdl / 50, 2);
|
|
|
@@ -213,14 +254,15 @@ public class WindReportService {
|
|
|
|
|
|
for (int i = 0; i < dltoplist.size(); i++) {
|
|
|
dltopFdl[i] = StringUtils.round(dltoplist.get(i).getRfdl() / bl, 2);
|
|
|
- dltopId[i] = dltoplist.get(i).getStationId();
|
|
|
+ dltopId[i] = dltoplist.get(i).getStationId() != null ? dltoplist.get(i).getStationId() : "";
|
|
|
}
|
|
|
|
|
|
String[] bottomId = new String[3];
|
|
|
+ Arrays.fill(bottomId, "");
|
|
|
double[] bottomFdl = new double[3];
|
|
|
for (int i = 0; i < dlbottomlist.size(); i++) {
|
|
|
bottomFdl[i] = StringUtils.round(dlbottomlist.get(i).getRfdl() / bl, 2);
|
|
|
- bottomId[i] = dlbottomlist.get(i).getStationId();
|
|
|
+ bottomId[i] = dlbottomlist.get(i).getStationId() != null ? dlbottomlist.get(i).getStationId() : "";
|
|
|
}
|
|
|
|
|
|
// map.put("发电量分析", "场站总发电量:月度" + monthfdl + "万KWh,年度" + yearfdl + "万KWh\n" +
|
|
|
@@ -326,10 +368,11 @@ public class WindReportService {
|
|
|
map.put("风资源分析-历史对比","历史对比:与去年同期相比,平均风速" + tqb_avgfs + "m/s(±),静风频率" + tqb_jfpl + "%(±)");
|
|
|
|
|
|
String[] qxtopid = new String[3];
|
|
|
+ Arrays.fill(qxtopid, "");
|
|
|
double[] qxpcl = new double[3];
|
|
|
for (int i = 0; i < getqxlist.size(); i++) {
|
|
|
var item = getqxlist.get(i);
|
|
|
- qxtopid[i] = item.getWindturbineId();
|
|
|
+ qxtopid[i] = item.getWindturbineId() != null ? item.getWindturbineId() : "";
|
|
|
qxpcl[i] = item.getDeviationRate2();
|
|
|
}
|
|
|
|
|
|
@@ -377,10 +420,10 @@ public class WindReportService {
|
|
|
String[] yqrtopid = new String[3];
|
|
|
double[] yqrfs = new double[3];
|
|
|
double[] yqcfs = new double[3];
|
|
|
-
|
|
|
+ Arrays.fill(yqrtopid, "");
|
|
|
for (int i = 0; i < outSpeedtopTotals.size(); i++) {
|
|
|
var item = outSpeedtopTotals.get(i);
|
|
|
- yqrtopid[i] = item.getWindturbineId();
|
|
|
+ yqrtopid[i] = item.getWindturbineId() != null ? item.getWindturbineId() : "";
|
|
|
yqrfs[i] = StringUtils.round(item.getMonthInputSmall(), 2);
|
|
|
yqcfs[i] = StringUtils.round(item.getMonthOutputSmall(), 2);
|
|
|
}
|
|
|
@@ -417,32 +460,36 @@ public class WindReportService {
|
|
|
"合格率低于60%的风机:" + out_60.size() + "台,为" + out60_id + "");
|
|
|
|
|
|
String[] topnhyd_id = new String[3];
|
|
|
+ Arrays.fill(topnhyd_id, "");
|
|
|
double[] top_ynhyd = new double[3];
|
|
|
|
|
|
String[] bottomnhyd_id = new String[3];
|
|
|
+ Arrays.fill(bottomnhyd_id, "");
|
|
|
double[] bottom_ynhyd = new double[3];
|
|
|
|
|
|
String[] sytopnhyd_id = new String[3];
|
|
|
+ Arrays.fill(sytopnhyd_id, "");
|
|
|
double[] sytop_ynhyd = new double[3];
|
|
|
|
|
|
String[] sybottomnhyd_id = new String[3];
|
|
|
+ Arrays.fill(sybottomnhyd_id, "");
|
|
|
double[] sybottom_ynhyd = new double[3];
|
|
|
|
|
|
for (int i = 0; i < getnhtop.size(); i++) {
|
|
|
var item = getnhtop.get(i);
|
|
|
- topnhyd_id[i] = item.getWindturbineId();
|
|
|
+ topnhyd_id[i] = item.getWindturbineId() != null ? item.getWindturbineId() : "";
|
|
|
top_ynhyd[i] = StringUtils.round(item.getMonthGoodness(), 2);
|
|
|
|
|
|
var item_bot = getnhbottom.get(i);
|
|
|
- bottomnhyd_id[i] = item_bot.getWindturbineId();
|
|
|
+ bottomnhyd_id[i] = item_bot.getWindturbineId() != null ? item_bot.getWindturbineId() : "";
|
|
|
bottom_ynhyd[i] = StringUtils.round(item_bot.getMonthGoodness(), 2);
|
|
|
|
|
|
var qnitem = getsy_nhtop.get(i);
|
|
|
- sytopnhyd_id[i] = qnitem.getWindturbineId();
|
|
|
+ sytopnhyd_id[i] = qnitem.getWindturbineId() != null ? qnitem.getWindturbineId() : "";
|
|
|
sytop_ynhyd[i] = StringUtils.round(qnitem.getMonthGoodness(), 2);
|
|
|
|
|
|
var qnitem_bot = getsy_nhbottom.get(i);
|
|
|
- sybottomnhyd_id[i] = qnitem_bot.getWindturbineId();
|
|
|
+ sybottomnhyd_id[i] = qnitem_bot.getWindturbineId() != null ? qnitem_bot.getWindturbineId() : "";
|
|
|
sybottom_ynhyd[i] = StringUtils.round(qnitem_bot.getMonthGoodness(), 2);
|
|
|
}
|
|
|
// map.put("单机性能分析", "拟合优度排行:\n" +
|
|
|
@@ -476,25 +523,29 @@ public class WindReportService {
|
|
|
String[] syglyz_botid = new String[3];
|
|
|
double[] syglyz_bot = new double[3];
|
|
|
double[] sylyxs_bot = new double[3];
|
|
|
+ Arrays.fill(glyz_topid, "");
|
|
|
+ Arrays.fill(syglyz_topid, "");
|
|
|
+ Arrays.fill(glyz_botid, "");
|
|
|
+ Arrays.fill(syglyz_botid, "");
|
|
|
for (int i = 0; i < glyztopList.size(); i++) {
|
|
|
var item_top = glyztopList.get(i);
|
|
|
- glyz_topid[i] = item_top.getStationId();
|
|
|
+ glyz_topid[i] = item_top.getStationId() != null ? item_top.getStationId() : "";
|
|
|
glyz_top[i] = StringUtils.round(item_top.getGlyzxxs(), 2);
|
|
|
lyxs_top[i] = StringUtils.round(item_top.getLyxs(), 2);
|
|
|
|
|
|
var syitem_top = syglyztopList.get(i);
|
|
|
- syglyz_topid[i] = syitem_top.getStationId();
|
|
|
+ syglyz_topid[i] = syitem_top.getStationId() != null ?syitem_top.getStationId() : "";
|
|
|
syglyz_top[i] = StringUtils.round(syitem_top.getGlyzxxs(), 2);
|
|
|
sylyxs_top[i] = StringUtils.round(syitem_top.getLyxs(), 2);
|
|
|
|
|
|
|
|
|
var item_bot = glyztopList.get(i);
|
|
|
- glyz_botid[i] = item_bot.getStationId();
|
|
|
+ glyz_botid[i] = item_bot.getStationId() != null ? item_bot.getStationId() : "";
|
|
|
glyz_bot[i] = StringUtils.round(item_bot.getGlyzxxs(), 2);
|
|
|
lyxs_bot[i] = StringUtils.round(item_bot.getLyxs(), 2);
|
|
|
|
|
|
var syitem_bot = syglyztopList.get(i);
|
|
|
- syglyz_botid[i] = syitem_bot.getStationId();
|
|
|
+ syglyz_botid[i] = syitem_bot.getStationId() != null ?syitem_bot.getStationId() : "";
|
|
|
syglyz_bot[i] = StringUtils.round(syitem_bot.getGlyzxxs(), 2);
|
|
|
sylyxs_bot[i] = StringUtils.round(syitem_bot.getLyxs(), 2);
|
|
|
|
|
|
@@ -559,79 +610,30 @@ public class WindReportService {
|
|
|
"B级(良好):" + level_B + "台(" + level_Bid + "号等)\n" +
|
|
|
"C级(合格):" + level_C + "台(" + level_Cid + "号等)");
|
|
|
|
|
|
- double wfzfwcs = 0.0;
|
|
|
- double sfzfwcs = 0.0;
|
|
|
- double swfzfwcs = 0.0;
|
|
|
- double esfzfwcs = 0.0;
|
|
|
-
|
|
|
- double wfzfwl = 0.0;
|
|
|
- double sfzfwl = 0.0;
|
|
|
- double swfzfwl = 0.0;
|
|
|
- double esfzfwl = 0.0;
|
|
|
- if (stateRateList.size() > 0) {
|
|
|
-
|
|
|
- wfzfwcs = stateRateList.stream()
|
|
|
- .filter(o -> o != null)
|
|
|
- .mapToDouble(o -> o.getTimerate16())
|
|
|
- .sum();
|
|
|
-
|
|
|
- sfzfwcs = stateRateList.stream()
|
|
|
- .filter(o -> o != null)
|
|
|
- .mapToDouble(o -> o.getTimerate17())
|
|
|
- .sum();
|
|
|
-
|
|
|
- swfzfwcs = stateRateList.stream()
|
|
|
- .filter(o -> o != null)
|
|
|
- .mapToDouble(o -> o.getTimerate18())
|
|
|
- .sum();
|
|
|
-
|
|
|
- esfzfwcs = stateRateList.stream()
|
|
|
- .filter(o -> o != null)
|
|
|
- .mapToDouble(o -> o.getTimerate19())
|
|
|
- .sum();
|
|
|
+ List<FwjslDTO> fwjslDTOList = fwjsllist.stream().filter(fw -> fw.getWpid().equals("合计")).collect(Collectors.toList());
|
|
|
+ List<FwjslDTO> syfwjslDTOList = syfwjsllist.stream().filter(fw -> fw.getWpid().equals("合计")).collect(Collectors.toList());
|
|
|
+ double wfzfwcs = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getWfz(),2) : 0.0;
|
|
|
+ double sfzfwcs = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getSfz(),2) : 0.0;
|
|
|
+ double swfzfwcs = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getSwfz(),2) : 0.0;
|
|
|
+ double esfzfwcs = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getEsfz(),2) : 0.0;
|
|
|
|
|
|
- wfzfwl = stateRateList.stream()
|
|
|
- .filter(o -> o != null && o.getTimerate20() != 0)
|
|
|
- .mapToDouble(o -> o.getTimerate16() / o.getTimerate20() * 100)
|
|
|
- .map(d -> new BigDecimal(d).setScale(2, RoundingMode.DOWN).doubleValue())
|
|
|
- .sum();
|
|
|
+ double wfzfwl = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getWfzfwl(),2) : 0.0;
|
|
|
+ double sfzfwl = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getSfzfwl(),2) : 0.0;
|
|
|
+ double swfzfwl = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getSwfzfwl(),2) : 0.0;
|
|
|
+ double esfzfwl = !fwjslDTOList.isEmpty() ? StringUtils.round(fwjslDTOList.get(0).getEsfzfwl(),2) : 0.0;
|
|
|
|
|
|
- sfzfwl = stateRateList.stream()
|
|
|
- .filter(o -> o != null && o.getTimerate20() != 0)
|
|
|
- .mapToDouble(o -> o.getTimerate17() / o.getTimerate20() * 100)
|
|
|
- .map(d -> new BigDecimal(d).setScale(2, RoundingMode.DOWN).doubleValue())
|
|
|
- .sum();
|
|
|
|
|
|
- swfzfwl = stateRateList.stream()
|
|
|
- .filter(o -> o != null && o.getTimerate20() != 0)
|
|
|
- .mapToDouble(o -> o.getTimerate18() / o.getTimerate20() * 100)
|
|
|
- .map(d -> new BigDecimal(d).setScale(2, RoundingMode.DOWN).doubleValue())
|
|
|
- .sum();
|
|
|
-
|
|
|
- esfzfwl = stateRateList.stream()
|
|
|
- .filter(o -> o != null && o.getTimerate20() != 0)
|
|
|
- .mapToDouble(o -> o.getTimerate19() / o.getTimerate20() * 100)
|
|
|
- .map(d -> new BigDecimal(d).setScale(2, RoundingMode.DOWN).doubleValue())
|
|
|
- .sum();
|
|
|
- }
|
|
|
-
|
|
|
- double sy_wfzcs = 0.0;
|
|
|
- double sy_zcs = 0.0;
|
|
|
- if (systateRateList.size() > 0) {
|
|
|
- sy_wfzcs = systateRateList.get(0).getTimerate16();
|
|
|
- sy_zcs = systateRateList.get(0).getTimerate16();
|
|
|
- }
|
|
|
-
|
|
|
- double sywfzfwl = StringUtils.round(sy_wfzcs / sy_zcs * 100, 2);
|
|
|
+ double sywfzfwl = !syfwjslDTOList.isEmpty() ?StringUtils.round(syfwjslDTOList.get(0).getWfzfwl(), 2) : 0.0;
|
|
|
|
|
|
String[] wfzfwcsbot_id = new String[3];
|
|
|
double[] wfzfwcsbot = new double[3];
|
|
|
- for (int i = 0; i < stateRatebotList.size(); i++) {
|
|
|
- var item = stateRatebotList.get(i);
|
|
|
- wfzfwcsbot_id[i] = item.getWindturbineId();
|
|
|
- wfzfwcsbot[i] = item.getTimerate16();
|
|
|
+ Arrays.fill(wfzfwcsbot_id, "");
|
|
|
+ for (int i = 0; i < firstThree.size(); i++) {
|
|
|
+ var item = firstThree.get(i);
|
|
|
+ wfzfwcsbot_id[i] = item.getWpid() != null ? item.getWpid() : "";
|
|
|
+ wfzfwcsbot[i] = item.getWfz();
|
|
|
}
|
|
|
- double fwltb = StringUtils.round((wfzfwl - sywfzfwl) / sywfzfwl * 100,2);
|
|
|
+ double fwltb = sywfzfwl>1 ? StringUtils.round((wfzfwl - sywfzfwl) / sywfzfwl * 100,2) : 0.0;
|
|
|
map.put("复位及时率", "月度5分钟: 复位次数 "+ wfzfwcs + "次"+",复位及时率:" + wfzfwl + "%\n" +
|
|
|
"月度10分钟:复位次数"+ sfzfwcs + "次"+",复位及时率:" + sfzfwl + "%\n" +
|
|
|
"月度15分钟:复位次数"+ swfzfwcs +"次"+",复位及时率:" + swfzfwl + "%\n" +
|
|
|
@@ -639,18 +641,18 @@ public class WindReportService {
|
|
|
"月度5分钟复位次数排名最低的三台风机:" + wfzfwcsbot_id[0] + "号(" + wfzfwcsbot[0] + "次)、" + wfzfwcsbot_id[1] + "号(" + wfzfwcsbot[1] + "次)、" + wfzfwcsbot_id[2] + "号(" + wfzfwcsbot[2] + "次)\n" +
|
|
|
"与上月对比:月度5分钟复位及时率环比" + fwltb + "%(±)");
|
|
|
|
|
|
- double ydgzcs = 0.0;
|
|
|
- double ydxqcs = 0.0;
|
|
|
- double ydxqjsl = 0.0;
|
|
|
- if (liminatedefects.size() > 0) {
|
|
|
- ydgzcs = liminatedefects.get(0).getFaultCount();
|
|
|
- ydxqcs = liminatedefects.get(0).getRightCount();
|
|
|
- ydxqjsl = StringUtils.round(liminatedefects.get(0).getRate(), 2);
|
|
|
- }
|
|
|
- double nxqjsl = yearliminatedefects.size() > 0 ? StringUtils.round(yearliminatedefects.get(0).getRate(), 2) : 0.0;
|
|
|
- double syxqjsl = syliminatedefects.size() > 0 ? StringUtils.round(syliminatedefects.get(0).getRate(), 2) : 0.0;
|
|
|
|
|
|
- double xqjsl_hb = StringUtils.round((ydxqjsl -syxqjsl) /syxqjsl * 100,2);
|
|
|
+ List<QxjslDTO> qxjslDTOS = xqjsllist.stream().filter(fw -> fw.getWpid().equals("合计")).collect(Collectors.toList());
|
|
|
+ List<QxjslDTO> syqxjslDTOS = syxqjsllist.stream().filter(fw -> fw.getWpid().equals("合计")).collect(Collectors.toList());
|
|
|
+
|
|
|
+ double ydgzcs = !qxjslDTOS.isEmpty() ? xqjsllist.get(0).getGzCount() : 0.0;
|
|
|
+ double ydxqcs = !qxjslDTOS.isEmpty() ? xqjsllist.get(0).getXqCount() : 0.0;
|
|
|
+ double ydxqjsl = !qxjslDTOS.isEmpty() ? StringUtils.round(xqjsllist.get(0).getXqjsl(), 2) : 0.0;
|
|
|
+
|
|
|
+ double nxqjsl = yearxqjsllist.size() > 0 ? StringUtils.round(yearxqjsllist.get(0).getXqjsl(), 2) : 0.0;
|
|
|
+ double syxqjsl = syqxjslDTOS.size() > 0 ? StringUtils.round(syxqjsllist.get(0).getXqjsl(), 2) : 0.0;
|
|
|
+
|
|
|
+ double xqjsl_hb = syxqjsl>1 ? StringUtils.round((ydxqjsl -syxqjsl) /syxqjsl * 100,2) : 0.0;
|
|
|
map.put("消缺及时率", "月度故障次数:" + ydgzcs + "次\n" +
|
|
|
"月度消缺及时次数:" + ydxqcs + "次\n" +
|
|
|
"月度消缺及时率:" + ydxqjsl + "%\n" +
|
|
|
@@ -717,10 +719,10 @@ public class WindReportService {
|
|
|
|
|
|
double[] ztzhbot_cs = new double[3];
|
|
|
String[] ztzhbot_id = new String[3];
|
|
|
-
|
|
|
+ Arrays.fill(ztzhbot_id, "");
|
|
|
for (int i = 0; i < threestateRatebotList.size(); i++) {
|
|
|
var item = threestateRatebotList.get(i);
|
|
|
- ztzhbot_id[i] = item.getWindturbineId();
|
|
|
+ ztzhbot_id[i] = item.getWindturbineId() != null ? item.getWindturbineId() : "";
|
|
|
ztzhbot_cs[i] = item.getTimerate5();
|
|
|
}
|
|
|
double sy_ztzhl = 0.0;
|