调整台账树
This commit is contained in:
@@ -54,6 +54,9 @@ public class CsLedgerVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "conType",value = "接线方式 0-星型 1-角型 2-V型")
|
@ApiModelProperty(name = "conType",value = "接线方式 0-星型 1-角型 2-V型")
|
||||||
private Integer conType;
|
private Integer conType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "process",value = "流程状态")
|
||||||
|
private Integer process;
|
||||||
|
|
||||||
@ApiModelProperty(name = "children",value = "子节点")
|
@ApiModelProperty(name = "children",value = "子节点")
|
||||||
private List<CsLedgerVO> children = new ArrayList<>();
|
private List<CsLedgerVO> children = new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,15 @@ public class EachModuleVO implements Serializable {
|
|||||||
@ApiModelProperty("模块状态")
|
@ApiModelProperty("模块状态")
|
||||||
private String moduleState;
|
private String moduleState;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块运行状态数据")
|
||||||
List<harmonicVo> dataList;
|
List<harmonicVo> dataList;
|
||||||
|
|
||||||
|
@ApiModelProperty("电压数据")
|
||||||
|
List<dataVo> vList;
|
||||||
|
|
||||||
|
@ApiModelProperty("电流数据")
|
||||||
|
List<dataVo> iList;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class harmonicVo implements Serializable {
|
public static class harmonicVo implements Serializable {
|
||||||
|
|
||||||
@@ -41,4 +48,15 @@ public class EachModuleVO implements Serializable {
|
|||||||
@ApiModelProperty("事件名称")
|
@ApiModelProperty("事件名称")
|
||||||
private String eventName;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setComFlag(po.getRunStatus());
|
item.setComFlag(po.getRunStatus());
|
||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
|
item.setProcess(po.getProcess());
|
||||||
})
|
})
|
||||||
.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))
|
||||||
@@ -223,6 +224,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
item.setComFlag(po.getRunStatus());
|
item.setComFlag(po.getRunStatus());
|
||||||
item.setNDId(po.getNdid());
|
item.setNDId(po.getNdid());
|
||||||
item.setType("device");
|
item.setType("device");
|
||||||
|
item.setProcess(po.getProcess());
|
||||||
})
|
})
|
||||||
.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))
|
||||||
|
|||||||
@@ -67,17 +67,17 @@ public class RStatIntegrityDServiceImpl extends MppServiceImpl<RStatIntegrityDMa
|
|||||||
RStatIntegrityD data = new RStatIntegrityD();
|
RStatIntegrityD data = new RStatIntegrityD();
|
||||||
//治理监测点
|
//治理监测点
|
||||||
if (item.getClDid() == 0) {
|
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 {
|
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.setTimeId(LocalDate.parse(time, DatePattern.NORM_DATE_FORMATTER));
|
||||||
data.setLineIndex(item.getLineId());
|
data.setLineIndex(item.getLineId());
|
||||||
data.setDueTime(dueCount);
|
data.setDueTime(dueCount);
|
||||||
data.setRealTime(statisticalDataDTO == null || statisticalDataDTO.getFrequency() == null
|
data.setRealTime(statisticalDataDTO == null || statisticalDataDTO.getValue() == null
|
||||||
? 0 : Integer.parseInt(statisticalDataDTO.getFrequency()));
|
? 0 : (int)Math.round(statisticalDataDTO.getValue()));
|
||||||
result.add(data);
|
result.add(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user