|
|
@@ -36,11 +36,7 @@ import java.util.*;
|
|
|
@Api(value = "单机信息总览详细信息", tags = "单机信息总览详细信息")
|
|
|
public class WindturbineGoodnessDetailController {
|
|
|
@Resource
|
|
|
- private IProEconWindturbineGoodnessService proEconWindturbineGoodnessService;
|
|
|
- @Resource
|
|
|
private IProEconWtwindDayInfoService proEconWtwindDayInfoService;
|
|
|
- @Resource
|
|
|
- private IProEconWtAlysisDayService proEconWtAlysisDayService;
|
|
|
|
|
|
@Resource
|
|
|
private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
|
|
|
@@ -76,63 +72,55 @@ public class WindturbineGoodnessDetailController {
|
|
|
Date firstDayOfMonth = Date.from(firstOfMonth.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
LocalDate localdate2 = localDate.withDayOfYear(1);
|
|
|
Date firstDayOfYear = Date.from(localdate2.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
- QueryWrapper<ProEconWtAlysisDay> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("record_date", date).eq("windturbine_id", wtId);
|
|
|
- List<ProEconWtAlysisDay> wtadls = proEconWtAlysisDayService.list(queryWrapper);
|
|
|
- // .stream().filter(i->i.getWindturbineId().equals(wtId )
|
|
|
- // && i.getRecordDate().compareTo(date)==0
|
|
|
- // ).collect(Collectors.toList());
|
|
|
- if (!wtadls.isEmpty()) {
|
|
|
- wtday = wtadls.get(0);
|
|
|
-
|
|
|
- QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
|
- qw.lambda().eq(TurbineInfoDay::getRecordDate, date).eq(TurbineInfoDay::getTurbineId, wtId);
|
|
|
- List<TurbineInfoDay> turbineInfoDays = turbineInfoDayService.list(qw);
|
|
|
-
|
|
|
- TurbineInfoDay ytb = turbineInfoDayService.getTurbineSingle(wtId, firstDayOfMonth, date);
|
|
|
- TurbineInfoDay ntb = turbineInfoDayService.getTurbineSingle(wtId, firstDayOfYear, date);
|
|
|
-
|
|
|
- TurbineInfoDay tb = turbineInfoDays.get(0);
|
|
|
- wtday.setRfdl(NumberUtil.round(tb.getRfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setRyfdl(NumberUtil.round(tb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setRpjfs(NumberUtil.round(tb.getPjfs(), 2).doubleValue());
|
|
|
- wtday.setRyxxs(NumberUtil.round((tb.getYxMin() + tb.getXdMin()) / 60, 2).doubleValue());
|
|
|
- wtday.setRjxxs(NumberUtil.round(tb.getJxMin() / 60, 2).doubleValue());
|
|
|
- wtday.setRgzxs(NumberUtil.round(tb.getGzMin() / 60, 2).doubleValue());
|
|
|
- wtday.setRdjxs(NumberUtil.round(tb.getDjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setRzdxs(NumberUtil.round(tb.getLxMin() / 60, 2).doubleValue());
|
|
|
- wtday.setRyxfs(NumberUtil.round(tb.getYxfss(), 2).doubleValue());
|
|
|
- wtday.setRssdl(NumberUtil.round((tb.getGzss() + tb.getSlss() + tb.getXdss() + tb.getJhjxss() + tb.getFjhjxss() + tb.getXnss()) / 1000, 2).doubleValue());
|
|
|
- wtday.setRtjcs(NumberUtil.round(tb.getGzcs(), 2).doubleValue());
|
|
|
- wtday.setRsbklyl(NumberUtil.round(tb.getKlyl(), 2).doubleValue());
|
|
|
- wtday.setRpjwd(NumberUtil.round(tb.getHjwd(), 2).doubleValue());
|
|
|
- wtday.setRbbhcs(NumberUtil.round(tb.getTjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setYfdl(NumberUtil.round(ytb.getRfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setYyfdl(NumberUtil.round(ytb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setYpjfs(NumberUtil.round(ytb.getPjfs(), 2).doubleValue());
|
|
|
- wtday.setYyxxs(NumberUtil.round((ytb.getYxMin() + ytb.getXdMin()) / 60, 2).doubleValue());
|
|
|
- wtday.setYdjxs(NumberUtil.round(ytb.getDjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setYgzxs(NumberUtil.round(ytb.getGzMin() / 60, 2).doubleValue());
|
|
|
- wtday.setYjxxs(NumberUtil.round(ytb.getJxMin() / 60, 2).doubleValue());
|
|
|
- wtday.setYzdxs(NumberUtil.round(ytb.getLxMin() / 60, 2).doubleValue());
|
|
|
- wtday.setYyxfs(NumberUtil.round(ytb.getYxfss(), 2).doubleValue());
|
|
|
- wtday.setYtjcs(NumberUtil.round(ytb.getGzcs(), 2).doubleValue());
|
|
|
- wtday.setYsbklyl(NumberUtil.round(ytb.getKlyl(), 2).doubleValue());
|
|
|
- wtday.setYbbhcs(NumberUtil.round(ytb.getTjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setNfdl(NumberUtil.round(ntb.getRfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setNyfdl(NumberUtil.round(ntb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
- wtday.setNpjfs(NumberUtil.round(ntb.getPjfs(), 2).doubleValue());
|
|
|
- wtday.setNyxxs(NumberUtil.round((ntb.getYxMin() + ntb.getXdMin()) / 60, 2).doubleValue());
|
|
|
- wtday.setNgzxs(NumberUtil.round(ntb.getGzMin() / 60, 2).doubleValue());
|
|
|
- wtday.setNjxxs(NumberUtil.round(ntb.getJxMin() / 60, 2).doubleValue());
|
|
|
- wtday.setNzdxs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setNdjxs(NumberUtil.round(ntb.getDjMin() / 60, 2).doubleValue());
|
|
|
- wtday.setNyxfs(NumberUtil.round(ntb.getYxfss(), 2).doubleValue());
|
|
|
- //停机小时
|
|
|
- wtday.setNbbhcs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
|
|
|
- }
|
|
|
|
|
|
+ QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
|
+ qw.lambda().eq(TurbineInfoDay::getRecordDate, date).eq(TurbineInfoDay::getTurbineId, wtId);
|
|
|
+ List<TurbineInfoDay> turbineInfoDays = turbineInfoDayService.list(qw);
|
|
|
+
|
|
|
+ TurbineInfoDay ytb = turbineInfoDayService.getTurbineSingle(wtId, firstDayOfMonth, date);
|
|
|
+ TurbineInfoDay ntb = turbineInfoDayService.getTurbineSingle(wtId, firstDayOfYear, date);
|
|
|
+
|
|
|
+ TurbineInfoDay tb = turbineInfoDays.get(0);
|
|
|
+ wtday.setRfdl(NumberUtil.round(tb.getRfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setRyfdl(NumberUtil.round(tb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setRpjfs(NumberUtil.round(tb.getPjfs(), 2).doubleValue());
|
|
|
+ wtday.setRyxxs(NumberUtil.round((tb.getYxMin() + tb.getXdMin()) / 60, 2).doubleValue());
|
|
|
+ wtday.setRjxxs(NumberUtil.round(tb.getJxMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setRgzxs(NumberUtil.round(tb.getGzMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setRdjxs(NumberUtil.round(tb.getDjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setRzdxs(NumberUtil.round(tb.getLxMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setRyxfs(NumberUtil.round(tb.getYxfss(), 2).doubleValue());
|
|
|
+ wtday.setRssdl(NumberUtil.round((tb.getGzss() + tb.getSlss() + tb.getXdss() + tb.getJhjxss() + tb.getFjhjxss() + tb.getXnss()) / 1000, 2).doubleValue());
|
|
|
+ wtday.setRtjcs(NumberUtil.round(tb.getGzcs(), 2).doubleValue());
|
|
|
+ wtday.setRsbklyl(NumberUtil.round(tb.getKlyl(), 2).doubleValue());
|
|
|
+ wtday.setRpjwd(NumberUtil.round(tb.getHjwd(), 2).doubleValue());
|
|
|
+ wtday.setRbbhcs(NumberUtil.round(tb.getTjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setYfdl(NumberUtil.round(ytb.getRfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setYyfdl(NumberUtil.round(ytb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setYpjfs(NumberUtil.round(ytb.getPjfs(), 2).doubleValue());
|
|
|
+ wtday.setYyxxs(NumberUtil.round((ytb.getYxMin() + ytb.getXdMin()) / 60, 2).doubleValue());
|
|
|
+ wtday.setYdjxs(NumberUtil.round(ytb.getDjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setYgzxs(NumberUtil.round(ytb.getGzMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setYjxxs(NumberUtil.round(ytb.getJxMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setYzdxs(NumberUtil.round(ytb.getLxMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setYyxfs(NumberUtil.round(ytb.getYxfss(), 2).doubleValue());
|
|
|
+ wtday.setYtjcs(NumberUtil.round(ytb.getGzcs(), 2).doubleValue());
|
|
|
+ wtday.setYsbklyl(NumberUtil.round(ytb.getKlyl(), 2).doubleValue());
|
|
|
+ wtday.setYbbhcs(NumberUtil.round(ytb.getTjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setNfdl(NumberUtil.round(ntb.getRfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setNyfdl(NumberUtil.round(ntb.getLlfdl() / 1000, 2).doubleValue());
|
|
|
+ wtday.setNpjfs(NumberUtil.round(ntb.getPjfs(), 2).doubleValue());
|
|
|
+ wtday.setNyxxs(NumberUtil.round((ntb.getYxMin() + ntb.getXdMin()) / 60, 2).doubleValue());
|
|
|
+ wtday.setNgzxs(NumberUtil.round(ntb.getGzMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setNjxxs(NumberUtil.round(ntb.getJxMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setNzdxs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setNdjxs(NumberUtil.round(ntb.getDjMin() / 60, 2).doubleValue());
|
|
|
+ wtday.setNyxfs(NumberUtil.round(ntb.getYxfss(), 2).doubleValue());
|
|
|
+ //停机小时
|
|
|
+ wtday.setNbbhcs(NumberUtil.round(ntb.getTjMin() / 60, 2).doubleValue());
|
|
|
}
|
|
|
+
|
|
|
+// }
|
|
|
if (null != wtday) {
|
|
|
return R.data(ResultMsg.ok(wtday));
|
|
|
} else {
|