调整台账树

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

@@ -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);
}
});