检测计划相关功能代码

This commit is contained in:
caozehui
2025-07-22 09:11:21 +08:00
parent 95d5396759
commit a67c5de69d
9 changed files with 151 additions and 105 deletions

View File

@@ -28,7 +28,7 @@ public enum DetectionCodeEnum {
V_UNBAN("V_UNBAN", "三相电压负序不平衡度"),
I_UNBAN("I_UNBAN", "三相电流负序不平衡度"),
PST("PST", "短时间闪变"),
P("P", "功率"),
P_FUND("P_FUND", "功率"),
I1("I1", "基波电流"),

View File

@@ -61,6 +61,7 @@ public class DetectionServiceImpl {
private final String U = "U";
private final String I = "I";
private final String F = "F";
private final String HP = "HP";
private final String P = "P";
private final String MAG = "MAG";
private final String DUR = "DUR";
@@ -157,7 +158,7 @@ public class DetectionServiceImpl {
* 谐波有功功率
*/
case HP:
AdHarmonicResult harmP = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, P, sourceIssue, dataRule, 2);
AdHarmonicResult harmP = isHarmQualified(dev, devIdMapComm, errDtlsCheckData, HP, sourceIssue, dataRule, 2);
if (ObjectUtil.isNotNull(harmP)) {
detectionDataDealService.acceptAdResult(Arrays.asList(harmP), code);
return harmP.getResultFlag();
@@ -179,6 +180,8 @@ public class DetectionServiceImpl {
case VOLTAGE_MAG:
case VOLTAGE_DUR:
return isVoltageQualified(dev, devIdMapComm, errDtlsCheckData, sourceIssue, dataRule, code);
case P:
return isQualified(dev, devIdMapComm, errDtlsCheckData, P, sourceIssue, dataRule, code);
default:
return isUnknownQualified(dev, devIdMapComm, errDtlsCheckData, sourceIssue, dataRule, code);
}
@@ -290,8 +293,8 @@ public class DetectionServiceImpl {
harmCode = DetectionCodeEnum.SI_1_49.getCode();
}
}
if (devIndex.contains("P")) {
type = P;
if (devIndex.contains("HP")) {
type = HP;
harmCode = DetectionCodeEnum.P2_50.getCode();
fData = (sourceIssue.getFIn() * sourceIssue.getFUn()) * 0.01;
}
@@ -345,7 +348,7 @@ public class DetectionServiceImpl {
*
* @param dev 处理过后的数据
* @param errDtlsCheckData 误差体系
* @param type (电压还是电流)
* @param type (电压或者电流或者频率或者功率)
* @param sourceIssue 源下发所对应的参数
* @param dataRule 数据处理原则
* @param code 源下发的装置通道code(->desc)
@@ -373,6 +376,9 @@ public class DetectionServiceImpl {
if (F.equals(type)) {
fData = sourceIssue.getFFreq();
}
if (P.equals(type)) {
fData = sourceIssue.getFUn() * sourceIssue.getFIn();
}
AdNonHarmonicResult result = new AdNonHarmonicResult();
String[] split = dev.get(0).getId().split("_");
String devID = devIdMapComm.get(split[0]);
@@ -476,10 +482,14 @@ public class DetectionServiceImpl {
harmCode = DetectionCodeEnum.I2_50.getCode();
}
}
if (P.equals(type)) {
if (HP.equals(type)) {
fData = (sourceIssue.getFIn() * sourceIssue.getFUn()) * 0.01;
harmCode = DetectionCodeEnum.P2_50.getCode();
}
// if (P.equals(type)) {
// fData = (sourceIssue.getFIn() * sourceIssue.getFUn()) * 0.01;
// harmCode = DetectionCodeEnum.P_FUND.getCode();
// }
Map<String, Map<Double, List<Double>>> devMap = devHarmListMap(dev, sourceIssue, dataRule, fundCode, harmCode, num);
if (CollUtil.isNotEmpty(devMap)) {
AdHarmonicResult harmonicResult = new AdHarmonicResult();
@@ -930,7 +940,7 @@ public class DetectionServiceImpl {
List<DetectionData> info = new ArrayList<>();
//根据谐波几次相值/额定值
Map<Double, Double> issueHarmMap;
if (P.equals(type)) {
if (HP.equals(type)) {
List<PqScriptCheckData> checkData = pqScriptCheckDataService.list(new MPJLambdaWrapper<PqScriptCheckData>()
.eq(PqScriptCheckData::getScriptIndex, sourceIssue.getIndex())
.eq(PqScriptCheckData::getPhase, phase)

View File

@@ -10,54 +10,54 @@ import java.util.Arrays;
* @date 2025/3/27 14:58
*/
public class UnitUtil {
public static String unit(String code, Integer fly) {
String unit = "";
if (Arrays.asList(0, 1).contains(fly)) {
if (DetectionCodeEnum.FREQ.getCode().equals(code)) {
unit = "Hz";
}
if (DetectionCodeEnum.VRMS.getCode().equals(code)) {
unit = "V";
}
if (DetectionCodeEnum.IRMS.getCode().equals(code)) {
unit = "A";
}
if (DetectionCodeEnum.V2_50.getCode().equals(code) ||
DetectionCodeEnum.SV_1_49.getCode().equals(code)||
DetectionCodeEnum.V_UNBAN.getCode().equals(code) ||
DetectionCodeEnum.I_UNBAN.getCode().equals(code)
) {
unit = "%";
}
if (DetectionCodeEnum.I2_50.getCode().equals(code) ||
DetectionCodeEnum.SI_1_49.getCode().equals(code)
) {
unit = "A";
}
if (DetectionCodeEnum.P2_50.getCode().equals(code)) {
unit = "W";
}
if (DetectionCodeEnum.P.getCode().equals(code)) {
unit = "P";
}
if (DetectionCodeEnum.MAG.getCode().equals(code)) {
unit = "V";
}
if (DetectionCodeEnum.DUR.getCode().equals(code)) {
unit = "s";
}
if (DetectionCodeEnum.VA.getCode().equals(code) ||
DetectionCodeEnum.IA.getCode().equals(code)
) {
unit = "°";
}
if (DetectionCodeEnum.DELTA_V.getCode().equals(code)
) {
unit = "%";
}
}else{
unit = "%";
}
return unit;
}
// public static String unit(String code, Integer fly) {
// String unit = "";
// if (Arrays.asList(0, 1).contains(fly)) {
// if (DetectionCodeEnum.FREQ.getCode().equals(code)) {
// unit = "Hz";
// }
// if (DetectionCodeEnum.VRMS.getCode().equals(code)) {
// unit = "V";
// }
// if (DetectionCodeEnum.IRMS.getCode().equals(code)) {
// unit = "A";
// }
// if (DetectionCodeEnum.V2_50.getCode().equals(code) ||
// DetectionCodeEnum.SV_1_49.getCode().equals(code)||
// DetectionCodeEnum.V_UNBAN.getCode().equals(code) ||
// DetectionCodeEnum.I_UNBAN.getCode().equals(code)
// ) {
// unit = "%";
// }
// if (DetectionCodeEnum.I2_50.getCode().equals(code) ||
// DetectionCodeEnum.SI_1_49.getCode().equals(code)
// ) {
// unit = "A";
// }
// if (DetectionCodeEnum.P2_50.getCode().equals(code)) {
// unit = "W";
// }
// if (DetectionCodeEnum.P.getCode().equals(code)) {
// unit = "P";
// }
// if (DetectionCodeEnum.MAG.getCode().equals(code)) {
// unit = "V";
// }
// if (DetectionCodeEnum.DUR.getCode().equals(code)) {
// unit = "s";
// }
// if (DetectionCodeEnum.VA.getCode().equals(code) ||
// DetectionCodeEnum.IA.getCode().equals(code)
// ) {
// unit = "°";
// }
// if (DetectionCodeEnum.DELTA_V.getCode().equals(code)
// ) {
// unit = "%";
// }
// }else{
// unit = "%";
// }
// return unit;
// }
}

View File

@@ -125,7 +125,7 @@ public class PqDevParam {
private String delegate;
@ApiModelProperty("被检通道")
private String inspectChannel;
private List<String> inspectChannel;
@ApiModelProperty("投运日期")
@DateTimeStrValid(message = DetectionValidMessage.OPERATION_DATE_FORMAT_ERROR)

View File

@@ -144,6 +144,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
if (ObjectUtil.isNotEmpty(pqDevParam.getMonitorList())) {
pqMonitorService.addPqMonitorByDevId(id, pqDevParam.getMonitorList());
}
pqDev.setInspectChannel(String.join(StrUtil.COMMA, pqDevParam.getInspectChannel()));
}
pqDev.setImportFlag(0);
pqDev.setState(DataStateEnum.ENABLE.getCode());
@@ -200,6 +201,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
// 比对式设备修改监测点
if (PatternEnum.CONTRAST.getValue().equals(dictDataService.getDictDataById(updateParam.getPattern()).getCode())) {
pqMonitorService.updatePqMonitorByDevId(updateParam.getId(), updateParam.getMonitorList());
pqDev.setInspectChannel(String.join(StrUtil.COMMA, updateParam.getInspectChannel()));
}
return this.updateById(pqDev);
}

View File

@@ -1,11 +1,11 @@
package com.njcn.gather.plan.pojo.vo;
import com.njcn.gather.device.pojo.vo.PqDevVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
import java.util.Map;
/**
* @author caozehui
@@ -123,7 +123,7 @@ public class AdPlanVO {
/**
* 标准设备ID列表
*/
private List<String> standardDevIds;
private Map<String, Integer> standardDevMap;
/**
* 标准设备名称

View File

@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@@ -179,14 +178,22 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
List<String> planIdList = new ArrayList<>();
planIdList.add(adPlan.getId());
List<PqStandardDev> pqStandardDevs = adPlanStandardDevMapper.listByPlanId(planIdList);
adPlanVO.setStandardDevMap(pqStandardDevs.stream().collect(Collectors.toMap(PqStandardDev::getId, obj -> 0)));
adPlanVO.setStandardDevNameStr(pqStandardDevs.stream().map(PqStandardDev::getName).reduce((a, b) -> a + "," + b).orElse(""));
if (CommonEnum.FATHER_ID.getValue().equals(adPlan.getFatherPlanId())) {
List<AdPlan> childrenPlan = this.lambdaQuery().eq(AdPlan::getFatherPlanId, adPlan.getId()).eq(AdPlan::getState, DataStateEnum.ENABLE.getCode()).list();
List<String> childrenPlanIds = childrenPlan.stream().map(AdPlan::getId).collect(Collectors.toList());
planIdList.addAll(childrenPlanIds);
if (CollUtil.isNotEmpty(childrenPlanIds)) {
pqStandardDevs = adPlanStandardDevMapper.listByPlanId(childrenPlanIds);
} else {
pqStandardDevs.clear();
}
Map<String, Integer> standardDevIds = adPlanVO.getStandardDevMap();
standardDevIds.putAll(pqStandardDevs.stream().collect(Collectors.toMap(PqStandardDev::getId, obj -> 1)));
adPlanVO.setStandardDevNameStr(adPlanVO.getStandardDevNameStr() + pqStandardDevs.stream().map(PqStandardDev::getName).reduce((a, b) -> a + "," + b).orElse(""));
}
List<PqStandardDev> pqStandardDevs = adPlanStandardDevMapper.listByPlanId(planIdList);
adPlanVO.setStandardDevIds(pqStandardDevs.stream().map(PqStandardDev::getId).collect(Collectors.toList()));
adPlanVO.setStandardDevNameStr(pqStandardDevs.stream().map(PqStandardDev::getName).reduce((a, b) -> a + "," + b).orElse(""));
}
@Override
@@ -302,23 +309,29 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
List<String> childrenPlanIds = childrenPlan.stream().map(AdPlan::getId).collect(Collectors.toList());
// 修改与标准设备的关联关系
List<AdPlanStandardDev> adPlanStandardDevList = adPlanStandardDevService.lambdaQuery().in(CollectionUtil.isNotEmpty(childrenPlanIds), AdPlanStandardDev::getPlanId, childrenPlanIds).list();
if (CollUtil.isNotEmpty(adPlanStandardDevList)) {
throw new BusinessException(DetectionResponseEnum.PLEASE_UNASSIGN_STANDARD_DEV);
List<AdPlanStandardDev> adPlanStandardDevList = new ArrayList<>();
if (CollUtil.isNotEmpty(childrenPlanIds)) {
adPlanStandardDevList.addAll(adPlanStandardDevService.lambdaQuery().in(AdPlanStandardDev::getPlanId, childrenPlanIds).list());
}
//List<String> standardDevIds = adPlanStandardDevList.stream().map(AdPlanStandardDev::getStandardDevId).collect(Collectors.toList());
//param.getStandardDevIds().removeAll(standardDevIds);
// if (CollUtil.isNotEmpty(adPlanStandardDevList)) {
// throw new BusinessException(DetectionResponseEnum.PLEASE_UNASSIGN_STANDARD_DEV);
// }
List<String> standardDevIds = adPlanStandardDevList.stream().map(AdPlanStandardDev::getStandardDevId).collect(Collectors.toList());
param.getStandardDevIds().removeAll(standardDevIds);
adPlanStandardDevService.updateAdPlanStandardDev(param.getId(), param.getStandardDevIds());
// 修改与被检设备的关联关系
PqDevParam.QueryParam param1 = new PqDevParam.QueryParam();
param1.setPlanIdList(childrenPlanIds);
List<PqDevVO> pqDevVOList = pqDevService.listByPlanId(param1);
if (CollUtil.isNotEmpty(pqDevVOList)) {
throw new BusinessException(DetectionResponseEnum.PLEASE_UNASSIGN_DEVICE);
}
// List<String> devIds = pqDevVOList.stream().map(PqDevVO::getId).collect(Collectors.toList());
// param.getDevIds().removeAll(devIds);
// if (CollUtil.isNotEmpty(pqDevVOList)) {
// throw new BusinessException(DetectionResponseEnum.PLEASE_UNASSIGN_DEVICE);
// }
List<String> devIds = pqDevVOList.stream().map(PqDevVO::getId).collect(Collectors.toList());
param.getDevIds().removeAll(devIds);
plan2.setTestState(pqDevService.bind(param.getId(), param.getDevIds()));
} else {
// 修改检测计划、检测源关联

View File

@@ -25,6 +25,7 @@ public enum ResultUnitEnum {
IMBV("%", "电压不平衡度","IMBV"),
IMBA("%", "电流不平衡度","IMBA"),
F("","闪变","F"),
P("W", "功率","P"),
UNKNOWN("","未知","UNKNOWN"),
;

View File

@@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.gather.detection.pojo.enums.DetectionCodeEnum;
import com.njcn.gather.detection.pojo.enums.SourceOperateCodeEnum;
import com.njcn.gather.detection.pojo.param.PreDetectionParam;
import com.njcn.gather.device.pojo.enums.CommonEnum;
import com.njcn.gather.device.pojo.po.PqDev;
@@ -437,7 +436,8 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
channelListDTO.setPid(dictTree.getPid());
DetectionCodeEnum codeEnum = DetectionCodeEnum.getDetectionCodeByCode(dictTree.getCode());
List<PqScriptDtlsParam.ChannelListDTO> channelList = sourceIssue.getChannelList();
List<PqScriptDtlsParam.ChannelListDTO> list;
List<PqScriptDtlsParam.ChannelListDTO> channelU;
List<PqScriptDtlsParam.ChannelListDTO> channelI;
List<PqScriptCheckData> checkArchive;
if (checkDataOldMap.containsKey(codeEnum.getCode())) {
checkArchive = checkDataOldMap.get(codeEnum.getCode());
@@ -462,20 +462,20 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
case U1:
case VRMS:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, list, checkArchive, false);
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, channelU, checkArchive, false);
}
break;
case DELTA_V:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, list, checkArchive, true);
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, channelU, checkArchive, true);
}
break;
case VA:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : list) {
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
if (listDTO.getChannelFlag()) {
checkData = new PqScriptDtlsParam.CheckData();
checkData.setErrorFlag(channelListDTO.getErrorFlag());
@@ -491,23 +491,23 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
break;
case V2_50:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
harmCheck(info, channelListDTO, list, checkArchive);
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
harmCheck(info, channelListDTO, channelU, checkArchive);
}
break;
case I2_50:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
harmCheck(info, channelListDTO, list, checkArchive);
channelI = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
harmCheck(info, channelListDTO, channelI, checkArchive);
}
break;
case P2_50:
List<PqScriptDtlsParam.ChannelListDTO> channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
if (CollUtil.isNotEmpty(channelU)) {
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
if (listDTO.getHarmFlag()) {
//获取电流通道
List<PqScriptDtlsParam.ChannelListDTO> channelI = channelList.stream()
channelI = channelList.stream()
.filter(PqScriptDtlsParam.ChannelListDTO::getHarmFlag)
.filter(x -> x.getChannelType().contains("I" + listDTO.getChannelType().substring(1, 2)))
.collect(Collectors.toList());
@@ -538,19 +538,19 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
break;
case SV_1_49:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
inHarmCheck(info, channelListDTO, list, checkArchive);
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
inHarmCheck(info, channelListDTO, channelU, checkArchive);
}
break;
case SI_1_49:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
inHarmCheck(info, channelListDTO, list, checkArchive);
channelI = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
inHarmCheck(info, channelListDTO, channelI, checkArchive);
}
break;
case MAG:
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : list) {
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
if (listDTO.getDipFlag()) {
checkData = new PqScriptDtlsParam.CheckData();
checkData.setErrorFlag(channelListDTO.getErrorFlag());
@@ -561,8 +561,8 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
}
break;
case DUR:
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : list) {
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
if (listDTO.getDipFlag()) {
checkData = new PqScriptDtlsParam.CheckData();
checkData.setErrorFlag(channelListDTO.getErrorFlag());
@@ -575,22 +575,22 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
case IRMS:
case IA:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, list, checkArchive, false);
channelI = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
rmsCheck(info, channelListDTO, channelI, checkArchive, false);
}
break;
case V_UNBAN:
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
unbanCheck(info, channelListDTO, list, checkArchive);
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
unbanCheck(info, channelListDTO, channelU, checkArchive);
break;
case I_UNBAN:
list = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
unbanCheck(info, channelListDTO, list, checkArchive);
channelI = channelList.stream().filter(x -> x.getChannelType().contains("I")).collect(Collectors.toList());
unbanCheck(info, channelListDTO, channelI, checkArchive);
break;
case PST:
if (CollUtil.isNotEmpty(channelList)) {
list = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : list) {
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
if (listDTO.getFlickerFlag()) {
checkData = new PqScriptDtlsParam.CheckData();
checkData.setErrorFlag(channelListDTO.getErrorFlag());
@@ -605,6 +605,26 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
break;
case I1:
break;
case P_FUND:
channelU = channelList.stream().filter(x -> x.getChannelType().contains("U")).collect(Collectors.toList());
if (CollUtil.isNotEmpty(channelU)) {
for (PqScriptDtlsParam.ChannelListDTO listDTO : channelU) {
//获取电流通道
channelI = channelList.stream()
.filter(PqScriptDtlsParam.ChannelListDTO::getHarmFlag)
.filter(x -> x.getChannelType().contains("I" + listDTO.getChannelType().substring(1, 2)))
.collect(Collectors.toList());
if (CollUtil.isNotEmpty(channelI)) {
checkData = new PqScriptDtlsParam.CheckData();
checkData.setErrorFlag(channelListDTO.getErrorFlag());
checkData.setEnable(channelListDTO.getEnable());
//电压*电流*cos电压角度-电流角度)
checkData.setValue(channelI.get(0).getFAmp() * listDTO.getFAmp() * Math.cos(listDTO.getFPhase() - channelI.get(0).getFPhase()));
setCheck(info, checkData, channelListDTO, checkArchive, listDTO);
}
}
}
break;
case UNKNOWN_ERROR:
break;
default: