调整台账树

This commit is contained in:
xy
2025-07-09 14:08:04 +08:00
parent 0f839dfd5b
commit 282a592a13
4 changed files with 27 additions and 4 deletions

View File

@@ -54,6 +54,9 @@ public class CsLedgerVO implements Serializable {
@ApiModelProperty(name = "conType",value = "接线方式 0-星型 1-角型 2-V型")
private Integer conType;
@ApiModelProperty(name = "process",value = "流程状态")
private Integer process;
@ApiModelProperty(name = "children",value = "子节点")
private List<CsLedgerVO> children = new ArrayList<>();

View File

@@ -20,8 +20,15 @@ public class EachModuleVO implements Serializable {
@ApiModelProperty("模块状态")
private String moduleState;
@ApiModelProperty("模块运行状态数据")
List<harmonicVo> dataList;
@ApiModelProperty("电压数据")
List<dataVo> vList;
@ApiModelProperty("电流数据")
List<dataVo> iList;
@Data
public static class harmonicVo implements Serializable {
@@ -41,4 +48,15 @@ public class EachModuleVO implements Serializable {
@ApiModelProperty("事件名称")
private String eventName;
}
@Data
public static class dataVo implements Serializable {
@ApiModelProperty("稳态数据时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime time;
@ApiModelProperty("数据")
private Double data;
}
}

View File

@@ -91,6 +91,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
item.setComFlag(po.getRunStatus());
item.setNDId(po.getNdid());
item.setType("device");
item.setProcess(po.getProcess());
})
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
.sorted(Comparator.comparing(CsLedgerVO::getSort))
@@ -223,6 +224,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
item.setComFlag(po.getRunStatus());
item.setNDId(po.getNdid());
item.setType("device");
item.setProcess(po.getProcess());
})
.filter(item -> Objects.equals(poMap.get(item.getId()).getUsageStatus(), 1))
.sorted(Comparator.comparing(CsLedgerVO::getSort))

View File

@@ -67,17 +67,17 @@ public class RStatIntegrityDServiceImpl extends MppServiceImpl<RStatIntegrityDMa
RStatIntegrityD data = new RStatIntegrityD();
//治理监测点
if (item.getClDid() == 0) {
statisticalDataDTO = commonService.getCounts(item.getLineId(),"apf_data","Apf_Freq","frequency","M","avg",item.getClDid().toString(),process.toString(),time+" 00:00:00",time+" 23:59:59");
statisticalDataDTO = commonService.getDataCounts(item.getLineId(),"apf_data","Apf_Freq","value","M","avg",item.getClDid().toString(),process.toString(),time+" 00:00:00",time+" 23:59:59");
}
//电能质量监测点
else {
statisticalDataDTO = commonService.getCounts(item.getLineId(),"pqd_data","Pq_Freq","frequency","M","avg",item.getClDid().toString(),process.toString(),time+" 00:00:00",time+" 23:59:59");
statisticalDataDTO = commonService.getDataCounts(item.getLineId(),"pqd_data","Pq_Freq","value","M","avg",item.getClDid().toString(),process.toString(),time+" 00:00:00",time+" 23:59:59");
}
data.setTimeId(LocalDate.parse(time, DatePattern.NORM_DATE_FORMATTER));
data.setLineIndex(item.getLineId());
data.setDueTime(dueCount);
data.setRealTime(statisticalDataDTO == null || statisticalDataDTO.getFrequency() == null
? 0 : Integer.parseInt(statisticalDataDTO.getFrequency()));
data.setRealTime(statisticalDataDTO == null || statisticalDataDTO.getValue() == null
? 0 : (int)Math.round(statisticalDataDTO.getValue()));
result.add(data);
}
});