Commit d1d7a071 authored by lilongyang's avatar lilongyang

1、大屏-分析-场站/设备/风电/光伏层级-健康状态指数与趋势折线图数据按照时间正序排序

parent 349f7f50
...@@ -27,10 +27,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl; ...@@ -27,10 +27,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.*; import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.*;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.TimeRangeUtil; import com.yeejoin.amos.boot.module.jxiop.biz.utils.TimeRangeUtil;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
...@@ -324,6 +321,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl ...@@ -324,6 +321,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
wrapper.eq(FanHealthIndex::getAnalysisObjType, "场站").and( wrapper.eq(FanHealthIndex::getAnalysisObjType, "场站").and(
qw->qw.eq(FanHealthIndex::getGatewayId, fanGatewayId).or().eq(FanHealthIndex::getGatewayId, syzGatewayId)); qw->qw.eq(FanHealthIndex::getGatewayId, fanGatewayId).or().eq(FanHealthIndex::getGatewayId, syzGatewayId));
List<FanHealthIndex> fanHealthIndexList = fanHealthIndexMapper.selectList(wrapper); List<FanHealthIndex> fanHealthIndexList = fanHealthIndexMapper.selectList(wrapper);
fanHealthIndexList = fanHealthIndexList.stream().sorted(Comparator.comparing(FanHealthIndex::getRecDate)).collect(Collectors.toList());
valueList = fanHealthIndexList.stream() valueList = fanHealthIndexList.stream()
.map(t -> String .map(t -> String
.valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP))) .valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP)))
...@@ -339,6 +337,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl ...@@ -339,6 +337,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
pvwrapper.orderByDesc(PvHealthIndex::getTs); pvwrapper.orderByDesc(PvHealthIndex::getTs);
pvwrapper.last("limit 15"); pvwrapper.last("limit 15");
List<PvHealthIndex> pvHealthIndexList = pvHealthIndexMapper.selectList(pvwrapper); List<PvHealthIndex> pvHealthIndexList = pvHealthIndexMapper.selectList(pvwrapper);
pvHealthIndexList = pvHealthIndexList.stream().sorted(Comparator.comparing(PvHealthIndex::getRecDate)).collect(Collectors.toList());
valueList = pvHealthIndexList.stream() valueList = pvHealthIndexList.stream()
.map(t -> String .map(t -> String
.valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP))) .valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP)))
...@@ -359,6 +358,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl ...@@ -359,6 +358,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
} }
List<FanHealthIndex> fanHealthIndexList = fanHealthIndexMapper.selectList(wrapper); List<FanHealthIndex> fanHealthIndexList = fanHealthIndexMapper.selectList(wrapper);
fanHealthIndexList = fanHealthIndexList.stream().sorted(Comparator.comparing(FanHealthIndex::getRecDate)).collect(Collectors.toList());
valueList = fanHealthIndexList.stream() valueList = fanHealthIndexList.stream()
.map(t -> String.valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP))) .map(t -> String.valueOf(BigDecimal.valueOf(t.getHealthIndex()).setScale(1, BigDecimal.ROUND_HALF_UP)))
.collect(Collectors.toList()); .collect(Collectors.toList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment