| | |
| | | .average() |
| | | .orElse(0.0); |
| | | |
| | | System.out.println("results"+results); |
| | | |
| | | // 计算设备检查平均分(需要解析 device_res_map) |
| | | List<Float> deviceScores = results.stream() |
| | | .filter(e -> StringUtils.hasText(e.getDeviceResMap())) |
| | |
| | | } |
| | | |
| | | // 根据阈值判断类别(从高到低判断) |
| | | if (finalScore >= thresholdC) { |
| | | if (finalScore >= thresholdA) { |
| | | return "A"; |
| | | } else if (finalScore >= thresholdB) { |
| | | return "B"; |
| | | } else if (finalScore >= thresholdA) { |
| | | } else if (finalScore >= thresholdC) { |
| | | return "C"; |
| | | } else { |
| | | return null; // 不满足任何类别 |
| | | return "C"; // 不满足任何类别 |
| | | } |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!matchesRule) { |
| | | break; |
| | | } |
| | | //短路或开关 |
| | | // if (!matchesRule) { |
| | | // break; |
| | | // } |
| | | } |
| | | |
| | | if (matchesRule) { |