告警修改
This commit is contained in:
+6
@@ -153,6 +153,12 @@ public class BiPlatformRealDataService {
|
||||
}
|
||||
fp.put("taskTypeStatistics", m);
|
||||
}
|
||||
// 月台告警统计:按业务要求恒为 0,纳入指纹以确保旧快照(可能含非0写死值)能被覆盖更新为 0
|
||||
if (vo.getPlatformAlarmStatistics() != null) {
|
||||
fp.put("todayAlarmTotal", vo.getPlatformAlarmStatistics().getTodayAlarmTotal());
|
||||
fp.put("handled", vo.getPlatformAlarmStatistics().getHandled());
|
||||
fp.put("unhandled", vo.getPlatformAlarmStatistics().getUnhandled());
|
||||
}
|
||||
return objectMapper.writeValueAsString(fp);
|
||||
}
|
||||
|
||||
|
||||
+4
-17
@@ -185,13 +185,8 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
||||
.build());
|
||||
}
|
||||
|
||||
// 月台告警:按业务要求,全部置 0(趋势/统计/分布均不生成写死数据)
|
||||
List<PlatformAlarmTrendItemVO> alarmTrend = new ArrayList<>();
|
||||
for (int i = 0; i < Baseline.P_AL_D.length; i++) {
|
||||
alarmTrend.add(PlatformAlarmTrendItemVO.builder()
|
||||
.date(Baseline.P_AL_D[i])
|
||||
.alarmCount(Math.max(0, jitterInt(Baseline.P_AL_C[i], r)))
|
||||
.build());
|
||||
}
|
||||
|
||||
List<TaskTypeCountItemVO> typeCounts = new ArrayList<>();
|
||||
for (int i = 0; i < Baseline.P_TT_TYPES.length; i++) {
|
||||
@@ -201,19 +196,11 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
||||
.build());
|
||||
}
|
||||
|
||||
int todayAl = Math.max(0, jitterInt(Baseline.P_AL_TOT, r));
|
||||
int handled = Math.max(0, jitterInt(Baseline.P_AL_H, r));
|
||||
handled = Math.min(handled, todayAl);
|
||||
int unhandled = Math.max(0, todayAl - handled);
|
||||
int todayAl = 0;
|
||||
int handled = 0;
|
||||
int unhandled = 0;
|
||||
|
||||
// 月台告警分布:按业务要求,全部置 0
|
||||
List<PlatformAlarmDistItemVO> dist = new ArrayList<>();
|
||||
for (int i = 0; i < Baseline.P_DIST_T.length; i++) {
|
||||
dist.add(PlatformAlarmDistItemVO.builder()
|
||||
.type(Baseline.P_DIST_T[i])
|
||||
.count(Math.max(0, jitterInt(Baseline.P_DIST_C[i], r)))
|
||||
.build());
|
||||
}
|
||||
|
||||
return PlatformSurveillanceVO.builder()
|
||||
.vehicles(vehicles)
|
||||
|
||||
Reference in New Issue
Block a user