diff --git a/zc-business/src/main/java/com/zc/business/domain/DcTrafficMetricsData.java b/zc-business/src/main/java/com/zc/business/domain/DcTrafficMetricsData.java index 29e180af..3fee49b5 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcTrafficMetricsData.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcTrafficMetricsData.java @@ -63,7 +63,7 @@ public class DcTrafficMetricsData { private Integer congestedSectionQuantity; /** - * 拥堵里程 + * 拥堵里程(单位:m) */ private Integer congestedDistance; } diff --git a/zc-business/src/main/java/com/zc/business/enums/ChannelCongestionLevelEnum.java b/zc-business/src/main/java/com/zc/business/enums/ChannelCongestionLevelEnum.java index f151e262..24922754 100644 --- a/zc-business/src/main/java/com/zc/business/enums/ChannelCongestionLevelEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/ChannelCongestionLevelEnum.java @@ -22,17 +22,17 @@ public enum ChannelCongestionLevelEnum { /** * 表示通道轻度拥堵,速度阈值为40 km/h */ - LIGHT_CONGESTION(40, 1, "轻度拥堵"), + LIGHT_CONGESTION(40, 1000, "轻度拥堵"), /** * 表示通道中度拥堵,速度阈值为20 km/h */ - MEDIUM_CONGESTION(20, 2, "中度拥堵"), + MEDIUM_CONGESTION(20, 2000, "中度拥堵"), /** * 使用负数作为默认值,表示无限小,始终小于其他速度阈值,表示通道严重拥堵 */ - SEVERE_CONGESTION(-1, 4, "严重拥堵"); + SEVERE_CONGESTION(-1, 4000, "严重拥堵"); /** * 速度阈值,用于判断通道拥挤程度 @@ -55,9 +55,9 @@ public enum ChannelCongestionLevelEnum { * @param speedThreshold 速度阈值 * @param description 等级描述 */ - ChannelCongestionLevelEnum(int speedThreshold, int defaultCongestionMiles, String description) { + ChannelCongestionLevelEnum(int speedThreshold, int defaultCongestionDistance, String description) { this.speedThreshold = speedThreshold; - this.defaultCongestionDistance = defaultCongestionMiles; + this.defaultCongestionDistance = defaultCongestionDistance; this.description = description; } diff --git a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java index 657927ac..1be1f17c 100644 --- a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java +++ b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java @@ -444,6 +444,7 @@ public class TrafficAnalysis { totalCongestionDistance.addAndGet(defaultCongestionDistance); } else { totalCongestionDistance.addAndGet(congestionDistance); + // 如果当前路段被计算过,则累加拥堵路段数量 congestedSectionQuantity.addAndGet(1); } }