台账添加设备类型区分
This commit is contained in:
@@ -72,6 +72,9 @@ public class CsLedgerVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "isTop",value = "是否置顶,默认不置顶")
|
@ApiModelProperty(name = "isTop",value = "是否置顶,默认不置顶")
|
||||||
private Integer isTop = 0;
|
private Integer isTop = 0;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "devConType",value = "设备连接方式 MQTT || CLD")
|
||||||
|
private String devConType;
|
||||||
|
|
||||||
@ApiModelProperty(name = "children",value = "子节点")
|
@ApiModelProperty(name = "children",value = "子节点")
|
||||||
private List<CsLedgerVO> children = new ArrayList<>();
|
private List<CsLedgerVO> children = new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
item.setProcess(po.getProcess());
|
item.setProcess(po.getProcess());
|
||||||
|
item.setDevConType(po.getDevAccessMethod());
|
||||||
})
|
})
|
||||||
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
||||||
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
||||||
@@ -146,6 +147,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
item.setProcess(po.getProcess());
|
item.setProcess(po.getProcess());
|
||||||
|
item.setDevConType(po.getDevAccessMethod());
|
||||||
})
|
})
|
||||||
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
||||||
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
||||||
@@ -472,6 +474,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
item.setProcess(po.getProcess());
|
item.setProcess(po.getProcess());
|
||||||
|
item.setDevConType(po.getDevAccessMethod());
|
||||||
})
|
})
|
||||||
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
||||||
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
||||||
@@ -499,6 +502,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
item.setProcess(po.getProcess());
|
item.setProcess(po.getProcess());
|
||||||
|
item.setDevConType(po.getDevAccessMethod());
|
||||||
})
|
})
|
||||||
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
|
||||||
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
.sorted(Comparator.comparing(CsLedgerVO::getSort))
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ public class CsAppReportServiceImpl extends ServiceImpl<CsAppReportMapper, CsApp
|
|||||||
timeRanges = splitIntoMonths(startLocalDate, endLocalDate);
|
timeRanges = splitIntoMonths(startLocalDate, endLocalDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
String queryStartTime = timeRanges.get(0).start.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
String queryStartTime = timeRanges.get(timeRanges.size() - 1).end.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
||||||
String queryEndTime = timeRanges.get(timeRanges.size() - 1).end.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
String queryEndTime = timeRanges.get(0).start.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
||||||
|
|
||||||
|
|
||||||
StatSubstationBizBaseParam rStatLimitQueryParam = new StatSubstationBizBaseParam();
|
StatSubstationBizBaseParam rStatLimitQueryParam = new StatSubstationBizBaseParam();
|
||||||
rStatLimitQueryParam.setIds(Collections.singletonList(param.getLineId()));
|
rStatLimitQueryParam.setIds(Collections.singletonList(param.getLineId()));
|
||||||
@@ -187,6 +188,9 @@ public class CsAppReportServiceImpl extends ServiceImpl<CsAppReportMapper, CsApp
|
|||||||
public void applicationReport(LineParamDTO param) {
|
public void applicationReport(LineParamDTO param) {
|
||||||
CsAppReport po = new CsAppReport();
|
CsAppReport po = new CsAppReport();
|
||||||
po.setId(IdUtil.fastSimpleUUID());
|
po.setId(IdUtil.fastSimpleUUID());
|
||||||
|
if (Objects.isNull(param.getLineId())) {
|
||||||
|
throw new BusinessException("请选择监测点!");
|
||||||
|
}
|
||||||
po.setLineId(param.getLineId());
|
po.setLineId(param.getLineId());
|
||||||
po.setEventList(String.join(",", param.getList()));
|
po.setEventList(String.join(",", param.getList()));
|
||||||
po.setStartTime(LocalDate.parse(param.getStartTime()));
|
po.setStartTime(LocalDate.parse(param.getStartTime()));
|
||||||
@@ -239,7 +243,7 @@ public class CsAppReportServiceImpl extends ServiceImpl<CsAppReportMapper, CsApp
|
|||||||
}
|
}
|
||||||
CsAppReport report = this.getById(id);
|
CsAppReport report = this.getById(id);
|
||||||
if (report == null) {
|
if (report == null) {
|
||||||
throw new BusinessException("事件缺失");
|
throw new BusinessException("报告记录缺失");
|
||||||
}
|
}
|
||||||
//生成暂态报告
|
//生成暂态报告
|
||||||
//step1: 获取暂态事件
|
//step1: 获取暂态事件
|
||||||
@@ -250,6 +254,13 @@ public class CsAppReportServiceImpl extends ServiceImpl<CsAppReportMapper, CsApp
|
|||||||
List<String> eventIdList = Arrays.asList(eventIds.split(","));
|
List<String> eventIdList = Arrays.asList(eventIds.split(","));
|
||||||
//获取事件集合
|
//获取事件集合
|
||||||
List<CsEventPO> eventList = eventFeignClient.getEventByIdList(eventIdList).getData();
|
List<CsEventPO> eventList = eventFeignClient.getEventByIdList(eventIdList).getData();
|
||||||
|
// 收集缺失波形文件的事件
|
||||||
|
List<CsEventPO> missingWaveEventList = eventList.stream()
|
||||||
|
.filter(item -> StringUtils.isBlank(item.getWavePath()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(missingWaveEventList)) {
|
||||||
|
throw new BusinessException("所选的暂态事件波形缺失,无法生成报告");
|
||||||
|
}
|
||||||
//获取监测点id集合
|
//获取监测点id集合
|
||||||
List<String> lineIdList = eventList.stream().map(CsEventPO::getLineId).distinct().collect(Collectors.toList());
|
List<String> lineIdList = eventList.stream().map(CsEventPO::getLineId).distinct().collect(Collectors.toList());
|
||||||
//获取监测点集合
|
//获取监测点集合
|
||||||
|
|||||||
Reference in New Issue
Block a user