修改畸变率topnum接口

This commit is contained in:
huangzj
2023-04-25 12:38:14 +08:00
parent 5b118aed7a
commit 72b88326fa

View File

@@ -2,7 +2,6 @@ package com.njcn.harmonic.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -136,10 +135,11 @@ public class THDistortionServiceImpl implements THDistortionService {
/*监测点ID扁平化*/
List<String> collect = deviceList.stream().map(GeneralDeviceDTO::getLineIndexes).flatMap(Collection::stream).distinct().collect(Collectors.toList());
QueryWrapper<RMpVThd> wrapper = new QueryWrapper<>();
wrapper.in("measurement_point_id", collect)
wrapper.select ("measurement_point_id","max(v_thd)")
.in("measurement_point_id", collect)
.between("data_date", statisticsBizBaseParam.getStartTime(), statisticsBizBaseParam.getEndTime())
.eq("data_type", 0)
.orderByDesc("v_thd");
.eq("data_type", 0).groupBy ("measurement_point_id")
.orderByDesc("max(v_thd)");
List<RMpVThd> rMpVThdList = rMpVThdMapper.selectList(wrapper);
rMpVThdVOList = rMpVThdList.stream().limit(topNum).map(rMpVThd -> {
RMpVThdVO rMpVThdVO = new RMpVThdVO();