|
@@ -1,5 +1,6 @@
|
|
|
package com.gyee.runeconomy.service.singleanalysis;
|
|
|
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
@@ -31,6 +32,9 @@ public class SingleAnalysisService {
|
|
|
@Resource
|
|
|
private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private ITurbineInfoDayService turbineInfoDayService;
|
|
|
+
|
|
|
private Map<String, ProEconInOrOutSpeedTotal> queryInOrOutSpeedTotal(String cmId, String type, String wpId, Date recordDate) {
|
|
|
|
|
|
List<ProEconInOrOutSpeedTotal> iostls = null;
|
|
@@ -1366,4 +1370,42 @@ public class SingleAnalysisService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public SingleAnalysisVo SingleAnalysisTurbineinfoday(String wtId, String year, String month, SingleAnalysisVo byzb) {
|
|
|
+ String date = year + "-" + month;
|
|
|
+ QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
|
+ qw.lambda().eq(TurbineInfoDay::getTurbineId, wtId)
|
|
|
+ .apply("to_char(record_date,'YYYY-MM')='" + date + "'");
|
|
|
+ List<TurbineInfoDay> list = turbineInfoDayService.list(qw);
|
|
|
+ double rfdl = list.stream().mapToDouble(TurbineInfoDay::getRfdl).sum();
|
|
|
+ byzb.setFdl(NumberUtil.round(rfdl/1000,2).doubleValue());
|
|
|
+ double pjfs = list.stream().mapToDouble(TurbineInfoDay::getPjfs).average().orElse(0.0);
|
|
|
+ byzb.setFs(NumberUtil.round(pjfs,2).doubleValue());
|
|
|
+ double gzss = list.stream().mapToDouble(TurbineInfoDay::getGzss).sum();
|
|
|
+ byzb.setGzss(NumberUtil.round(gzss/1000,2).doubleValue());
|
|
|
+ double jhjxss = list.stream().mapToDouble(TurbineInfoDay::getJhjxss).sum();
|
|
|
+ byzb.setJxss(NumberUtil.round(jhjxss/1000,2).doubleValue());
|
|
|
+ double xdss = list.stream().mapToDouble(TurbineInfoDay::getXdss).sum();
|
|
|
+ byzb.setXdss(NumberUtil.round(xdss/1000,2).doubleValue());
|
|
|
+ double xnss = list.stream().mapToDouble(TurbineInfoDay::getXnss).sum();
|
|
|
+ byzb.setXnss(NumberUtil.round(xnss/1000,2).doubleValue());
|
|
|
+ double slss = list.stream().mapToDouble(TurbineInfoDay::getXnss).sum();
|
|
|
+ byzb.setSlss(NumberUtil.round(slss/1000,2).doubleValue());
|
|
|
+ double llfdl = list.stream().mapToDouble(TurbineInfoDay::getXnss).sum();
|
|
|
+ byzb.setLlfdl(NumberUtil.round(llfdl/1000,2).doubleValue());
|
|
|
+ double gzmin = list.stream().mapToDouble(TurbineInfoDay::getGzMin).sum();
|
|
|
+ byzb.setGzxs(NumberUtil.round(gzmin/60,2).doubleValue());
|
|
|
+ double jxmin = list.stream().mapToDouble(TurbineInfoDay::getJxMin).sum();
|
|
|
+ byzb.setJxxs(NumberUtil.round(jxmin/60,2).doubleValue());
|
|
|
+ double lxmin = list.stream().mapToDouble(TurbineInfoDay::getLxMin).sum();
|
|
|
+ byzb.setZdxs(NumberUtil.round(lxmin/60,2).doubleValue());
|
|
|
+ double yxmin = list.stream().mapToDouble(TurbineInfoDay::getYxMin).sum();
|
|
|
+ byzb.setYxxs(NumberUtil.round(yxmin/60,2).doubleValue());
|
|
|
+ double djmin = list.stream().mapToDouble(TurbineInfoDay::getDjMin).sum();
|
|
|
+ byzb.setDjxs(NumberUtil.round(djmin/60,2).doubleValue());
|
|
|
+ double sblyxs = list.stream().mapToDouble(TurbineInfoDay::getLyxs).sum();
|
|
|
+ byzb.setLyxs(NumberUtil.round(sblyxs,2).doubleValue());
|
|
|
+ double sbklyl = list.stream().mapToDouble(TurbineInfoDay::getKlyl).average().orElse(0.0);
|
|
|
+ byzb.setSbklyl(NumberUtil.round(sbklyl,2).doubleValue());
|
|
|
+ return byzb;
|
|
|
+ }
|
|
|
}
|