|
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
@@ -466,6 +467,140 @@ public class SingleAnalysisService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public Map<String,List<SingleAnalysisVo>> SingleAnalysisListByWtIdDetiml(String wtId, Date beginDate, Date endDate) {
|
|
|
+
|
|
|
+ Map<String,List<SingleAnalysisVo>> map=new HashMap<>();
|
|
|
+ List<SingleAnalysisVo> fdlfsls = new ArrayList<>();
|
|
|
+ List<SingleAnalysisVo> wsls = new ArrayList<>();
|
|
|
+ List<SingleAnalysisVo> jfpldjsjls = new ArrayList<>();
|
|
|
+ if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
|
|
|
+
|
|
|
+ List<Inputoroutputspeedtotal> iols = inputoroutputspeedtotalService.getInputoroutputspeedtotalbyWtId(wtId, beginDate, endDate);
|
|
|
+ List<WindTurbineInfoDay> wtdayls = windturbineinfodayService.getWindturbineinfodayListByWtId(wtId, beginDate, endDate);
|
|
|
+// List<WindTurbineInfoDay2> wtday2ls = WindTurbineInfoDay2Service.getWindturbineinfoday2List(wtId, beginDate, endDate);
|
|
|
+ List<Windturbineinfoday3> wtday3ls = windturbineinfoday3Service.getWindturbineinfoday3ListBywtId(wtId, beginDate, endDate);
|
|
|
+ List<Windturbinethewindinfo> wtdls = windturbinethewindinfoService.getWindturbinethewindinfo(wtId, beginDate, endDate);
|
|
|
+
|
|
|
+ Windturbine wt = InitialRunner.wtmap.get(wtId);
|
|
|
+ Windpowerstation wp = InitialRunner.wpmap.get(wt.getWindpowerstationid());
|
|
|
+// List<Windpowerinfoday> wpls = windpowerinfodayService.getWindpowerinfodayList(wp.getId(), beginDate, endDate);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ 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 gzss = 0.0;//风机故障损失合计
|
|
|
+ double jxss = 0.0;//风机检修损失合计
|
|
|
+ double xdss = 0.0;//风机限电损失合计
|
|
|
+ double xnss = 0.0;//风机性能损失时合计
|
|
|
+ double slss = 0.0;//风机受累损失合计
|
|
|
+
|
|
|
+ double jfpl = 0.0;//风机小风切入
|
|
|
+
|
|
|
+
|
|
|
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Map<String,WindTurbineInfoDay> wtdmap=new HashMap<>();
|
|
|
+ if (StringUtils.notEmp(wtdayls) && !wtdayls.isEmpty()) {
|
|
|
+
|
|
|
+ for(WindTurbineInfoDay wtd:wtdayls)
|
|
|
+ {
|
|
|
+
|
|
|
+ SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
+ fdl = null != wtd.getGeneratingcapacity2() ? wtd.getGeneratingcapacity2() : 0.0;//风机发电量合计
|
|
|
+ yxxs = null != wtd.getRuntime() ? wtd.getRuntime() : 0.0;//风机运行小时合计
|
|
|
+ gzxs = null != wtd.getFaulttime() ? wtd.getFaulttime() : 0.0;//风机故障小时合计
|
|
|
+ jxxs = null != wtd.getMaintaintime() ? wtd.getMaintaintime() : 0.0;//风机检修小时合计
|
|
|
+ tjxs = null != wtd.getStoptime() ? wtd.getStoptime() : 0.0;//风机停机小时合计
|
|
|
+ zdxs = null != wtd.getInterrupttime() ? wtd.getInterrupttime() : 0.0;//风机中断小时合计
|
|
|
+ rlxs = null != wtd.getDaycalendarhours() ? wtd.getDaycalendarhours() : 0.0;//风机日历小时合计
|
|
|
+ fs = null != wtd.getSpeed() ? wtd.getSpeed() : 0.0;//风机平均风速
|
|
|
+
|
|
|
+ vo.setWindPowerStationId(wt.getWindpowerstationid());
|
|
|
+ vo.setWindPowerStationName(wp.getName());
|
|
|
+ vo.setWindturbineName(wt.getName());
|
|
|
+ vo.setWindturbineid(wt.getId());
|
|
|
+ vo.setRecorddate(wtd.getRecorddate());
|
|
|
+
|
|
|
+ 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));
|
|
|
+ fdlfsls.add(vo);
|
|
|
+ wtdmap.put(df.format(wtd.getRecorddate()),wtd);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.notEmp(wtday3ls) && StringUtils.notEmp(wtday3ls.get(0)) && !wtday3ls.isEmpty()) {
|
|
|
+ for(Windturbineinfoday3 wtd:wtday3ls) {
|
|
|
+
|
|
|
+ SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
+ gzss = null != wtd.getDaynhxdssdl() ? wtd.getDaynhxdssdl() : 0.0;//风机故障损失合计
|
|
|
+ jxss = null != wtd.getDaynhwhssdl() ? wtd.getDaynhwhssdl() : 0.0;//风机检修损失合计
|
|
|
+ xdss = null != wtd.getDaynhxdssdl() ? wtd.getDaynhxdssdl() : 0.0;//风机限电损失合计
|
|
|
+ xnss = null != wtd.getDaynhqfdl() ? wtd.getDaynhqfdl() : 0.0;//风机性能损失时合计
|
|
|
+ slss = null != wtd.getDaynhcfdl() ? wtd.getDaynhcfdl() : 0.0;//风机受累损失合计
|
|
|
+
|
|
|
+ vo.setWindPowerStationId(wt.getWindpowerstationid());
|
|
|
+ vo.setWindPowerStationName(wp.getName());
|
|
|
+ vo.setWindturbineName(wt.getName());
|
|
|
+ vo.setWindturbineid(wt.getId());
|
|
|
+ vo.setRecorddate(wtd.getRecorddate());
|
|
|
+
|
|
|
+ vo.setGzss(gzss);
|
|
|
+ vo.setJxss(jxss);
|
|
|
+ vo.setXdss(xdss);
|
|
|
+ vo.setXnss(xnss);
|
|
|
+ vo.setSlss(slss);
|
|
|
+ wsls.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.notEmp(wtdls) && !wtdls.isEmpty()) {
|
|
|
+
|
|
|
+ for(Windturbinethewindinfo wtd:wtdls) {
|
|
|
+
|
|
|
+ SingleAnalysisVo vo = new SingleAnalysisVo();
|
|
|
+
|
|
|
+ vo.setRecorddate(wtd.getRecorddate());
|
|
|
+ jfpl = null != wtd.getCb() ? wtd.getCb() : 0.0;//静风频率
|
|
|
+ vo.setWindPowerStationId(wt.getWindpowerstationid());
|
|
|
+ vo.setWindPowerStationName(wp.getName());
|
|
|
+ vo.setWindturbineName(wt.getName());
|
|
|
+ vo.setWindturbineid(wt.getId());
|
|
|
+ vo.setJfpl(StringUtils.round(jfpl, 2));
|
|
|
+ if(wtdmap.containsKey(df.format(wtd.getRecorddate())))
|
|
|
+ {
|
|
|
+ WindTurbineInfoDay wtday=wtdmap.get(df.format(wtd.getRecorddate()));
|
|
|
+ vo.setTjxs(wtday.getStoptime());
|
|
|
+ }
|
|
|
+ jfpldjsjls.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ map.put("ff",fdlfsls);//发电量和风速
|
|
|
+ map.put("ws",wsls);//五项损失,绑定五个
|
|
|
+ map.put("jd",jfpldjsjls);//静风频率和待机时间
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return map;
|
|
|
+ }
|
|
|
public SingleAnalysisVo SingleAnalysisListByWtId(SingleAnalysisVo vo1, SingleAnalysisVo vo2) {
|
|
|
|
|
|
SingleAnalysisVo vo = new SingleAnalysisVo();
|