微调
This commit is contained in:
@@ -1295,6 +1295,12 @@ public class SocketDevResponseService {
|
|||||||
|
|
||||||
if (targetTestMap.containsKey(sourceIssue.getType())) {
|
if (targetTestMap.containsKey(sourceIssue.getType())) {
|
||||||
List<DevLineTestResult> devLineTestResultList = targetTestMap.get(sourceIssue.getType());
|
List<DevLineTestResult> devLineTestResultList = targetTestMap.get(sourceIssue.getType());
|
||||||
|
devListRes.forEach(it1 -> {
|
||||||
|
devLineTestResultList.stream().filter(it2 -> it2.getDeviceId().equals(it1.getDeviceId())).findFirst().ifPresent(it2 -> {
|
||||||
|
setNewChnResult(it2.getChnResult(), it1.getChnResult());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
devLineTestResultList.addAll(devListRes);
|
devLineTestResultList.addAll(devListRes);
|
||||||
} else {
|
} else {
|
||||||
targetTestMap.put(sourceIssue.getType(), devListRes);
|
targetTestMap.put(sourceIssue.getType(), devListRes);
|
||||||
@@ -1307,6 +1313,26 @@ public class SocketDevResponseService {
|
|||||||
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(webSocketVO));
|
WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(webSocketVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setNewChnResult(Integer[] oldChnResult, Integer[] newChnResult) {
|
||||||
|
for (int i = 0; i < oldChnResult.length; i++) {
|
||||||
|
if (newChnResult[i] == 2) {
|
||||||
|
oldChnResult[i] = 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (newChnResult[i] == 3 && oldChnResult[i] != 2) {
|
||||||
|
oldChnResult[i] = 3;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (newChnResult[i] == 4 && oldChnResult[i] != 2) {
|
||||||
|
oldChnResult[i] = 4;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (newChnResult[i] == 5 && oldChnResult[i] != 2 && oldChnResult[i] != 3 && oldChnResult[i] != 4) {
|
||||||
|
oldChnResult[i] = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回大项检测结果,默认遇到 4,5时认为不参与计算
|
* 返回大项检测结果,默认遇到 4,5时认为不参与计算
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user