This commit is contained in:
wr
2025-03-06 16:00:15 +08:00
parent 646e33d93a
commit e0e1b6ea9e

View File

@@ -129,7 +129,8 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
List<SourceIssue> sourceIssues = new ArrayList<>(); List<SourceIssue> sourceIssues = new ArrayList<>();
Set<Double> voltSet = new HashSet<>(1); Set<Double> voltSet = new HashSet<>(1);
Set<Double> currSet = new HashSet<>(1); Set<Double> currSet = new HashSet<>(1);
if (CollUtil.isNotEmpty(param.getDevIds())) { boolean devFly = CollUtil.isNotEmpty(param.getDevIds());
if (devFly) {
//校验终端额定电压电流是否相同 //校验终端额定电压电流是否相同
List<PqDev> list = pqDevService.list(new LambdaQueryWrapper<PqDev>() List<PqDev> list = pqDevService.list(new LambdaQueryWrapper<PqDev>()
.eq(PqDev::getPlanId, param.getPlanId()) .eq(PqDev::getPlanId, param.getPlanId())
@@ -206,7 +207,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, isValueType); issueAdd(volList, dtlsVList, HARM_V, INHARM_V, freqDtls.getValue(), "U", channelListDTOS, checkDataParam,devFly, 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()))
@@ -218,7 +219,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, isValueType); issueAdd(curList, dtlsIList, HARM_I, INHARM_I, freqDtls.getValue(), "I", channelListDTOS, checkDataParam,devFly, isValueType);
issue.setChannelList(channelListDTOS); issue.setChannelList(channelListDTOS);
sourceIssues.add(issue); sourceIssues.add(issue);
@@ -869,6 +870,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
String code, String code,
List<SourceIssue.ChannelListDTO> channelListDTOS, List<SourceIssue.ChannelListDTO> channelListDTOS,
PqScriptCheckDataParam checkDataParam, PqScriptCheckDataParam checkDataParam,
Boolean devFly,
Boolean isValueType) { Boolean isValueType) {
List<String> info = new ArrayList<>(); List<String> info = new ArrayList<>();
info.add("A"); info.add("A");
@@ -939,11 +941,14 @@ 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());
if(devFly){
if (isValueType) { if (isValueType) {
dipDataDTO.setFTransValue(dip.getTransValue() * dtls.getValue() * 0.01); dipDataDTO.setFTransValue(dip.getTransValue() * dtls.getValue() * 0.01);
} else { } else {
dipDataDTO.setFTransValue(dip.getTransValue()); 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());