bug修改
This commit is contained in:
@@ -48,6 +48,7 @@ import io.swagger.models.auth.In;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -733,7 +734,7 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
|
||||
|
||||
List<AdvanceEventDetailVO> advanceEventDetailVOLsit = querySagEventsAll(startTime, endTime);
|
||||
|
||||
|
||||
advanceEventDetailVOLsit = advanceEventDetailVOLsit.stream().filter(temp-> StringUtils.isNotEmpty(temp.getAdvanceType())).collect(Collectors.toList());
|
||||
for (AdvanceEventDetailVO advanceEventDetailVO : advanceEventDetailVOLsit) { // 获取监测点线路序号
|
||||
//母线id
|
||||
String nodePhysics = advanceEventDetailVO.getVoltageId();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -191,6 +191,11 @@ public class EventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, Rm
|
||||
}
|
||||
DictData advancereason = dicDataFeignClient.getDicDataByCode(reason).getData();
|
||||
DictData advanceType = dicDataFeignClient.getDicDataByCode(type).getData();
|
||||
if(Objects.equals(result.getCauseFlag(),1)&&Objects.equals(result.getTypeFlag(),1)){
|
||||
rmpEventDetailPO.setDealFlag(1);
|
||||
}else {
|
||||
rmpEventDetailPO.setDealFlag(0);
|
||||
}
|
||||
rmpEventDetailPO.setAdvanceReason(advancereason.getId());
|
||||
rmpEventDetailPO.setAdvanceType(advanceType.getId());
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetailNew> eventDetailList = influxDBResultMapper.toPOJO(monitorQuery, EventDetailNew.class);
|
||||
|
||||
Map<String, List<EventDetailNew>> map = eventDetailList.stream().filter(x -> x.getEventType() == "1").collect(Collectors.groupingBy(s -> s.getStartTime().substring(0, 10)));
|
||||
Map<String, List<EventDetailNew>> map = eventDetailList.stream().filter(x -> x.getEventType() == "1").collect(Collectors.groupingBy(s ->s.getStartTime().substring(0, 10)));
|
||||
Set<String> keySet = map.keySet();
|
||||
|
||||
LocalDate parse1 = LocalDate.parse(startTime);
|
||||
|
||||
Reference in New Issue
Block a user