|
@@ -1,5 +1,7 @@
|
|
|
package com.gyee.frame.service.singleanalysis;
|
|
|
|
|
|
+import com.gyee.frame.common.exception.QiNiuException;
|
|
|
+import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
|
|
|
import com.gyee.frame.common.spring.InitialRunner;
|
|
|
import com.gyee.frame.model.auto.*;
|
|
|
import com.gyee.frame.model.custom.SingleAnalysisVo;
|
|
@@ -36,285 +38,289 @@ public class SingleAnalysisService {
|
|
|
|
|
|
List<SingleAnalysisVo> vos = new ArrayList<>();
|
|
|
|
|
|
- if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
|
|
|
+ try{
|
|
|
+ if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
|
|
|
|
|
|
- Map<String, SingleAnalysisVo> iomap = getInputoroutputspeedtotalMap(wpId, beginDate, endDate);
|
|
|
- Map<String, SingleAnalysisVo> wtdaymap = getWindturbineinfodayMap(wpId, beginDate, endDate);
|
|
|
- Map<String, SingleAnalysisVo> wtday2map = getWindturbineinfoday2Map(wpId, beginDate, endDate);
|
|
|
- Map<String, SingleAnalysisVo> wtday3map = getWindturbineinfoday3Map(wpId, beginDate, endDate);
|
|
|
+ Map<String, SingleAnalysisVo> iomap = getInputoroutputspeedtotalMap(wpId, beginDate, endDate);
|
|
|
+ Map<String, SingleAnalysisVo> wtdaymap = getWindturbineinfodayMap(wpId, beginDate, endDate);
|
|
|
+ Map<String, SingleAnalysisVo> wtday2map = getWindturbineinfoday2Map(wpId, beginDate, endDate);
|
|
|
+ Map<String, SingleAnalysisVo> wtday3map = getWindturbineinfoday3Map(wpId, beginDate, endDate);
|
|
|
|
|
|
|
|
|
- if (InitialRunner.wp_wtmap.containsKey(wpId)) {
|
|
|
- List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
|
|
|
+ if (InitialRunner.wp_wtmap.containsKey(wpId)) {
|
|
|
+ List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
|
|
|
|
|
|
- for (Windturbine wt : wtls) {
|
|
|
- SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
- vo.setWindPowerStationId(wt.getWindpowerstationid());
|
|
|
- vo.setWindturbineName(wt.getName());
|
|
|
- if (InitialRunner.wpmap.containsKey(wt.getWindpowerstationid())) {
|
|
|
- Windpowerstation wp = InitialRunner.wpmap.get(wt.getWindpowerstationid());
|
|
|
- vo.setWindPowerStationName(wp.getName());
|
|
|
- }
|
|
|
+ for (Windturbine wt : wtls) {
|
|
|
+ SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
+ vo.setWindPowerStationId(wt.getWindpowerstationid());
|
|
|
+ vo.setWindturbineName(wt.getName());
|
|
|
+ if (InitialRunner.wpmap.containsKey(wt.getWindpowerstationid())) {
|
|
|
+ Windpowerstation wp = InitialRunner.wpmap.get(wt.getWindpowerstationid());
|
|
|
+ vo.setWindPowerStationName(wp.getName());
|
|
|
+ }
|
|
|
|
|
|
- if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
|
|
|
- Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
|
|
|
- vo.setFjrl(model.getPowerproduction());
|
|
|
- }
|
|
|
+ if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
|
|
|
+ Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
|
|
|
+ vo.setFjrl(model.getPowerproduction());
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- vo.setWindturbineid(wt.getId());
|
|
|
+ vo.setWindturbineid(wt.getId());
|
|
|
|
|
|
// double swdl=wpls.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();//风场上网电量合计
|
|
|
// double gwdl=wpls.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();//风场购网电量合计
|
|
|
//
|
|
|
// vo.setSwdl(swdl);
|
|
|
// vo.setGwdl(gwdl);
|
|
|
- double fdl = 0;
|
|
|
- if (wtdaymap.containsKey(wt.getId())) {
|
|
|
- SingleAnalysisVo wtd = wtdaymap.get(wt.getId());
|
|
|
-
|
|
|
- fdl = null != wtd.getFdl() ? wtd.getFdl() : 0.0;//风机发电量合计
|
|
|
- fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
-
|
|
|
- double yxxs = null != wtd.getYxxs() ? wtd.getYxxs() : 0.0;//风机运行小时合计
|
|
|
- double gzxs = null != wtd.getGzxs() ? wtd.getGzxs() : 0.0;//风机故障小时合计
|
|
|
- double jxxs = null != wtd.getJxxs() ? wtd.getJxxs() : 0.0;//风机检修小时合计
|
|
|
- double tjxs = null != wtd.getTjxs() ? wtd.getTjxs() : 0.0;//风机停机小时合计
|
|
|
- double zdxs = null != wtd.getZdxs() ? wtd.getZdxs() : 0.0;//风机中断小时合计
|
|
|
- double rlxs = null != wtd.getRlxs() ? wtd.getRlxs() : 0.0;//风机日历小时合计
|
|
|
- double fs = null != wtd.getFs() ? wtd.getFs() : 0.0;//风机平均风速
|
|
|
- double sbklyl = null != wtd.getSbklyl() ? wtd.getSbklyl() : 0.0;//风机平均设备可利用率
|
|
|
- double dxklyxs = null != wtd.getDxklyxs() ? wtd.getDxklyxs() : 0.0;//风机平均等效可利用系数
|
|
|
- double lyxs = null != wtd.getLyxs() ? wtd.getLyxs() : 0.0;//风机平均利用小时
|
|
|
- double yxfss = null != wtd.getYxfss() ? wtd.getYxfss() : 0.0;//风机平均有效风时速
|
|
|
-
|
|
|
-
|
|
|
- vo.setFdl(StringUtils.round(fdl, 2));
|
|
|
- vo.setYxxs(StringUtils.round(yxxs, 2));
|
|
|
- vo.setGzxs(StringUtils.round(gzxs, 2));
|
|
|
- vo.setJxxs(StringUtils.round(jxxs, 2));
|
|
|
- vo.setTjxs(StringUtils.round(tjxs, 2));
|
|
|
- vo.setZdxs(StringUtils.round(zdxs, 2));
|
|
|
- vo.setRlxs(StringUtils.round(rlxs, 2));
|
|
|
- vo.setFs(StringUtils.round(fs, 2));
|
|
|
- vo.setSbklyl(StringUtils.round(sbklyl, 2));
|
|
|
- vo.setDxklyxs(StringUtils.round(dxklyxs, 2));
|
|
|
- vo.setLyxs(StringUtils.round(lyxs, 2));
|
|
|
- vo.setYxxs(StringUtils.round(yxfss, 2));
|
|
|
-
|
|
|
+ double fdl = 0;
|
|
|
+ if (wtdaymap.containsKey(wt.getId())) {
|
|
|
+ SingleAnalysisVo wtd = wtdaymap.get(wt.getId());
|
|
|
+
|
|
|
+ fdl = null != wtd.getFdl() ? wtd.getFdl() : 0.0;//风机发电量合计
|
|
|
+ fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+
|
|
|
+ double yxxs = null != wtd.getYxxs() ? wtd.getYxxs() : 0.0;//风机运行小时合计
|
|
|
+ double gzxs = null != wtd.getGzxs() ? wtd.getGzxs() : 0.0;//风机故障小时合计
|
|
|
+ double jxxs = null != wtd.getJxxs() ? wtd.getJxxs() : 0.0;//风机检修小时合计
|
|
|
+ double tjxs = null != wtd.getTjxs() ? wtd.getTjxs() : 0.0;//风机停机小时合计
|
|
|
+ double zdxs = null != wtd.getZdxs() ? wtd.getZdxs() : 0.0;//风机中断小时合计
|
|
|
+ double rlxs = null != wtd.getRlxs() ? wtd.getRlxs() : 0.0;//风机日历小时合计
|
|
|
+ double fs = null != wtd.getFs() ? wtd.getFs() : 0.0;//风机平均风速
|
|
|
+ double sbklyl = null != wtd.getSbklyl() ? wtd.getSbklyl() : 0.0;//风机平均设备可利用率
|
|
|
+ double dxklyxs = null != wtd.getDxklyxs() ? wtd.getDxklyxs() : 0.0;//风机平均等效可利用系数
|
|
|
+ double lyxs = null != wtd.getLyxs() ? wtd.getLyxs() : 0.0;//风机平均利用小时
|
|
|
+ double yxfss = null != wtd.getYxfss() ? wtd.getYxfss() : 0.0;//风机平均有效风时速
|
|
|
+
|
|
|
+
|
|
|
+ vo.setFdl(StringUtils.round(fdl, 2));
|
|
|
+ vo.setYxxs(StringUtils.round(yxxs, 2));
|
|
|
+ vo.setGzxs(StringUtils.round(gzxs, 2));
|
|
|
+ vo.setJxxs(StringUtils.round(jxxs, 2));
|
|
|
+ vo.setTjxs(StringUtils.round(tjxs, 2));
|
|
|
+ vo.setZdxs(StringUtils.round(zdxs, 2));
|
|
|
+ vo.setRlxs(StringUtils.round(rlxs, 2));
|
|
|
+ vo.setFs(StringUtils.round(fs, 2));
|
|
|
+ vo.setSbklyl(StringUtils.round(sbklyl, 2));
|
|
|
+ vo.setDxklyxs(StringUtils.round(dxklyxs, 2));
|
|
|
+ vo.setLyxs(StringUtils.round(lyxs, 2));
|
|
|
+ vo.setYxxs(StringUtils.round(yxfss, 2));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wtday2map.containsKey(wt.getId())) {
|
|
|
+ SingleAnalysisVo wtd = wtday2map.get(wt.getId());
|
|
|
+
|
|
|
+ double glyzxxs = null != wtd.getGlyzxxs() ? wtd.getGlyzxxs() : 0.0;//风机平均功率一致性系数
|
|
|
+ vo.setGlyzxxs(StringUtils.round(glyzxxs, 2));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wtday3map.containsKey(wt.getId())) {
|
|
|
+ SingleAnalysisVo wtd = wtday3map.get(wt.getId());
|
|
|
+
|
|
|
+ double gzss = null != wtd.getGzss() ? wtd.getGzss() : 0.0;//风机故障损失合计
|
|
|
+ double jxss = null != wtd.getJxss() ? wtd.getJxss() : 0.0;//风机检修损失合计
|
|
|
+ double xdss = null != wtd.getXdss() ? wtd.getXdss() : 0.0;//风机限电损失合计
|
|
|
+ double xnss = null != wtd.getXnss() ? wtd.getXnss() : 0.0;//风机性能损失时合计
|
|
|
+ double slss = null != wtd.getSlss() ? wtd.getSlss() : 0.0;//风机受累损失合计
|
|
|
+
|
|
|
+
|
|
|
+ double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
|
|
|
+
|
|
|
+ vo.setGzss(StringUtils.round(gzss,2));
|
|
|
+ vo.setJxss(StringUtils.round(jxss,2));
|
|
|
+ vo.setXdss(StringUtils.round(xdss,2));
|
|
|
+ vo.setXnss(StringUtils.round(xnss,2));
|
|
|
+ vo.setSlss(StringUtils.round(xnss,2));
|
|
|
+
|
|
|
+ vo.setLlfdl(StringUtils.round(llfdl, 2));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (iomap.containsKey(wt.getId())) {
|
|
|
+ SingleAnalysisVo wtd = iomap.get(wt.getId());
|
|
|
+
|
|
|
+ double xfqr = null != wtd.getXfqr() ? wtd.getXfqr() : 0.0;//风机小风切入
|
|
|
+ double xfqrhgl = null != wtd.getXfqrhgl() ? wtd.getXfqrhgl() : 0.0;//风机小风切入合格率
|
|
|
+ vo.setXfqr(StringUtils.round(xfqr, 2));
|
|
|
+ vo.setXfqrhgl(StringUtils.round(xfqrhgl, 2));
|
|
|
+ }
|
|
|
+ vos.add(vo);
|
|
|
}
|
|
|
|
|
|
- if (wtday2map.containsKey(wt.getId())) {
|
|
|
- SingleAnalysisVo wtd = wtday2map.get(wt.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- double glyzxxs = null != wtd.getGlyzxxs() ? wtd.getGlyzxxs() : 0.0;//风机平均功率一致性系数
|
|
|
- vo.setGlyzxxs(StringUtils.round(glyzxxs, 2));
|
|
|
+ if (null != vos && !vos.isEmpty()) {
|
|
|
+
|
|
|
+ //统计所有风机指标数据
|
|
|
+ SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
+ vo.setWindturbineName("合计");
|
|
|
+ List<Windpowerinfoday> wpls = windpowerinfodayService.getWindpowerinfodayList(wpId, beginDate, endDate);
|
|
|
+ double swdl = wpls.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();//风场上网电量合计
|
|
|
+ double gwdl = wpls.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();//风场购网电量合计
|
|
|
+ vo.setSwdl(StringUtils.round(swdl, 2));
|
|
|
+ vo.setGwdl(StringUtils.round(gwdl, 2));
|
|
|
+
|
|
|
+ double fdl = 0.0;//风机发电量合计
|
|
|
+ double yxxs = 0.0;//风机运行小时合计
|
|
|
+ double gzxs = 0.0;//风机故障小时合计
|
|
|
+ double jxxs = 0.0;//风机检修小时合计
|
|
|
+ double tjxs = 0.0;//风机停机小时合计
|
|
|
+ double zdxs = 0.0;//风机中断小时合计
|
|
|
+ double rlxs = 0.0;//风机日历小时合计
|
|
|
+
|
|
|
+ double fs = 0.0;//风机平均风速
|
|
|
+ double sbklyl = 0.0;//风机平均设备可利用率
|
|
|
+ double dxklyxs = 0.0;//风机平均等效可利用系数
|
|
|
+ double lyxs = 0.0;//风机平均利用小时
|
|
|
+ double yxfss = 0.0;//风机平均有效风时速
|
|
|
+ double glyzxxs = 0.0;//风机平均功率一致性系数
|
|
|
+
|
|
|
+ double xfqr = 0.0;//风机小风切入
|
|
|
+ double xfqrhgl = 0.0;//风机小风切入合格率
|
|
|
+
|
|
|
+ int xfqrnum = 0;
|
|
|
+ int xfqrhglnum = 0;
|
|
|
+
|
|
|
+ int fsnum = 0;
|
|
|
+ int sbklylnum = 0;
|
|
|
+ int dxklyxsnum = 0;
|
|
|
+ int lyxsnum = 0;
|
|
|
+ int yxfssnum = 0;
|
|
|
+ int glyzxxsnum = 0;
|
|
|
+
|
|
|
+ for (SingleAnalysisVo wtd : vos) {
|
|
|
+ double temp = null != wtd.getFdl() ? wtd.getFdl() : 0.0;//风机发电量合计
|
|
|
+ fdl = fdl + temp;
|
|
|
+ temp = null != wtd.getYxxs() ? wtd.getYxxs() : 0.0;//风机运行小时合计
|
|
|
+ yxxs = yxxs + temp;
|
|
|
+ temp = null != wtd.getGzxs() ? wtd.getGzxs() : 0.0;//风机故障小时合计
|
|
|
+ gzxs = gzxs + temp;
|
|
|
+ temp = null != wtd.getJxxs() ? wtd.getJxxs() : 0.0;//风机检修小时合计
|
|
|
+ jxxs = jxxs + temp;
|
|
|
+ temp = null != wtd.getTjxs() ? wtd.getTjxs() : 0.0;//风机停机小时合计
|
|
|
+ tjxs = tjxs + temp;
|
|
|
+ temp = null != wtd.getZdxs() ? wtd.getZdxs() : 0.0;//风机中断小时合计
|
|
|
+ zdxs = zdxs + temp;
|
|
|
+ temp = null != wtd.getRlxs() ? wtd.getRlxs() : 0.0;//风机日历小时合计
|
|
|
+ rlxs = rlxs + temp;
|
|
|
+
|
|
|
+ temp = null != wtd.getFs() ? wtd.getFs() : 0.0;//风机平均风速
|
|
|
+ fs = fs + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getFs())) {
|
|
|
+ fsnum++;
|
|
|
}
|
|
|
-
|
|
|
- if (wtday3map.containsKey(wt.getId())) {
|
|
|
- SingleAnalysisVo wtd = wtday3map.get(wt.getId());
|
|
|
-
|
|
|
- double gzss = null != wtd.getGzss() ? wtd.getGzss() : 0.0;//风机故障损失合计
|
|
|
- double jxss = null != wtd.getJxss() ? wtd.getJxss() : 0.0;//风机检修损失合计
|
|
|
- double xdss = null != wtd.getXdss() ? wtd.getXdss() : 0.0;//风机限电损失合计
|
|
|
- double xnss = null != wtd.getXnss() ? wtd.getXnss() : 0.0;//风机性能损失时合计
|
|
|
- double slss = null != wtd.getSlss() ? wtd.getSlss() : 0.0;//风机受累损失合计
|
|
|
-
|
|
|
-
|
|
|
- double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
|
|
|
-
|
|
|
- vo.setGzss(StringUtils.round(gzss,2));
|
|
|
- vo.setJxss(StringUtils.round(jxss,2));
|
|
|
- vo.setXdss(StringUtils.round(xdss,2));
|
|
|
- vo.setXnss(StringUtils.round(xnss,2));
|
|
|
- vo.setSlss(StringUtils.round(xnss,2));
|
|
|
-
|
|
|
- vo.setLlfdl(StringUtils.round(llfdl, 2));
|
|
|
+ temp = null != wtd.getSbklyl() ? wtd.getSbklyl() : 0.0;//风机平均设备可利用率
|
|
|
+ sbklyl = sbklyl + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getSbklyl())) {
|
|
|
+ sbklylnum++;
|
|
|
+ }
|
|
|
+ temp = null != wtd.getDxklyxs() ? wtd.getDxklyxs() : 0.0;//风机平均等效可利用系数
|
|
|
+ dxklyxs = dxklyxs + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getDxklyxs())) {
|
|
|
+ dxklyxsnum++;
|
|
|
+ }
|
|
|
+ temp = null != wtd.getLyxs() ? wtd.getLyxs() : 0.0;//风机平均利用小时
|
|
|
+ lyxs = lyxs + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getLyxs())) {
|
|
|
+ lyxsnum++;
|
|
|
+ }
|
|
|
+ temp = null != wtd.getYxfss() ? wtd.getYxfss() : 0.0;//风机平均有效风时速
|
|
|
+ yxfss = yxfss + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getYxfss())) {
|
|
|
+ yxfssnum++;
|
|
|
+ }
|
|
|
+ temp = null != wtd.getGlyzxxs() ? wtd.getGlyzxxs() : 0.0;//风机平均功率一致性系数
|
|
|
+ glyzxxs = glyzxxs + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getGlyzxxs())) {
|
|
|
+ glyzxxsnum++;
|
|
|
}
|
|
|
|
|
|
- if (iomap.containsKey(wt.getId())) {
|
|
|
- SingleAnalysisVo wtd = iomap.get(wt.getId());
|
|
|
-
|
|
|
- double xfqr = null != wtd.getXfqr() ? wtd.getXfqr() : 0.0;//风机小风切入
|
|
|
- double xfqrhgl = null != wtd.getXfqrhgl() ? wtd.getXfqrhgl() : 0.0;//风机小风切入合格率
|
|
|
- vo.setXfqr(StringUtils.round(xfqr, 2));
|
|
|
- vo.setXfqrhgl(StringUtils.round(xfqrhgl, 2));
|
|
|
+ temp = null != wtd.getXfqr() ? wtd.getXfqr() : 0.0;//风机小风切入
|
|
|
+ xfqr = xfqr + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getXfqr())) {
|
|
|
+ xfqrnum++;
|
|
|
+ }
|
|
|
+ temp = null != wtd.getXfqrhgl() ? wtd.getXfqrhgl() : 0.0;//风机小风切入合格率
|
|
|
+ xfqrhgl = xfqrhgl + temp;
|
|
|
+ if (StringUtils.notEmp(wtd.getXfqrhgl())) {
|
|
|
+ xfqrhglnum++;
|
|
|
}
|
|
|
- vos.add(vo);
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (null != vos && !vos.isEmpty()) {
|
|
|
-
|
|
|
- //统计所有风机指标数据
|
|
|
- SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
- vo.setWindturbineName("合计");
|
|
|
- List<Windpowerinfoday> wpls = windpowerinfodayService.getWindpowerinfodayList(wpId, beginDate, endDate);
|
|
|
- double swdl = wpls.stream().mapToDouble(Windpowerinfoday::getGridelectricity).sum();//风场上网电量合计
|
|
|
- double gwdl = wpls.stream().mapToDouble(Windpowerinfoday::getBuyelectricity).sum();//风场购网电量合计
|
|
|
- vo.setSwdl(StringUtils.round(swdl, 2));
|
|
|
- vo.setGwdl(StringUtils.round(gwdl, 2));
|
|
|
-
|
|
|
- double fdl = 0.0;//风机发电量合计
|
|
|
- double yxxs = 0.0;//风机运行小时合计
|
|
|
- double gzxs = 0.0;//风机故障小时合计
|
|
|
- double jxxs = 0.0;//风机检修小时合计
|
|
|
- double tjxs = 0.0;//风机停机小时合计
|
|
|
- double zdxs = 0.0;//风机中断小时合计
|
|
|
- double rlxs = 0.0;//风机日历小时合计
|
|
|
-
|
|
|
- double fs = 0.0;//风机平均风速
|
|
|
- double sbklyl = 0.0;//风机平均设备可利用率
|
|
|
- double dxklyxs = 0.0;//风机平均等效可利用系数
|
|
|
- double lyxs = 0.0;//风机平均利用小时
|
|
|
- double yxfss = 0.0;//风机平均有效风时速
|
|
|
- double glyzxxs = 0.0;//风机平均功率一致性系数
|
|
|
-
|
|
|
- double xfqr = 0.0;//风机小风切入
|
|
|
- double xfqrhgl = 0.0;//风机小风切入合格率
|
|
|
-
|
|
|
- int xfqrnum = 0;
|
|
|
- int xfqrhglnum = 0;
|
|
|
-
|
|
|
- int fsnum = 0;
|
|
|
- int sbklylnum = 0;
|
|
|
- int dxklyxsnum = 0;
|
|
|
- int lyxsnum = 0;
|
|
|
- int yxfssnum = 0;
|
|
|
- int glyzxxsnum = 0;
|
|
|
-
|
|
|
- for (SingleAnalysisVo wtd : vos) {
|
|
|
- double temp = null != wtd.getFdl() ? wtd.getFdl() : 0.0;//风机发电量合计
|
|
|
- fdl = fdl + temp;
|
|
|
- temp = null != wtd.getYxxs() ? wtd.getYxxs() : 0.0;//风机运行小时合计
|
|
|
- yxxs = yxxs + temp;
|
|
|
- temp = null != wtd.getGzxs() ? wtd.getGzxs() : 0.0;//风机故障小时合计
|
|
|
- gzxs = gzxs + temp;
|
|
|
- temp = null != wtd.getJxxs() ? wtd.getJxxs() : 0.0;//风机检修小时合计
|
|
|
- jxxs = jxxs + temp;
|
|
|
- temp = null != wtd.getTjxs() ? wtd.getTjxs() : 0.0;//风机停机小时合计
|
|
|
- tjxs = tjxs + temp;
|
|
|
- temp = null != wtd.getZdxs() ? wtd.getZdxs() : 0.0;//风机中断小时合计
|
|
|
- zdxs = zdxs + temp;
|
|
|
- temp = null != wtd.getRlxs() ? wtd.getRlxs() : 0.0;//风机日历小时合计
|
|
|
- rlxs = rlxs + temp;
|
|
|
-
|
|
|
- temp = null != wtd.getFs() ? wtd.getFs() : 0.0;//风机平均风速
|
|
|
- fs = fs + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getFs())) {
|
|
|
- fsnum++;
|
|
|
- }
|
|
|
- temp = null != wtd.getSbklyl() ? wtd.getSbklyl() : 0.0;//风机平均设备可利用率
|
|
|
- sbklyl = sbklyl + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getSbklyl())) {
|
|
|
- sbklylnum++;
|
|
|
- }
|
|
|
- temp = null != wtd.getDxklyxs() ? wtd.getDxklyxs() : 0.0;//风机平均等效可利用系数
|
|
|
- dxklyxs = dxklyxs + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getDxklyxs())) {
|
|
|
- dxklyxsnum++;
|
|
|
- }
|
|
|
- temp = null != wtd.getLyxs() ? wtd.getLyxs() : 0.0;//风机平均利用小时
|
|
|
- lyxs = lyxs + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getLyxs())) {
|
|
|
- lyxsnum++;
|
|
|
+ if (fsnum != 0) {
|
|
|
+ double temp = new BigDecimal(fs).divide(new BigDecimal(fsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setFs(temp);
|
|
|
}
|
|
|
- temp = null != wtd.getYxfss() ? wtd.getYxfss() : 0.0;//风机平均有效风时速
|
|
|
- yxfss = yxfss + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getYxfss())) {
|
|
|
- yxfssnum++;
|
|
|
- }
|
|
|
- temp = null != wtd.getGlyzxxs() ? wtd.getGlyzxxs() : 0.0;//风机平均功率一致性系数
|
|
|
- glyzxxs = glyzxxs + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getGlyzxxs())) {
|
|
|
- glyzxxsnum++;
|
|
|
+ if (sbklylnum != 0) {
|
|
|
+ double temp = new BigDecimal(sbklyl).divide(new BigDecimal(sbklylnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setSbklyl(temp);
|
|
|
}
|
|
|
|
|
|
- temp = null != wtd.getXfqr() ? wtd.getXfqr() : 0.0;//风机小风切入
|
|
|
- xfqr = xfqr + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getXfqr())) {
|
|
|
- xfqrnum++;
|
|
|
- }
|
|
|
- temp = null != wtd.getXfqrhgl() ? wtd.getXfqrhgl() : 0.0;//风机小风切入合格率
|
|
|
- xfqrhgl = xfqrhgl + temp;
|
|
|
- if (StringUtils.notEmp(wtd.getXfqrhgl())) {
|
|
|
- xfqrhglnum++;
|
|
|
+ if (dxklyxsnum != 0) {
|
|
|
+ double temp = new BigDecimal(dxklyxs).divide(new BigDecimal(dxklyxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setDxklyxs(temp);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (fsnum != 0) {
|
|
|
- double temp = new BigDecimal(fs).divide(new BigDecimal(fsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setFs(temp);
|
|
|
- }
|
|
|
- if (sbklylnum != 0) {
|
|
|
- double temp = new BigDecimal(sbklyl).divide(new BigDecimal(sbklylnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setSbklyl(temp);
|
|
|
- }
|
|
|
-
|
|
|
- if (dxklyxsnum != 0) {
|
|
|
- double temp = new BigDecimal(dxklyxs).divide(new BigDecimal(dxklyxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setDxklyxs(temp);
|
|
|
- }
|
|
|
-
|
|
|
- if (lyxsnum != 0) {
|
|
|
- double temp = new BigDecimal(lyxs).divide(new BigDecimal(lyxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setLyxs(temp);
|
|
|
- }
|
|
|
-
|
|
|
- if (yxfssnum != 0) {
|
|
|
- double temp = new BigDecimal(yxfss).divide(new BigDecimal(yxfssnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setYxfss(temp);
|
|
|
- }
|
|
|
-
|
|
|
- if (glyzxxsnum != 0) {
|
|
|
- double temp = new BigDecimal(glyzxxs).divide(new BigDecimal(glyzxxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setGlyzxxs(temp);
|
|
|
- }
|
|
|
+ if (lyxsnum != 0) {
|
|
|
+ double temp = new BigDecimal(lyxs).divide(new BigDecimal(lyxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setLyxs(temp);
|
|
|
+ }
|
|
|
|
|
|
+ if (yxfssnum != 0) {
|
|
|
+ double temp = new BigDecimal(yxfss).divide(new BigDecimal(yxfssnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setYxfss(temp);
|
|
|
+ }
|
|
|
|
|
|
- vo.setFdl(StringUtils.round(fdl, 2));
|
|
|
- vo.setYxxs(StringUtils.round(yxxs, 2));
|
|
|
- vo.setGzxs(StringUtils.round(gzxs, 2));
|
|
|
- vo.setJxxs(StringUtils.round(jxxs, 2));
|
|
|
- vo.setTjxs(StringUtils.round(tjxs, 2));
|
|
|
- vo.setZdxs(StringUtils.round(zdxs, 2));
|
|
|
- vo.setRlxs(StringUtils.round(rlxs, 2));
|
|
|
- vo.setFs(StringUtils.round(fs, 2));
|
|
|
- vo.setSbklyl(StringUtils.round(sbklyl, 2));
|
|
|
- vo.setDxklyxs(StringUtils.round(dxklyxs, 2));
|
|
|
- vo.setLyxs(StringUtils.round(lyxs, 2));
|
|
|
- vo.setYxxs(StringUtils.round(yxfss, 2));
|
|
|
- vo.setGlyzxxs(StringUtils.round(glyzxxs, 2));
|
|
|
+ if (glyzxxsnum != 0) {
|
|
|
+ double temp = new BigDecimal(glyzxxs).divide(new BigDecimal(glyzxxsnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setGlyzxxs(temp);
|
|
|
+ }
|
|
|
|
|
|
- double gzss = vos.stream().mapToDouble(SingleAnalysisVo::getGzss).sum();//风机故障损失合计
|
|
|
- double jxss = vos.stream().mapToDouble(SingleAnalysisVo::getJxss).sum();//风机检修损失合计
|
|
|
- double xdss = vos.stream().mapToDouble(SingleAnalysisVo::getXdss).sum();//风机限电损失合计
|
|
|
- double xnss = vos.stream().mapToDouble(SingleAnalysisVo::getXnss).sum();//风机性能损失时合计
|
|
|
- double slss = vos.stream().mapToDouble(SingleAnalysisVo::getSlss).sum();//风机受累损失合计
|
|
|
- double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
|
|
|
|
|
|
- vo.setGzss(StringUtils.round(gzss, 2));
|
|
|
- vo.setJxss(StringUtils.round(jxss, 2));
|
|
|
- vo.setXdss(StringUtils.round(xdss, 2));
|
|
|
- vo.setXnss(StringUtils.round(xnss, 2));
|
|
|
- vo.setSlss(StringUtils.round(slss, 2));
|
|
|
- vo.setLlfdl(StringUtils.round(llfdl, 2));
|
|
|
+ vo.setFdl(StringUtils.round(fdl, 2));
|
|
|
+ vo.setYxxs(StringUtils.round(yxxs, 2));
|
|
|
+ vo.setGzxs(StringUtils.round(gzxs, 2));
|
|
|
+ vo.setJxxs(StringUtils.round(jxxs, 2));
|
|
|
+ vo.setTjxs(StringUtils.round(tjxs, 2));
|
|
|
+ vo.setZdxs(StringUtils.round(zdxs, 2));
|
|
|
+ vo.setRlxs(StringUtils.round(rlxs, 2));
|
|
|
+ vo.setFs(StringUtils.round(fs, 2));
|
|
|
+ vo.setSbklyl(StringUtils.round(sbklyl, 2));
|
|
|
+ vo.setDxklyxs(StringUtils.round(dxklyxs, 2));
|
|
|
+ vo.setLyxs(StringUtils.round(lyxs, 2));
|
|
|
+ vo.setYxxs(StringUtils.round(yxfss, 2));
|
|
|
+ vo.setGlyzxxs(StringUtils.round(glyzxxs, 2));
|
|
|
+
|
|
|
+ double gzss = vos.stream().mapToDouble(SingleAnalysisVo::getGzss).sum();//风机故障损失合计
|
|
|
+ double jxss = vos.stream().mapToDouble(SingleAnalysisVo::getJxss).sum();//风机检修损失合计
|
|
|
+ double xdss = vos.stream().mapToDouble(SingleAnalysisVo::getXdss).sum();//风机限电损失合计
|
|
|
+ double xnss = vos.stream().mapToDouble(SingleAnalysisVo::getXnss).sum();//风机性能损失时合计
|
|
|
+ double slss = vos.stream().mapToDouble(SingleAnalysisVo::getSlss).sum();//风机受累损失合计
|
|
|
+ double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
|
|
|
+
|
|
|
+ vo.setGzss(StringUtils.round(gzss, 2));
|
|
|
+ vo.setJxss(StringUtils.round(jxss, 2));
|
|
|
+ vo.setXdss(StringUtils.round(xdss, 2));
|
|
|
+ vo.setXnss(StringUtils.round(xnss, 2));
|
|
|
+ vo.setSlss(StringUtils.round(slss, 2));
|
|
|
+ vo.setLlfdl(StringUtils.round(llfdl, 2));
|
|
|
+
|
|
|
+
|
|
|
+ if (xfqrnum != 0) {
|
|
|
+ double temp = new BigDecimal(xfqr).divide(new BigDecimal(xfqrnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setXfqr(temp);
|
|
|
+ }
|
|
|
|
|
|
+ if (xfqrhglnum != 0) {
|
|
|
+ double temp = new BigDecimal(xfqrhgl).divide(new BigDecimal(xfqrhglnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
+ vo.setXfqrhgl(temp);
|
|
|
+ }
|
|
|
|
|
|
- if (xfqrnum != 0) {
|
|
|
- double temp = new BigDecimal(xfqr).divide(new BigDecimal(xfqrnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setXfqr(temp);
|
|
|
- }
|
|
|
|
|
|
- if (xfqrhglnum != 0) {
|
|
|
- double temp = new BigDecimal(xfqrhgl).divide(new BigDecimal(xfqrhglnum), 2, RoundingMode.HALF_UP).doubleValue();
|
|
|
- vo.setXfqrhgl(temp);
|
|
|
+ vos.add(vo);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- vos.add(vo);
|
|
|
+ } catch (Exception e){
|
|
|
+ throw new QiNiuException(QiNiuErrorEnum.ERROR_DATA);
|
|
|
}
|
|
|
|
|
|
vos = sortSingleAnalysisVoList(tablepar, vos);
|