This commit is contained in:
wr
2025-03-06 08:46:15 +08:00
parent ae94e35607
commit 8419450427

View File

@@ -34,6 +34,7 @@ import com.njcn.gather.type.pojo.po.DevType;
import com.njcn.gather.type.service.IDevTypeService; import com.njcn.gather.type.service.IDevTypeService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.hamcrest.core.Is;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -205,7 +206,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
) )
.sorted(Comparator.comparing(PqScriptDtls::getPhase)) .sorted(Comparator.comparing(PqScriptDtls::getPhase))
.collect(Collectors.toList()); .collect(Collectors.toList());
issueAdd(volList, dtlsVList, HARM_V, INHARM_V, freqDtls.getValue(), "U", channelListDTOS, checkDataParam); issueAdd(volList, dtlsVList, HARM_V, INHARM_V, freqDtls.getValue(), "U", channelListDTOS, checkDataParam, isValueType);
//2.通道电流(ABC) //2.通道电流(ABC)
List<PqScriptDtls> curList = value.stream().filter(x -> CUR.equals(x.getValueType())) List<PqScriptDtls> curList = value.stream().filter(x -> CUR.equals(x.getValueType()))
@@ -217,7 +218,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
) )
.sorted(Comparator.comparing(PqScriptDtls::getPhase)) .sorted(Comparator.comparing(PqScriptDtls::getPhase))
.collect(Collectors.toList()); .collect(Collectors.toList());
issueAdd(curList, dtlsIList, HARM_I, INHARM_I, freqDtls.getValue(), "I", channelListDTOS, checkDataParam); issueAdd(curList, dtlsIList, HARM_I, INHARM_I, freqDtls.getValue(), "I", channelListDTOS, checkDataParam, isValueType);
issue.setChannelList(channelListDTOS); issue.setChannelList(channelListDTOS);
sourceIssues.add(issue); sourceIssues.add(issue);
@@ -867,7 +868,8 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
Double fFreq, Double fFreq,
String code, String code,
List<SourceIssue.ChannelListDTO> channelListDTOS, List<SourceIssue.ChannelListDTO> channelListDTOS,
PqScriptCheckDataParam checkDataParam) { PqScriptCheckDataParam checkDataParam,
Boolean isValueType) {
List<String> info = new ArrayList<>(); List<String> info = new ArrayList<>();
info.add("A"); info.add("A");
info.add("B"); info.add("B");
@@ -937,7 +939,11 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollUtil.isNotEmpty(dipList)) { if (CollUtil.isNotEmpty(dipList)) {
PqScriptDtls dip = dipList.get(0); PqScriptDtls dip = dipList.get(0);
dipDataDTO.setFTransValue(dip.getTransValue() * dtls.getValue()); if (isValueType) {
dipDataDTO.setFTransValue(dip.getTransValue() * dtls.getValue());
} else {
dipDataDTO.setFTransValue(dip.getTransValue());
}
// 1.0/频率*持续时间(周波)= 暂态持续时间s // 1.0/频率*持续时间(周波)= 暂态持续时间s
dipDataDTO.setFRetainTime(NumberUtil.round(1.0 / fFreq * dip.getRetainTime(), 3).doubleValue()); dipDataDTO.setFRetainTime(NumberUtil.round(1.0 / fFreq * dip.getRetainTime(), 3).doubleValue());
dipDataDTO.setRetainTime(dip.getRetainTime()); dipDataDTO.setRetainTime(dip.getRetainTime());