zbj//1.暂态报告 暂降/暂升/中断 分页代码修改

This commit is contained in:
zhangbaojian
2023-04-28 11:34:21 +08:00
parent 37d4c999ec
commit c8d766e8ad
3 changed files with 18 additions and 29 deletions

View File

@@ -495,7 +495,7 @@ public class ReportServiceImpl implements ReportService {
public Page<DetailVO> getSagTimes(WaveTypeParam waveTypeParam) {
//List<DetailVO> result = new ArrayList<>();
//获取暂降字典信息
//DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
List<GeneralDeviceDTO> deviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(waveTypeParam).getData();
List<String> lineIds = deviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
@@ -503,8 +503,8 @@ public class ReportServiceImpl implements ReportService {
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
}
List<DetailVO> detailVO = reportMapper.getSagTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime());
Page<DetailVO> detail = reportMapper.getSagTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime(),dictdata.getId());
List<DetailVO> detailVO = detail.getRecords();
/*Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
.ge(StringUtils.isNotBlank(waveTypeParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(waveTypeParam.getSearchBeginTime())))
@@ -554,11 +554,8 @@ public class ReportServiceImpl implements ReportService {
}
}
}
Page<DetailVO> page = BeanUtil.copyProperties(detailVO,Page.class);
Page<DetailVO> page = BeanUtil.copyProperties(detail,Page.class);
page.setRecords(detailVO);
int size = detailVO.size();
Long aLong = Long.valueOf(String.valueOf(size));
page.setTotal(aLong);
return page;
@@ -574,7 +571,7 @@ public class ReportServiceImpl implements ReportService {
public Page<DetailVO> getUpTimes(WaveTypeParam waveTypeParam) {
//List<DetailVO> result = new ArrayList<>();
//获取暂升字典信息
//DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_RISE.getCode()).getData();
DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_RISE.getCode()).getData();
List<GeneralDeviceDTO> deviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(waveTypeParam).getData();
List<String> lineIds = deviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
@@ -582,8 +579,8 @@ public class ReportServiceImpl implements ReportService {
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
}
List<DetailVO> detailVO = reportMapper.getUpTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime());
Page<DetailVO> detail = reportMapper.getUpTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime(),dictdata.getId());
List<DetailVO> detailVO = detail.getRecords();
/*Page<RmpEventDetailPO> pageInfo = eventDetailService.page(
new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),
new LambdaQueryWrapper<RmpEventDetailPO>()
@@ -638,11 +635,8 @@ public class ReportServiceImpl implements ReportService {
}
}
}
Page<DetailVO> page = BeanUtil.copyProperties(detailVO,Page.class);
Page<DetailVO> page = BeanUtil.copyProperties(detail,Page.class);
page.setRecords(detailVO);
int size = detailVO.size();
Long aLong = Long.valueOf(String.valueOf(size));
page.setTotal(aLong);
return page;
@@ -659,7 +653,7 @@ public class ReportServiceImpl implements ReportService {
//List<DetailVO> result = new ArrayList<>();
//获取中断字典信息
//DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
DictData dictdata = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
List<GeneralDeviceDTO> deviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(waveTypeParam).getData();
List<String> lineIds = deviceDTOList.stream().flatMap(list -> list.getLineIndexes().stream()).collect(Collectors.toList());
@@ -667,7 +661,8 @@ public class ReportServiceImpl implements ReportService {
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
}
List<DetailVO> detailVO = reportMapper.getBreakTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime());
Page<DetailVO> detail = reportMapper.getBreakTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime(),dictdata.getId());
List<DetailVO> detailVO = detail.getRecords();
/* Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
@@ -721,11 +716,8 @@ public class ReportServiceImpl implements ReportService {
}
}
}
Page<DetailVO> page = BeanUtil.copyProperties(detailVO,Page.class);
Page<DetailVO> page = BeanUtil.copyProperties(detail,Page.class);
page.setRecords(detailVO);
int size = detailVO.size();
Long aLong = Long.valueOf(String.valueOf(size));
page.setTotal(aLong);
return page;