bug修改

This commit is contained in:
hzj
2026-01-27 13:47:35 +08:00
parent 2a5a5087ad
commit 133766a2c7
4 changed files with 20 additions and 6 deletions

View File

@@ -291,7 +291,14 @@ public class ReportServiceImpl implements ReportService {
.le(StrUtil.isNotBlank(businessParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(businessParam.getSearchEndTime())))
.orderByDesc(RmpEventDetailPO::getSeverity).last(" limit 20")
);
info = BeanUtil.copyToList(eventDetails, EventDetailNew.class);
info = eventDetails.stream().map(temp->{
EventDetailNew eventDetailNew = new EventDetailNew();
BeanUtils.copyProperties(temp,eventDetailNew);
eventDetailNew.setStartTime(LocalDateTimeUtil.format(temp.getStartTime(),DatePattern.NORM_DATETIME_MS_PATTERN));
return eventDetailNew;
}).collect(Collectors.toList());
// info = BeanUtil.copyToList(eventDetails, EventDetailNew.class);
} else {
throw new BusinessException(DeviceResponseEnum.DEPT_LINE_EMPTY);
}
@@ -309,6 +316,7 @@ public class ReportServiceImpl implements ReportService {
if (detail.getLineId().equals(vo.getLineId())) {
BeanUtils.copyProperties(detail, waveTypeVO);
BeanUtils.copyProperties(vo, waveTypeVO);
waveTypeVO.setStartTime(LocalDateTimeUtil.parse(detail.getStartTime(),DatePattern.NORM_DATETIME_MS_PATTERN));
result.add(waveTypeVO);
}
}
@@ -343,7 +351,7 @@ public class ReportServiceImpl implements ReportService {
count.put(datum.getName(), 0);
}
//过滤掉原因的是空的
info = info.stream().filter(temp->Objects.nonNull(temp.getAdvanceReason())).collect(Collectors.toList());
info = info.stream().filter(temp->StringUtils.isNotEmpty(temp.getAdvanceReason())).collect(Collectors.toList());
//替值
for (EventDetail eventDetail : info) {
// if (dictData.getId().equals(eventDetail.getEventType())) {
@@ -978,7 +986,7 @@ public class ReportServiceImpl implements ReportService {
cell9.setCellStyle(bodyStyle);
cell0.setCellValue(i + 1);
cell1.setCellValue(vo.getStartTime());
cell1.setCellValue(LocalDateTimeUtil.format(vo.getStartTime(),DatePattern.NORM_DATETIME_MS_PATTERN));
cell2.setCellValue(vo.getGdName());
cell3.setCellValue(vo.getSubName());
cell4.setCellValue(vo.getLineName());
@@ -1101,7 +1109,7 @@ public class ReportServiceImpl implements ReportService {
}
public void sheet4(HSSFWorkbook sheets, HSSFCellStyle cellStyle, HSSFCellStyle bodyStyle, DeviceInfoParam.BusinessParam businessParam) {
sheets.createSheet("详细事件列表");
sheets.createSheet("暂降事件列表");
HSSFSheet sheetAt = sheets.getSheetAt(3);
sheetAt.setColumnWidth(0, 24 * 256);
sheetAt.setColumnWidth(1, 24 * 256);