1.告警统计算法调整

2.告警统计详情接口代码逻辑调整
This commit is contained in:
wr
2024-02-29 20:10:28 +08:00
parent 945ae25c07
commit 8022b12b4c
3 changed files with 32 additions and 106 deletions

View File

@@ -74,7 +74,7 @@ public class RStatHarmonicOrgServiceImpl implements RStatHarmonicOrgService {
private final RStatHarmonicOrgQPOService rStatHarmonicQPOService;
private final RStatHarmonicOrgYPOService rStatHarmonicYPOService;
DecimalFormat df = new DecimalFormat("0.00");
DecimalFormat df = new DecimalFormat("0.00000");

View File

@@ -109,8 +109,8 @@ public class RAlarmCountServiceImpl implements RAlarmCountService {
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new));
// 获取前 30% 的告警 id 数量
int top30PercentCount = (int) (sortedAvgStatusOneCountByAlarmId.size() * 0.3) + 1;
double v = sortedAvgStatusOneCountByAlarmId.size() * 0.3;
int top30PercentCount = (int) (v<1?Math.ceil(v):v);
RStatZwAlarmCountWPO rStatZwAlarmCountWPO = new RStatZwAlarmCountWPO();
rStatZwAlarmCountWPO.setOrgNo(deptGetChildrenMoreDTO.getUnitId());
rStatZwAlarmCountWPO.setDataDate(localDate);