This commit is contained in:
wr
2024-12-30 09:34:02 +08:00
parent 7f5c132573
commit 82afff2a6e
5 changed files with 71 additions and 30 deletions

View File

@@ -163,7 +163,7 @@ public class SourceIssue {
* 谐波次数
*/
@JSONField(name = "harm", ordinal = 1)
private Integer harm;
private Double harm;
/**
* 谐波含有率

View File

@@ -43,9 +43,9 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
List<PqScriptCheckData> pqScriptCheckData = this.getBaseMapper().selectJoinList(PqScriptCheckData.class, queryWrapper);
if(CollUtil.isNotEmpty(pqScriptCheckData)){
if (param.getIsValueTypeName()) {
return pqScriptCheckData.stream().map(x -> x.getDataType() + "$" + x.getValueType()).collect(Collectors.toList());
return pqScriptCheckData.stream().map(x -> x.getDataType() + "$" + x.getValueType()).distinct().collect(Collectors.toList());
} else {
return pqScriptCheckData.stream().map(PqScriptCheckData::getValueType).collect(Collectors.toList());
return pqScriptCheckData.stream().map(PqScriptCheckData::getValueType).distinct().collect(Collectors.toList());
}
}
return new ArrayList<>();

View File

@@ -139,6 +139,9 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
* VOL-Harm:谐波对电压测量的影响
*/
List<PqScriptDtls> freq = value.stream().filter(x -> FREQ.equals(x.getValueType())).collect(Collectors.toList());
if(key==6){
System.out.println();
}
if (CollUtil.isNotEmpty(freq)) {
PqScriptDtls freqDtls = freq.get(0);
SourceIssue issue = new SourceIssue();
@@ -343,7 +346,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
SourceIssue.ChannelListDTO.HarmModel harmModel;
for (PqScriptDtls pqScriptDtls : phaseHarmVList) {
harmModel = new SourceIssue.ChannelListDTO.HarmModel();
harmModel.setHarm(pqScriptDtls.getHarmNum().intValue());
harmModel.setHarm(pqScriptDtls.getHarmNum().doubleValue());
harmModel.setFApm(pqScriptDtls.getValue());
harmModel.setFPhase(pqScriptDtls.getAngle());
info.add(harmModel);