This commit is contained in:
wr
2025-01-16 09:31:41 +08:00
parent ec2242bc35
commit bab07585a9

View File

@@ -908,8 +908,6 @@ public class SocketDevResponseService {
}
Map<String, List<DevLineTestResult>> targetTestMap = new HashMap<>();
/**
@@ -1199,8 +1197,8 @@ public class SocketDevResponseService {
.sorted(Comparator.comparing(SourceIssue.ChannelListDTO::getChannelType))
.collect(Collectors.toList());
Map<String, String> sourceMessageMap = sourceMessage(issue);
List<String> v = Arrays.asList("VRMS", "VA", "U", "V");
List<String> i = Arrays.asList("IRMS", "IA", "I", "I");
List<String> v = Arrays.asList("VRMS", "VA", "U", "V", "电压");
List<String> i = Arrays.asList("IRMS", "IA", "I", "I", "电流");
devMap.forEach((key, value) -> {
List<DevData.SqlDataDTO> sqlData = value.stream().flatMap(x -> x.getSqlData().stream()).collect(Collectors.toList());
getResult(key, sqlData, sourceMessageMap, sourceV, info, v);
@@ -1226,7 +1224,7 @@ public class SocketDevResponseService {
}
compareDev.setDevName(devName);
compareDev.setLineNum(split[1]);
getSourceCompareDev(type.get(2), dataV, dataVPhase, compareDev, sourceMessageMap.get(type.get(3)), sourceV);
getSourceCompareDev(type.get(2), dataV, dataVPhase, compareDev, sourceMessageMap.get(type.get(3)), sourceV, type.get(4));
info.add(compareDev);
}
@@ -1244,16 +1242,18 @@ public class SocketDevResponseService {
List<DevData.SqlDataDTO> dataPhase,
SourceCompareDev compareDev,
String desc,
List<SourceIssue.ChannelListDTO> channelList
List<SourceIssue.ChannelListDTO> channelList,
String name
) {
//源信息
Map<String, SourceIssue.ChannelListDTO> sourceMap = channelList.stream()
.collect(Collectors.toMap(x -> x.getChannelType(), Function.identity()));
compareDev.setIsQualified(getaBoolean(sourceMap.get(type + "a"), data.get(0).getList().getA(), dataPhase.get(0).getList().getA()));
compareDev.setIsQualified(getaBoolean(sourceMap.get(type + "b"), data.get(0).getList().getB(), dataPhase.get(0).getList().getB()));
compareDev.setIsQualified(getaBoolean(sourceMap.get(type + "c"), data.get(0).getList().getC(), dataPhase.get(0).getList().getC()));
compareDev.setDesc((compareDev.getIsQualified() ? "合格->" : "不合格->") + desc + stepTag + devMessage(type, data, dataPhase));
Boolean a = getaBoolean(sourceMap.get(type + "a"), data.get(0).getList().getA(), dataPhase.get(0).getList().getA());
Boolean b = getaBoolean(sourceMap.get(type + "b"), data.get(0).getList().getB(), dataPhase.get(0).getList().getB());
Boolean c = getaBoolean(sourceMap.get(type + "c"), data.get(0).getList().getC(), dataPhase.get(0).getList().getC());
compareDev.setIsQualified(a && b && c);
compareDev.setDesc(name + (compareDev.getIsQualified() ? "合格->" : "不合格->") + desc + stepTag + devMessage(type, data, dataPhase));
return compareDev;
}
@@ -1546,7 +1546,7 @@ public class SocketDevResponseService {
}
public void backCheckState(PreDetectionParam param) {
if (CollUtil.isNotEmpty(param.getDevIds()) && StrUtil.isNotBlank(param.getPlanId())) {
if (CollUtil.isNotEmpty(param.getDevIds()) && StrUtil.isNotBlank(param.getPlanId())&&"1".equals(param.getOperateType())) {
adPlanService.updateBackTestState(param.getPlanId(), param.getDevIds());
}
}