修改接口

This commit is contained in:
huangzj
2023-04-25 12:47:53 +08:00
parent 72b88326fa
commit 5b3c5e6c94

View File

@@ -135,11 +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.select ("measurement_point_id","max(v_thd)")
wrapper.select ("measurement_point_id","max(v_thd) as v_thd")
.in("measurement_point_id", collect)
.between("data_date", statisticsBizBaseParam.getStartTime(), statisticsBizBaseParam.getEndTime())
.eq("data_type", 0).groupBy ("measurement_point_id")
.orderByDesc("max(v_thd)");
.orderByDesc("v_thd");
List<RMpVThd> rMpVThdList = rMpVThdMapper.selectList(wrapper);
rMpVThdVOList = rMpVThdList.stream().limit(topNum).map(rMpVThd -> {
RMpVThdVO rMpVThdVO = new RMpVThdVO();