zbj//1.暂态报告 暂升/暂降次数统计 代码修改
This commit is contained in:
@@ -493,16 +493,19 @@ public class ReportServiceImpl implements ReportService {
|
||||
*/
|
||||
@Override
|
||||
public Page<DetailVO> getSagTimes(WaveTypeParam waveTypeParam) {
|
||||
List<DetailVO> result = new ArrayList<>();
|
||||
//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());
|
||||
if (CollectionUtil.isEmpty(lineIds)) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
|
||||
}
|
||||
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
|
||||
List<DetailVO> detailVO = reportMapper.getSagTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime());
|
||||
|
||||
/*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())))
|
||||
.le(StringUtils.isNotBlank(waveTypeParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(waveTypeParam.getSearchEndTime())))
|
||||
@@ -525,10 +528,14 @@ public class ReportServiceImpl implements ReportService {
|
||||
BeanUtils.copyProperties(eventDetail, vo);
|
||||
result.add(vo);
|
||||
idlist.add(eventDetail.getLineId());
|
||||
}*/
|
||||
ArrayList<String> idlist = new ArrayList<>();
|
||||
for (DetailVO vo : detailVO) {
|
||||
idlist.add(vo.getLineId());
|
||||
}
|
||||
HttpResult<List<AreaLineInfoVO>> AreaInfo = lineFeignClient.getBaseLineAreaInfo(idlist);
|
||||
List<AreaLineInfoVO> data = AreaInfo.getData();
|
||||
for (DetailVO detailVO : result) {
|
||||
/*for (DetailVO detailVO : result) {
|
||||
for (AreaLineInfoVO vo : data) {
|
||||
if (vo.getLineId().equals(detailVO.getLineId())) {
|
||||
BeanUtils.copyProperties(vo, detailVO);
|
||||
@@ -539,9 +546,16 @@ public class ReportServiceImpl implements ReportService {
|
||||
detailVO.setTimes(countMap.get(s));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
for (DetailVO v : detailVO) {
|
||||
for (AreaLineInfoVO vo : data) {
|
||||
if (vo.getLineId().equals(v.getLineId())) {
|
||||
BeanUtils.copyProperties(vo, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
Page<DetailVO> page = BeanUtil.copyProperties(pageInfo,Page.class);
|
||||
page.setRecords(result);
|
||||
Page<DetailVO> page = BeanUtil.copyProperties(detailVO,Page.class);
|
||||
page.setRecords(detailVO);
|
||||
return page;
|
||||
|
||||
|
||||
@@ -555,16 +569,19 @@ public class ReportServiceImpl implements ReportService {
|
||||
*/
|
||||
@Override
|
||||
public Page<DetailVO> getUpTimes(WaveTypeParam waveTypeParam) {
|
||||
List<DetailVO> result = new ArrayList<>();
|
||||
//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());
|
||||
if (CollectionUtil.isEmpty(lineIds)) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
|
||||
}
|
||||
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(
|
||||
|
||||
List<DetailVO> detailVO = reportMapper.getUpTimes(new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),lineIds,waveTypeParam.getSearchBeginTime(),waveTypeParam.getSearchEndTime());
|
||||
|
||||
/*Page<RmpEventDetailPO> pageInfo = eventDetailService.page(
|
||||
new Page<>(waveTypeParam.getPageNum(), waveTypeParam.getPageSize()),
|
||||
new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
@@ -590,10 +607,16 @@ public class ReportServiceImpl implements ReportService {
|
||||
BeanUtils.copyProperties(eventDetail, vo);
|
||||
result.add(vo);
|
||||
idlist.add(eventDetail.getLineId());
|
||||
}*/
|
||||
|
||||
//id集合
|
||||
ArrayList<String> idlist = new ArrayList<>();
|
||||
for (DetailVO vo : detailVO) {
|
||||
idlist.add(vo.getLineId());
|
||||
}
|
||||
HttpResult<List<AreaLineInfoVO>> AreaInfo = lineFeignClient.getBaseLineAreaInfo(idlist);
|
||||
List<AreaLineInfoVO> data = AreaInfo.getData();
|
||||
for (DetailVO detailVO : result) {
|
||||
/*for (DetailVO detailVO : result) {
|
||||
for (AreaLineInfoVO vo : data) {
|
||||
if (vo.getLineId().equals(detailVO.getLineId())) {
|
||||
BeanUtils.copyProperties(vo, detailVO);
|
||||
@@ -604,9 +627,16 @@ public class ReportServiceImpl implements ReportService {
|
||||
detailVO.setTimes(countMap.get(s));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
for (DetailVO v : detailVO) {
|
||||
for (AreaLineInfoVO vo : data) {
|
||||
if (vo.getLineId().equals(v.getLineId())) {
|
||||
BeanUtils.copyProperties(vo, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
Page<DetailVO> page = BeanUtil.copyProperties(pageInfo,Page.class);
|
||||
page.setRecords(result);
|
||||
Page<DetailVO> page = BeanUtil.copyProperties(detailVO,Page.class);
|
||||
page.setRecords(detailVO);
|
||||
return page;
|
||||
|
||||
|
||||
@@ -620,10 +650,10 @@ public class ReportServiceImpl implements ReportService {
|
||||
*/
|
||||
@Override
|
||||
public Page<DetailVO> getBreakTimes(WaveTypeParam waveTypeParam) {
|
||||
List<DetailVO> result = new ArrayList<>();
|
||||
//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());
|
||||
|
||||
Reference in New Issue
Block a user